# PolynomialRemainder

PolynomialRemainder[p,q,x]

gives the remainder from dividing p by q, treated as polynomials in x.

# Details and Options • The degree of the result in x is guaranteed to be smaller than the degree of q.
• Unlike PolynomialMod, PolynomialRemainder performs divisions in generating its results.
• With the option Modulus->n, the remainder is computed modulo n.

# Examples

open allclose all

## Basic Examples(3)

Find the remainder after dividing one polynomial by another:

The difference of the dividend and the remainder is a polynomial multiple of the divisor:

If the dividend is a multiple of the divisor, then the remainder is zero:

Find the remainder of division for polynomials with symbolic coefficients:

Coefficients of the quotient are rational functions of the input coefficients:

## Scope(3)

The resulting polynomial will have coefficients that are rational expressions of input coefficients:

Polynomial remainder over the integers modulo :

PolynomialRemainder also works for rational functions:

The quotient and remainder of division of by are and , where : and are uniquely determined by the condition that the degree of is less than the degree of :

## Options(1)

### Modulus(1)

Use a prime modulus:

## Applications(1)

Euclid's algorithm for the greatest common divisor:

## Properties & Relations(3)

For a polynomial , , where is given by PolynomialQuotient:

Use Expand to verify identity:

To get both quotient and remainder use PolynomialQuotientRemainder:

PolynomialReduce generalizes PolynomialRemainder for multivariate polynomials:

## Possible Issues(1)

The variable assumed for the polynomials matters: