Bezout coefficients for Polynomials [closed]

asked 2015-05-27 12:08:47 -0500

this post is marked as community wiki

This post is a wiki. Anyone with karma >750 is welcome to improve it.

I want to find the bezout coefficient for those 2 polynomials :

f = 1+x-x^2-x^4+x^5 and g = -1+x^2+x^3-x^6 when I use the gcd function in sage the output is :

sage: gcd(f,g)
sage: 1

but when I use xgcd(f,g) it gives me the following :

(-27, 9x^5 - 18x^2 - 9x - 9, 9x^4 - 9x^3 - 18x + 18)

I want xgcd to give me 1 instead of -27 so the polynomials will be the bezout coefficients

P.S: I can't divide the polynomials by -27 because i'm working in ZZ

edit retag flag offensive reopen merge delete

Closed for the following reason duplicate question by kcrisman
close date 2015-05-27 16:10:18.557020