Why $(-2)^{2.5}$ isn't equal to $((-2)^{25})^{1/10}$?

J.W. Tanner has communicated the main point and provided some links to questions that provide more details. I'd like to try to tell the (mostly) whole story in one place.

Recall that the standard definition of $a^b$ for $a \in \mathbb{R}_{>0}$, $b\in \mathbb{R}$ is

$$a^b := e^{b\ln(a)}$$

Where the exponential function can be defined in several ways-- through its power series, as the solution to the differential equation $y'=y$, or the inverse to the natural logarithm (which is in turn defined as the integral $\ln(x)=\int_1^x\frac{1}{t}dt$). From this definition, it's clear that $b\ln(a)=\ln(a^b)$, so we have

$$a^{bc} = e^{bc\ln(a)}=e^{c\ln(a^b)}=(a^b)^c.$$

However, for $a \leq 0$, this definition requires us to make sense of $\ln(a)$, and the integral definition referenced above diverges. How might we do this? Since we're trying to understand exponentiation of negative numbers, we surely must include the case of $(-1)^{1/2} = \pm i \in \mathbb{C}$, so we can't get around working in the complex plane. If we want to try to extend our earlier definition of $a^b$, then, we're forced to confront the extension of the exponential function to the complex plane. Fortunately, the exponential function's power series definition extends naturally to the complex plane, and from it we can easily derive Euler's identity, which states

$$e^{i\theta} = \cos(\theta)+i\sin(\theta)$$

for $\theta \in \mathbb{R}$, so $e^{i\theta}$ is a point on the unit circle at angle $\theta$ from the positive real axis, measured counterclockwise. In particular, we see that any nonzero complex number $z$ can be written uniquely as $z=re^{i\theta}$ for some $r \in \mathbb{R}_{>0}$ and $-\pi < \theta \leq \pi$. If we want a defining property of our extension of the natural logarithm to be that the exponential function inverts it (which it had better, if the original formula is to always return $a^1=a$), then, one way to define the natural logarithm of $z$ is $\ln(z) := \ln(r)+i\theta$, as this gives $$e^{\ln(z)}=e^{\ln(r)+i\theta}=re^{i\theta}=z,$$ as desired. Note $z=r$ and $\theta=0$ if $z$ is real and positive, so this is indeed an extension of the usual natural logarithm.

However, this choice was not unique-- we had to restrict $-\pi < \theta \leq \pi$ to make this definition. If our defining property is just inversion by the exponential function, it's clear that $\ln(z)=\ln(r)+i(\theta+2\pi n)$ works just as well for any integer $n$, and in general one could define a natural logarithm by instead restricting $\theta$ to be in any interval of length $2\pi$ we want, even making the interval a function of $r$-- making this choice is called choosing a branch of the logarithm. The original definition I gave is called the principal branch, and this is what most calculators like Wolfram Alpha will use. Going back to our definition of $a^b$ and declaring it true for any $a,b \in \mathbb{C}$, we see the result depends on our choice of branch. This is what people mean when they say that exponentiation isn't uniquely defined in $\mathbb{C}$.

Now, let's finally see what goes wrong in your example using the principal branch of the logarithm to define $(-2)^{2.5}$ and $((-2)^{25})^{1/10}$. We have $$(-2)^{2.5}=e^{2.5\ln(-2)}=e^{2.5(\ln(2)+i\pi)}=e^{2.5\ln(2)+2.5\pi i}=e^{2.5\ln(2)}e^{i\frac{\pi}{2}} = 2^{2.5}i,$$ while $$((-2)^{25})^{1/10}=(-2^{25})^{1/10} = e^{\frac{1}{10}\ln(-2^{25})} = e^{\frac{1}{10}(\ln(2^{25})+i\pi)} = 2^{2.5}e^{i\pi/10}=2^{2.5}(\cos(\pi/10)+i\sin(\pi/10)),$$ and these are clearly different. This example demonstrates precisely that, in general, the identity $a^{bc}=(a^b)^c$ does not hold if $a$ is not a positive real number, and you can similarly see that this identity breaks down if $b$ is not real, even if $a \in \mathbb{R}_{>0}$.


Fractional powers of negative numbers are not uniquely defined,

