From school I know that
$\sqrt{x^2} = |x|$.
But if we rewrite the above equation in another way
$\sqrt{x^2} = (x^2)^{\frac{1}{2}} = x^{\frac{2}{2}} = x^1 = x$
then we get another answer.
How is it possible that rewritting an equation changes the answer? And which answer is right, $x$ or $|x|$?