Previous Up Next

11.2.9  Solving au+bv=c over polynomials

A consequence of Bézout’s identity is that given polynomials A(x), B(x) and C(x), there exist polynomials U(x) and V(x) such that

  C(x)=U(xA(x)+V(xB(x)

exactly when C(x) is a multiple of the greatest common divisor of A(x) and B(x). The abcuv command solves this polynomial equation.

Examples

abcuv(x^2+2*x+1,x^2-1,x+1)
     



1
2
,−
1
2



          
abcuv(x^2+2*x+1,x^2-1,x^3+1)
     



x+2
2
,
3
2
 x


          
abcuv([1,2,1],[1,0,-1],[1,0,0,1])
     
[▯ 
1
2
,−
1
2
,
1
2
 ▯, ▯ −
1
2
,
1
2
,−
1
2
▯]
          

Previous Up Next