Prove $\max\{x,y\}=\frac {(x-y)}{2} + \frac {(x+y)}{2}$ 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?

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$
