Polynomial Calculator
Long and synthetic division, p(a), roots, GCD and partial fractions in exact fractions.
Try before you buy.
- Free preview: a watermarked graph and the names of each table’s first rows (up to 3), with the answer, its working and every figure hidden.
- Locked until you unlock it: download and copy.
- Unlock: Pro pass, ₹179 for 30 days, a one-time payment that never renews.
Ways to unlock shows how to get the full result.
Printing this result is locked in the free preview.
Result
This is the last answer worked out. Fix the input above to update it.
Step by step
Locked in the free preview. Opens the ways to unlock this result.
Locked in the free preview. Batch runs unlock with a pass.
Locked in the free preview. Query results unlock with a pass.
About the Polynomial Calculator
Work with polynomials in exact fractions, every step shown: add, subtract and multiply them, divide one by another by long division (and by synthetic division when the divisor is linear), evaluate p(a) with Horner’s scheme and the remainder and factor theorems, find all roots with the factorisation, compute the GCD and LCM by Euclid’s algorithm, and split a fraction into partial fractions, with the cover-up method for simple linear factors and equated coefficients for repeated factors and factors such as x² + 1.
Every answer is checked by putting it back together: the quotient times the divisor plus the remainder, the factors multiplied out, the partial fractions added up. Roots are exact where they have a closed form (fractions, √ and ∛) and given to 8 significant digits otherwise. Everything is worked out in your browser.
How to use it
- Choose what to do: p ± q, p × q, Divide, p(a), Roots, GCD & LCM or Partial fractions.
- Type the polynomials with ^ for powers, such as
2x^3 + 3x^2 - 4x + 5or(x - 1)^2 (x + 2); any single letter can be the variable. For partial fractions, type one fraction with brackets, such as(3x + 5)/((x + 1)(x + 2)). - Read the answer, the steps and the tables of the working; for roots and p(a) there is a graph.
- With a pass, or after unlocking this result, copy the whole working or download it as a text file.
Examples
(2x³ + 3x² − 4x + 5) ÷ (x + 2)
2x² − x − 2, remainder 9
Coefficients 2, 3, −4, 5 with −2: 2, −1, −2 and the remainder 9.
(x⁴ + 1) ÷ (x² + 1)
x² − 1, remainder 2
(x² + 1)(x² − 1) + 2 = x⁴ + 1.
p(2) for 2x³ − 3x + 5
15
Horner: 2 → 4 → 5 → 15.
x³ − 6x² + 11x − 6
x = 1, 2, 3
The candidates are ±1, ±2, ±3 and ±6.
x⁴ − 5x² + 6
x = −√3, −√2, √2, √3
(x² − 2)(x² − 3).
x² − 1 and x² + 2x + 1
gcd = x + 1, lcm = x³ + x² − x − 1
(x² + 1)/((x − 1)²(x + 2))
4/(9(x − 1)) + 2/(3(x − 1)²) + 5/(9(x + 2))
Common uses
- Checking polynomial division and factor theorem homework, step by step.
- Finding every root of a cubic or quartic, with exact surds where they exist.
- Splitting a rational function into partial fractions before integrating it or taking an inverse Laplace transform.
- Simplifying rational expressions with the GCD of the top and the bottom.
Long division, synthetic division and the remainder theorem
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, which gives p(x) = d(x)·q(x) + r(x) (Knuth, The Art of Computer Programming, Vol. 2, §4.6). For a divisor x − c, synthetic division does the same with the coefficients alone: bring the first one down, then multiply by c and add to the next, again and again.
The last number of that table is p(c): dividing p(x) by x − c leaves the remainder p(c) (the remainder theorem), so p(c) = 0 exactly when x − c is a factor (the factor theorem). Evaluating a polynomial this way is Horner’s scheme, which needs only one multiplication per coefficient.
Finding the roots
If a polynomial with whole coefficients has a rational root p/q in lowest terms, p divides the constant term and q divides the leading coefficient (the rational root theorem), so a few candidates find every rational root. The polynomial is then factored over the rational numbers into factors that cannot be split further. A linear factor gives one root; a quadratic one gives two by the quadratic formula, as surds such as (1 + √5)/2 or as a pair of non-real roots; a factor such as x³ − 2 gives a real cube root.
From degree 5 on there is no general formula with roots and powers (the Abel–Ruffini theorem), so other roots are given as decimals. They are not guessed: Sturm’s theorem counts the real roots in any interval exactly, so every real root is found once and in order, and then narrowed down to 8 significant digits.
Partial fractions
A proper fraction N(x)/D(x) (the top of lower degree than the bottom) is a sum of simpler fractions, one for each power of each factor of D: A/(x − r) for a linear factor, A/(x − r) + B/(x − r)² + … for a repeated one, and (Bx + C)/(x² + bx + c) for a factor that cannot be split. When the top has the higher degree, divide first.
For a factor x − r that appears once, Heaviside’s cover-up method gives its fraction at once: cover up x − r in the denominator and put x = r in what is left. The other unknowns come from multiplying both sides by D(x) and equating the coefficients of each power of x, which is a system of linear equations solved here in exact fractions.
Limitations
- Polynomials in one variable with rational coefficients, of degree up to 60. Coefficients such as √2 or π are not supported.
- Roots without a closed form are given to 8 significant digits; non-real roots of factors of degree 3 and more are found numerically.
- Partial fractions are taken over the rational numbers, so a factor such as x² − 2 stays whole (it would split only with √2).
- Very long calculations stop after 20 seconds; Stop ends them sooner.
Privacy
Everything happens in your browser. What you enter or open here is not uploaded or stored by MySmartCoPilot.
Frequently asked questions
What do I get without a pass?
Without a pass, Polynomial Calculator shows a watermarked graph and the names of each table’s first rows (up to 3), with the answer, its working and every figure hidden. Until you unlock it, the result can’t be downloaded or copied. A Pro, Premium or Ultimate pass, a one-time payment that never renews, unlocks the full result. The pricing page lists the passes and their prices.
How do you divide polynomials?
Divide the leading terms, multiply the whole divisor by the result, subtract, and repeat with what is left until its degree is lower than the divisor’s. For (2x³ + 3x² − 4x + 5) ÷ (x + 2): 2x³ ÷ x = 2x², and 2x²(x + 2) = 2x³ + 4x² leaves −x² − 4x + 5; then −x, which leaves −2x + 5; then −2, which leaves 9. The quotient is 2x² − x − 2 and the remainder 9.
When can I use synthetic division?
When the divisor is linear. For x − c, use c itself (for x + 2, use −2). For a divisor such as 2x − 1, divide by x − 1/2 and then divide the quotient by 2; the remainder stays the same.
What is the remainder theorem?
Dividing p(x) by x − a leaves the remainder p(a). For 2x³ − 3x + 5 and a = 2 the remainder is 2·8 − 6 + 5 = 15. If the remainder is 0, x − a is a factor of p(x) (the factor theorem).
How do I do partial fractions with a repeated factor?
Give each power of the factor its own fraction: for (x − 1)²(x + 2) write A/(x − 1) + B/(x − 1)² + C/(x + 2). The cover-up method gives B (cover (x − 1)² and put x = 1) and C (cover x + 2 and put x = −2); A follows from comparing the coefficients of x². For (x² + 1)/((x − 1)²(x + 2)): A = 4/9, B = 2/3 and C = 5/9.
Why are some roots shown as decimals?
Because they have no exact form with fractions and square or cube roots that is worth writing: x³ − 3x + 1 has three real roots that can only be written with cosines or with cube roots of complex numbers, and x⁵ − x − 1 has a real root that cannot be written with radicals at all. Those roots are found exactly in the sense that each one is pinned down between two fractions, then shown to 8 significant digits.