Cubic Equation Solver
Solve cubic equations only. Find real and complex roots, follow Cardano-based steps, and explore the cubic graph.
Input on the left, result on the right, graph below both
This keeps the primary solving workflow easy to scan: enter coefficients, review the solved cubic, then confirm everything with the graph underneath.
Cubic Graph
Live graph preview
The graph and the state summary sit side by side so the cubic shape stays paired with its live measurements.
Graph states
Live summaryReal x-intercepts
No real x-intercepts
Y-intercept
(0, 0)
Inflection point
(0, 0)
Turning points
No local max/min
Cubic Examples
Cubic Solver FAQ
What is a cubic equation?
A cubic equation is a third-degree polynomial written in standard cubic form, where the leading coefficient cannot be zero.
Can this solver show complex roots?
Yes. If the equation has one real root and a complex-conjugate pair, the results section shows them clearly and labels them as complex.
Why does coefficient a matter so much?
If a = 0, the equation is no longer cubic. The UI validates this immediately and explains why the solver cannot proceed.
What does the step-by-step section show?
It summarizes the normalized equation, depressed cubic transformation, discriminant, and final interpretation so the solver feels more transparent.
How Cubic Solving Works
This section keeps the solver focused on cubic equations: normalize the equation, reduce it to the depressed cubic, classify the discriminant, and apply the matching cubic method.
Normalize the equation
Start with the general cubic equation, confirm the leading coefficient is nonzero, and divide every term by a.
Remove the quadratic term
Use the substitution
Compute the discriminant
The discriminant tells us which type of roots the cubic has and which branch of the method to use.
Choose the matching case
Once
Every Possible Case
The discriminant controls which branch of the cubic method applies.
One real root and two complex conjugate roots
Case 1: Delta > 0
Compute u and v from Cardano's cube-root expressions, build the three depressed-cubic roots from those values, and then convert back with the usual shift.
Triple real root
Case 2A: Delta = 0 and p = 0, q = 0
The depressed cubic collapses to a single repeated value, so all three real roots coincide after shifting back.
One simple real root and one double real root
Case 2B: Delta = 0 but p and q are not both zero
A single cube-root value generates one simple real root and one repeated real root after the inverse shift.
Three distinct real roots
Case 3: Delta < 0
Use the trigonometric form to express the three real roots through cosine angles, then convert them back to x with the inverse shift.
Compact General Formula
This is the algebraic closed form. When
Classification Summary
Generic Template
Keep the calculator generic by starting from symbolic coefficients, then derive p, q, and Delta from a, b, c, and d.
After computing Delta, choose Cardano, the repeated-root shortcut, or the trigonometric branch depending on the sign of Delta.
Generic workflow: normalize, substitute x = t - b/(3a), compute p, q, and Delta, choose the correct branch, then convert back from t to x.
Site-Ready Summary
Present cubic solving in this order: normalize the equation, substitute
How to Solve a Cubic Equation
A complete step-by-step explanation of the cubic solving process, including all possible root cases and mathematical transformations.
The Multi-Stage Methodology
The solver first normalizes the equation, transforms it into depressed cubic form, computes p, q, and the discriminant, then selects the correct method depending on the root case.
Logic Parameters
b/3a
p, q
(q/2)^2 + (p/3)^3
Step-by-Step Mathematical Breakdown
01Normalize the Equation
Normalize the Equation
Divide the entire cubic equation by the leading coefficient a to get a monic equation.
02Remove the Quadratic Term
Remove the Quadratic Term
Substitute
03Get the Depressed Cubic
Get the Depressed Cubic
The substitution results in a 'depressed' form without the t^2 term.
04Compute Parameters p, q, and Delta
Compute Parameters p, q, and Delta
Calculate the depressed parameters and the discriminant which determines the root nature.
05Choose the Correct Case
Choose the Correct Case
Identify the root nature based on Delta: Delta > 0 (1 real, 2 complex), Delta = 0 (repeated real), or Delta < 0 (3 distinct real).
Advanced ObservationDelta > 0: One real root, two complex conjugate. Delta = 0: Multiple real roots. Delta < 0: Three distinct real roots.
06Apply the Matching Root Formula
Apply the Matching Root Formula
Use Cardano's formula for Case 1, repeated root shortcuts for Case 2, or the Trigonometric method for Case 3.
Advanced ObservationWe select the algorithm that provides the highest precision for the specific discriminant value.
07Convert from t back to x
Convert from t back to x
Once t is found, reverse the substitution shift to find the final roots x.
08Show Final Roots and Type
Show Final Roots and Type
Verify the calculated roots and confirm that
Classification Summary
Case 1: Delta > 0
1 Real, 2 ComplexOne real root and two complex conjugate roots. Solved via Cardano's cube roots.
Case 2A: Delta = 0, p = q = 0
3 Equal RealThe rarest case where all three roots collapse into a single point (the inflection point).
Case 2B: Delta = 0 (p, q != 0)
1 Simple, 1 DoubleOne distinct real root and one repeated real root. The graph is tangent to the x-axis.
Case 3: Delta < 0
3 Distinct RealThree distinct real roots. The trigonometric method provides the most stable solution.
Algorithms Used
Cardano's Formula
Used for Delta > 0. Uses combinations of cube roots of real numbers.
Trigonometric Form
Used for Delta < 0. Avoids 'Casus Irreducibilis' by using cosine functions.
Repeated Root Path
Used for Delta = 0. Simplifies calculation as u = v in the Cardano derivation.
Method selected automatically based on the discriminant.
Algebraic Context
Mastering the Cardano-Tartaglia Derivation
The fundamental principle is using the substitution
General Cubic Structure
Start from symbolic coefficients a, b, c, and d, then derive the reduced form and matching root branch.
Root Pattern Overview
The final root pattern depends on Delta: positive gives one real root, zero gives repeated real roots, and negative gives three distinct real roots.