<s>[INST] How to solve $\lvert{x}\rvert - \lvert{2+x}\rvert = x$? How do I solve the following equation?
$$\lvert{x}\rvert- \lvert{2+x}\rvert= x$$
I was thinking about dividing it into 4 cases: plus plus, plus minus, minus plus and minus minus. What is the best way to solve this?
 [/INST] Another way is to use $|x| = \sqrt{x^2}$.  If $|x| - |2+x| = x$ then
$$\begin{align*}
\sqrt{x^2} - \sqrt{(x+2)^2} &= x\\
x^2 + (x+2)^2 -2\sqrt{x^2}\sqrt{(x+2)^2} &= x^2\\
(x+2)^2 &= 2\sqrt{x^2} \sqrt{(x+2)^2}\\
(x+2)^4 &= 4x^2(x+2)^2
\end{align*}$$
So either $x= -2$, which doesn't satisfy the original equation, or else
$$(x+2)^2 = 4x^2$$
which is a quadratic equation in $x$. This has the roots $x=2$ and $x=-2/3$. Now you just have to check whether either of these satisfies the original equation, and only $x=-2/3$ does, so this is the only solution.
</s>