Third Order Polynomial Calculator & Guide
The calculator for this page is switched off while it is checked. The formula is below, and the worked example in the article shows how to use it by hand.
This calculator finds the roots of a cubic equation of the form ax³ + bx² + cx + d = 0. You enter the four coefficients a, b, c, and d, and it returns the real and complex roots, along with the discriminant and the value of the function at x = 0. It uses the standard cubic formula and handles all cases, including those with three real roots or one real and two complex roots.
Formula
The cubic equation is written as:
ax³ + bx² + cx + d = 0
where:
- a, b, c, d are real numbers (coefficients), with a ≠ 0.
- x is the variable (unknown).
The roots are found using the cubic formula (Cardano’s method). First, compute the discriminant Δ:
Δ = b²c² − 4ac³ − 4b³d − 27a²d² + 18abcd
Then, depending on the sign of Δ, the equation has either three distinct real roots (Δ > 0), one real root and two complex conjugate roots (Δ < 0), or multiple roots (Δ = 0). The calculator uses the general formula that works for all cases, including complex numbers.
Worked Example
Let’s solve the cubic equation with the default values: a = 1, b = −6, c = 11, d = −6. The equation is:
x³ − 6x² + 11x − 6 = 0
First, compute the discriminant:
Δ = (−6)²(11)² − 4(1)(11)³ − 4(−6)³(−6) − 27(1)²(−6)² + 18(1)(−6)(11)(−6)
Δ = 36×121 − 4×1331 − 4×(−216)×(−6) − 27×36 + 18×396
Δ = 4356 − 5324 − 5184 − 972 + 7128 = 4
Since Δ > 0, there are three distinct real roots. Using the cubic formula (or factoring), we find:
x = 1, x = 2, x = 3
Indeed, (x−1)(x−2)(x−3) = x³ − 6x² + 11x − 6. The calculator gives the same roots: 1, 2, 3.
How to Use the Calculator
- Enter the coefficient a (must be non‑zero).
- Enter b, c, and d.
- Click “Calculate�. The three roots are shown, along with the discriminant.
The roots may be real numbers or complex numbers (displayed with “i� for the imaginary unit). If you only need real roots, ignore any that have a non‑zero imaginary part.
When to Use a Cubic Equation
Cubic equations appear in many fields:
- Physics: motion with constant acceleration (though those are quadratic), some optics and wave equations.
- Engineering: beam deflection, fluid flow, and stress analysis.
- Economics: cost and revenue models, supply and demand curves.
- Geometry: volumes of certain shapes, and in solving quartic equations.
- Chemistry: Van der Waals equation of state for real gases.
If you have a problem that reduces to a cubic polynomial, this calculator gives you the roots quickly, saving you from tedious algebra.
Common Mistakes and Pitfalls
- Entering a = 0: That makes it a quadratic, not a cubic. The calculator requires a ≠ 0.
- Sign errors: A negative coefficient must be entered with its minus sign. For example, x³ − 2x² + 3x − 4 means a=1, b=−2, c=3, d=−4.
- Misreading complex roots: If the discriminant is negative, you get one real root and two complex roots. The complex roots are conjugates (a+bi and a−bi).
- Rounding too early: If you are using the roots in further calculations, keep more decimal places to avoid error propagation.
Limitations of the Cubic Formula
The cubic formula is exact but can be numerically unstable for certain coefficient values, especially when the roots are very close together. In such cases, the calculator may produce small imaginary parts that should be zero. This is a known issue with any floating‑point implementation. For most practical purposes, the results are accurate to several decimal places.
Also, the formula involves cube roots of complex numbers, which can be confusing. The calculator handles this internally, so you don’t need to worry about it.
Alternatives to the Cubic Formula
- Factoring: If the polynomial has rational roots, you can try rational root theorem (possible roots are factors of d divided by factors of a). This works for simple cases like the example above.
- Numerical methods: Newton‑Raphson or bisection methods can approximate roots to any precision. They are easier to implement in code but give approximate, not exact, results.
- Graphing: Plot the function and read the x‑intercepts. Good for a quick visual estimate.
Frequently Asked Questions
What is a third order polynomial?
A third order polynomial is a cubic equation: ax³ + bx² + cx + d = 0. The highest power of x is 3. It can have up to three real roots, or one real and two complex roots.
Can the calculator handle complex coefficients?
No, this calculator expects real coefficients a, b, c, and d. If you have complex coefficients, you need a more advanced tool or a computer algebra system.
What does the discriminant tell me?
The discriminant Δ indicates the nature of the roots: Δ > 0 → three distinct real roots; Δ = 0 → multiple real roots (at least two equal); Δ < 0 → one real root and a pair of complex conjugates.
Why does the calculator show a root like 1.0000 + 0.0000i?
That is a real root displayed in complex form. The imaginary part is zero (or nearly zero due to rounding). You can treat it as the real number 1.0000.
How do I use the roots to factor the polynomial?
If r is a root, then (x − r) is a factor. For three roots r1, r2, r3, the polynomial factors as a(x − r1)(x − r2)(x − r3). This works even for complex roots, but then the factors have complex coefficients.
Related
Formula used
in a | Coefficient a | - | 1 | 0 in b | Coefficient b | - | -6 | 0 in c | Coefficient c | - | 11 | 0 in d | Coefficient d | - | -6 | 0 out root1 | First root | - | (-b/(3*a)) - (cbrt((2*b^3 - 9*a*b*c + 27*a^2*d + sqrt(-4*(b^2 - 3*a*c)^3 + (2*b^3 - 9*a*b*c + 27*a^2*d)^2))/(54*a^3)) + cbrt((2*b^3 - 9*a*b*c + 27*a^2*d - sqrt(-4*(b^2 - 3*a*c)^3 + (2*b^3 - 9*a*b*c + 27*a^2*d)^2))/(54*a^3))) | 4 out root2 | Second root | - | (-b/(3*a)) + ((1 + sqrt(-3)*1i)/2)*cbrt((2*b^3 - 9*a*b*c + 27*a^2*d + sqrt(-4*(b^2 - 3*a*c)^3 + (2*b^3 - 9*a*b*c + 27*a^2*d)^2))/(54*a^3)) + ((1 - sqrt(-3)*1i)/2)*cbrt((2*b^3 - 9*a*b*c + 27*a^2*d - sqrt(-4*(b^2 - 3*a*c)^3 + (2*b^3 - 9*a*b*c + 27*a^2*d)^2))/(54*a^3)) | 4 out root3 | Third root | - | (-b/(3*a)) + ((1 - sqrt(-3)*1i)/2)*cbrt((2*b^3 - 9*a*b*c + 27*a^2*d + sqrt(-4*(b^2 - 3*a*c)^3 + (2*b^3 - 9*a*b*c + 27*a^2*d)^2))/(54*a^3)) + ((1 + sqrt(-3)*1i)/2)*cbrt((2*b^3 - 9*a*b*c + 27*a^2*d - sqrt(-4*(b^2 - 3*a*c)^3 + (2*b^3 - 9*a*b*c + 27*a^2*d)^2))/(54*a^3)) | 4 out disc | Discriminant | - | b^2*c^2 - 4*a*c^3 - 4*b^3*d - 27*a^2*d^2 + 18*a*b*c*d | 0
Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work
Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.