Show that: $$ \max\{x,y\}=\frac{1}{2} \left(x+y+|x-y|\right) $$
I have no idea how to prove this; most likely it is trivial.
Show that: $$ \max\{x,y\}=\frac{1}{2} \left(x+y+|x-y|\right) $$
I have no idea how to prove this; most likely it is trivial.
Geometrically, $\frac{x+y}{2}$ is the midpoint between $x$ and $y$, and $\frac{|x-y|}{2}$ is half the distance between $x$ and $y$.
So if you start at the midpoint and go half the distance in the positive direction, you end up at the right endpoint (or max).
If $y>x \implies |x-y|=y-x$ hence $\max\{x,y\}=y$.
If $x>y \implies |x-y|=x-y$ hence $\max\{x,y\}=x$.
For $x=y$, it's trivial
$\max(x, y)+\min(x, y) = x+y$ and $\max(x, y)-\min(x, y) = |x-y|$ thus $2\max(x, y) = x+y+|x-y|$. Therefore $\max(x, y) = \frac{1}{2}(x+y+|x-y|).$
If $x\geq y$ then $|x-y|=x-y$ and the RHS above becomes $\frac{2x}{2}=x$. If $x\leq y$ then $|x-y|=y-x$ and the RHS above becomes $\frac{2y}{2}=y$. In both cases it is $\operatorname{max}(x,y)$