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?