Polynomial Long Division Calculator

Type the dividend and the divisor, for example (x^3 + 2x^2 − 5x + 3)/(x − 2).

Answer

Polynomial division
Q(x)=x2+4x+3,R(x)=−3x+2Q(x) = x^{2} + 4x + 3, \quad R(x) = -3x + 2

Checked numerically before it is shown

Step-by-step solution

  1. Missing powers

    Write every power, with 0 for the missing ones:

    x4+3x3−2x+5=x4+3x3+0x2−2x+5x^{4} + 3x^{3} - 2x + 5 = x^{4} + 3x^{3} + 0x^{2} - 2x + 5
  2. Set up

    Divide the dividend by the divisor:

    x4+3x3−2x+5x2−x+1\frac{x^{4} + 3x^{3} - 2x + 5}{x^{2} - x + 1}
  3. Divide the leading terms

    Divide the leading term of what is left by the leading term of the divisor:

    x4x2=x2\frac{x^{4}}{x^{2}} = x^{2}
  4. Multiply

    Multiply the divisor by this term:

    x2⋅(x2−x+1)=x4−x3+x2x^{2} \cdot \left(x^{2} - x + 1\right) = x^{4} - x^{3} + x^{2}
  5. Subtract

    Subtract the product:

    (x4+3x3−2x+5)−(x4−x3+x2)=4x3−x2−2x+5\left(x^{4} + 3x^{3} - 2x + 5\right) - \left(x^{4} - x^{3} + x^{2}\right) = 4x^{3} - x^{2} - 2x + 5
  6. Divide the leading terms

    Divide the leading term of what is left by the leading term of the divisor:

    4x3x2=4x\frac{4x^{3}}{x^{2}} = 4x
  7. Multiply

    Multiply the divisor by this term:

    4x⋅(x2−x+1)=4x3−4x2+4x4x \cdot \left(x^{2} - x + 1\right) = 4x^{3} - 4x^{2} + 4x
  8. Subtract

    Subtract the product:

    (4x3−x2−2x+5)−(4x3−4x2+4x)=3x2−6x+5\left(4x^{3} - x^{2} - 2x + 5\right) - \left(4x^{3} - 4x^{2} + 4x\right) = 3x^{2} - 6x + 5
  9. Divide the leading terms

    Divide the leading term of what is left by the leading term of the divisor:

    3x2x2=3\frac{3x^{2}}{x^{2}} = 3
  10. Multiply

    Multiply the divisor by this term:

    3⋅(x2−x+1)=3x2−3x+33 \cdot \left(x^{2} - x + 1\right) = 3x^{2} - 3x + 3
  11. Subtract

    Subtract the product:

    (3x2−6x+5)−(3x2−3x+3)=−3x+2\left(3x^{2} - 6x + 5\right) - \left(3x^{2} - 3x + 3\right) = -3x + 2
  12. Remainder reached

    What is left has a lower degree than the divisor, so it is the remainder:

    deg⁡(−3x+2)=1<deg⁡(x2−x+1)=2\deg\left(-3x + 2\right) = 1 < \deg\left(x^{2} - x + 1\right) = 2
  13. Read the result

    Quotient and remainder:

    Q(x)=x2+4x+3,R(x)=−3x+2Q(x) = x^{2} + 4x + 3, \quad R(x) = -3x + 2
  14. Result

    So the division gives:

    x4+3x3−2x+5x2−x+1=x2+4x+3−3x−2x2−x+1\frac{x^{4} + 3x^{3} - 2x + 5}{x^{2} - x + 1} = x^{2} + 4x + 3 - \frac{3x - 2}{x^{2} - x + 1}
  15. Check

    Divisor × quotient + remainder gives back the dividend:

    (x2−x+1)⋅(x2+4x+3)−(3x−2)=x4+3x3+x+3−(3x−2)=x4+3x3−2x+5\left(x^{2} - x + 1\right) \cdot \left(x^{2} + 4x + 3\right) - \left(3x - 2\right) = x^{4} + 3x^{3} + x + 3 - \left(3x - 2\right) = x^{4} + 3x^{3} - 2x + 5

Try an example

About this solver

How to use

  1. Write the division as (dividend)/(divisor), or as “divide … by …”.
  2. Missing powers are fine: x^3 − 8 is read as x^3 + 0x^2 + 0x − 8.
  3. Coefficients can be integers or fractions; use one variable.

How to type math

To enterType
Powerx^2 x^(n+1)
Rootsqrt(x) \sqrt[3]{x}
Fraction(x+1)/(x-1) \frac{1}{x}
Functionssin(x) ln(x) log_2(x) exp(x)
Absolute value|x| abs(x)
Derivatived/dx x^2 sin x (x^2+x)'
Integral\int x^2 dx \int_0^1 x^2 dx
Limitlim x->0 sin(x)/x \lim_{x\to\infty} 1/x
Degreessin(30°)
System of equations2x+y=5, x-y=1

How it works

Long division repeats three moves: divide the leading term of what is left by the leading term of the divisor, multiply the divisor by that term, and subtract. It stops when what is left has a lower degree than the divisor; that is the remainder.

When the divisor is x − a, synthetic division (Horner’s method) gives the same quotient faster: bring down the first coefficient, then multiply by a and add, one coefficient at a time. The last number is the remainder, which also equals P(a).

Frequently asked questions

Which method is shown first?

The simplest one that applies: synthetic division when the divisor is x − a, with long division next to it; long division for any other divisor. Both give the same quotient and remainder.

How can I check the answer?

Multiply the divisor by the quotient and add the remainder: the result must be the dividend. The solver does this as its last step.

What does a remainder of 0 mean?

The divisor is a factor of the dividend: the dividend equals divisor × quotient.