Previous Up Next

11.2.8  Bézout’s identity

Bézout’s Identity (also known as Extended Greatest Common Divisor) states that for two polynomials A(x),B(x) with greatest common divisor D(x), there exist polynomials U(x) and V(x) such that

  U(xA(x)+V(xB(x)=D(x).

The egcd or gcdex command computes the greatest common divisor of two polynomials as well as the polynomials U(x) and V(x) in the above identity.

Examples

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

1,−1,2 x+2
          
egcd([1,2,1],[1,0,-1])
     


1
,
−1
,
2,2

          
egcd(y^2-2*y+1,y^2-y+2,y)
     

y−2,−y+3,4
          
egcd([1,-2,1],[1,-1,2])
     


1,−2
,
−1,3
,
4

          

Previous Up Next