Ask Your Question
1

Imaginary result for cube root of -1

asked 2020-09-17 23:44:47 +0200

cybervigilante gravatar image

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 flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2020-09-18 02:08:57 +0200

slelievre gravatar image

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.

edit flag offensive delete link more

Comments

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...

Emmanuel Charpentier gravatar imageEmmanuel Charpentier ( 2020-09-18 08:23:51 +0200 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2020-09-17 23:44:47 +0200

Seen: 236 times

Last updated: Sep 18 '20