Group Abstract Group Abstract

Message Boards Message Boards

Solve doesn't like roots

In[6]:= Solve[x^(1/3) == -1, x]

Out[6]= {}

In[7]:= -1^((1/3))

Out[7]= -1
POSTED BY: Frank Kampas
20 Replies

SolveValues[x^3 == -1, x]? (Returns {-1, (-1)^(1/3), -(-1)^(2/3)}.)

Addendum

Also: Exp[Log[-1] + Range[3] 2 Pi/3 I] // Simplify

POSTED BY: Michael Rogers
To summarize, I have always regarded x^(1/3) as being the same as cube root of x.

That is not true in Mathematica

In[4]:= (-1)^(1/3) // N

Out[4]= 0.5 + 0.866025 I

In[3]:= CubeRoot[-1]

Out[3]= -1
POSTED BY: Frank Kampas

The warning seems to apply to the value of the parameter y -> 1.

The issue is that the complex-valued principal root does not have -1 in its range. Consider

Arg[x^(1/3)]
(* Arg[x] / 3 *)

It implies that the argument of x^(1/3) is between ±Pi/3, since Arg[x] is between ±Pi. There are three cube roots of any nonzero complex number, and their arguments differ by 2Pi/3. There is always exactly one in the sector -Pi/3 < Arg[y] <= Pi/3. This root is what x^(1/3) represents.

Therefore the real part of x^(1/3) is greater than or equal to zero. I believe that Solve[] is looking at all roots in the complex plane, but there are none.

POSTED BY: Michael Rogers
In[3]:= Solve[x^(1/3)==y,x]/. y -> -1
During evaluation of In[3]:= Solve::nongen: There may be values of the parameters for which some or all solutions are not valid.
Out[3]= {{x->-1}}
POSTED BY: Frank Kampas

This also works:

In[10]:= Solve[CubeRoot[x] == -1, x]

Out[10]= {{x -> -1}}

However, it seems to me that Solve should look at all the roots in the complex plane.

POSTED BY: Frank Kampas

Assume that x^(1/3) == -1. Taking the cube of both sides we conclude that necessarily x == -1. On the other hand, this is not a solution of the equation x^(1/3) == -1, because

In[29]:= (-1)^(1/3) // N

Out[29]= 0.5 + 0.866025 I

The obvious solution x == -1 can be obtained this way:

In[35]:= Solve[Surd[x, 3] == -1, x]

Out[35]= {{x -> -1}}
POSTED BY: Gianluca Gorni
Posted 3 years ago

Thanks a lot. I feel that these things should be emphasized in learning Math and refines the concept of roots.

POSTED BY: Zhenyu Zeng

There are three complex cube roots of a number.

If you work in the real domain, you obviously prefer the single real cube root.

If you work in the complex plane, you may prefer one that is consistent with analytic continuation. This criterion leads to something like Exp[Log[x]/3], which is not real when x<0, unfortunately.

My own position is that there is no "true" cube root. We must get familiar and play with all three options, without getting confused. And help others to the same...

POSTED BY: Gianluca Gorni
Posted 3 years ago

Which is true according to a rigorous mathematical definition?

POSTED BY: Zhenyu Zeng
Posted 3 years ago

Thanks very much. I learned a lot.

POSTED BY: Zhenyu Zeng

Sorry, I meant x^(1/3)=Exp[Log[x]/3].

POSTED BY: Gianluca Gorni
POSTED BY: Gianluca Gorni
Posted 3 years ago

And why

SolveValues[x^3 == -1, x] // ComplexExpand

gives three answers:

{-1, 1/2 + (I Sqrt[3])/2, 1/2 - (I Sqrt[3])/2}

So, what is/are the exact solution/solutions for

x^3=-1
POSTED BY: Zhenyu Zeng
Posted 3 years ago

And why

Solve[x^(1/3) == -1, x, Reals]

gives empty?

POSTED BY: Zhenyu Zeng
Posted 3 years ago

Hello, May you teach me why

(-1)^(1/3) // N

gives result containing i?

As

a=b

of course

a^3=b^3

Where am I wrong?

POSTED BY: Zhenyu Zeng

You are correct

In[9]:= Solve[x^(1/3) == -1, x]

Out[9]= {}

In[10]:= SolveValues[x^(1/3) == -1, x]

Out[10]= {}

In[12]:= Solve[Surd[x, 3] == -1, x]

Out[12]= {{x -> -1}}

In[13]:= SolveValues[Surd[x, 3] == -1, x]

Out[13]= {-1}
POSTED BY: Frank Kampas

SolveValues[x^3 == -1, x] and Solve[x^3 == -1, x] give me the same solutions (in different forms). Or maybe that's what you meant. I wasn't sure.

POSTED BY: Michael Rogers
POSTED BY: Frank Kampas

-1 has three cube roots.

In[19]:= {-1, Exp[I \[Pi]/3], Exp[-I \[Pi]/3]}^3

Out[19]= {-1, -1, -1}

How can I compute all 3 of them in Mathematica?

POSTED BY: Frank Kampas

This works as well:

Solve[x^(1/3) == Exp[a I], x] /. a -> Pi

But yes - it is a bit strange ...

POSTED BY: Henrik Schachner
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard