gcdex - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


gcdex

extended Euclidean algorithm for polynomials

 

Calling Sequence

Parameters

Description

Examples

Compatibility

Calling Sequence

gcdex(A, B, x, 's', 't')

gcdex(A, B, C, x, 's', 't')

Parameters

A, B, C

-

polynomials in the variable x

x

-

variable name

s, t

-

(optional) unevaluated names

Description

• 

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 sA&plus;tB&equals;g where g is the monic GCD (Greatest Common Divisor) of A and B. The results computed satisfy degrees<degreeBg and degreet<degreeAg. 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 sA&plus;tB&equals;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 degrees<degreeBg. If degreeCg<degreeAg+degreeBg then the polynomial t will satisfy degreet<degreeAg. 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.

Examples

gcdexx31&comma;x21&comma;x&comma;s&comma;t

x1

(1)

s,t

1,x

(2)

gcdexx2+a&comma;x21&comma;x2a&comma;x&comma;s&comma;t

s,t

1+aa+1,2aa+1

(3)

gcdex1&comma;x&comma;12x+4x2&comma;x&comma;s&comma;t

s,t

1,4x2

(4)

gcdexx21&comma;x31&comma;x&comma;x&comma;s&comma;t

Error, (in `gcdex/diophant`) the Diophantine equation has no solution

gcdx21&comma;x31

x1

(5)

Compatibility

• 

The gcdex command was updated in Maple 2018.

See Also

degree

gcd

Gcdex

igcdex