Polynomial Long Division

Learning goals

  • State the division algorithm and its degree condition
  • Read a polynomial in standard form as place-value columns, like a base-xx numeral
  • Find each quotient term by dividing the leading terms
  • Insert 0xk0x^k placeholders for every missing power
  • Check a division by expanding DQ+RDQ + R, and read a zero remainder as a factorization

The promise integer division makes

Before touching a polynomial, look closely at what integer division actually delivers, because the polynomial version copies it clause for clause.

Divide 4747 by 55. The process returns 99 with 22 left over, and the entire content of that answer is one equation together with one condition:

47=5⋅9+2,0≤2<5.47 = 5 \cdot 9 + 2, \qquad 0 \leq 2 < 5.

The equation says the answer is correct: nine fives and two more really do rebuild 4747. The condition says the division is finished: fewer than five remain, so no further five can be pulled out. Drop the condition and “answers” multiply without end. The equations 47=5⋅8+747 = 5 \cdot 8 + 7 and 47=5⋅6+1747 = 5 \cdot 6 + 17 are both true, yet nobody calls 88 remainder 77 the result of dividing 4747 by 55, because a remainder of 77 still contains a five. Only the demand that the remainder be smaller than the divisor pins down the pair (9,2)(9, 2) as the one and only answer.

So division with remainder is really two promises: an identity, dividend equals divisor times quotient plus remainder, and a smallness condition that makes the identity’s pieces unique. Keep both promises in view; the whole lesson is about keeping them for polynomials.

Both promises are visible at once if you lay the dividend out in rows. In the figure below you set a number of dots and a row width. The dots fill rows from the top left, and any dots that cannot complete a row are drawn hollow.

Start at 1111 dots in rows of 44. Two rows fill and three dots are left hollow, which is the identity 11=4⋅2+311 = 4 \cdot 2 + 3 drawn rather than computed. The row width is the divisor, the solid rows are the quotient, and the hollow dots are the remainder. Try to break the smallness condition and you cannot: any four hollow dots would have completed another row, so the hollow dots always come out fewer than the row width. That is what “no further copy of the divisor can be pulled out” looks like. Set the count to 1212 against the same rows of 44 and the hollow dots vanish, the R=0R = 0 case where the divisor goes in exactly.

Reading a divisor, a quotient, and a remainder off the rows

11 dots in rows of 4 make 2 full rows with 3 dots left over. So 11 = 4 times 2 + 3, remainder 3. Dots laid out in equal rows, filling from the top left. Dots that do not complete a row are drawn hollow. Use the controls below the figure to change the number of dots or the row width.
Dots Rows of

11 dots in rows of 4 make 2 full rows with 3 dots left over. So 11 = 4 times 2 + 3, remainder 3.

A dividend of dots packed into rows the size of the divisor, with whatever will not finish a row left unfilled. The solid rows count how many times the divisor goes in and the unfilled dots are what remains, so one picture carries both halves of a division at once.

A polynomial is a numeral written in base x

The last lesson gave you the vocabulary. The degree of a polynomial is its highest power, the leading term carries that power, and standard form lists the terms in falling powers. Now set a numeral and a polynomial side by side:

2,572=2⋅103+5⋅102+7⋅10+2and2x3+5x2+7x+2.2{,}572 = 2 \cdot 10^3 + 5 \cdot 10^2 + 7 \cdot 10 + 2 \qquad \text{and} \qquad 2x^3 + 5x^2 + 7x + 2.

Same skeleton. The coefficients play the digits, and the powers of xx play the places. Two honest differences separate them. First, a numeral’s digits stay between 00 and 99, and any overflow is handled by carrying into the next column. A polynomial’s coefficients, by contrast, are unrestricted, so nothing ever carries and the columns never interact. In that one respect polynomial arithmetic is simpler than integer arithmetic. Second, a numeral names a single number, while a polynomial’s value moves with xx. That second difference is why the smallness condition needs translating. The phrase “the remainder is smaller than the divisor” cannot mean numerical size, because which of two polynomials is bigger can flip as xx changes. At x=2x = 2, xx is smaller than x2x^2, since x2=4x^2 = 4. At x=12x = \tfrac12, though, xx is larger than x2x^2, since x2=14x^2 = \tfrac14. The measure that does not move with xx is the degree, so degree takes over the job that size did for integers.

