
pdivide - pseudo-division of polynomials

Calling sequence:
pdivide(poly_1, poly_2 [ , opt ])
pdivide(expr_1, expr_2 [ , indet ]  [ , opt ])
indet  --->  [ expr ]

Parameter:
poly_1, poly_2          --  polynomials
expr, expr_1, expr_2    --  expressions
opt                     --  one of the options Quo or Rem

Overloading:

1,2

Summary:

pdivide(p,q) calculates the pseudo-division of the univariate polynomial p
by q, and returns b, s, r which satisfy the equation bp = sq + r, whereby b
= lcoeff(q)^(degree(p) - degree(q) + 1). If no option is given then the result
is the sequence consisting of b, s and r.

 o  If the identifier Quo is given as the option opt then only the pseudo-
    quotient s is calculated.

  o  If the identifier Rem is given as the option then only the pseudo-remainder
     r is returned.

Coefficient rings that are domains  do not need special methods for this
function because the coefficients are not divided by pdivide.

The first two arguments may be polynomials or expressions and optionally
a listcontaining a variable. Expressions are converted into polynomials (see
function poly). pdivide returns FAIL if the expressions cannot be converted.
Both polynomials must have the same type, i.e. their variables and coefficient
rings must be identical.  The result has the same type as the first two
arguments. pdivide is a kernel function.

>>  p := poly(x^3+x+1): q := poly(3*x^2+x+1):
    pdivide(p, q);

      9, poly(3*x-1, [x]), poly(7*x+10, [x])

>>  pdivide(x^3+x+1, a*x^2+x+1, [x], Quo);

      a*x - 1

See also:  content , divide , multcoeffs , poly

