Proving max (a,b) = \frac{a+b + \left|a+b\right|}{2}

  • Thread starter Thread starter The_Iceflash
  • Start date Start date
  • Tags Tags
    Proof
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
1 reply · 2K views
The_Iceflash
Messages
50
Reaction score
0

Homework Statement


Prove max (a,b) = [tex]\frac{a+b + \left|a+b\right|}{2}[/tex]

Make 3 cases:

Case 1: Assume a > b. Show both sides come out with the same number.
Case 2: Assume a < b. Show both sides come out with the same number.
Case 3: Assume a = b. Show both sides come out with the same number.


Homework Equations


N/A


The Attempt at a Solution



To be honest I'm not sure how to set up both sides to begin with before I even start to break it down to address each case. Once I see how to do that I should be able to be able to prove this.
 
Physics news on Phys.org
First make sure you have the correct statement: if you check your expression for a = 5, b = 10, you get

[tex] \frac{5+10 + |5+10|}{2} = \frac{15 + 15} 2 = 15[/tex]

which is not the maximum of the numbers 5 and 10. Perhaps it should be

[tex] \max(a,b) = \frac{(a+b) + |a-b|}{2}[/tex]

Consider your final case: if [tex]a = b[/tex], what can you say about which one is the maximum? Then, what can you say about how the right-side simplifies if the two inputs are equal?