1

Problem: prove $\max\{x,y\}=\frac {(x-y)}{2} + \frac {(x+y)}{2}$

$x$ and $y$ are max elements in two sets.

Here is what i have thought of so far as a concrete problem: $\max \{4,5\}=d(4,5)= 1$

I know that the $$\begin{align} \max\{4,5\} &= \frac{4-5}{2}+ \frac{4+5}{2} \\ &= \frac{-1}{2}+\frac{1}{2} \\ &= 0\end{align}$$

I am thinking of breaking it down to trichotomy: $x=y, x>y$, and $x<y$.

for $x=y$ what i got is.. $$ \begin{align} \max\{x,y\} &= \frac{(x-y)}{2}+\frac{(x+y)}{2} \\ &= 0+x \\ &= x \end{align} $$ (which is the max) but why isn't this 0?

and am i even thinking in the right direction or am i mixing up two different concepts?

jimjim
  • 9,855
james
  • 55

2 Answers2

1

The problem is wrong as $\frac{x+y}2+\frac{x-y}2$ is always equal to $x$

where as max$(x,y)=x$ iff $x\ge y$

In fact max$\displaystyle(x,y)=\frac{x+y}2+\frac{|x-y|}2$

If $x\ge y,$

max$(x,y)=x$ and $|x-y|=x-y\implies \frac{x+y}2+\frac{|x-y|}2=\frac{x+y+(x-y)}2=x$

If $x<y,$

max$(x,y)=y$ and $|x-y|=-(x-y)\implies \frac{x+y}2+\frac{|x-y|}2=\frac{x+y-(x-y)}2=y$

  • thank you both very much! I thought i typed abs value bars instead of (). I apologize... I just hadn't finished it yet. i haven't done this stuff in over 12 years and was getting worried i didn't know what i was doing. – james Sep 01 '13 at 04:18
  • @peter tamarhoff. thank you both very much! I thought i typed abs value bars instead of (). I apologize... I just hadn't finished it yet. i haven't done this stuff in over 12 years and was getting worried i didn't know what i was doing. – james Sep 01 '13 at 04:18
0

What you want is $$\max(x,y)=\frac{|x-y|+x+y}2$$

Consider cases to verify both sides are equal.

Pedro
  • 125,149
  • 19
  • 236
  • 403
  • tamarhoff. thank you both very much! I thought i typed abs value bars instead of (). I apologize... I just hadn't finished it yet. i haven't done this stuff in over 12 years and was getting worried i didn't know what i was doing. – james Sep 01 '13 at 04:19