About the property $(a^m)^n=a^{mn}$ when $a<0$
Solution 1:
Don't use the laws of exponents when the base is negative:
- The law $(a^n)^m=a^{nm}$ is true whenever $a>0$.
- It is also true for all $a\ne 0$ if we assume $n,m\in\mathbb{Z}$.
But when $a<0$ and $n,m$ are not necessarily integers bad things can happen like you've shown. The way you should treat your exercise is to note that since $a$ may be negative then when you simplify $(a^2)^{\frac{1}{2}}$ you do not use the laws of exponentiation to reach $a$ but instead write this as $\sqrt{a^2}$ which equals $|a|$ for any $a$. [The law $(a^2)^{\frac{1}{2}}=\sqrt{a^2}$ remains correct because $a^2\geq 0$.]
In general you need to be very careful with the exponential functions when the base is negative, and most commonly one defines the function $f(x)=a^x$ only for $a>0$ (unless one is considering only integer exponents, then negative bases are fine).
For instance what is $(-1)^{\frac{1}{2}}$? Surely it is undefined, but on the other hand blindly using the laws of exponents we get $\frac{1}{2}=\frac{2}{4}$ so it must equal $\sqrt[4]{(-1)^{2}}=1$, an absurdity. Even worse: $$-1=\sqrt[3]{-1}=(-1)^{\frac{1}{3}}=(-1)^{\frac{2}{6}}=\sqrt[6]{1}=1$$ We proved $1=-1$ and we didn't even use any of the laws of exponentiation other than $a^{\frac{b}{c}}=\sqrt[c]{a^b}$. All of this shows one should be very careful with negative bases.