Proofs of max and min formulas for 2 numbers

AI Thread Summary
The discussion centers on proving the formulas for the maximum and minimum of two numbers, max(x,y) and min(x,y). The initial proofs were deemed too informal, prompting a suggestion to apply the trichotomy law and consider three cases: when x equals y, when x is less than y, and when x is greater than y. The revised proof effectively demonstrates that max(x,y) can be expressed as (x + y + |y - x|) / 2, covering all scenarios for any real numbers x and y. The participants agree that the revised approach is clearer and more concise.
nike5
Messages
13
Reaction score
0

Homework Statement


The maximum of 2 numbers x and y is denoted by max(x,y) and the minimum of 2 numbers
x and y is denoted by min(x,y). Prove that max(x,y) = (x + y + l y - x l) / 2
and min(x,y) = (x + y - ly - xl ) / 2.



Homework Equations





The Attempt at a Solution


Theorem. max(x,y) = (x + y + l y - x l) / 2
Proof. Let x and y be arbitrary real numbers. Then the midpoint between x and y is represented by (a + b) / 2. Therefore, (a + b ) / 2 is l y - x l / 2 numbers less than
max(x, y). Then adding l y - x l / 2 to (a + b ) / 2 yields ( x + y + l y - x l / 2 = max(x, y).

Theorem. min( x, y) = (x + y - l y - x l) / 2
Proof. Let x and y be arbitrary real numbers. Then the midpoint between x and y is represented by (a + b ) /2 . Therefore, (a + b) /2 is l y - x l) / 2 greater than min(x, y). Then subtracting l y - x l) / 2 from (a + b ) / 2 yields (x + y - l y - x l) / 2 = min( x,y).

Is the reasoning in these proofs too informal? Should I instead use the trichotomy law and prove the formulas by the three cases
 
Physics news on Phys.org
Hi nike5! :smile:

(you should be able to find a | on your keyboard somewhere near the " :wink:)
nike5 said:
… Should I instead use the trichotomy law and prove the formulas by the three cases

Short answer … yes! :biggrin:
 
And you should get rid of the a and b. You're given x and y, so use them instead.
 
Proof take 2
Theorem. max (x, y) = (x + y + |y - x|) / 2
Proof. Let x and y be arbitrary real numbers. We will consider three cases.
Case 1. x = y. Then max ( x, y) = x = y = ( x + y) / 2 = [(x + y) / 2] + 0
= [(x + y) / 2] + ( 0 = y-x) = [(x + y) / 2] + ( |y - x|) = [(x + y) / 2] + ( |y - x|/ 2)
= (x + y + |y - x |) / 2.
Case 2. x < y. Adding (-x) to both sides of x < y we get (y-x) > 0.
Then max (x, y) = y = (2y) / 2 = (y + y) / 2 = ( y + y + x + (-x) / 2 = (x + y + y - x) / 2
Hence, since y- x > 0, ( x + y + |y - x|) / 2.
Case 3. x > y. Then max (x, y) = x = (2x) / 2 = (x + x) /2 = ( x + x + y + (-y)) / 2
= ( x + y + (-y) + x) / 2. Adding (- x) to both sides of x > y we get ( y - x) < 0. Then, by the
definition of absolute value, |y - x| = (- y) + x. Substituting |y - x| for ( -y) + x in
( x + y + (-y) + x) / 2 we get max ( x,y) = x = ( x + y + |y - x|) / 2.
Thus, since this covers all cases for every pair of real numbers x and y, we can conclude that max (x,y) = (x + y + |y - x|) / 2. QED

Better?
 
nike5 said:
Better?

Yes! :smile:

But you can cut out a lot of it …

for example:

Case 1. x = y. Then max ( x, y) = x

and (x + y + |y - x |) / 2 = (x + x + 0)/2 = x :wink:

(and similarly for Cases 2 and 3)
 
Thanks for the help Tim:smile:
 
I picked up this problem from the Schaum's series book titled "College Mathematics" by Ayres/Schmidt. It is a solved problem in the book. But what surprised me was that the solution to this problem was given in one line without any explanation. I could, therefore, not understand how the given one-line solution was reached. The one-line solution in the book says: The equation is ##x \cos{\omega} +y \sin{\omega} - 5 = 0##, ##\omega## being the parameter. From my side, the only thing I could...
Back
Top