Raising a negative to a non-integer exponential

10 views (last 30 days)
Hello, I am trying to raise a negative number to a non-integer exponential and getting imaginary answers. For example, the following works fine.
However, when I input the following I get an imaginary answer.

Answers (2)

John D'Errico
John D'Errico on 17 Jul 2023
Edited: John D'Errico on 17 Jul 2023
What do you expect? Do you understand there is no real answer to that fractional power?
For example, what is
(-2)^0.5
ans = 0.0000 + 1.4142i
Yes, as expected, it is imaginary. Just sqrt(-2). And that is COMPLETELY expected. We can easily prove that a negative number, raised to a fractional power will ALWAYS result in something with a non-zero imaginary part. If the exponent has a 1/2 in it, then the result will be purely imaginary. Again, not difficult to prove. If the exponent is not exactly an integer plus 1/2, then you will get a complex result. Fir example:
(-2)^2.3
ans = 2.8946 + 3.9841i
So now we see both a real and an imaginary component. Again, fully expected.

Walter Roberson
Walter Roberson on 17 Jul 2023
sym(-2)^(31/10)
ans = 
The -8 is real valued and 2^(1/10) is positive, so we can neglect them for a moment, and examine the (-1)^(1/10) .
Is there a real-valued quanty r such that (-1)^(1/10) == r ? That would imply that (-1) == r^10 for some real-valued r. If r were positive, then positive to the 10th is positive, and so the result cannot possibly be -1. If r were negative, then negative to the 10th is... positive, so the result could not be -1 either.
Therefore there is no real-valued quantity r such that (-1)^(1/10) == r. And that means that (-2)^(31/10) cannot be real-valued.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!