Let
be a field.
Let
be three nonzero univariate polynomials in
with coefficients in
.
We are interested in computing the polynomials
such that

(2) 
holds.
Let
be the gcd of
and let
be such that

(3) 
holds.
Remember that
can be computed by the Extended Euclidean Algorithm.
Marc Moreno Maza
20080318