Prove $\max \{|x|,|y|\}\cdot | x/|x| - y/|y| | \leq 2|x-y|$

294 Views Asked by At

Prove that: $$\max \{|x|,|y|\} \left| \frac{x}{|x|} - \frac{y}{|y|} \right| \leq 2|x-y|$$ I tried by I didn't arrive. Please help me.

2

There are 2 best solutions below

0
On

WLOG assume $|x|>|y|$, then we see that \begin{align} |x|\left|\frac{x}{|x|}-\frac{y}{|y|} \right| =& \left|\ x-\frac{|x|}{|y|}y\right|= \left|x-y-\frac{|x|-|y|}{|y|}y \right|\\ \leq&\ |x-y| + ||x|-|y|| \leq 2|x-y|. \end{align}

3
On

An alternative answer using the sign function:

Assume $|x| > |y|$ without loss of generality. Then the LHS becomes

$$\max\{|x|,|y|\}\left|\text{sign}(x)-\text{sign}(y)\right| = |x|\left|\text{sign}(x)-\text{sign}(y)\right|$$ Now, if $\text{sign}(x) = \text{sign}(y)$, then this becomes $0$ and therefore is clearly less than or equal to $2|x-y|$.

If $\text{sign}(x) = - \text{sign}(y)$, then the LHS becomes $2|x|$. However, in this case the RHS becomes $$2|x-y| = 2|x| + 2|y|,$$ which is clearly greater than $2|x|$.