After having defined d and p as symbols, I obtained the same result.

I wonder in Sympy, is it possible to isolate the complex numbers for
the solution set produced for my problem and only show real numbers
which are greater than 0? I actually need the real number part of the
solution.

On Jun 10, 2:01 am, "[email protected]"
<[email protected]> wrote:
> wow, I am impressed that this actually works. Here is a solution to
> your problem:
>
> Basically you need to explicitly tell sympy that your problem concerns
> polynomials.
>
> In [28]: d = expand(M.det()*x**7)
>
> In [29]: p = Poly(d, domain='RR')
>
> In [30]: roots(p)
> Out[30]:
> {0.493925305792670: 1,
>  0.686078618485956: 1,
>  1.41962464487823: 1,
>  1.94850578985495: 1,
>  1.13403908097417 + 0.462280083435835⋅ⅈ: 1,
>  1.13403908097417 - 0.462280083435835⋅ⅈ: 1,
>  0.954664327597906 + 2.08418596323768⋅ⅈ: 1,
>  0.954664327597906 - 2.08418596323768⋅ⅈ: 1,
>  0.0863087356449101 + 0.375733099310826⋅ⅈ: 1,
>  0.0863087356449101 - 0.375733099310826⋅ⅈ: 1,
>  0.22104987835555 + 0.140867150246981⋅ⅈ: 1,
>  0.22104987835555 - 0.140867150246981⋅ⅈ: 1,
>  -0.39235142430066 + 1.0529792538102⋅ⅈ: 1,
>  -0.39235142430066 - 1.0529792538102⋅ⅈ: 1}

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sympy?hl=en.

Reply via email to