When I look for roots to a quartic polynomial of the form $A - B x^3 + Cx^4$ for positive $A$, $B$, and $C$, it seems that ToRadicals
does not preserve the root order given by Root
. Here is a minimal example:
In[1]:= Table[ToRadicals[Root[A - B #1^3 + C #1^4 &, k]], {k, 1, 4}]/.{A -> 10., B -> 20., C -> 3.}
Out[1]:= {-0.409172 - 0.660503 I, -0.409172 + 0.660503 I, 0.829652, 6.65536}
In[2]:= Table[Root[A - B #1^3 + C #1^4 &, k], {k, 1, 4}] /. {A -> 10., B -> 20., C -> 3.}
Out[2]:= {0.829652, 6.65536, -0.409172 - 0.660503 I, -0.409172 + 0.660503 I}
These are the same roots, in a different order. Can anyone explain this to me? Is it a piece of functionality I don't understand? Or just a bug? I am using version 11.0.1.0 on OS X.
If it is intended functionality, is there any way to predict which root of the function given by Root
maps to which root of the function given by ToRadical[Root]
?
Thanks!
-Ben
Update
Per J.M.'s suggestion, a cubic example with one parameter:
In[3]:= Table[ToRadicals[Root[2 - #1 - 2 #1^2 + a #1^3 &, k]], {k, 1, 3}] /. a -> 1.
Out[3]:= {2. - 1.11022*10^-16 I, -1. - 5.55112*10^-17 I, 1. + 1.11022*10^-16 I}
In[4]:= Table[Root[2 - #1 - 2 #1^2 + a #1^3 &, k], {k, 1, 3}] /. a -> 1.
Out[4]:= {-1., 1., 2.}