The Absolute Value can be defined in many ways, but these are the two most common :
1. As a Piecewise Function
$$ |x|= \begin{cases} -x&\text{if } x < 0\\ x&\text{if } x\geq 0 \end{cases} $$
2. As The Principle Square Root of a Square
$$|x| = \sqrt{x^2}$$
In the second definition that I've included here, what stops us from doing the following, and reaching a contradiction?
$$|x| = (x^{2})^{\frac{1}{2}} = x \ \ \ \ \ \ \ \ \ \ \ \text{Contradiction}$$
Likewise, if I have $f(x) = \ln(|x|)$, what is the reason why the following contradiction can't be reached :
$$f(x) = \ln(|x|)$$ $$\implies f(x)=\ln(\sqrt{x^2})$$ $$\implies f(x) = \ln[(x^2)^{\frac{1}{2}}]$$ $$\implies f(x) = \frac{1}{2}\ln(x^2)$$ $$\implies f(x) = \frac{1}{2} \cdot 2 \ \ln(x)$$ $$\implies f(x) = \ln(x) \ \ \ \ \ \ \ \ \ \ \ \text{Contradiction}$$
$\endgroup$ 34 Answers
$\begingroup$$\sqrt{x^2} = (x^2)^{\frac{1}{2}}=x$, only when $x>0$, otherwise it equals $-x$.
This is because for any $x>0$, $|x|=x$ and for any $x<0$, $ |x|=-x$
So, no contradiction is reached.
$\endgroup$ 1 $\begingroup$Because $(x^2)^{1/2}$ is not in general equal to $x$. The squaring operation lost the information about the sign of $x$.
With the log example, it's because you need to pick a branch.
$\endgroup$ 2 $\begingroup$What stops us from saying $|x|= (x^2)^{1/2}= x$ is that the second equality simply is NOT true! $a^{1/2}$ is defined as "the positive number $x$ such that $x^2= a$". In particular, if $x= -2$, then $x^2= (-2)^2= 4$ and then $((-2)^2)^{1/2}= 4^{1/2}= 2$, not $-2$.
$\endgroup$ $\begingroup$First off, I want to thank everyone for their answers here, but I found this to be the most general answer after thinking about this question for a while.
$$(a^{n})^{\frac{1}{n}} = a \ \ ,\ \text{if} \ \ n \ \ \text{is odd}$$ $$(a^{n})^{\frac{1}{n}} = |a|\ \ ,\ \text{if} \ \ n \ \ \text{is even}$$
Stated a bit more formally :
$$(a^{2n+1})^{\frac{1}{2n+1}} = a \ \ ,\ \forall n\in\mathbb{Z}$$ $$(a^{2n})^{\frac{1}{2n}} = |a|\ \ ,\ \forall n\in\mathbb{Z}$$
Parts of this answer and the intuition developed behind it have come from Paul's Online Notes, so full credit must go to that site.
$\endgroup$