Gcdex - Maple Programming Help

Gcdex

inert gcdex function

 Calling Sequence Gcdex(a, b, x, 's', 't')

Parameters

 a, b - multivariate polynomials x - main variable s, t - (optional) unevaluated names

Description

 • The Gcdex function is a placeholder for the extended Euclidean algorithm applied to a and b which are polynomials in x over a field.  Gcdex computes g, the greatest common divisor of a and b, which is a monic polynomial in x.  Additionally s and t are (if present) assigned polynomials in x such that  $as+bt=g$  with $\mathrm{degree}\left(s,x\right)<\mathrm{degree}\left(b,x\right)$ and $\mathrm{degree}\left(t,x\right)<\mathrm{degree}\left(a,x\right)$. Gcdex is used in conjunction with either mod or evala as described below, both of which define the coefficient domain.
 • The call Gcdex(a, b, x, 's', 't') mod p performs the computation modulo p a prime integer. The multivariate polynomials a and b must have rational coefficients or coefficients in a finite field specified by RootOfs.
 • The call evala(Gcdex(a, b, x, 's', 't')) does likewise. The multivariate polynomials a and b must have algebraic number (or function) coefficients specified by RootOfs.

Examples

 > $\mathrm{Gcdex}\left({x}^{2}+x+1,{x}^{2}-x+1,x,'s','t'\right)\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}\mathbf{mod}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}11$
 ${1}$ (1)
 > $s,t$
 ${5}{}{x}{+}{6}{,}{6}{}{x}{+}{6}$ (2)
 > $\mathrm{alias}\left(\mathrm{sqrt2}=\mathrm{RootOf}\left({x}^{2}-2\right)\right):$
 > $\mathrm{evala}\left(\mathrm{Gcdex}\left({x}^{2}-2,{x}^{2}-\mathrm{sqrt2}x,x,'s','t'\right)\right)$
 ${-}{\mathrm{sqrt2}}{+}{x}$ (3)
 > $s,t$
 $\frac{{1}}{{2}}{}{\mathrm{sqrt2}}{,}{-}\frac{{1}}{{2}}{}{\mathrm{sqrt2}}$ (4)
 >