1. Not finding help here? Sign up for a free 30min tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Proofs of max and min formulas for 2 numbers

  1. Jun 8, 2009 #1
    1. The problem statement, all variables and given/known data
    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.



    2. Relevant equations



    3. 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
     
  2. jcsd
  3. Jun 8, 2009 #2

    tiny-tim

    User Avatar
    Science Advisor
    Homework Helper

    Hi nike5! :smile:

    (you should be able to find a | on your keyboard somewhere near the " :wink:)
    Short answer … yes!! :biggrin:
     
  4. Jun 8, 2009 #3

    Mark44

    Staff: Mentor

    And you should get rid of the a and b. You're given x and y, so use them instead.
     
  5. Jun 8, 2009 #4
    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?
     
  6. Jun 8, 2009 #5

    tiny-tim

    User Avatar
    Science Advisor
    Homework Helper

    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)
     
  7. Jun 8, 2009 #6
    Thanks for the help Tim:smile:
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Proofs of max and min formulas for 2 numbers
  1. Max/ min (Replies: 3)

  2. Min/max graph (Replies: 1)

Loading...