
gcdex - extended gcd algorithm for polynomials

Calling sequence:
gcdex(a, b, x)
gcdex(p, q)

Parameters:
a, b   --  expressions
x      --  indeterminate
p, q   --  univariate polynomials

Summary:

gcdex(a,b,x) returns a tuple g,s,t where g is the gcd of a and b with
respect to the variable x, and s,t are polynomials such that g = s*a + t*b,
with degree(s,x)<degree(b,x), and degree(t,x)<degree(a,x).

>>  gcdex(poly(x^3+1),poly(x^2+2*x+1));

                                              /  x          \
             poly(x + 1, [x]), poly(1/3, [x]), poly-- - + 2/3, [x]-
                                              \  3          /

>>  gcdex(x^3+a,x^2+1,x);

                                     2

                       a + x   - a x - x  + 1
                    1, ------, ---------------
                        2          2
                       a  + 1     a  + 1

See also:  gcd, igcdex , pdioe , poly

