Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
Drexel University or The Math Forum.
|
|
|
|
Re: Mathematica strange behaviour finding a cubic root
Posted:
Dec 17, 2012 2:54 AM
|
|
(-1/2)^(2/3) // N
-0.31498 + 0.545562 I
((-1/2)^(1/3))^2 // N
-0.31498 + 0.545562 I
Solve[y^(3/2) == -1/2, y] // N
{{y -> -0.31498 + 0.545562 I}}
NSolve[y^(3/2) == -1/2, y]
{{y -> -0.31498 + 0.545562 I}, {y -> -0.31498 - 0.545562 I}}
Solve[y^3 == (-1/2)^2, y] // N
{{y -> -0.31498 + 0.545562 I}, {y -> 0.629961}, {y -> -0.31498 - 0.545562 I}}
((-1/2)^2)^(1/3) // N
0.629961
This last approach forces a real result rather than the principal root of the original expression.
((-1/2)^2)^(1/3) == (y /. Solve[y^3 == (-1/2)^2, y, Reals][[1]]) // Simplify
True
Bob Hanlon
This last approach forces a real result rather than the principal root of the original expression.
On Sun, Dec 16, 2012 at 1:06 AM, <sergio_r@mail.com> wrote: > > How can I make Mathematica provides the same answer for > (-1/2)^(2/3) = ((-1/2)^2)^(1/3) ? > > What follows is a Mathematica session: > > In[1]:= (-1/2)^(2/3) > > 1 2/3 > Out[1]= (-(-)) > 2 > > In[2]:= N[%] > > Out[2]= -0.31498 + 0.545562 I > > In[3]:= ((-1/2)^2)^(1/3) > > -(2/3) > Out[3]= 2 > > In[4]:= N[%] > > Out[4]= 0.629961 > > > Sergio >
|
|
|
|