Cubic Equation Solver WORKSPACE
Open menu
Dedicated Cubic Solver

Cubic Equation Solver

Solve cubic equations only. Find real and complex roots, follow Cardano-based steps, and explore the cubic graph.

Enter cubic coefficients

Enter values for ax^3 + bx^2 + cx + d = 0.

Workflow Preview

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.

Enter a, b, c, and d in the left panel.
Solve to populate the result summary on the right.
Use the full-width graph below to confirm the cubic behavior.

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.

The graph stays on the left so the curve remains the primary visual anchor while the states on the right stay easy to scan.

Graph states

Live summary

Real 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.

General Cubic Method

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.

Step 1

Normalize the equation

Start with the general cubic equation, confirm the leading coefficient is nonzero, and divide every term by a.

x^3 + (b/a)x^2 + (c/a)x + d/a = 0
Step 2

Remove the quadratic term

Use the substitution

x = t - b/(3a)
. This converts the original cubic into the depressed cubic
t^3 + pt + q = 0
.

p = (3ac - b^2) / (3a^2) q = (27a^2d - 9abc + 2b^3) / (27a^3) x = t - b/(3a)
Step 3

Compute the discriminant

The discriminant tells us which type of roots the cubic has and which branch of the method to use.

Delta = (q/2)^2 + (p/3)^3
Step 4

Choose the matching case

Once

Delta
is known, we use Cardano's real branch, the repeated-root shortcut, or the trigonometric form.

Delta > 0: 1 real + 2 complex Delta = 0: repeated real roots Delta < 0: 3 distinct real roots

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

u = cbrt(-q/2 + sqrt(Delta)) v = cbrt(-q/2 - sqrt(Delta)) omega = (-1 + i*sqrt(3)) / 2 x1 = u + v - b/(3a) x2 = omega*u + omega^2*v - b/(3a) x3 = omega^2*u + omega*v - b/(3a)

This is the algebraic closed form. When

Delta < 0
, the trigonometric version is usually easier to use in practice.

Classification Summary

If Delta > 0, the cubic has 1 real root and 2 complex conjugate roots.
If Delta = 0 and p = q = 0, the cubic has 3 equal real roots.
If Delta = 0 but p and q are not both zero, the cubic has 1 simple real root and 1 double real root.
If Delta < 0, the cubic has 3 distinct real roots.

Generic Template

ax^3 + bx^2 + cx + d = 0

Keep the calculator generic by starting from symbolic coefficients, then derive p, q, and Delta from a, b, c, and d.

p = (3ac - b^2) / (3a^2) q = (27a^2d - 9abc + 2b^3) / (27a^3) Delta = (q/2)^2 + (p/3)^3

After computing Delta, choose Cardano, the repeated-root shortcut, or the trigonometric branch depending on the sign of Delta.

If Delta > 0: one real and two complex roots If Delta = 0: repeated real roots If Delta < 0: three distinct real roots

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

x = t - b/(3a)
, build the depressed cubic
t^3 + pt + q = 0
, compute p, q, and
Delta
, choose the correct case, apply the matching root formula, convert from t back to x, and then show the final roots with their root type.

Educational Guide

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.

Normalize Equation
Remove Quadratic Term
Compute Discriminant
Classify Method

Logic Parameters

Normalized Form
x^3 + (b/a)x^2 + (c/a)x + d/a = 0
Depressed Form
t^3 + pt + q = 0
Shift (x = t - shift)

b/3a

Parameters p, q

p, q

Discriminant (Delta)

(q/2)^2 + (p/3)^3

Step-by-Step Mathematical Breakdown

01

Normalize the Equation

Divide the entire cubic equation by the leading coefficient a to get a monic equation.

x^3 + (b/a)x^2 + (c/a)x + (d/a) = 0
02

Remove the Quadratic Term

Substitute

x = t - b/(3a)
to eliminate the quadratic term and shift the inflection point to the y-axis.

Substitute: x = t - b/(3a)
03

Get the Depressed Cubic

The substitution results in a 'depressed' form without the t^2 term.

t^3 + pt + q = 0
04

Compute Parameters p, q, and Delta

Calculate the depressed parameters and the discriminant which determines the root nature.

p = (3ac - b^2) / (3a^2) q = (27a^2d - 9abc + 2b^3) / (27a^3) Delta = (q/2)^2 + (p/3)^3
05

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.

06

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.

07

Convert from t back to x

Once t is found, reverse the substitution shift to find the final roots x.

x = t - b/(3a)
08

Show Final Roots and Type

Verify the calculated roots and confirm that

f(x) \\approx 0
for each root.

f(x) \approx 0

Classification Summary

D+
Case 1: Delta > 0
1 Real, 2 Complex

One real root and two complex conjugate roots. Solved via Cardano's cube roots.

D0
Case 2A: Delta = 0, p = q = 0
3 Equal Real

The rarest case where all three roots collapse into a single point (the inflection point).

R2
Case 2B: Delta = 0 (p, q != 0)
1 Simple, 1 Double

One distinct real root and one repeated real root. The graph is tangent to the x-axis.

D-
Case 3: Delta < 0
3 Distinct Real

Three 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

x = u + v
to convert the cubic into a quadratic in terms of
u^3
and
v^3
. Once these are found, the values for t and finally x are unlocked.

ax^3 + bx^2 + cx + d = 0
t^3 + pt + q = 0
Generic Equation Template

General Cubic Structure

Start from symbolic coefficients a, b, c, and d, then derive the reduced form and matching root branch.

Target Problem
ax^3 + bx^2 + cx + d = 0
Shift Value
x = t - b/(3a)
Parameter p
(3ac - b^2) / (3a^2)
Parameter q
(27a^2d - 9abc + 2b^3) / (27a^3)
Discriminant Delta
(q/2)^2 + (p/3)^3
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.

xx1
xx2
xx3