PolynomialQuotient[p,q,x]
gives the quotient of p and q, treated as polynomials in x, with any remainder dropped.
PolynomialQuotient
PolynomialQuotient[p,q,x]
gives the quotient of p and q, treated as polynomials in x, with any remainder dropped.
Details and Options
- With the option Modulus->n, the quotient is computed modulo n.
Examples
open all close allBasic Examples (3)
The quotient of two polynomials:
PolynomialQuotient[x ^ 4 + 2x + 1, x ^ 2 + 1, x]The degree of the remainder is less than the degree of the divisor:
x ^ 4 + 2x + 1 - %(x ^ 2 + 1)//ExpandThe quotient of
by
, with the remainder dropped:
PolynomialQuotient[x ^ 2, x + a, x]x ^ 2 - % (x + a)//ExpandIf the degree of the dividend is less than the degree of the divisor, then the quotient is zero:
PolynomialQuotient[x ^ 2 + 2x + 1, x ^ 3, x]Scope (4)
The resulting polynomial will have coefficients that are rational expressions of input coefficients:
PolynomialQuotient[x ^ 2 + x + 1, 2x + 1, x]PolynomialQuotient[x ^ 2 + b x + 1, a x + 1, x]PolynomialQuotient[x ^ 2 + x + 1, Pi x + 1, x]Polynomial quotient over the integers modulo
:
PolynomialQuotient[x ^ 2 + 4 x + 1, 2x + 1, x, Modulus -> 5]Polynomial quotient over a finite field:
ℱ = FiniteField[17, 3];PolynomialQuotient[ℱ[1]x ^ 5 + ℱ[123]x + ℱ[456], ℱ[789]x ^ 3 + ℱ[987]x + ℱ[654], x]PolynomialQuotient also works for rational functions:
PolynomialQuotient[(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)) - %((x ^ 2 - 1/x + 3))//Together
and
are uniquely determined by the condition that the degree of
is less than the degree of
:
Exponent[Numerator[%], x] < Exponent[Cancel[(x ^ 2 - 1) / Denominator[%]], x]Options (1)
Applications (2)
When the divisor
divides the dividend
, then the quotient
of
by
satisfies
:
f = x ^ 4 - 4;
g = x ^ 2 - 2;Use PolynomialGCD to check that
divides
:
PolynomialGCD[f, g] == gq = PolynomialQuotient[f, g, x]Expand[f - q g]In general, the quotient
of
by
satisfies
:
f = x ^ 4 - 5x + 4;
g = x ^ 2 - 2;q = PolynomialQuotient[f, g, x]The degree of the remainder
is less than the degree of
:
r = Expand[f - q g]Exponent[r, x] < Exponent[g, x]Factor a polynomial by finding one root at a time:
f = x ^ 3 + 6x ^ 2 + 11x + 6;FindRoot[f, {x, 0}]Take a quotient by the first factor:
PolynomialQuotient[f, x + 1, x]Find another root and compute the quotient:
FindRoot[%, {x, 0}]PolynomialQuotient[%%, x + 2, x]Verify the obtained factorization:
f - (x + 1)(x + 2)(x + 3)//ExpandProperties & Relations (4)
For a polynomial f, f==gq+r, where r is given by PolynomialRemainder:
{f, g} = {x ^ 2 + 4x + 1, x + 2};q = PolynomialQuotient[f, g, x]r = PolynomialRemainder[f, g, x]Use Expand to verify identity:
Expand[q g + r] == fTo get both quotient and remainder use PolynomialQuotientRemainder:
PolynomialQuotientRemainder[f, g, x]PolynomialReduce generalizes PolynomialQuotient for multivariate polynomials:
PolynomialReduce[x ^ 2 + 4x + 1, {x + 2}, {x}]Use PolynomialGCD to find a common divisor:
{f, g} = {x ^ 2 + 3x + 2, x ^ 2 + 5x + 6};h = PolynomialGCD[f, g]Use PolynomialQuotient to see the resulting factorization:
f == PolynomialQuotient[f, h, x]hg == PolynomialQuotient[g, h, x]hFor rational functions common divisors are not automatically canceled:
f / gCancel effectively uses PolynomialQuotient to cancel common divisors:
Cancel[%]The Cyclotomic polynomials are defined as quotients:
PolynomialQuotient[x ^ 5 - 1, x - 1, x]Cyclotomic[5, x]Possible Issues (2)
The result depends on what is assumed to be a variable:
{PolynomialQuotient[x ^ 3 + y ^ 2, x - y, x], PolynomialQuotient[x ^ 3 + y ^ 2, x - y, y]}The result from PolynomialQuotient depends on recognizing zeros:
PolynomialQuotient[x ^ 3 + x + 1, zero x ^ 2 + x + 1, x]PolynomialQuotient[x ^ 3 + x + 1, x + 1, x]zero = Sin[Sqrt[2] + Sqrt[3]] - Sin[Sqrt[5 + 2Sqrt[6]]];FullSimplify[zero]The result is as if the hidden zero was not zero:
PolynomialQuotient[x ^ 3 + x + 1, zero x ^ 2 + x + 1, x]//NSee Also
PolynomialRemainder PolynomialReduce PolynomialGCD Apart Cancel Quotient
Function Repository: PseudoQuotientRemainder
Tech Notes
Related Guides
History
Introduced in 1988 (1.0) | Updated in 2023 (13.3)
Text
Wolfram Research (1988), PolynomialQuotient, Wolfram Language function, https://reference.wolfram.com/language/ref/PolynomialQuotient.html (updated 2023).
CMS
Wolfram Language. 1988. "PolynomialQuotient." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2023. https://reference.wolfram.com/language/ref/PolynomialQuotient.html.
APA
Wolfram Language. (1988). PolynomialQuotient. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/PolynomialQuotient.html
BibTeX
@misc{reference.wolfram_2026_polynomialquotient, author="Wolfram Research", title="{PolynomialQuotient}", year="2023", howpublished="\url{https://reference.wolfram.com/language/ref/PolynomialQuotient.html}", note=[Accessed: 12-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_polynomialquotient, organization={Wolfram Research}, title={PolynomialQuotient}, year={2023}, url={https://reference.wolfram.com/language/ref/PolynomialQuotient.html}, note=[Accessed: 12-June-2026]}