With that translation made, here is the exact claim this lesson runs on, proves, and then uses. It is called the division algorithm for polynomials. Let P(x)P(x) be any polynomial (the dividend) and D(x)D(x) any nonzero polynomial (the divisor). Then there is exactly one pair of polynomials Q(x)Q(x) (the quotient) and R(x)R(x) (the remainder) with

P(x)=D(x) Q(x)+R(x),where R=0  or  deg⁡R<deg⁡D.P(x) = D(x)\,Q(x) + R(x), \qquad \text{where } R = 0 \ \text{ or } \ \deg R < \deg D.

Two small print items. The zero polynomial has no degree, since it has no leading term, which is why the condition says ”R=0R = 0 or deg⁡R<deg⁡D\deg R < \deg D” instead of just deg⁡R<deg⁡D\deg R < \deg D. And D=0D = 0 is excluded for the same reason 47÷047 \div 0 is: with P=0⋅Q+RP = 0 \cdot Q + R, nothing would stop RR from just equaling PP, and the division would promise nothing.

Each quotient term is forced

The algorithm is a loop, and the loop has only one legal move. Watch it once in slow motion on

(x2+5x+7)÷(x+2).(x^2 + 5x + 7) \div (x + 2).

Your goal is to peel copies of x+2x + 2 out of x2+5x+7x^2 + 5x + 7 until what is left is too small, in degree, to contain another copy. The tool is subtraction: subtract a multiple of the divisor, record how many copies that multiple used, repeat. To make progress you must kill the dividend’s leading term x2x^2, and here is the key point: a multiple q⋅(x+2)q \cdot (x + 2) cancels x2x^2 exactly when its own leading term is x2x^2. If you take qq to be a single term, the leading term of q⋅(x+2)q \cdot (x + 2) is just q⋅xq \cdot x, so you need q⋅x=x2q \cdot x = x^2, which forces

q=x2x=x.q = \frac{x^2}{x} = x.

Divide the leading terms: that is the whole rule, and no other choice touches the x2x^2. Multiply back and subtract, remembering to subtract the entire product:

x(x+2)=x2+2x,(x2+5x+7)−(x2+2x)=3x+7.x(x + 2) = x^2 + 2x, \qquad (x^2 + 5x + 7) - (x^2 + 2x) = 3x + 7.

The x2x^2 is gone, exactly as designed. What remains is a smaller division problem, 3x+73x + 7 divided by x+2x + 2, so run the same forced move again: 3x÷x=33x \div x = 3, then 3(x+2)=3x+63(x + 2) = 3x + 6, and (3x+7)−(3x+6)=1(3x + 7) - (3x + 6) = 1. Now the working remainder 11 has degree 00, which is below the divisor’s degree 11. The loop must stop, because any further multiple of x+2x + 2 would introduce a new xx term rather than cancel anything. Collecting the two recorded quotient terms, xx and 33,

x2+5x+7=(x+2)(x+3)+1.x^2 + 5x + 7 = (x + 2)(x + 3) + 1.

The traditional tableau records exactly these moves in columns, quotient on the roof, each product written under the matching powers:

x+3x+2 ) x2+5x+7‾− (x2+2x)‾+73x+7− (3x+6)‾1\def\arraystretch{1.25} \begin{array}{r} x + 3 \\ x+2\ {\overline{\smash{\big)}\ x^2+5x+7}} \\ \underline{-\,(x^2+2x)}\phantom{{}+7} \\ 3x+7 \\ \underline{-\,(3x+6)} \\ 1 \end{array}

Now cash in the base-xx idea. Substitute x=10x = 10 everywhere: the dividend becomes 157157, the divisor becomes 1212, the quotient becomes 1313, and the remainder stays 11. Check it as an integer sentence: 12⋅13+1=156+1=15712 \cdot 13 + 1 = 156 + 1 = 157. The division you just performed mirrors a grade-school division almost move for move, with one comfort added: since coefficients never carry, each column settles in a single step.

One habit before moving on. Every polynomial division can be checked by multiplying back, and the check is cheaper than the division was:

