1
-0
2
3
0
-0
-0
-0
-0
1
-0
2
3
0
-0
-0
-0
-0
The Cubic Equation Calculator solves third-degree polynomial equations of the form ax³ + bx² + cx + d = 0 using Cardano’s method combined with trigonometric substitution. Enter the four coefficients, and the calculator instantly provides all real roots, the discriminant, and the classification of the solution type.
Cubic equations represent a significant step up in complexity from quadratic equations and have a rich history spanning thousands of years. While the ancient Babylonians could solve certain cubic problems geometrically, the first general algebraic solution was discovered by Italian mathematicians Scipione del Ferro and Niccolò Tartaglia in the early 16th century, later published by Gerolamo Cardano in his landmark 1545 work Ars Magna. This achievement was a watershed moment in mathematics—it proved that algebraic solutions existed beyond the familiar quadratic formula.
Cubic equations arise naturally in many scientific and engineering contexts. In fluid dynamics, the cubic equation governs the relationship between flow rate and pressure drop in certain pipe configurations. In materials science, cubic equations describe the equation of state for real gases (the van der Waals equation). In structural engineering, buckling analysis of columns involves solving cubic characteristic equations. In economics, cubic cost and revenue functions model more realistic scenarios than simple quadratic models.
The general approach implemented in this calculator uses Cardano’s method. First, the cubic is converted to a depressed cubic by substituting $$x = t - \frac{b}{3a}$$ to eliminate the squared term, yielding $$t^3 + pt + q = 0$$. The discriminant of this depressed cubic, along with the quantities \(Q = p/3\) and \(R = q/2\), determines the nature of the solutions.
When the internal discriminant \(D = Q^3 + R^2\) is positive, there is one real root and two complex conjugate roots, and Cardano’s formula applies directly using cube roots. When \(D\) is negative (the famous casus irreducibilis), all three roots are real, but paradoxically, Cardano’s formula involves complex intermediate expressions. This calculator handles this case elegantly using trigonometric substitution, expressing the three real roots as $$t_k = 2\sqrt{-Q}\cos\left(\frac{\theta + 2\pi k}{3}\right), \quad k = 0, 1, 2$$ where \(\theta = \arccos\left(\frac{-R}{\sqrt{-Q^3}}\right)\).
The overall discriminant of the original cubic \(ax^3 + bx^2 + cx + d = 0\) is given by $$\Delta = -(4p^3 + 27q^2) \cdot a^2$$ (shown here in simplified form for the depressed cubic). A positive discriminant means three distinct real roots; zero means at least two equal roots; negative means one real and two complex roots. This calculator computes and displays all of this information automatically.
Understanding cubic equations is a gateway to Galois theory, one of the deepest areas of abstract algebra, which explains when polynomial equations can be solved by radicals and ultimately led to the proof that no general formula exists for equations of degree five or higher.
The calculator uses a two-stage approach to solve $$ax^3 + bx^2 + cx + d = 0$$:
Stage 1: Depressed Cubic
Substitute \(x = t - \frac{b}{3a}\) to obtain the depressed form $$t^3 + pt + q = 0$$ where:
$$p = \frac{3ac - b^2}{3a^2}, \quad q = \frac{2b^3 - 9abc + 27a^2d}{27a^3}$$
Stage 2: Solve Depressed Cubic
Compute \(Q = p/3\), \(R = q/2\), \(D = Q^3 + R^2\).
Finally, shift back: \(x_k = t_k - \frac{b}{3a}\).
The discriminant tells you the root structure at a glance. A positive discriminant means three distinct real roots—all are displayed as x&sub1;, x&sub2;, x&sub3;. A negative discriminant means only one real root (x&sub1;) exists alongside a complex conjugate pair (x&sub2; and x&sub3; show NaN). The Real Root x&sub1; is always computed regardless of discriminant sign and represents the principal real solution of the cubic equation.
Inputs
Results
Factors as (x−1)(x−2)(x−3) = 0, so roots are 1, 2, 3. Discriminant > 0 confirms three distinct real roots.
Inputs
Results
Discriminant < 0 indicates one real root (≈ −0.6823) and two complex conjugate roots.
A cubic equation is a polynomial equation of degree three, written in the general form ax³ + bx² + cx + d = 0, where a ≠ 0. It always has at least one real root and can have up to three distinct real roots.
Cardano’s formula is the cubic analog of the quadratic formula. For the depressed cubic t³ + pt + q = 0, one root is given by t = √³(−q/2 + √(q²/4 + p³/27)) + √³(−q/2 − √(q²/4 + p³/27)). It was first published by Gerolamo Cardano in 1545.
A depressed cubic has the form t³ + pt + q = 0 (no t² term). Any general cubic ax³ + bx² + cx + d = 0 can be converted to depressed form by the substitution x = t − b/(3a), which eliminates the quadratic term.
The casus irreducibilis occurs when a cubic equation has three distinct real roots but Cardano’s formula involves taking cube roots of complex numbers. This paradox is resolved by using the trigonometric method, which expresses all three real roots using cosines.
By the Fundamental Theorem of Algebra, every cubic equation has exactly three roots (counted with multiplicity) in the complex numbers. In terms of real roots, it always has at least one and at most three distinct real roots.
The discriminant Δ of a cubic determines root structure: Δ > 0 means three distinct real roots; Δ = 0 means at least two equal roots (could be a triple root or one simple + one double root); Δ < 0 means one real root and two complex conjugate roots.
No. If a = 0, the equation reduces to a quadratic (bx² + cx + d = 0) or lower degree. Use our Quadratic Formula Calculator for degree-two equations.
Cubic equations appear in the van der Waals equation for real gases, beam deflection formulas in structural engineering, cubic spline interpolation in computer graphics, and optimization problems where cost or revenue functions are cubic polynomials.
The calculator uses standard IEEE 754 double-precision floating-point arithmetic, providing approximately 15–16 significant digits of precision. For most practical applications, the results are extremely accurate. Numerical issues can arise only for equations with very large or very small coefficients.
This calculator solves cubic (degree 3) equations only. While quartic equations also have a closed-form solution (Ferrari’s formula), it is considerably more complex. For degree 5 and above, the Abel–Ruffini theorem proves that no general algebraic solution exists.
Roboculator Team
The Roboculator Team explains calculations, planning tools, and practical formulas in clear language for real-life situations.
How helpful was this calculator?
Be the first to rate!
Quadratic Formula Calculator
Algebra Calculators - Equation Solvers
Completing the Square Calculator
Algebra Calculators - Equation Solvers
System of Equations Calculator
Algebra Calculators - Equation Solvers
Elimination Method Calculator
Algebra Calculators - Equation Solvers
Substitution Method Calculator
Algebra Calculators - Equation Solvers
Simultaneous Equations Calculator
Algebra Calculators - Equation Solvers