gcdex
extended Euclidean algorithm for polynomials
Calling Sequence
Parameters
Description
Examples
Compatibility
gcdex(A, B, x, 's', 't')
gcdex(A, B, C, x, 's', 't')
A, B, C
-
polynomials in the variable x
x
variable name
s, t
(optional) unevaluated names
For the first calling sequence (when the number of parameters is less than six), gcdex applies the extended Euclidean algorithm to compute unique polynomials s, t, and g in x such that s⁢A+t⁢B=g where g is the monic GCD (Greatest Common Divisor) of A and B. The results computed satisfy degree⁡s<degree⁡Bg and degree⁡t<degree⁡Ag. The GCD g is returned as the function value.
If arguments s and t are specified, they are assigned the cofactors.
In the second calling sequence, gcdex solves the polynomial Diophantine equation s⁢A+t⁢B=C for polynomials s and t in x. Let g be the GCD of A and B. The input polynomial C must be divisible by g; otherwise, an error message is displayed. The polynomial s computed satisfies degree⁡s<degree⁡Bg. If degree⁡Cg<degree⁡Ag+degree⁡Bg then the polynomial t will satisfy degree⁡t<degree⁡Ag. The NULL value is returned as the function value.
In this case, s and t are not optional.
Note that if the input polynomials are multivariate then, in general, s and t will be rational functions in variables other than x.
gcdex⁡x3−1,x2−1,x,s,t
x−1
s,t
1,−x
gcdex⁡x2+a,x2−1,x2−a,x,s,t
−−1+aa+1,2⁢aa+1
gcdex⁡1,x,1−2⁢x+4⁢x2,x,s,t
1,4⁢x−2
gcdex⁡x2−1,x3−1,x,x,s,t
Error, (in `gcdex/diophant`) the Diophantine equation has no solution
gcd⁡x2−1,x3−1
The gcdex command was updated in Maple 2018.
See Also
degree
gcd
Gcdex
igcdex
Download Help Document