On Thu, Jun 4, 2009 at 4:22 PM, [email protected]
<[email protected]> wrote:
>
> I have the same question about solve(). I have a system of quadratic
> equations, and i want only the solution real of the system.
>
> I tried to define the space for all the variables i used, with assume
> ()  but solve() return all the solution complex or real.
>
> Does exist any solution in order to avoid this ?

You can try something like

sage: solns = solve(x^3 + 1 == 0, x)
sage: [eq for eq in solns if eq.rhs().imag_part() == 0]
[x == 1/2*I*(-1)^(1/3)*sqrt(3) - 1/2*(-1)^(1/3)]

which may work for your particular problem.

--Mike

--~--~---------~--~----~------------~-------~--~----~
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/sage-support
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to