Close
Close window
gcdex - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Mozilla Firefox.
Maplesoft logo
Maplesoft logo

Online Help

All Products Maple MapleSim


[フレーム] [フレーム]

gcdex

extended Euclidean algorithm for polynomials

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

>

gcdx21&comma;x31

x1

(5)

Compatibility

The gcdex command was updated in Maple 2018.

See Also


Download Help Document

AltStyle によって変換されたページ (->オリジナル) /