Mathematica 9 is now available
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.
Mathematica > Mathematics and Algorithms > Polynomial Algebra > Polynomial Division >

PolynomialRemainder

PolynomialRemainder[p, q, x]
gives the remainder from dividing p by q, treated as polynomials in x.
  • The degree of the result in x is guaranteed to be smaller than the degree of q.
  • With the option Modulus->n, the remainder is computed modulo n.
Find the remainder after dividing one polynomial by another:
Find the remainder after dividing one polynomial by another:
In[1]:=
Click for copyable input
Out[1]=
The resulting polynomial will have coefficients that are rational expressions of input coefficients:
PolynomialRemainder also works for rational functions:
Use a prime modulus:
Euclid's algorithm for the greatest common divisor:
Divide by the leading coefficient:
For a polynomial f, f=qg+r, where q is given by PolynomialQuotient:
Use Expand to verify identity:
To get both quotient and remainder use PolynomialQuotientRemainder:
PolynomialReduce generalizes PolynomialRemainder for multivariate polynomials:
The variable assumed for the polynomials matters:
New in 1
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team