PolynomialQuotientRemainder[p,q,x]
gives a list of the quotient and remainder of p and q, treated as polynomials in x.
PolynomialQuotientRemainder
PolynomialQuotientRemainder[p,q,x]
gives a list of the quotient and remainder of p and q, treated as polynomials in x.
Examples
open all close allBasic Examples (2)
Find the quotient and remainder after dividing one polynomial by another:
PolynomialQuotientRemainder[x ^ 4 + 2x + 1, x ^ 2 + 1, x]The dividend is equal to the product of the quotient and the divisor plus the remainder:
x ^ 4 + 2x + 1 == %[[1]](x ^ 2 + 1) + %[[2]]//ExpandFind the quotient and remainder for polynomials with symbolic coefficients:
PolynomialQuotientRemainder[x ^ 3, a x + b, x]Scope (4)
The resulting polynomials will have coefficients that are rational expressions of input coefficients:
PolynomialQuotientRemainder[x ^ 2 + x + 1, 2x + 1, x]PolynomialQuotientRemainder[x ^ 2 + b x + 1, a x + 1, x]PolynomialQuotientRemainder[x ^ 2 + x + 1, Pi x + 1, x]Polynomial quotient and remainder over the integers modulo
:
PolynomialQuotientRemainder[x ^ 2 + 4 x + 1, 2x + 1, x, Modulus -> 5]Polynomial quotient and remainder over a finite field:
ℱ = FiniteField[17, 3];PolynomialQuotientRemainder[ℱ[1]x ^ 5 + ℱ[123]x + ℱ[456], ℱ[789]x ^ 3 + ℱ[987]x + ℱ[654], x]PolynomialQuotientRemainder also works for rational functions:
{quo, rem} = PolynomialQuotientRemainder[(x ^ 2 + 1/(x + 2)(x - 1)), (x ^ 2 - 1/x + 3), x]The quotient and remainder of division of
by
are
and
, where
:
(x ^ 2 + 1/(x + 2)(x - 1)) == quo((x ^ 2 - 1/x + 3)) + rem//Together
and
are uniquely determined by the condition that the degree of
is less than the degree of
:
Exponent[Numerator[rem], x] < Exponent[Cancel[(x ^ 2 - 1) / Denominator[rem]], x]Options (1)
Applications (1)
Express the rational function as a polynomial and simple fraction:
{f, g} = {x ^ 2 + 2x + 1, x + 2};{q, r} = PolynomialQuotientRemainder[f, g, x]The transformed rational function:
f / g == q + r / gSimplify[%]Properties & Relations (2)
{f, g} = {x ^ 2 + 4x + 1, x + 2};{q, r} = PolynomialQuotientRemainder[f, g, x]Use Expand to verify identity:
Expand[q g + r] == fPolynomialQuotient and PolynomialRemainder:
{PolynomialQuotient[f, g, x], PolynomialRemainder[f, g, x]}PolynomialReduce generalizes PolynomialQuotientRemainder for multivariate polynomials:
PolynomialReduce[x ^ 2 + 4x + 1, {x + 2}, {x}]PolynomialQuotientRemainder[x ^ 2 + 4x + 1, x + 2, x]See Also
PolynomialQuotient PolynomialRemainder PolynomialReduce
Function Repository: PseudoQuotientRemainder
Related Guides
Text
Wolfram Research (2007), PolynomialQuotientRemainder, Wolfram Language function, https://reference.wolfram.com/language/ref/PolynomialQuotientRemainder.html (updated 2023).
CMS
Wolfram Language. 2007. "PolynomialQuotientRemainder." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2023. https://reference.wolfram.com/language/ref/PolynomialQuotientRemainder.html.
APA
Wolfram Language. (2007). PolynomialQuotientRemainder. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/PolynomialQuotientRemainder.html
BibTeX
@misc{reference.wolfram_2026_polynomialquotientremainder, author="Wolfram Research", title="{PolynomialQuotientRemainder}", year="2023", howpublished="\url{https://reference.wolfram.com/language/ref/PolynomialQuotientRemainder.html}", note=[Accessed: 13-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_polynomialquotientremainder, organization={Wolfram Research}, title={PolynomialQuotientRemainder}, year={2023}, url={https://reference.wolfram.com/language/ref/PolynomialQuotientRemainder.html}, note=[Accessed: 13-June-2026]}