Learn
Lesson · Polynomials and Factoring · Division and roots

Polynomial Long Division

The long division you learned for integers, performed on polynomials. It works for a divisor of any degree, it always terminates, and it produces a quotient and a remainder that are unique — which is what makes it an algorithm rather than a technique.

f(x) = d(x)·q(x) + r(x) with deg r < deg d or r = 0 2x⁴ - 3x³ + 5x - 1 ÷ (x² - x + 2) q = 2x² - x - 5 r = 2x + 9
The division algorithm for polynomials

Core ideas

What this lesson establishes

One statement carries this lesson. Everything in the procedure exists to produce the q and r it promises.

1

Division always succeeds, but not always exactly

For any f and any non-zero d there are a quotient q and a remainder r with f = dq + r. A remainder of zero means d is a factor of f; any other remainder means it is not.

2

The remainder must have smaller degree than the divisor

That is the stopping rule, and it is not a convention. While the leading term of what is left is still divisible by the leading term of d, there is another step to take.

3

Missing powers must be written in

2x⁴ - 3x³ + 5x - 1 has no x² term, and the division needs a column for it. Writing + 0x² costs one symbol; omitting it misaligns every subtraction that follows.

The material

Long division for polynomials

The algorithm, the stopping rule, and the subtraction that goes wrong.

Dividing 17 by 5 gives 3 remainder 2, and the content of that sentence is 17 = 5 · 3 + 2 with 2 < 5. Polynomial division makes the same statement, with degree playing the part of size.

Theorem · The division algorithm for polynomials

Let f and d be polynomials with d ≠ 0. There exist unique polynomials q and r such that f(x) = d(x)q(x) + r(x), where either r = 0 or deg r < deg d.

Uniqueness is the half that is usually skipped, and it is what lets you check an answer. If you and I divide the same f by the same d and get different quotients, one of us is wrong; there is no second correct answer to compare against.

Definition · The procedure

Write both polynomials in descending order with every power present. Divide the leading term of the current remainder by the leading term of the divisor to get the next quotient term; multiply the whole divisor by that term; subtract; bring down. Stop when the remainder's degree is less than the divisor's.

Only the LEADING terms decide each quotient term. To start 2x⁴ - 3x³ + 0x² + 5x - 1 divided by x² - x + 2 you ask what times x² gives 2x⁴, and the answer 2x² depends on nothing else in either polynomial.

Example · The first step in full

2x² · (x² - x + 2) = 2x⁴ - 2x³ + 4x². Subtracting this from 2x⁴ - 3x³ + 0x² gives -x³ - 4x², because -3x³ - (-2x³) = -x³ and 0x² - 4x² = -4x². Both signs come from the subtraction, and both are places where a term is commonly lost.

Subtracting a polynomial means subtracting every one of its terms. “Adding and Subtracting Polynomials” made this point about -(x - 3); here the same slip costs you the rest of the division, because each line feeds the next. If you find it easier, negate the product and add.

Reading the result

The division above ends with q = 2x² - x - 5 and r = 2x + 9. The remainder has degree 1, the divisor degree 2, so the stopping rule is satisfied and the work is finished. Written out in full: 2x⁴ - 3x³ + 5x - 1 = (x² - x + 2)(2x² - x - 5) + (2x + 9).

Because r ≠ 0, the divisor is not a factor. Had the remainder been 0, we would have a factorisation of a quartic into a quadratic times a quadratic — which is how division earns its place in a course about factoring, and what “The Factor Theorem and Rational Roots” exploits.

Theorem · Degrees add

If r = 0 then deg f = deg d + deg q. So dividing a degree-4 polynomial by a degree-2 one gives a degree-2 quotient, and a quotient of any other degree is an arithmetic error you can catch before checking a single coefficient.

Interactive

Long division

The remainder before and after every subtraction

Long division
fd · qr

Method

Dividing one polynomial by another

The setup carries most of the risk; the loop itself is short.

1

Write both in descending order, with gaps filled

Insert 0x^k for every missing power in the dividend. The divisor needs the same treatment if it has gaps.

2

Divide leading term by leading term

That single division gives the next term of the quotient. Ignore every other term in both polynomials while you do it.

3

Multiply and subtract, carefully

Multiply the entire divisor by the new quotient term, then subtract the entire product. Change every sign, not just the first.

4

Stop by degree, then state the result

When the remainder's degree drops below the divisor's, stop and write f = dq + r. Expand it to check — the check catches every sign error at once.

Check yourself

Score 0 / 0

Dividing 2x⁴ - 3x³ + 5x - 1 by x² - x + 2

The dividend has no x² term, so it is written with 0x² in place. The divisor has degree 2, so the division stops as soon as what remains has degree 1 or 0.

2x² - x - 5 ┌────────────────────────────────────── x² - x + 2 │ 2x⁴ - 3x³ + 0x² + 5x - 1 2x⁴ - 2x³ + 4x² 2x² · (x² - x + 2) ───────────────────── - x³ - 4x² + 5x - x³ + x² - 2x -x · (x² - x + 2) ────────────────── - 5x² + 7x - 1 - 5x² + 5x - 10 -5 · (x² - x + 2) ──────────────── 2x + 9 degree 1 < 2 : stop 2x⁴ - 3x³ + 5x - 1 = (x² - x + 2)(2x² - x - 5) + (2x + 9)

Each subtraction is where the work is lost. At the second step the line being subtracted is -x³ + x² - 2x, and -4x² - (+x²) is -5x² while 5x - (-2x) is 7x. Two sign changes in one line, both from the same rule.

The check is mechanical: expand (x² - x + 2)(2x² - x - 5) to get 2x⁴ - 3x³ + 3x - 10, then add 2x + 9 to get 2x⁴ - 3x³ + 5x - 1. That is the original dividend, so the quotient and remainder are right.

For a faded division, write x³ - 5x + 6 as x³ + 0x² - 5x + 6 and divide by x² + x - 2. The first quotient term x is supplied. Finish the multiply-subtract loop and verify the identity. You should get q = x - 1, r = -2x + 4; a remainder containing x² means you stopped before its degree fell below the divisor's.

Common mistakes

1
Subtracting only the first term of the productThe whole product is subtracted, so every sign in it flips. This single error accounts for most wrong quotients, and because each line feeds the next, it is invisible until the final check fails.
2
Omitting a missing powerLeaving out 0x² slides every later coefficient one column left, and the result is a quotient of the right degree with entirely wrong coefficients — the kind of wrong answer that looks plausible.
3
Dividing whole polynomials instead of leading termsEach quotient term comes from the leading terms alone. Trying to account for the divisor's other terms at that moment is doing the multiply step early, and it double-counts them.

Check your understanding

✓
Finish when you can divide, state f = dq + r, and check it by expanding.

The result is not the quotient on its own. You should write the full identity with the remainder in place, and verify it by multiplying out — which is the only step here that confirms every sign at once.

Note: Long division works for a divisor of any degree, and that generality is why it comes first. “Synthetic Division and the Remainder Theorem”'s synthetic division is faster but applies only when the divisor is x - c; when a divisor is quadratic or worse, this is the method, and there is no shortcut waiting.

Kept in this browser only, for you. Nothing is sent anywhere and nothing checks it. Carry it to another device.

Feedback and recommendations

Something to change about this lesson? Write it down, tick it off when it is handled, and export the list when you want to act on it. Kept in this browser only: nothing is sent anywhere, and nobody is notified.

No recommendations yet for this lesson.