Dear John,
I failed to understand your test. The way I defined f
in the first post never meant to be equal to 0 for a=-5/8
. There is no surprise that you got False
.
Secondly, let's look at the correctly defined case
FullSimplify@f/.a->-5/8
(* 2(-1)^(1/3) *)
Even if you had used the original condition, you would still get False
when you test it against -2
since Mathematica returns the principle root of 2(-1)^(1/3)
which is 1.+1.73205I
2(-1)^(1/3)//N
(* 1.+1.73205*I *)
For a second, let's forget about how Mathematica evaluates an expression.
The expression 2(-1)^(1/3)
has 3 roots. The roots are
2Exp[I Pi/3], 2Exp[I 5Pi/3], 2Exp[I Pi]
2Exp[I Pi/3]
is the principle root which Mathematica returns and its value is 1.+1.73205I
. The real root is 2Exp[I Pi]
which is returned by CubeRoot function and its value is -2
and finally the other root 2Exp[I 5Pi/2]
whose value is 1.-1.73205I
The way I looked at Solve
function initially was that I thought it was trying all these roots to find a
, but it wasn't, as cleared out by Daniel.
If I am asked to check whether f==-2
for a=-5/8
, I would consider all the roots. Not just the principle root which obviously doesn't satisfy the condition, but the root 2Exp[I Pi]
does!
Back to Mathematica, you may consider the equations corresponding to each root as separate equations. Mathematica may choose to do that for any reason-- consistency is a very valid reason. Then you may say a=-5/8
does not satisfy the condition for my equation corresponding to the "principle root", which you are correct. But for another root, it satisfies.
I think you should now see the source of my initial objection (or say, confusion) which is related to the "machinery" of Solve
. I'll get my head wrapped around the way Mathematica operates in the future.