It is a classical issue, known as Casus irreducibilis 
<https://en.wikipedia.org/wiki/Casus_irreducibilis>, that the algebraic 
expressions of the roots of an irreducible cubic polynomial involve complex 
expressions even in case the roots are real. (See also this 
<https://github.com/sympy/sympy/issues/14690> for more information.)

Kalevi Suominen

On Wednesday, October 3, 2018 at 9:03:22 AM UTC+3, Cesar Gomes wrote:
>
> Hello everyone!
>
> While trying to find the zeros of the following polynomial: 
>
>
> q = (-2/15)*x**3 + (23/10)*x**2 - (47/30)*x - 21
>
>
> Sympy is returning 3 complex roots, which makes no sense since there are 3 
> real roots. Using nsolve the results are as expected.
>
>
> What am I missing?
>
>
> I'm using Python 3.6.4 and IPython 6.2.1 on OS X Mojave.
>

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sympy.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/8ccf7f66-980b-486f-aa04-d50bd8d44560%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to