(x+2)(x+3)+1=x2+5x+6+1=x2+5x+7.✓(x + 2)(x + 3) + 1 = x^2 + 5x + 6 + 1 = x^2 + 5x + 7. \checkmark

Make the check a reflex. The division algorithm’s identity is an equation about every value of xx at once, so expanding DQ+RDQ + R and comparing with PP catches any slip immediately.

Anatomy of a polynomial long divisionThe tableau for dividing x squared plus 5 x plus 7 by x plus 2, with the quotient x plus 3 above the overline, two subtraction rows, and the remainder 1 at the bottom. Accent labels name the divisor, dividend, quotient, and remainder, and muted notes show the degree dropping from 2 to 1 to 0.divisordividendx + 3quotientx + 2)x² + 5x + 7degree 2-(x² + 2x)3x + 7degree 1-(3x + 6)1degree 0remainder
The anatomy of one long division. Dividing x² + 5x + 7 by x + 2 leaves the quotient x + 3 on the roof and the remainder 1 at the bottom. Each subtraction row lowers the degree, 2 to 1 to 0, and the process stops the moment the degree falls below the divisor's.

Check your understanding

You are dividing 6x3−x2+46x^3 - x^2 + 4 by 2x−12x - 1. What is the first term of the quotient?

Answer choices

Worked example 1 Divide x3+2x2−5x+1x^3 + 2x^2 - 5x + 1 by x+3x + 3

Both polynomials are already in standard form, so run the forced move until the degree falls below 11.

First pass: divide the leading terms, x3÷x=x2x^3 \div x = x^2. Multiply back and subtract the whole product:

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

Second pass: −x2÷x=−x-x^2 \div x = -x, and −x(x+3)=−x2−3x-x(x + 3) = -x^2 - 3x. Subtracting, (−x2−5x+1)−(−x2−3x)=−2x+1(-x^2 - 5x + 1) - (-x^2 - 3x) = -2x + 1. Watch the signs: subtracting −3x-3x adds 3x3x.

Third pass: −2x÷x=−2-2x \div x = -2, and −2(x+3)=−2x−6-2(x + 3) = -2x - 6. Subtracting, (−2x+1)−(−2x−6)=7(-2x + 1) - (-2x - 6) = 7. Degree 00 is below degree 11, so the loop stops. In the tableau:

x2−x−2x+3 ) x3+2x2−5x+1‾− (x3+3x2)‾−5x+1−x2−5x+1− (−x2−3x)‾+1−2x+1− (−2x−6)‾7\def\arraystretch{1.25} \begin{array}{r} x^2 - x - 2 \\ x+3\ {\overline{\smash{\big)}\ x^3+2x^2-5x+1}} \\ \underline{-\,(x^3+3x^2)}\phantom{{}-5x+1} \\ -x^2-5x+1 \\ \underline{-\,(-x^2-3x)}\phantom{{}+1} \\ -2x+1 \\ \underline{-\,(-2x-6)} \\ 7 \end{array}

The quotient is x2−x−2x^2 - x - 2 and the remainder is 77:

x3+2x2−5x+1=(x+3)(x2−x−2)+7.x^3 + 2x^2 - 5x + 1 = (x + 3)(x^2 - x - 2) + 7.

Check by multiplying back:

(x+3)(x2−x−2)=x3−x2−2x+3x2−3x−6=x3+2x2−5x−6,(x + 3)(x^2 - x - 2) = x^3 - x^2 - 2x + 3x^2 - 3x - 6 = x^3 + 2x^2 - 5x - 6,

and adding 77 restores x3+2x2−5x+1x^3 + 2x^2 - 5x + 1 exactly.

Why the loop is correct, and why it must stop

Two questions are worth answering before you trust the method on harder problems: does every pass keep the identity P=DQ+RP = DQ + R true, and does the loop ever actually stop?

Both answers are visible in the two moves you just made. Multiplying the divisor by the new quotient term and subtracting removes exactly that amount from the working remainder and adds it to the quotient. So the total, ”DD times the quotient so far, plus what’s left,” never changes: it starts at D⋅0+P=PD \cdot 0 + P = P, so it still equals PP at every later stage. That is why the final line, whatever it turns out to be, is automatically a true identity.

