# Imaginary result for cube root of -1

I get -1 as the cube root of -1,which is correct. But if I put -1 in parentheses I get an imaginary result. I was hoping the imaginary result, if cubed, would give me -1, but it got worse.

-1^(1/3).n()
-1.00000000000000

(-1)^(1/3).n()
0.500000000000000 + 0.866025403784439*I

edit retag close merge delete

Sort by » oldest newest most voted

The power operator has higher priority than the unary negation.

So in the first case you are really doing "minus (1 to the 1/3)", and not "(minus 1) to the 1/3".

For the real n-th root, use real_nth_root.

sage: real_nth_root(-1, 3)
-1


Regarding cubing the cube root:

sage: a = (-1)^(1/3)
sage: a
(-1)^(1/3)
sage: a^3
-1


Using the numerical approximation of the cube root:

sage: aa = a.n()
sage: aa
0.500000000000000 + 0.866025403784439*I
sage: aa^3
-1.00000000000000 + 3.88578058618805e-16*I


So, very close to -1, with tiny imaginary part from rounding errors.

more

1

$x^3+1=0$ has three roots in $\mathbb{C}$. Therefore it could be argued that (-1)^(1/3) is in fact a set of three numbers ; our habit of using this notation to denote one of these numbers

• is not consistent, and

• does not explicitly specify which of these numbers it denotes

But this is far to be the sole inconsistency in our mathematical notational conventions... Equating $\sqrt [3]{-1}$ to $-1$ is just a habit...

( 2020-09-18 08:23:51 +0100 )edit