For real numbers x and y, show that $$\max\{x,y\} = \frac{x+y +|x-y|}{2}$$
My attempt:
If $x\geq y$, then $$\frac{x+y+|x-y|}{2} = \frac{x+y+x-y}{2} = \frac{2x}{2} = x = \max\{x,y\}.$$
Similarly, if $x < y$, then $$\frac{x+y+|x-y|}{2} = \frac{x+y+y-x}{2} = \frac{2y}{2} = y = \max\{x,y\}.$$
Where do I go on from here?