The quotient term at each pass was chosen for one reason: to cancel the working remainder’s leading term. Once that term is gone, nothing left over can be as large, so the degree of what remains drops by at least 11 on every pass. A degree cannot drop below 00, so after a bounded number of passes the working remainder is 00 or too low in degree to continue, and the loop must stop.

Notice what this quietly explains about the tableau. The invariant is why you can trust the final line without re-deriving anything, and the strict degree drop is why the highest surviving power gets lower after every subtraction. If a row’s highest power does not drop, a subtraction error has slipped in, usually a sign.

Missing terms need placeholders

The tableau is column bookkeeping, and columns only work when every power has a column. A numeral handles a skipped place with the digit 00. The zero in 3,2053{,}205 contributes nothing to the sum, but it holds the tens column open so the 22 and the 33 land where they belong. A polynomial that skips powers needs the same fix. Before dividing, rewrite the dividend (and the divisor, if need be) with an explicit 00 coefficient for every missing power. Nothing changes mathematically, since 0⋅xk0 \cdot x^k is zero; what changes is that like powers now sit above one another in the tableau, where the subtractions can find them.

Worked example 2 Divide x3−27x^3 - 27 by x−3x - 3

The dividend skips two powers, so restore them as placeholders first:

x3−27=x3+0x2+0x−27.x^3 - 27 = x^3 + 0x^2 + 0x - 27.

Now divide. First pass: x3÷x=x2x^3 \div x = x^2, and x2(x−3)=x3−3x2x^2(x - 3) = x^3 - 3x^2; subtracting leaves 3x2+0x−273x^2 + 0x - 27, with the placeholder column keeping the 0x0x term aligned. Second pass: 3x2÷x=3x3x^2 \div x = 3x, and 3x(x−3)=3x2−9x3x(x - 3) = 3x^2 - 9x; subtracting leaves 9x−279x - 27. Third pass: 9x÷x=99x \div x = 9, and 9(x−3)=9x−279(x - 3) = 9x - 27; subtracting leaves 00.

x2+3x+9x−3 ) x3+0x2+0x−27‾− (x3−3x2)‾+0x−273x2+0x−27− (3x2−9x)‾−279x−27− (9x−27)‾0\def\arraystretch{1.25} \begin{array}{r} x^2 + 3x + 9 \\ x-3\ {\overline{\smash{\big)}\ x^3+0x^2+0x-27}} \\ \underline{-\,(x^3-3x^2)}\phantom{{}+0x-27} \\ 3x^2+0x-27 \\ \underline{-\,(3x^2-9x)}\phantom{{}-27} \\ 9x-27 \\ \underline{-\,(9x-27)} \\ 0 \end{array}

The remainder is the zero polynomial, so the division comes out even:

x3−27=(x−3)(x2+3x+9).x^3 - 27 = (x - 3)(x^2 + 3x + 9).

When R=0R = 0 we say x−3x - 3 divides x3−27x^3 - 27, and the identity is a genuine factorization, certified by the division itself. Multiply back to confirm: (x−3)(x2+3x+9)=x3+3x2+9x−3x2−9x−27=x3−27(x - 3)(x^2 + 3x + 9) = x^3 + 3x^2 + 9x - 3x^2 - 9x - 27 = x^3 - 27. Division with zero remainder is how you prove one polynomial is a factor of another, and the rest of this chapter leans on exactly that.

Check your understanding

To divide x4−5x+1x^4 - 5x + 1 by x+2x + 2 using the tableau, how should you write the dividend first?

Answer choices

Only one answer is possible

Existence came from running the loop: some quotient and remainder can always be found. A separate question is uniqueness: could a different pair (Q,R)(Q, R) also keep both promises for the same PP and DD? It could not, and seeing why starts from one fact about degrees.

Multiply two nonzero polynomials with leading terms axma x^m and bxnb x^n. The only way to produce the power xm+nx^{m+n} in the product is leading term times leading term, and every other pairing lands strictly lower. Since a≠0a \neq 0 and b≠0b \neq 0, their product abab is not zero either, so the product’s leading term really is ab xm+nab\,x^{m+n}:

