Cubic Equation Solver
A cubic equation has the basic form: ax3+bx2+cx+d=0Enter the coefficients a, b, c, d of the cubic equation in its basic standardized form. The solutions of a cubic equation are usually three roots, two of which may be complex. Calculation is done using Cardano's formula.
How to Calculate the Roots of a Cubic Equation
A cubic equation is a polynomial equation of the third degree, written in its standard form as ax³ + bx² + cx + d = 0, where a ≠ 0. Every cubic equation has exactly three roots, though some may be repeated or complex. Finding these roots is more involved than solving a quadratic equation, but several reliable methods exist.
Simplifying the Equation
The first step is to divide the entire equation by the leading coefficient a, producing a reduced form x³ + bx² + cx + d = 0 where the coefficients have been adjusted accordingly. This simplification makes all subsequent steps easier to manage.
Checking for Rational Roots
Before reaching for advanced formulas, it is worth testing for rational roots using the Rational Root Theorem. This theorem states that any rational root must be a factor of the constant term d divided by a factor of the leading coefficient a. If you find one rational root, you can factor it out and reduce the cubic to a quadratic equation, which is straightforward to solve.
Cardano's Formula
When rational roots are not available, the most classical approach is Cardano's formula, published in 1545. The method begins by eliminating the quadratic term through the substitution x = t − b/3a, which transforms the equation into a depressed cubic of the form t³ + pt + q = 0. The discriminant Δ = −4p³ − 27q² then determines the nature of the roots. If Δ > 0, all three roots are real and distinct. If Δ = 0, all roots are real but at least two are equal. If Δ < 0, one root is real and the other two are complex conjugates.
The real root of the depressed cubic is calculated as t = ∛(−q/2 + √(q²/4 + p³/27)) + ∛(−q/2 − √(q²/4 + p³/27)), and the remaining roots are found either by factoring or by applying the formula with complex cube roots.
Numerical and Graphical Methods
For practical applications, numerical methods such as the Newton-Raphson iteration are often preferred. You start with an initial guess and repeatedly refine it using the formula xₙ₊₁ = xₙ − f(xₙ)/f'(xₙ) until the result converges. Graphing the function can also help identify approximate root locations before applying any algebraic or numerical technique.