and the "general rule" $(a^m)^n=a^{m\times n}$ does not always work when $m$ and $n$ are not integers.


As @J. W. Tanner pointed out in his comment, $a^{m/n}$ is not defined in $\mathbb{R}$ when $a<0$ (and not uniquely defined in $\mathbb{C}$ for all $a$s). That's why softwares usually mess up with things like $(-2)^{2.5} = (-2)^{5/2}$.

Now, you should ask why $a^{m/n}$ is not defined in $\mathbb{R}$ when $a<0$. The motivation of this fact is not trivial, and depends on the importance Mathematicians have attributed to exponentiation identities as $(a^x)^y = a^{xy}$ or $a^{x+y}=a^x\cdot a^y$.

As you should know, the power $a^{1/n}$ (with $a\geq 0$ and $n \in \mathbb{N}$) is defined through the following theorem:

For each $a \geq 0$ and $n \in \mathbb{N}$, there exists a unique $\alpha \geq 0$ s.t. $\alpha^n = a$.

Such an $\alpha$ is called the arithmetic $n$-th root of $a$ and denoted with $\sqrt[n]{a}$ or $a^{1/n}$.

whose proof heavily relies on the completeness of $\mathbb{R}$. Theorem allows you to define the fractional power $a^{m/n}$ with $a\geq 0$ (or $a > 0$ when $m/n < 0$) by letting:

$$a^{m/n} := \sqrt[n]{a^m}\quad \text{(or equivalently } a^{m/n} := (\sqrt[n]{a})^m \text{)}$$

for each $m/n \in \mathbb{Q}$ (it is easy to prove that $\sqrt[n]{a^m} = (\sqrt[n]{a})^m$, hence definition does not depend on the order of application of $m$-th power and $n$-th root).

What happens if constraint $a\geq 0$ is dropped? The theorem cannot remain true for every value of the exponent $n \in \mathbb{N}$: in particular, if $n$ is even (i.e., $n=2,4,6,\ldots$) then $\alpha^n \geq 0$ for all $\alpha \in \mathbb{R}$, therefore equality $\alpha^n = a < 0$ is out of question for even $n$s. On the other hand, the situation for odd $n$s is straightforward:

When $n \in \mathbb{N}$ odd (i.e., $n=1,3,5,\ldots$), for each $a<0$ there exists only one $\alpha < 0$ s.t. $\alpha^n = a$, precisely:

$$\alpha = -\sqrt[n]{-a}\quad \text{(or equivalently } \alpha = -\sqrt[n]{|a|}\text{)}\; . $$

Previous statement allows you to define the arithmetic $n$-th root of $a$ also when $a<0$ and $n \in \mathbb{N}$ is odd by setting:

$$\tag{*} \sqrt[n]{a} := - \sqrt[n]{-a}\; ,$$

but doesn't allow you to define the fractional power $a^{1/n}$, nor $a^{m/n}$ when $a<0$!

In fact, it happens that the definition of rational power with base $a<0$ (by means of $a^{m/n} = \sqrt[n]{a^m}$) is incompatible with usual exponentiation identities, i.e. it causes failure of usual rules like $(a^x)^y = a^{xy}$. In order to see this, consider $a=-1$ and use (*) to get:

$$(-1)^{1/3} = \sqrt[3]{-1} \stackrel{\text{def.}}{=} - \sqrt[3]{-(-1)} = -\sqrt[3]{1} = -1\; ;$$

if usual exponentiation identities were in force then you would get:

$$-1 = (-1)^{1/3} = (-1)^{2/6} = \left[ (-1)^2 \right]^{1/6} = \left[ 1 \right]^{1/6} = 1$$

which is clearly wrong (for $-1 \neq 1$!), or oddities like:

$$-1 = (-1)^{1/3} = (-1)^{1/6 + 1/6} = (-1)^{1/6} \cdot (-1)^{1/6}$$

whose rightmost side has no meaning at all.

Therefore, there is a problem here: fractional powers with negative base and usual exponentiation identities do not fit together.

Mathematicians think it is way better to choose exponentiation identities to hold over the possibility of giving a definition to the symbol $a^{m/n}$ with $a<0$, because identities are of fundamental importance and almost ubiquitous in every possible kind of computation. ;-)