deg⁡(fg)=deg⁡f+deg⁡g.\deg(fg) = \deg f + \deg g.

Degrees add under multiplication. That single fact is enough to rule out any second quotient and remainder. Two different quotients would force DD times their difference to have degree at least deg⁡D\deg D. But a difference of two too-small remainders can never reach that high, so no second pair exists. However you found a quotient and remainder, by the tableau, by cleverness, or by a lucky guess, they are the quotient and remainder.

Uniqueness pays off immediately in bookkeeping. Suppose deg⁡P≥deg⁡D\deg P \geq \deg D. In P=DQ+RP = DQ + R the product DQDQ has degree deg⁡D+deg⁡Q\deg D + \deg Q. And RR is either zero or too low in degree to disturb that leading term, so PP and DQDQ must share a leading term. Two consequences follow, when deg⁡P≥deg⁡D\deg P \geq \deg D,

deg⁡Q=deg⁡P−deg⁡D,andthe leading coefficient of Q is the leading coefficient of P divided by that of D.\begin{aligned} &\deg Q = \deg P - \deg D, \qquad \text{and} \\ &\text{the leading coefficient of } Q \text{ is the leading coefficient of } P \text{ divided by that of } D. \end{aligned}

A cubic divided by a linear divisor must give a quadratic quotient; if it does not, stop and find the error before checking a single coefficient. And if instead deg⁡P<deg⁡D\deg P < \deg D, the pair Q=0Q = 0, R=PR = P already keeps both promises, so by uniqueness it is the answer. Dividing x+1x + 1 by x2+1x^2 + 1 gives quotient 00 and remainder x+1x + 1, just as 3÷53 \div 5 gives quotient 00 and remainder 33.

Worked example 3 Divide 6x3+5x2−8x+76x^3 + 5x^2 - 8x + 7 by 2x−12x - 1

The divisor’s leading coefficient is 22, not 11, and nothing about the method changes: each quotient term still comes from dividing leading terms, coefficients divided and exponents subtracted.

First pass: 6x3÷2x=3x26x^3 \div 2x = 3x^2, and 3x2(2x−1)=6x3−3x23x^2(2x - 1) = 6x^3 - 3x^2; subtracting leaves 8x2−8x+78x^2 - 8x + 7. Second pass: 8x2÷2x=4x8x^2 \div 2x = 4x, and 4x(2x−1)=8x2−4x4x(2x - 1) = 8x^2 - 4x; subtracting leaves −4x+7-4x + 7. Third pass: −4x÷2x=−2-4x \div 2x = -2, and −2(2x−1)=−4x+2-2(2x - 1) = -4x + 2; subtracting leaves 55.

3x2+4x−22x−1 ) 6x3+5x2−8x+7‾− (6x3−3x2)‾−8x+78x2−8x+7− (8x2−4x)‾+7−4x+7− (−4x+2)‾5\def\arraystretch{1.25} \begin{array}{r} 3x^2 + 4x - 2 \\ 2x-1\ {\overline{\smash{\big)}\ 6x^3+5x^2-8x+7}} \\ \underline{-\,(6x^3-3x^2)}\phantom{{}-8x+7} \\ 8x^2-8x+7 \\ \underline{-\,(8x^2-4x)}\phantom{{}+7} \\ -4x+7 \\ \underline{-\,(-4x+2)} \\ 5 \end{array}

So the quotient is 3x2+4x−23x^2 + 4x - 2 and the remainder is 55:

6x3+5x2−8x+7=(2x−1)(3x2+4x−2)+5.6x^3 + 5x^2 - 8x + 7 = (2x - 1)(3x^2 + 4x - 2) + 5.

Run the sanity checks from the uniqueness section before the full multiply-back. Degrees: 3=1+23 = 1 + 2. Leading coefficients: 6=2⋅36 = 2 \cdot 3. Both pass. Now the full check: (2x−1)(3x2+4x−2)=6x3+8x2−4x−3x2−4x+2=6x3+5x2−8x+2(2x - 1)(3x^2 + 4x - 2) = 6x^3 + 8x^2 - 4x - 3x^2 - 4x + 2 = 6x^3 + 5x^2 - 8x + 2, and adding the remainder 55 restores 6x3+5x2−8x+76x^3 + 5x^2 - 8x + 7 exactly. In general a divisor whose leading coefficient is not 11 can force fractions into the quotient, and that is not an error. Dividing x2+1x^2 + 1 by 2x2x opens with x2÷2x=12xx^2 \div 2x = \tfrac{1}{2}x, and the algorithm carries on unbothered.

