On May 23, 3:21 am, Gaëtan Bisson <[EMAIL PROTECTED]> wrote:
> Dear SAGE community,
>
> I would like to do some symbolic computation using SAGE, namely, to
> compute the extended GCD of two polynomials, one of them having symbolic
> coefficients.
>
> Here is a short example:
>   sage: R.<a,b>=PolynomialRing(RationalField(),2);
>   sage: S.<x>=PolynomialRing(R);
>   sage: xgcd(x^2,a+x*b)
>
> As an answer, I would expect:
>   (b^2/a^2, 1, -x/a+b/a^2)

You need to explicitly use the field of fractions of R:

sage: R.<a,b> = QQ[]
sage: S.<x> = R.fraction_field()[]
sage: xgcd(x^2, a*x+b)
(b^2/a^2, 1, ((-1)/a)*x + b/a^2)

Carl

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-support@googlegroups.com
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