Ask Your Question

Revision history [back]

I will not solve your interface problem, but you could search for inspiration in the file src/sage/interfaces/singular.py.

I would however suggest the Sage way:

You can get the set of somutions by looking to the variety of the ideal:

sage: I
Ideal (1/32*x*y - 5/32*y, -x^3 - 5*x + y^2 - 10) of Multivariate Polynomial Ring in x, y over Rational Field
sage: I.variety()
[]

As you can see, there is no rational solution. So, let me suggest to solve the system over the algebraic field:

sage: P = PolynomialRing(QQbar,'x,y',order='lex'); x,y = P.gens()
sage: I = Ideal((x-5)*y/32, y^2-x^3-5*x-10)
sage: I
Ideal (1/32*x*y + (-5/32)*y, -x^3 + (-5)*x + y^2 - 10) of Multivariate Polynomial Ring in x, y over Algebraic Field
sage: I.variety()
[{y: -12.64911064067352?, x: 5},
 {y: 0, x: -1.423318344753072?},
 {y: 0, x: 0.7116591723765360? - 2.553306940593506?*I},
 {y: 0, x: 0.7116591723765360? + 2.553306940593506?*I},
 {y: 12.64911064067352?, x: 5}]