Here is an elementary third root calculation of -8 (or any negative real number) with and without parentheses, but Mathematica seems to be given different answers!
In[1]:= -8^(1/3) // N
Out[1]= -2.
In[2]:= (-8)^(1/3) // N,
Out[2]= 1. + 1.73205 I,
In[3]:= (8)^(1/3) // N
Out[3]= 2.
In[4]:= 8^(1/3) // N
Out[4]= 2.
I noticed this weird behaviour when I was trying to compute Telles transformation points from some Gauss points. My set up required using nested parentheses, but it turned out after several tries I have to examine each component of my equation only to notice this strange behaviour with and without parentheses. Could this be a bug in V.11.1.1.0?
The question above was motivated by this basic computation
type1: k = (e (e^2 - 1) + Abs[e^2 - 1])^(1/3) + (e (e^2 - 1) -
Abs[e^2 - 1])^(1/3) + e /. e -> -0.861136
a1 = e (e^2 - 1) /. e -> -0.861136;
a2 = Abs[e^2 - 1] /. e -> -0.861136;
type2: k = (a1 + a2)^(1/3) + (a1 - a2)^(1/3) - 0.861136
type3: k = CubeRoot[a1 + a2] + CubeRoot[a1 - a2] - 0.861136
0.0873074 + 0.28566 I (type1 output)
0.0873074 + 0.28566 I (type2 output)
-0.407471(type3 output)
Typically one would write out equations in the type1 or type2 formats especially if you have more complicated functions to deal with. I am not sure why type1 and type2 are not giving the expected answer (type3).
CubeRoot.-8^(1/3)is equivalent to-(8^(1/3))– Szabolcs Mar 15 '18 at 17:04-x^nto mean(-x)^n– george2079 Mar 15 '18 at 17:16Type1andtype2formats are some of the general ways one would write an equation like this. Thank you. – D. Andrew Mar 15 '18 at 19:35CubeRootin Mathematica. – Szabolcs Mar 15 '18 at 19:36type1andtype2expressions to avoid the kind of results Mathematica gave for both types? – D. Andrew Mar 15 '18 at 19:50CubeRoot[x]instead ofx^(1/3)? If not, can you explain why not? As for closing the question: there is of course no typo. This is a templated close reason which is used in cases when the question is the result of misunderstanding or mistake that is trivial or not related to Mathematica (e.g. purely mathematical, as in this case). People are not trying to deny you an answer. If you still have a practical, Mathematica-related problem, please describe it. – Szabolcs Mar 15 '18 at 20:47CubeRoot[x]is sufficient for -8. But you wont typically write complicated expressions with CubeRoot[.....].Type1andType2formats would be how you write those equations normally. I'm looking at a general situation here, whereby you have no idea an intermediate negative value will be generated during calculation and you need to take the cuberoot of such number. We will not always be able to pull apart expressions as I did with expression intype2 ans 3. Parenthenses is one way we will typically set precedences for our expressions. – D. Andrew Mar 16 '18 at 01:32x^(1/3), so you do need to make it a bit "complicated" (i.e. usingCubeRoot[]instead). – J. M.'s missing motivation Mar 16 '18 at 05:56