MathsAlgebra

Polynomial Long Division
calculator.

Divide one polynomial by another, with every subtraction lined up in columns.

How it's worked out

The method copies long division with whole numbers. Divide the first term of what is left by the first term of the divisor, and write that in the answer. Multiply the whole divisor by it, subtract, and go again. You stop once what is left has a lower degree, or highest power, than the divisor.

The division algorithm promises one quotient and one remainder for any divisor other than 0.

P(x)\displaystyle P(x)=D(x)Q(x)+R(x)\displaystyle {}= D(x)\,Q(x) + R(x)

Here P is the dividend, D is the divisor, Q is the quotient and R is the remainder. R is either 0 or has a lower degree than D. When R is not 0, you can write the answer as the quotient plus a fraction.

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

To check any answer, multiply the divisor by the quotient and add the remainder. You should get the dividend back. The tool does this last, in exact fractions when it can, so a coefficient of one third stays one third and does not pick up rounding.

Worked examples

Jo divides by a quadratic

Jo has 2x⁴ − 3x² + x + 5 over x² − x + 2. Synthetic division cannot help with a quadratic divisor, so she uses long division. The first term of the answer is 2x², and subtracting leaves 2x³ − 7x² + x + 5.

Two more rounds give a quotient of 2x² + 2x − 5 and a remainder of −8x + 15. Its degree, 1, is below the divisor's 2, so she stops there.

Open this example in the tool

Ben keeps his zero columns

Ben divides x⁴ + 1 by x² + 1. Written in full, the dividend has zeros on the x³, x² and x terms. The first round gives x², and subtracting leaves −x² + 1.

The x³ column is now empty, so the next term of the quotient is 0, and that 0 has to stay in its place. The quotient is x² − 1, with a remainder of 2.

Open this example in the tool

Ana gets fractions from a divisor of 3x − 1

Ana divides by 3x − 1, so each round divides by 3 and thirds appear. The quotient's coefficients are 2, 1 over 3, −11 over 9, and the remainder is −2 over 9.

In decimals the remainder is about −0.2222. The divisor is 0 at one third, so the first part of the division vanishes there. Putting one third into the dividend gives −0.2222, the same remainder.

Open this example in the tool

Reading your result

A remainder of 0 means a factor. Then the divisor goes in evenly, and the quotient is the other factor. That is how you take a polynomial apart once you know one piece of it.

With x minus a number, the remainder is a value of P. Dividing x³ − 2x² + x − 3 by x − 3 leaves 9. Evaluating at 3 gives 9 as well. The remainder theorem states this for every such divisor.

The quotient says what the graph does far from the middle. Away from the roots of the divisor, the fraction R over D shrinks, so the curve closes in on Q. When the top has a degree one above the bottom, Q is a line called a slant asymptote: 3x² − 2x + 1 over x − 1 has the line y = 3x + 1.

A divisor of the form x minus a number has a shorter route: the synthetic division calculator gives the same answer. To find which number to try, use the rational root theorem calculator.

Common mistakes

  • Skipping a missing power. Leave out the zeros and the columns slide out of line. A correct quotient of x² − 1 for x⁴ + 1 over x² + 1 turns into x − 1.
  • Forgetting to subtract every term. The minus applies to the whole product, so a negative term in the product adds. This is where most sign slips happen.
  • Stopping too early or too late. Keep going while what is left has a degree equal to or above the divisor's. Stop as soon as it drops below.
  • Writing the remainder on its own. The remainder belongs over the divisor in the final answer. On its own it is a different number.

Questions people ask

Each round takes away a multiple of the divisor, so the difference between the dividend and the product always stays the remainder so far. Each round also lowers the degree of what is left, so it has to finish. It is the same reason long division of numbers works.

Sources