Cubic Equation Calculator
Solve cubic equation problems step-by-step with our free calculator. See formulas, worked examples, and clear explanations.
Reviewed for accuracy by Manoj Kumar, Mathematics Educator
Cubic Equation Calculator
Calculator
Adjust values & calculateEnter your values below. Every result is computed in your browser โ no data is sent to any server.
Formula: x = cbrt(-q/2 + sqrt(q^2/4 + p^3/27)) + cbrt(-q/2 - sqrt(q^2/4 + p^3/27))
Worked example โ Roots: x = 1, x = 2, x = 3
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: x^3 - 6x^2 + 11x - 6 = (x - 1)(x - 2)(x - 3) = 0 Verification with Vieta's formulas: Sum of roots: 1 + 2 + 3 = 6 = -(-6)/1 Sum of products: 1*2 + 1*3 + 2*3 = 11 = 11/1 Product: 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) p = 1, q = 2, discriminant = -4(1) - 27(4) = -112 < 0 Using Cardano's formula: u = cbrt(-1 + sqrt(1 + 1/27)), v = cbrt(-1 - sqrt(1 + 1/27)) Real root approximately x = -1 Complex 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.
Can cubic equations have complex roots and how do they appear?
Yes, cubic equations with real coefficients can have complex roots, but they always appear in conjugate pairs. This means if a + bi is a root, then a - bi must also be a root. Since a cubic has exactly three roots (counting multiplicity), the possible combinations are: three real roots, or one real root plus one pair of complex conjugate roots. A cubic with real coefficients can never have exactly two complex roots without a conjugate partner. The real root that always exists represents where the cubic curve crosses the x-axis, while complex roots indicate that the curve approaches but does not touch the x-axis at certain points.
How do you factor a cubic polynomial once you know one root?
Once you find one root r of a cubic equation ax^3 + bx^2 + cx + d = 0, you know that (x - r) is a factor. You can then perform polynomial long division or synthetic division to divide the cubic by (x - r), yielding a quadratic quotient ax^2 + ex + f. The remaining two roots are found using the quadratic formula on this quotient. This strategy of reducing the polynomial degree by one is called deflation. In practice, finding the first root is the hardest part. You can try rational roots using the Rational Root Theorem, which states that any rational root p/q must have p dividing d and q dividing a.
What is the inflection point of a cubic function?
The inflection point of a cubic function is where the concavity changes from concave up to concave down or vice versa. For f(x) = ax^3 + bx^2 + cx + d, the inflection point occurs at x = -b/(3a), found by setting the second derivative f''(x) = 6ax + 2b equal to zero. Every cubic function has exactly one inflection point, and this point is also the center of symmetry of the cubic curve. The cubic function is symmetric about its inflection point, meaning if you rotate the graph 180 degrees around the inflection point, you get the same curve. The y-coordinate of the inflection point can be found by substituting x = -b/(3a) back into f(x).
How are cubic equations used in real-world applications?
Cubic equations appear in numerous practical applications across science and engineering. In physics, they describe the relationship between pressure, volume, and temperature in the van der Waals equation for real gases. In engineering, cubic equations arise in beam deflection calculations and stress analysis. Computer graphics use cubic Bezier curves extensively for smooth path interpolation and font rendering. In economics, cubic cost functions model the behavior of marginal costs. Fluid dynamics uses cubic equations in pipe flow calculations. Even everyday applications like designing roller coasters or optimizing packaging dimensions involve solving cubic equations to find optimal dimensions.
References
Reviewed for accuracy by Manoj Kumar, Mathematics Educator ยท Editorial policy
Related Calculators
๐งฎEquation Solver
Solve linear, quadratic, cubic, and polynomial equations with step-by-step solutions.
๐งฎAbsolute Value Equation Calculator
Calculate absolute value equation with inputs, formulas, and instant results.
๐งฎEquation Balancer Calculator
Calculate equation balancer with inputs, formulas, and instant results.
๐งฎQuartic Equation Solver
Calculate quartic equation solver with inputs, formulas, and instant results.
๐งฎEquation of a Circle Calculator
Calculate equation of acircle with inputs, formulas, and instant results.
๐งฎEquation of a Sphere Calculator
Calculate equation of asphere with inputs, formulas, and instant results.
๐งฎLine Equation From Two Points Calculator
Calculate line equation from two points with inputs, formulas, and instant results.
๐งฎDifferential Equation Solver
Calculate differential equation solver with inputs, formulas, and instant results.