Why are cases required in proofs? i.e. in the inequality $|\sqrt{x}-\sqrt{y}| \leq \sqrt{|x-y|}$

fake-proofsproof-explanationproof-verificationproof-writing

So there is a proof of the inequality needed:

$|\sqrt{x}-\sqrt{y}| \leq \sqrt{|x-y|} $ , where $x$,$y$ $\geq$ $0$

After squaring both sides:

$(|\sqrt{x}-\sqrt{y}|)^2 \leq (\sqrt{|x-y|})^2$

$x + y – 2\sqrt{xy} \leq |x-y|$,

Apparently, now you need cases of:

Case 1: $x \geq y$

Case 2: $x > y$

Case 3: $y > x$

I am asking why you need cases (in general for a proof and specifically this one) and also how would case 3 work? Thanks.

Best Answer

We can consider two main cases, indeed we need $x,y \geq 0$ and

  • for $x\ge y \implies \sqrt x \ge \sqrt y$

$$|\sqrt{x}-\sqrt{y}| \leq \sqrt{|x-y|} \iff \sqrt{x}-\sqrt{y} \leq \sqrt{x-y}$$

  • for $x< y \implies \sqrt x < \sqrt y$

$$|\sqrt{x}-\sqrt{y}| \leq \sqrt{|x-y|} \iff -\sqrt{x}+\sqrt{y} \leq \sqrt{-x+y}$$

and since in both cases LHS and RHS are positive we can proceed by squaring both sides.