A divisor of higher degree

Nothing in the loop, the proof, or the bookkeeping assumed the divisor was linear. Divide by a quadratic and the only visible change is the finish line. With that divisor the loop stops when the working remainder is zero or of degree below 22, so a remainder may now be linear, or a constant, or zero.

Worked example 4 Divide x4+3x3−x2+5x^4 + 3x^3 - x^2 + 5 by x2+1x^2 + 1

Restore the missing xx column first: the dividend is x4+3x3−x2+0x+5x^4 + 3x^3 - x^2 + 0x + 5.

First pass: x4÷x2=x2x^4 \div x^2 = x^2, and x2(x2+1)=x4+x2x^2(x^2 + 1) = x^4 + x^2. This product skips the x3x^3 column, so when you write it into the tableau, slide its x2x^2 term under the x2x^2 column and leave the gap open. Subtracting leaves 3x3−2x2+0x+53x^3 - 2x^2 + 0x + 5. Second pass: 3x3÷x2=3x3x^3 \div x^2 = 3x, and 3x(x2+1)=3x3+3x3x(x^2 + 1) = 3x^3 + 3x; subtracting leaves −2x2−3x+5-2x^2 - 3x + 5. Third pass: −2x2÷x2=−2-2x^2 \div x^2 = -2, and −2(x2+1)=−2x2−2-2(x^2 + 1) = -2x^2 - 2; subtracting leaves −3x+7-3x + 7, of degree 1<21 < 2: stop.

x2+3x−2x2+1 ) x4+3x3−x2+0x+5‾− (x4+3x3+x2)‾+0x+53x3−2x2+0x+5− (3x3−2x2+3x)‾+5−2x2−3x+5− (−2x2−3x−2)‾−3x+7\def\arraystretch{1.25} \begin{array}{r} x^2 + 3x - 2 \\ x^2+1\ {\overline{\smash{\big)}\ x^4+3x^3-x^2+0x+5}} \\ \underline{-\,(x^4\phantom{{}+3x^3}+x^2)}\phantom{{}+0x+5} \\ 3x^3-2x^2+0x+5 \\ \underline{-\,(3x^3\phantom{{}-2x^2}+3x)}\phantom{{}+5} \\ -2x^2-3x+5 \\ \underline{-\,(-2x^2\phantom{{}-3x}-2)} \\ -3x+7 \end{array}

The quotient is x2+3x−2x^2 + 3x - 2 and the remainder is −3x+7-3x + 7:

x4+3x3−x2+5=(x2+1)(x2+3x−2)+(−3x+7).x^4 + 3x^3 - x^2 + 5 = (x^2 + 1)(x^2 + 3x - 2) + (-3x + 7).

A linear remainder is not unfinished business. No multiple of the degree-22 divisor can cancel a degree-11 term without introducing something of degree 22 or higher. So −3x+7-3x + 7 is as reduced as a remainder can be. Check:

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

and adding −3x+7-3x + 7 gives back x4+3x3−x2+5x^4 + 3x^3 - x^2 + 5.

Two ways to package the answer

Dividing both sides of P=DQ+RP = DQ + R by D(x)D(x) gives a second form of the same fact:

P(x)D(x)=Q(x)+R(x)D(x).\frac{P(x)}{D(x)} = Q(x) + \frac{R(x)}{D(x)}.

This is the polynomial version of turning an improper fraction into a mixed number: 475=9+25\tfrac{47}{5} = 9 + \tfrac{2}{5}, quotient out front, remainder still sitting over the divisor, valid wherever D(x)≠0D(x) \neq 0. From Worked Example 3, for instance,

6x3+5x2−8x+72x−1=3x2+4x−2+52x−1.\frac{6x^3 + 5x^2 - 8x + 7}{2x - 1} = 3x^2 + 4x - 2 + \frac{5}{2x - 1}.

