I want to prove the maximum function max: $\mathbb{R} \rightarrow \mathbb{R}$, which is defined by
$$\max(x,y) = \begin{cases}x, \text { if } x \geq y , \\ y, \text { if } x < y \end{cases}$$
I want to prove this for $\max(x,y) = \frac {x +y +|x-y|} {2}$.
I have no idea on how to start, I just read over my search over the internet that the modulus function could be a way. I really appreciate your help!
UPDATE
I want to prove that $\max(x,y) = \frac {x +y +|x-y|} {2}$.
If ${x \geq y}$ then $\max(x,y)=x$ and $${\frac{x+y+|x-y|}{2}=\frac{x+y+x-y}{2}=\frac{2x}{2}=x}.$$
Else, then ${\max(x,y)=y}$ and $${\frac{x+y+|x-y|}{2}=\frac{x+y+y-x}{2}=\frac{2y}{2}=y}.$$
Thus, ${\max(x,y)=\frac{x+y+|x-y|}{2}}$.