Extracting complex roots of a cubic polynomial as points in the complex plane.

m_flashman shared this question 3 years ago

I wish to show the complex roots of a cubic polynomial as point in the complex plane.

I have tried using ComplexRoot[f(x)] where f(x) = x^3 +p*x +q and extracting the elements of the resulting list which depends on the values of p and q. Element[r_f, 1] + 0ί, Element[r_f, 2] + 0ί, and Element[r_f, 3] + 0ί The result is not stable. Sometime I get three real or two complex and one real root, but at other times my use of Element will gives a real root and only one complex root.

Why is this not working uniformly for all p and q.

Comments (1)


I have found the answer myself, :)

I was using ComplexRoot in CAS which gives a list as the result. In the graph mode this gives three complex numbers as the result, z_1, z_2, and z_3, each a point in the complex plane. This result is stable and I can proceed to use these for further work as a list by creating root={z_1,z_2,z_3}.

© 2021 International GeoGebra Institute