Both forms carry the same information, but proofs use the identity form. The fraction form is what you’ll reach for later, when a chapter on rational expressions takes up quotients like this one in their own right.

Check your understanding

Divide 3x2−5x+43x^2 - 5x + 4 by x−2x - 2, then verify your division by expanding DQ+RDQ + R. Which option states both the correct division and a correct check?

Answer choices

Common mistakes

Practice

Multiple Choice Questions (MCQ)

Progressively harder sets of questions. Each opens on its own page.

Core practice

Practice problems at the level of the course, to be worked out on paper. Hints one at a time, then the answer or the full worked solution, with your progress kept in this browser.

Core practice Work it out on paper 10 problems Start →
More practice (optional)

Extra sets, as hard as the Challenge set. Each one opens on its own page.

More resources (optional)

Other explanations of this lesson, if you want a second take.

Go deeper (optional)

You can skip this and keep going. Read it if you want to know more.

Why the division loop always halts with a correct identity

The division loop always ends, and ends correctly#

Run the argument once on numbers before writing it with letters. Take P=x2+7x+5P = x^2 + 7x + 5 and D=x+3D = x + 3, and keep two ledgers: the quotient built so far, SS, and the working remainder WW still waiting to be divided. Start at S=0S = 0 and W=PW = P; then D⋅S+W=0+(x2+7x+5)=PD \cdot S + W = 0 + (x^2+7x+5) = P, so the ledgers already satisfy P=DS+WP = DS + W.

Pass 1: the leading term of WW is x2x^2 and of DD is xx, so q=xq = x. Update SS to 0+x=x0 + x = x, and WW to (x2+7x+5)−x(x+3)=4x+5(x^2+7x+5) - x(x+3) = 4x + 5. Check the ledgers again: D⋅S+W=(x+3)(x)+(4x+5)=x2+7x+5=PD \cdot S + W = (x+3)(x) + (4x+5) = x^2+7x+5 = P, still true, and WW‘s degree dropped from 22 to 11.

Pass 2: the leading term of WW is 4x4x and of DD is still xx, so q=4q = 4. Update SS to x+4x + 4, and WW to (4x+5)−4(x+3)=−7(4x+5) - 4(x+3) = -7. Once more, D⋅S+W=(x+3)(x+4)+(−7)=x2+7x+5=PD \cdot S + W = (x+3)(x+4) + (-7) = x^2+7x+5 = P. Now deg⁡W=0\deg W = 0, below deg⁡D=1\deg D = 1, so the loop stops with x2+7x+5=(x+3)(x+4)−7x^2 + 7x + 5 = (x+3)(x+4) - 7.

The general argument runs the same two checks, an unchanged total and a falling degree, on any PP and any nonzero DD. Keep two ledgers while you divide: the quotient built so far, call it SS, and the working remainder WW still waiting to be divided. At the very start S=0S = 0 and W=PW = P, so the equation

P=D⋅S+WP = D \cdot S + W

holds trivially. Now examine one pass of the loop. If W=0W = 0 or deg⁡W<deg⁡D\deg W < \deg D, the loop stops. Otherwise write the leading term of WW as axma x^m and the leading term of DD as bxnb x^n, where m≥nm \geq n because the loop did not stop. The pass divides the leading terms to get q=abxm−nq = \tfrac{a}{b} x^{m-n}, adds qq to the quotient ledger, and subtracts qDqD from the working remainder. The combination D⋅S+WD \cdot S + W does not move:

D(S+q)+(W−qD)=DS+qD+W−qD=DS+W.D(S + q) + (W - qD) = DS + qD + W - qD = DS + W.

So the equation P=DS+WP = DS + W is an invariant: true before the first pass, preserved by every pass, therefore true when the loop stops. Whatever the ledgers hold at the end is automatically a correct identity.

