Polynomials & Factoring

Polynomial Long Division: Steps, Examples and Checks

Polynomial long division rewrites A(x)÷B(x)A(x)\div B(x) as A(x)=B(x) Q(x)+R(x)A(x)=B(x)\,Q(x)+R(x), where the remainder R(x)R(x) has a smaller degree than B(x)B(x). You build Q(x)Q(x) one term at a time: divide leading terms, multiply back, subtract.

A(x)=B(x) Q(x)+R(x),deg⁡R<deg⁡BA(x) = B(x)\,Q(x) + R(x), \quad \deg R < \deg B

Try it with your numbers

Show every step

If the vocabulary of polynomials is still fresh, the whole method fits in one sentence: keep removing the largest multiple of the divisor you can, until nothing big enough is left. The sections below cover the mechanics, why the method always finishes, the three places students lose points (missing terms, fractions, subtraction signs), and how to confirm an answer in under a minute.

How does polynomial long division work?

Each pass through the method is one cycle of four moves, and every cycle produces exactly one term of the quotient.

  1. Divide the leading term of what is left by the leading term of the divisor. The result is the next quotient term.
  2. Multiply the entire divisor by that term.
  3. Subtract the product from what is left. The leading terms cancel, always.
  4. Carry the new leftover into the next cycle, and stop when its degree is lower than the divisor’s.

Take (2x3+3x2−5x+6)÷(x+3)(2x^3+3x^2-5x+6)\div(x+3). The first quotient term is 2x3÷x=2x22x^3\div x=2x^2. Then −3x-3x, then 44. Each cycle in one line looks like this:

(2x3+3x2−5x+6)−2x2(x+3)=−3x2−5x+6(−3x2−5x+6)−(−3x)(x+3)=4x+6(4x+6)−4(x+3)=−6\begin{aligned}(2x^3+3x^2-5x+6)-2x^2(x+3)&=-3x^2-5x+6\\(-3x^2-5x+6)-(-3x)(x+3)&=4x+6\\(4x+6)-4(x+3)&=-6\end{aligned}

The leftover −6-6 has degree 00, which is below the divisor’s degree 11, so the process ends. The quotient is 2x2−3x+42x^2-3x+4 and the remainder is −6-6.

The answer is written with the remainder over the divisor, not beside it:

2x2−3x+4−6x+32x^2-3x+4-\frac{6}{x+3}

A remainder is not a mistake. It is the part of the dividend that is not an exact multiple of the divisor, exactly like the 22 in 17÷5=3 remainder 217\div5=3\text{ remainder }2.

Quick check

What is the first term of the quotient in (8x3+2x−1)÷(2x+1)(8x^3+2x-1)\div(2x+1)?

Why does polynomial long division work?

The clean idea: at every cycle, the leftover equals the original dividend minus the divisor times the quotient built so far. Nothing else is happening. Choosing the quotient term as (leading term)÷\div(leading term) guarantees the top term of the leftover vanishes, so the degree of the leftover drops by at least one each cycle. A degree cannot fall forever, so the process must stop, and it stops precisely when the leftover is too small to hold another copy of the divisor’s leading term.

That is where the formula comes from. Collecting all the subtractions gives

A(x)=B(x) Q(x)+R(x),deg⁡R<deg⁡B.A(x)=B(x)\,Q(x)+R(x),\qquad \deg R<\deg B.

Same rule as whole numbers

For numbers, 17=5⋅3+217=5\cdot3+2 with 0≤2<50\le2<5. For polynomials, "smaller remainder" is replaced by "smaller degree".

The quotient and remainder are also unique. Suppose BQ1+R1=BQ2+R2BQ_1+R_1=BQ_2+R_2 with both remainders of degree below deg⁡B\deg B. Then

B (Q1−Q2)=R2−R1.B\,(Q_1-Q_2)=R_2-R_1.

If Q1≠Q2Q_1\ne Q_2, the left side has degree at least deg⁡B\deg B, but the right side has a smaller degree. That is impossible, so Q1=Q2Q_1=Q_2 and then R1=R2R_1=R_2. This is why every correct method, long division, synthetic division or guesswork plus multiplying polynomials to confirm, lands on the same answer.

How do you handle missing terms in polynomial long division?

Every power from the top degree down to the constant needs its own column. When a power is absent, write it with a coefficient of 00. Skip this and a lower term slides into the wrong column during subtraction, which quietly ruins everything after it. The same applies to the divisor, which students forget more often.

Divide 3x4−5x2+2x−13x^4-5x^2+2x-1 by x2+2x^2+2. Rewrite both:

3x4+0x3−5x2+2x−1andx2+0x+2.3x^4+0x^3-5x^2+2x-1\quad\text{and}\quad x^2+0x+2.

The first quotient term is 3x4÷x2=3x23x^4\div x^2=3x^2, then −11-11:

(3x4+0x3−5x2+2x−1)−3x2(x2+2)=−11x2+2x−1(−11x2+2x−1)−(−11)(x2+2)=2x+21\begin{aligned}(3x^4+0x^3-5x^2+2x-1)-3x^2(x^2+2)&=-11x^2+2x-1\\(-11x^2+2x-1)-(-11)(x^2+2)&=2x+21\end{aligned}

The leftover 2x+212x+21 has degree 11, below the divisor’s degree 22, so the division is finished. The remainder is a linear expression, not a number, and that is perfectly legal. The result:

3x2−11+2x+21x2+2.3x^2-11+\frac{2x+21}{x^2+2}.

Placeholders also expose patterns. Dividing x3−8x^3-8 by x−2x-2 means working with x3+0x2+0x−8x^3+0x^2+0x-8, and the quotient comes out as x2+2x+4x^2+2x+4 with remainder 00. That is the difference of cubes factorization appearing on its own, since x3−8=(x−2)(x2+2x+4)x^3-8=(x-2)(x^2+2x+4).

Quick check

Rewrite x4−3x+7x^4-3x+7 so it is ready for long division.

Polynomial long division with fractions and non-monic divisors

When the divisor’s leading coefficient is not 11, the quotient terms can be fractions. Nothing has gone wrong. Divide 4x3−2x2+5x−14x^3-2x^2+5x-1 by 2x−32x-3:

(4x3−2x2+5x−1)−2x2(2x−3)=4x2+5x−1(4x2+5x−1)−2x(2x−3)=11x−1(11x−1)−112(2x−3)=312\begin{aligned}(4x^3-2x^2+5x-1)-2x^2(2x-3)&=4x^2+5x-1\\(4x^2+5x-1)-2x(2x-3)&=11x-1\\(11x-1)-\tfrac{11}{2}(2x-3)&=\tfrac{31}{2}\end{aligned}

The quotient terms were 2x22x^2, 2x2x and 112\tfrac{11}{2} (because 11x÷2x=11211x\div2x=\tfrac{11}{2}). The answer is

2x2+2x+112+312(2x−3).2x^2+2x+\frac{11}{2}+\frac{31}{2(2x-3)}.

There is a shortcut for the stress. Dividing by 2x−32x-3 is the same as dividing by x−32x-\tfrac32 and then halving the quotient. Dividing by x−32x-\tfrac32 gives 4x2+4x+114x^2+4x+11 with remainder 312\tfrac{31}{2}, and halving the quotient gives 2x2+2x+1122x^2+2x+\tfrac{11}{2}. The remainder stays the same. You can use this to avoid fractions in the middle of the work, or to double-check the final line.

Try this: Divide 6x2+x−26x^2+x-2 by 2x−12x-1 using long division. Then factor 6x2+x−26x^2+x-2 on its own and see if the quotient matches one of your factors. (Answer: 3x+23x+2, remainder 00.)

Polynomial long division with negatives: the subtraction trap

Most lost points come from step three. Subtracting a polynomial means changing the sign of every term in it, then adding. When the product contains negative terms, those become positive, and that is where the arithmetic slips.

In the first example, the second cycle subtracted (−3x)(x+3)=−3x2−9x(-3x)(x+3)=-3x^2-9x from −3x2−5x+6-3x^2-5x+6. The xx-terms behave like this:

−5x−(−9x)=−5x+9x=4x.-5x-(-9x)=-5x+9x=4x.

A student who forgets the flip writes −14x-14x instead, and every later number is wrong. Rewriting the subtraction as “flip all signs of the product, then add” before touching the numbers removes most of these errors. The same rules are in adding and subtracting polynomials.

A built-in alarm helps: after every subtraction, the top term must vanish exactly. If a 3x23x^2 remains where 00 should be, the quotient term or the multiplication was wrong, so stop and redo that cycle before going on. This works because the quotient term was chosen specifically to cancel the top term.

Negative divisor constants add one more wrinkle. Dividing by x−4x-4 means each multiplication produces −4-4 times the quotient term, and the subtraction then turns that back into a positive contribution. Writing each product on its own line, rather than doing it in your head, is slower by seconds and safer by a lot.

How do you check a polynomial long division answer?

Three quick checks, from most reliable to fastest:

  • Multiply back: confirm B(x)⋅Q(x)+R(x)B(x)\cdot Q(x)+R(x) expands to A(x)A(x). For the second example, (x2+2)(3x2−11)=3x4−5x2−22(x^2+2)(3x^2-11)=3x^4-5x^2-22, and adding 2x+212x+21 gives 3x4−5x2+2x−13x^4-5x^2+2x-1.
  • Plug in a number: pick any xx where the divisor is not 00 and test A=BQ+RA=BQ+R. At x=1x=1 in the first example, A(1)=6A(1)=6, and B(1) Q(1)+R(1)=4⋅3+(−6)=6B(1)\,Q(1)+R(1)=4\cdot3+(-6)=6.
  • Check the degree: deg⁡Q=deg⁡A−deg⁡B\deg Q=\deg A-\deg B, and deg⁡R<deg⁡B\deg R<\deg B.

Using x=1x=1 is especially fast because evaluating a polynomial there is just adding its coefficients. A single number does not prove the answer, but a mismatch proves an error, and most slips show up immediately.

When the divisor is x−cx-c, there is an even quicker test for the remainder. The Remainder Theorem says it equals A(c)A(c). In the first example the divisor x+3x+3 has c=−3c=-3, and 2(−27)+3(9)−5(−3)+6=−62(-27)+3(9)-5(-3)+6=-6, which matches the long division result.

Quick check

Without dividing, find the remainder when x3−2x+5x^3-2x+5 is divided by x−2x-2.

Polynomial long division or synthetic division: which to use?

Long division works for any divisor. Synthetic division is a compressed version that works only when the divisor is a linear factor x−cx-c, and it records just the coefficients. When both apply, synthetic division is faster, and the answers are identical.

Long division Synthetic division
Divisor allowed Any polynomial Only x−cx-c
What you write Full terms Coefficients only
Missing terms Insert 00 Insert 00

A divisor like 2x−32x-3 can still use synthetic division if you divide by x−32x-\tfrac32 and rescale the quotient, as in the halving shortcut above. For a quadratic divisor such as x2+2x^2+2, long division is the only option here.

Zero remainder means a factor

If R(x)=0R(x)=0 when dividing by x−cx-c, then x−cx-c is a factor of A(x)A(x) and A(c)=0A(c)=0. This is the content of the Factor Theorem.

Both methods rest on the same formula, A=BQ+RA=BQ+R, so understanding long division first makes the shortcut feel earned instead of mysterious.

What is polynomial long division used for?

The most common use is factoring higher-degree polynomials. If a root is known, dividing by the matching factor drops the degree by one. The Rational Root Theorem gives candidate roots, and long division confirms one and strips it off. For x3−2x2−5x+6x^3-2x^2-5x+6, the value x=1x=1 is a root, and dividing by x−1x-1 leaves

x2−x−6,x^2-x-6,

which can then be handled with factoring trinomials to get (x−3)(x+2)(x-3)(x+2). The full factorization is (x−1)(x−3)(x+2)(x-1)(x-3)(x+2).

The second use is graphing rational functions. Dividing the numerator by the denominator splits the function into a polynomial part plus a shrinking fraction. For f(x)=x2+1x−1f(x)=\dfrac{x^2+1}{x-1}, long division gives x+1+2x−1x+1+\dfrac{2}{x-1}. As xx grows large, the fraction fades, so the graph hugs the slant asymptote y=x+1y=x+1.

Outside the classroom, the same idea powers error detection in digital communication. A cyclic redundancy check treats a message as a polynomial, divides it by a fixed generator polynomial, and attaches the remainder, so the receiver can detect corrupted data by repeating the division. That version works over arithmetic with only 00 and 11, but the structure is identical: dividend, divisor, quotient, remainder.

Practice problems

0 of 5 solved

  1. (x2+7x+12)÷(x+3)(x^2+7x+12)\div(x+3)

  2. (x2−5x+9)÷(x−2)(x^2-5x+9)\div(x-2)

  3. (2x3−5x2+x+4)÷(x−2)(2x^3-5x^2+x+4)\div(x-2)

  4. (x4−16)÷(x+2)(x^4-16)\div(x+2)

  5. (4x4−3x2+5x−2)÷(2x2−x+1)(4x^4-3x^2+5x-2)\div(2x^2-x+1)

Common questions

How do you do polynomial long division step by step?

Write both polynomials in descending order, divide the leading term of the dividend by the leading term of the divisor, multiply the whole divisor by that result, subtract, and repeat on what is left. Stop when the leftover has a smaller degree than the divisor.

When do you stop dividing polynomials?

Stop when the leftover polynomial has a lower degree than the divisor, or is 00. The leftover is the remainder, and it does not have to be a constant.

What do you do if a term is missing in polynomial long division?

Insert it with a coefficient of 00. For x3−8x^3-8 write x3+0x2+0x−8x^3+0x^2+0x-8 so that every power has its own column.

Does a remainder of zero mean the divisor is a factor?

Yes. If R(x)=0R(x)=0 then A(x)=B(x)Q(x)A(x)=B(x)Q(x), so B(x)B(x) divides A(x)A(x) exactly and is a factor of it.

How do you write the final answer with a remainder?

Write the quotient, then add the remainder over the divisor: Q(x)+R(x)B(x)Q(x)+\dfrac{R(x)}{B(x)}. If the remainder is negative, you can write it as a subtraction.

What if the divisor has a higher degree than the dividend?

Then no division step is possible. The quotient is 00 and the remainder is the dividend itself.

Up next