In my homework I've been accustomed to assuming that $|x|^a = |x^a|$ Recently however, I've begun to doubt that. Take the following example:
$$ \begin{equation*} \begin{split} |\sqrt{-|x|} | &= \sqrt{|-|x||} \\ &= \sqrt{|x|} \end{split} \end{equation*} $$
I don't, it just seems weird to me. So I took it upon myself to investigate my assumption, and prove/ disprove that $|x|^a = |x^a|$.
$$\begin{equation*} \begin{split} |x|^a &= \begin{cases} x^a, \ \ & x \geq 0 \\ (-x)^a, \ \ & x < 0 \end{cases}\ \\[10pt] &= \begin{cases} x^a, \ \ & x \geq 0 \\ (-1)^a \cdot (x)^a, \ \ & x < 0 \end{cases}\ \\ \end{split} \end{equation*}$$
Whereas $$|x^a|= \begin{cases} x^a, \ \ & x \geq 0 \\ -x^a, \ \ & x < 0 \end{cases}\ $$
In other words, it would seem to me that the two only equal each other when $a$ is odd.
I don't know, could you guys clear this up for me?
It is not correct that $|x^a| = -x^a$ when $x< 0$; only when $x^a < 0$.