Prove the formula for the maximum of two numbers

In summary, you should consider two cases: x>y and y>x. Then use that with the definition of absolute value. That should show the right results.
  • #1
nietzsche
186
0

Homework Statement



The maximum of two numbers x and y is denoted by max(x,y). Thus max(-1,3) = max (3,3) = 3. Prove that:

[tex]
\mathrm{max}(x,y) = \frac{x+y+|y-x|}{2}[/tex]

Homework Equations



N/A

The Attempt at a Solution



I have no idea where to begin. I've thought about it for a long time, I swear! Any hints on how to get started?
 
Physics news on Phys.org
  • #2
You'll need to consider two cases: x>y and y>x. Then use that with the definition of absolute value. That should show the right results.
 
  • #3
Here's an attempt:

Assume x > y .

[tex]
\begin{align*}
\mathrm{max}(x,y) &= \frac{x+y+x-y}{2}\\
\mathrm{max}(x,y) &= \frac{x+y+|x-y|}{2}\\
\mathrm{max}(x,y) &= \frac{x+y+|y-x|}{2}
\end{align*}
[/tex]

But I haven't proved it yet...
 
  • #4
Brian-san said:
You'll need to consider two cases: x>y and y>x. Then use that with the definition of absolute value. That should show the right results.

Okay, so I'm on the right track with that last post.

Assume y > x .
[tex]
\begin{align*}
\mathrm{max}(x,y) &= \frac{x+y-x+y}{2}\\
&= \frac{x+y+|y-x|}{2}
\end{align*}
[/tex]
 
  • #5
So is that a sufficient proof? Because it could just as well be

[tex]
\mathrm{max}(x,y) = \frac{x+y+|x-y|}{2}
[/tex]

couldn't it?
 
  • #6
With each case, you can show that the formula leaves you with one value x, or y, that should be enough for the proof.
 
  • #7
Brian-san said:
With each case, you can show that the formula leaves you with one value x, or y, that should be enough for the proof.

Ah, thank you very much.
 
  • #8
(1) Assume x > y .

[tex]
\begin{align*}
\mathrm{max}(x,y) &= \frac{x+y+|y-x|}{2}\\
&= \frac{x+y+(x-y)}{2}\\
&= \frac{2x}{2}\\
&= x
\end{align*}
[/tex](2) Now assume y > x .

[tex]
\begin{align*}
\mathrm{max}(x,y) &= \frac{x+y+|y-x|}{2}\\
&= \frac{x+y+(y-x)}{2}\\
&= \frac{2y}{2}\\
&= y
\end{align*}
[/tex]Therefore:
[tex]
\mathrm{max}(x,y) &= \frac{x+y+|y-x|}{2}
[/tex]

is true for all values of x,y provided x,y are real numbers.

(Although I'm still not thoroughly convinced that it's sufficient...)
 
  • #9
Since x and y are arbitrary real numbers, I don't see why it wouldn't be considered a strong enough proof. You can make an argument about how you come to that particular formula, but I don't think it's necessary.
 
  • #10
There is the third possibility that y=x. Include and your proof is complete.

ehild
 
  • #11
ehild said:
There is the third possibility that y=x. Include and your proof is complete.

ehild

Thanks very much.
 
  • #12
you're reading from the spivak textbook are you? your post on x^2 + xy + y^2 > 0 was also an exercise from the textbook
 
  • #13
yes i am. it's such an awful textbook, it gives practically no examples.

or maybe i should say that it's a textbook that require a bit more thinking...
 

What is the formula for finding the maximum of two numbers?

The formula for finding the maximum of two numbers is simple: the maximum of two numbers is the larger number of the two. This means that if you have two numbers, x and y, the maximum would be whichever number is larger, whether it is x or y.

Can you prove that the maximum of two numbers is the larger number?

Yes, we can prove this by using the mathematical property of the transitive relation. This property states that if a is greater than b, and b is greater than c, then a is greater than c. In this case, we can say that if x is greater than y, and y is greater than z, then x must be greater than z. Therefore, the maximum of two numbers must be the larger number.

Is there a specific mathematical equation that represents the maximum of two numbers?

Yes, the maximum of two numbers can be represented by the following equation: max(x,y) = (x + y + |x - y|) / 2. This equation takes the sum of the two numbers and adds the absolute value of their difference, then divides the result by 2. This will always result in the larger number being the maximum.

Do you need to use a specific method or algorithm to find the maximum of two numbers?

No, there is no specific method or algorithm that is required to find the maximum of two numbers. As mentioned before, the maximum is simply the larger number of the two. This can be determined by comparing the two numbers and selecting the larger one.

Why is it important to know the formula for the maximum of two numbers?

Knowing the formula for the maximum of two numbers is important because it allows us to easily find the larger number of two values. This can be useful in various mathematical and scientific applications, such as data analysis, optimization problems, and decision making processes.

Similar threads

  • Precalculus Mathematics Homework Help
Replies
21
Views
2K
  • Precalculus Mathematics Homework Help
Replies
6
Views
1K
  • Precalculus Mathematics Homework Help
Replies
17
Views
1K
  • Precalculus Mathematics Homework Help
Replies
3
Views
2K
  • Precalculus Mathematics Homework Help
Replies
5
Views
954
  • Precalculus Mathematics Homework Help
2
Replies
57
Views
3K
  • Introductory Physics Homework Help
Replies
6
Views
231
  • Precalculus Mathematics Homework Help
Replies
8
Views
1K
  • Precalculus Mathematics Homework Help
Replies
8
Views
2K
  • Precalculus Mathematics Homework Help
Replies
21
Views
766
Back
Top