Termination is a statement about degrees. The product qDqD was engineered so that its leading term is abxm−n⋅bxn=axm\tfrac{a}{b} x^{m-n} \cdot b x^n = a x^m, the exact leading term of WW. Every other term of qDqD is qq times a lower term of DD, and therefore has degree below mm; so does every other term of WW. In the subtraction W−qDW - qD the two copies of axma x^m cancel, and nothing of degree mm or higher survives. So the new working remainder is either 00 or of degree strictly below mm. The degree of WW therefore drops by at least 11 on every pass, and a strictly decreasing sequence of nonnegative integers cannot continue forever. After at most m−n+1m - n + 1 passes the loop halts with W=0W = 0 or deg⁡W<deg⁡D\deg W < \deg D, and the invariant then reads P=DQ+RP = DQ + R with the remainder condition satisfied.

That is existence: a valid quotient and remainder can always be produced, and the long-division tableau is nothing but this proof written out in columns.

Why the quotient and remainder are unique

The quotient and remainder are unique#

Run the argument once on numbers first. Take P=2x2+5x−3P = 2x^2 + 5x - 3 and D=x+2D = x + 2. Dividing gives the real quotient and remainder, Q1=2x+1Q_1 = 2x + 1 and R1=−5R_1 = -5: check (x+2)(2x+1)−5=2x2+5x−3(x+2)(2x+1) - 5 = 2x^2+5x-3. Suppose a second quotient Q2=2x+2Q_2 = 2x + 2 also worked, paired with some remainder R2R_2 chosen to keep P=DQ2+R2P = DQ_2 + R_2 true. Subtract the two identities the way the general argument below does, D(Q1−Q2)=R2−R1D(Q_1 - Q_2) = R_2 - R_1. Here Q1−Q2=−1Q_1 - Q_2 = -1, so the left side is (x+2)(−1)=−x−2(x+2)(-1) = -x - 2, of degree 11: a nonzero polynomial times DD has degree at least deg⁡D=1\deg D = 1, by deg⁡(fg)=deg⁡f+deg⁡g\deg(fg) = \deg f + \deg g. For R2R_2 to be a legal remainder, the right side R2−R1R_2 - R_1 would have to be zero or of degree below deg⁡D=1\deg D = 1, that is, a plain number. It cannot be, since it must equal −x−2-x - 2, which has degree 11. No legal R2R_2 exists, so Q2≠Q1Q_2 \neq Q_1 is impossible here.

The general argument makes that failure explicit for every possible second pair, not just this one. Suppose two pairs both keep the promises for the same dividend and divisor:

P=D Q1+R1=D Q2+R2,P = D\,Q_1 + R_1 = D\,Q_2 + R_2,

where each RiR_i is zero or of degree less than deg⁡D\deg D. Subtract one identity from the other and gather the DD terms on one side:

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

Now suppose, aiming for a contradiction, that Q1≠Q2Q_1 \neq Q_2. Then Q1−Q2Q_1 - Q_2 is a nonzero polynomial, so the left side is a product of two nonzero polynomials, and by the degree fact deg⁡(fg)=deg⁡f+deg⁡g\deg(fg) = \deg f + \deg g its degree is deg⁡D+deg⁡(Q1−Q2)≥deg⁡D\deg D + \deg(Q_1 - Q_2) \geq \deg D. Look at the right side. Each remainder is zero or of degree below deg⁡D\deg D, so their difference is zero or of degree below deg⁡D\deg D as well: a difference cannot reach higher than its tallest term. One polynomial cannot be both of degree at least deg⁡D\deg D and of degree below deg⁡D\deg D (nor can a nonzero polynomial equal the zero polynomial), so the supposition fails, and Q1=Q2Q_1 = Q_2. Feeding that back into DQ1+R1=DQ2+R2D Q_1 + R_1 = D Q_2 + R_2 leaves R1=R2R_1 = R_2.

A bit of history (optional)

For most of its history a polynomial was a way of stating a problem, not a thing you calculated with directly. Simon Stevin, a Flemish engineer, changed that. In 1585 he published two books that treated numbers and letters alike. The slim De Thiende (“The Tenth”) taught Europe to write fractions as decimal places. The longer companion volume did the same for algebra, showing that a polynomial could be added, multiplied, and divided with a remainder just as a whole number can.

Stevin favored plain, ordinary language over the dense Latin common in the scholarship of his day, so that working clerks and engineers could follow him. A numeral is built on powers of ten; a polynomial is built on powers of xx. The division you did today is his claim in miniature: nothing new is needed, only letters where digits stood.