For negative values of x, $(x^2)^{0.5}$ is $\pm x$.
For negative values of x, $(x^{0.5})^2$ is undefined.
Why do textbooks insist the following: for negative values of $x$, $\sqrt{x^2} = |x|$?
Surely the correct way to think about this is that for negative values of $x$, $\sqrt{x^2}$ is either undefined or equal to $\pm x$, depending on the order the operations are conducted in?
See here for an example: http://www.jamesbrennan.org/algebra/radicals/simplifying_radical_expressions.htm