# Homework Help: Show max(a,b) = (a + b + |a-b|)+2

1. Sep 22, 2008

### Diffy

1. The problem statement, all variables and given/known data
let a and b be two real numbers show that max{a,b} = (a + b + |a - b|)/2

2. Relevant 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.

3. 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.

2. Sep 22, 2008

### Dick

Re: Max

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

3. Sep 23, 2008

### Diffy

Re: Max

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.

4. Sep 23, 2008

### Dick

Re: Max

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?

5. Sep 23, 2008

### Diffy

Re: Max

Thanks so much