Proofs of max and min formulas for 2 numbers

Click For Summary

Homework Help Overview

The discussion revolves around proving the maximum and minimum formulas for two numbers, x and y, specifically max(x,y) and min(x,y). Participants are exploring the mathematical reasoning behind these formulas and considering different approaches to their proofs.

Discussion Character

  • Exploratory, Conceptual clarification, Mathematical reasoning

Approaches and Questions Raised

  • The original poster attempts to prove the formulas using informal reasoning and questions whether a more formal approach, such as the trichotomy law, would be appropriate. Other participants suggest using x and y directly instead of introducing variables a and b.

Discussion Status

The discussion is active, with participants providing feedback on the proofs and suggesting improvements. Some participants express that the reasoning could be more concise and focused on the essential elements of the cases being considered.

Contextual Notes

Participants are considering the implications of using different proof techniques and the clarity of their arguments. There is an emphasis on ensuring that all cases are covered in the proofs for maximum rigor.

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:
 

Similar threads

  • · Replies 10 ·
Replies
10
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
Replies
7
Views
2K
  • · Replies 13 ·
Replies
13
Views
2K
  • · Replies 21 ·
Replies
21
Views
3K
Replies
5
Views
2K
Replies
4
Views
3K
  • · Replies 4 ·
Replies
4
Views
3K
Replies
7
Views
3K
  • · Replies 1 ·
Replies
1
Views
3K