I have a small doubt. Is $\sqrt{x^2}= |x|$ true? For, put $x=-1\implies x^2=1$. Now, $\sqrt 1=\pm 1$, whereas $|1|=+1$ only. $x\in\mathbb{R}$
P.S. This doubt came @Daniel's answer from this post. To quote-
The problem appears when you take square roots, since it is not still true that $\sqrt{(-1)^2}=-1$, in fact, $\sqrt{x^2}= |x|$ so in this case $\sqrt{(-1)^2}=|-1|=1$, which is not equal to $x-2$ when $x=1$.