Cubic Equation Calculator
Solve cubic equation problems step-by-step with our free calculator. See formulas, worked examples, and clear explanations.
Formula
x = cbrt(-q/2 + sqrt(q^2/4 + p^3/27)) + cbrt(-q/2 - sqrt(q^2/4 + p^3/27))
Where the depressed cubic t^3 + pt + q = 0 is derived from ax^3 + bx^2 + cx + d = 0 by substituting x = t - b/(3a). The values p = (3ac - b^2)/(3a^2) and q = (2b^3 - 9abc + 27a^2d)/(27a^3).
Worked Examples
Example 1: Three Distinct Real Roots
Problem: Solve x^3 - 6x^2 + 11x - 6 = 0
Solution: Using Cardano's method or factoring:\nx^3 - 6x^2 + 11x - 6 = (x - 1)(x - 2)(x - 3) = 0\nVerification with Vieta's formulas:\nSum of roots: 1 + 2 + 3 = 6 = -(-6)/1\nSum of products: 1*2 + 1*3 + 2*3 = 11 = 11/1\nProduct: 1*2*3 = 6 = -(-6)/1
Result: Roots: x = 1, x = 2, x = 3
Example 2: One Real and Two Complex Roots
Problem: Solve x^3 + x + 2 = 0 (a=1, b=0, c=1, d=2)
Solution: Depressed cubic: t^3 + t + 2 = 0 (already depressed since b=0)\np = 1, q = 2, discriminant = -4(1) - 27(4) = -112 < 0\nUsing Cardano's formula:\nu = cbrt(-1 + sqrt(1 + 1/27)), v = cbrt(-1 - sqrt(1 + 1/27))\nReal root approximately x = -1\nComplex roots: 0.5 +/- 1.3229i
Result: One real root x = -1, two complex roots 0.5 +/- 1.3229i
Frequently Asked Questions
What is a cubic equation and what does it look like?
A cubic equation is a polynomial equation of degree three, written in the standard form ax^3 + bx^2 + cx + d = 0, where a is not equal to zero. The coefficient a is called the leading coefficient, b is the quadratic coefficient, c is the linear coefficient, and d is the constant term. Unlike quadratic equations that form parabolas, cubic equations graph as S-shaped curves that can cross the x-axis up to three times. Every cubic equation with real coefficients has at least one real root, which is guaranteed by the Intermediate Value Theorem since the function approaches positive infinity in one direction and negative infinity in the other.
How does Cardano's formula solve cubic equations?
Cardano's formula, published in 1545 by Gerolamo Cardano, is the cubic analog of the quadratic formula. The method first eliminates the quadratic term by substituting x = t - b/(3a) to create a depressed cubic t^3 + pt + q = 0. Then it uses the substitution t = u + v and solves for u and v using the relationship u^3 + v^3 = -q and 3uv = -p. The resulting cube roots give the solution. While historically groundbreaking, the formula can produce complex intermediate values even when all roots are real, a situation known as casus irreducibilis. In such cases, the trigonometric method provides a more practical approach.
What does the discriminant tell you about cubic equation roots?
The discriminant of a cubic equation reveals the nature of its roots without actually solving it. For ax^3 + bx^2 + cx + d = 0, the discriminant is calculated as -4p^3 - 27q^2 (from the depressed form). When the discriminant is positive, the equation has three distinct real roots. When it equals zero, the equation has repeated roots (either a double root and a single root, or a triple root). When the discriminant is negative, the equation has one real root and two complex conjugate roots. This classification is extremely useful for quickly understanding the behavior of the cubic equation.
What are Vieta's formulas for cubic equations?
Vieta's formulas establish elegant relationships between the coefficients of a polynomial and its roots. For a cubic equation ax^3 + bx^2 + cx + d = 0 with roots r1, r2, and r3, the formulas state: the sum of roots r1 + r2 + r3 = -b/a, the sum of products of pairs r1*r2 + r1*r3 + r2*r3 = c/a, and the product of all roots r1*r2*r3 = -d/a. These formulas are incredibly useful for checking solutions and for problems where you need relationships between roots without finding the actual root values. They also extend naturally to polynomials of any degree.
How do you find the critical points of a cubic function?
Critical points of a cubic function f(x) = ax^3 + bx^2 + cx + d are found by setting the derivative equal to zero. The derivative is f'(x) = 3ax^2 + 2bx + c, which is a quadratic equation. Using the quadratic formula gives the critical points. If the discriminant 4b^2 - 12ac is positive, there are two critical points (a local maximum and minimum). If it equals zero, there is one inflection point where the function flattens momentarily. If negative, there are no real critical points and the function is monotonically increasing or decreasing. The inflection point is always at x = -b/(3a).
What is a depressed cubic and why is it useful?
A depressed cubic is a cubic equation with no quadratic term, written as t^3 + pt + q = 0. Any general cubic ax^3 + bx^2 + cx + d = 0 can be converted to depressed form by substituting x = t - b/(3a), which eliminates the x^2 term through a process called Tschirnhaus transformation. This simplification is useful because the depressed cubic is much easier to solve analytically. The values of p and q in the depressed form determine the discriminant and the nature of the roots. Cardano's formula and the trigonometric method both work directly with the depressed cubic form to find solutions.