> ("solve" seems to be very much an overkill and it is not that
> transparent in what it does...)

Definitely! And I won't even believe the output...

> I want to solve polynomial equations and in order to do so, I do
> something like:
>
> sage: R.<x,y> = PolynomialRing(QQ, order='lex')
> sage: I = R.ideal([x*y-1, x^2-y^2])
> sage: I.groebner_basis()
> [x - y^3, y^4 - 1]
>
> What is the Sage command to do this operation, i.e., backwards
> substituting to find a solution?

One possibility (I do not think there is a ready made function)

sage: sage: R.<x,y> = PolynomialRing(QQ, order='lex')
sage: sage: I = R.ideal([x*y-1, x^2-y^2])
sage: sage: I.groebner_basis()
[x - y^3, y^4 - 1]
sage: f1, f2 = I.groebner_basis()
sage: Ry.<y> = PolynomialRing(QQ)
sage: Rx.<x> = PolynomialRing(QQbar)
sage: roots_y = Ry(f2).roots(QQbar)
sage: print roots_y
[(-1, 1), (1, 1), (-1*I, 1), (1*I, 1)]
sage: for r,_ in roots_y:
....:    for s,_ in Rx(f1.subs(y=r)).roots(QQbar):
....:        print (s,r)
(-1, -1)
(1, 1)
(1*I, -1*I)
(-1*I, 1*I)

Vincent

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.

Reply via email to