Show max(a,b) = (a + b + |a-b|)+2

  • Thread starter Thread starter Diffy
  • Start date Start date
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
4 replies · 4K views
Diffy
Messages
441
Reaction score
0

Homework Statement


let a and b be two real numbers show that max{a,b} = (a + b + |a - b|)/2


Homework Equations


I have all the field properties of the real numbers and order, LUB and existence of square root.

I also have definition of absolute value.


The Attempt at a Solution


This is very easy for me to see on the real line. If I break it into (a+b)/2 + |a+b|/2 then it is clear that I am taking the midpoint and adding half the distance between a and b.

However I am not sure I should argue it that way. I think that I should somehow be using my LUB properties but I don't know how.

Any help is appreciated.
 
Physics news on Phys.org


Split it into the two cases a>=b and a<b?
 


I did think about doing it that way, but I think within each of those cases there will be 3 others as well.

So assume a < b, then I have to consider if a and b are positive, if a and b are negative and if a is negative b is positive.

And all I really know by assuming a < b is that b - a > 0. Which I can't seem to make a connection to the formula (a + b + |a-b|)/2.
 


Diffy said:
I did think about doing it that way, but I think within each of those cases there will be 3 others as well.

So assume a < b, then I have to consider if a and b are positive, if a and b are negative and if a is negative b is positive.

And all I really know by assuming a < b is that b - a > 0. Which I can't seem to make a connection to the formula (a + b + |a-b|)/2.

If a<b then i) max(a,b)=b and ii) a-b<0, so |a-b|=-(a-b). Can you check it works now?