Triangle inequality problem with equality

200 Views Asked by At

How does one prove that, for any reals $x,y$ , there holds the equality

$$|x|+|y|+||x|-|y|| = |x-y|+|x+y|\quad?$$

I have tried this using both the reverse and triangle inequalities, but I cannot get the equality between the two expressions.

2

There are 2 best solutions below

2
On

You only need to worry about two cases: if $|x|\geq |y|$, then both sides equal $2|x|$ and, conversely, if $|x|<|y|$, then both sides equal $2|y|$.

In the above observation, the LHS is simple to see. As for the RHS, you can square it: $$ \text{RHS}^2=(x-y)^2+(x+y)^2+2|x-y||x+y|\\ =2x^2+2y^2+2|x^2-y^2|=\left\{ \begin{array}{ll} 4x^2&\text{if }|x|\geq |y|,\\ 4y^2&\text{if }|x|< |y|. \end{array}\right. $$

0
On

For any $w$, $|w|=|-w|$. For this reason,

  1. Replacing $y$ by $-y$ does not change the left or right expression.

  2. Replacing $x$ by $-x$ neither, because $|-x-y|+|-x+y|=|x+y|+|x-y|$.

If the signs do not matter, then it suffices to establish the equality for $x, y\ge0$: $$x+y+|x-y|=|x-y|+x+y.$$