1 | initial version |
sage: eq = x^2+2*x-3==0
sage: solve(eq,x)
[x == -3, x == 1]
sage: [sol for sol in solve(eq,x) if sol.rhs()>0]
[x == 1]
But keep in mind that not every quadratic equation has one positive and one negative solution! (Or even two real solutions...)