standarddeviationcalculator.net

Updated Free · runs in your browser

Math

Polynomial calculator

Type polynomials the way you would write them, such as 2x^3 − 3x² + 4x − 5, and choose an operation: long division, multiplication, addition, subtraction, evaluation at a point, or every root. Each result comes with its working and a graph.

Type powers with ^ or ², e.g. x^4 − 3x² + 2. Brackets are expanded for you.

(2x³ − 3x² + 4x − 5) ÷ (x − 2) 2x² + x + 6, remainder 7
Quotient2x² + x + 6
Remainder7
As one expression2x² + x + 6 + 7/(x − 2)
Check: P = Q × quotient + remainder2x³ − 3x² + 4x − 5 = (x − 2)(2x² + x + 6) + 7
Is Q a factor of P?No
-2-1012345050100150 x y

━ P(x) = 2x³ − 3x² + 4x − 5   ┄ Q(x) = x − 2

Show the working, step by step
  1. Write both in descending powers of x, keeping a 0 for any missing power in P.

    P = 2x³ − 3x² + 4x − 5 Q = x − 2

  2. Divide the leading term of 2x³ − 3x² + 4x − 5 by the leading term of Q (x): the next quotient term is 2x².

    2x² × (x − 2) = 2x³ − 4x² (2x³ − 3x² + 4x − 5) − (2x³ − 4x²) = x² + 4x − 5

  3. Divide the leading term of x² + 4x − 5 by the leading term of Q (x): the next quotient term is x.

    x × (x − 2) = x² − 2x (x² + 4x − 5) − (x² − 2x) = 6x − 5

  4. Divide the leading term of 6x − 5 by the leading term of Q (x): the next quotient term is 6.

    6 × (x − 2) = 6x − 12 (6x − 5) − (6x − 12) = 7

  5. Stop when the remainder’s degree is below Q’s degree (1).

    Quotient = 2x² + x + 6 Remainder = 7

Remainder theorem: dividing by x − 2 leaves the remainder P(2) = 7.

What counts as a polynomial

P(x) = aₙxⁿ + aₙ₋₁xⁿ⁻¹ + … + a₁x + a₀

A sum of terms, each a number times a whole-number power of one variable. The highest power with a non-zero coefficient is the degree. Brackets are fine and are expanded for you, so (x − 1)²(x + 2) is read as x³ − 3x + 2. Square roots of x, negative powers and x in a denominator are not polynomial, and the calculator will say so.

A worked example: long division

The default divides P = 2x³ − 3x² + 4x − 5 by Q = x − 2.

  1. 2x³ ÷ x = 2x². Multiply: 2x²(x − 2) = 2x³ − 4x². Subtract: x² + 4x − 5.
  2. x² ÷ x = x. Multiply: x(x − 2) = x² − 2x. Subtract: 6x − 5.
  3. 6x ÷ x = 6. Multiply: 6(x − 2) = 6x − 12. Subtract: 7.
  4. The remainder 7 has degree 0, below Q's degree of 1, so stop. Quotient 2x² + x + 6, remainder 7.

Horner's method confirms it: start with 2, then 2 × 2 − 3 = 1, 1 × 2 + 4 = 6 and 6 × 2 − 5 = 7 = P(2). The numbers 2, 1, 6 are the quotient's coefficients, which is why synthetic division and Horner's method are the same calculation.

The other operations

OperationHow it worksDefault result
P × QMultiply each term of P by all of Q, then collect2x⁴ − 7x³ + 10x² − 13x + 10
P + QAdd coefficients of equal powers2x³ − 3x² + 5x − 7
P − QChange every sign in Q, then add2x³ − 3x² + 3x − 3
P(2)Horner: multiply by x, add the next coefficient7
Roots of PDurand–Kerner iteration, then Newton polishing1.37113, 0.064433 ± 1.3488i

For roots, Vieta's formulas give a quick check: the roots of aₙxⁿ + … + a₀ sum to −aₙ₋₁/aₙ. For the default P that is 3/2, and 1.37113 + 2 × 0.0644328 = 1.5.

Common mistakes

  • Skipping missing powers in long division. Divide x³ + 2x + 1 as x³ + 0x² + 2x + 1, or the columns slide out of line. The calculator handles this for you.
  • Subtracting only the first term. The whole product is subtracted, so −(2x³ − 4x²) adds 4x².
  • Stopping too early. Keep dividing until the remainder's degree is below the divisor's.
  • Expecting only real roots. A degree-n polynomial always has n roots once complex ones are counted.

Common questions

How does polynomial long division work?

Divide the leading term of what is left by the leading term of the divisor, write that in the quotient, multiply it by the whole divisor, subtract, and repeat until the remainder has a lower degree than the divisor. Dividing 2x³ − 3x² + 4x − 5 by x − 2 gives the quotient 2x² + x + 6 and remainder 7, so 2x³ − 3x² + 4x − 5 = (x − 2)(2x² + x + 6) + 7.

What is the remainder theorem?

The remainder when P(x) is divided by (x − c) equals P(c). For the example above, P(2) = 16 − 12 + 8 − 5 = 7, the same as the long-division remainder. It follows that (x − c) is a factor exactly when P(c) = 0, which is the factor theorem.

How are the roots found?

With the Durand–Kerner method, which improves guesses for all n roots at once: each guess zᵢ moves to zᵢ − P(zᵢ)/∏(zᵢ − zⱼ). It converges to every root, real or complex, from a ring of starting points. Each root is then polished with Newton's method, and any root within rounding of a simple fraction that makes P exactly zero is shown as that fraction.

How many roots does a polynomial have?

A polynomial of degree n has exactly n complex roots, counting repeats (the fundamental theorem of algebra). With real coefficients the non-real roots come in conjugate pairs, so a cubic always has at least one real root. 2x³ − 3x² + 4x − 5 has one real root, about 1.37113, and the pair 0.0644328 ± 1.34876i.

What is the degree of a product or sum?

The degree of a product is the sum of the degrees (3 + 1 = 4 in the default example). The degree of a sum or difference is at most the larger degree, and can be lower when the leading terms cancel, as in (x² + 1) − (x² − 3) = 4.