FireCADCalc

Cubic Equation Roots

Real and complex roots of a cubic equation ax³ + bx² + cx + d = 0 by the trigonometric and Cardano methods, with the discriminant and the number of real roots.

Inputs

Examples: Illustrative roots 1, 2 and 3One real root and a complex pairPeng-Robinson-like Z cubic

Accepted: -1E+9 to 1E+9
Accepted: -1E+9 to 1E+9
Accepted: -1E+9 to 1E+9
Accepted: -1E+9 to 1E+9

Results

Dividing by a and substituting x = t − b/3a gives the depressed cubic t³ + pt + q = 0. With three real roots (discriminant positive) the trigonometric form t = 2√(−p/3)·cos[(1/3)acos(3q/(2p)·√(−3/p)) − 2πk/3] avoids complex arithmetic; with one real root Cardano's formula t = ∛(−q/2 + √Δ′) + ∛(−q/2 − √Δ′) gives it and the complex pair. Check roots by substitution; equal roots are sensitive to rounding.

Root 1 (always real)-0.70394
Root 2 (real part if complex)1.1020
Root 3 (real part if complex)1.1020
Imaginary part of the complex pair (0 if all real)1.5288
Discriminant-4,688.0
Number of distinct real roots1.0000

Download PDF CSV Link to this result Compare another case

Log in to save calculations to your dashboard.

Worked example

Example: Illustrative roots 1, 2 and 3. The inputs, in the units selected above:

InputValue
Coefficient a (x³)1.0000 -
Coefficient b (x²)-6.0000 -
Coefficient c (x)11.000 -
Constant d-6.0000 -

Applying the formula below gives:

ResultValue
Root 1 (always real)3.0000
Root 2 (real part if complex)2.0000
Root 3 (real part if complex)1.00000
Imaginary part of the complex pair (0 if all real)0
Discriminant4.0000
Number of distinct real roots3.0000

Open this example in the calculator and change any input.

Formula

\(x = t - \frac{b}{3a}, \quad t^3 + pt + q = 0, \quad t_k = 2\sqrt{-\frac p3}\cos\left[\frac13\cos^{-1}\left(\frac{3q}{2p}\sqrt{-\frac3p}\right) - \frac{2\pi k}{3}\right]\)

Variables

Symbol Meaning SI unit
\(a\) Coefficient a (x³) -
\(b\) Coefficient b (x²) -
\(c\) Coefficient c (x) -
\(d\) Constant d -
\(x_1\) Root 1 (always real) -
\(x_2\) Root 2 (real part if complex) -
\(x_3\) Root 3 (real part if complex) -
\(\pm\Im\) Imaginary part of the complex pair (0 if all real) -
\(\Delta\) Discriminant -
\(n_{real}\) Number of distinct real roots -

Method and standards

Cubic roots.

Where it is used

  • Equations of state and tank geometry.
  • Any polynomial model of degree three.

Common mistakes

  • Setting a = 0.
  • Expecting real roots where the pair is complex.

Assumptions and limits

  • Real coefficients.

References

  • Cardano and trigonometric solutions of the cubic

Questions and answers

Where do cubic equations appear in engineering?

Cubic equations of state (Peng–Robinson), beam deflection, tank depth from volume and economic optimisation.

Why use the trigonometric form?

When all three roots are real, Cardano's formula needs complex cube roots; the cosine form avoids them.

What do the defaults represent?

x³ − 6x² + 11x − 6 = 0, whose roots are 1, 2 and 3.

Method and article reviewed by FireCAD engineering on 17 November 2026. Every result is checked against an independent calculation on each release: how we verify our calculators.

Sources

Zwillinger, CRC Standard Mathematical Tables and Formulae, 33rd ed. (CRC Press, 2018)

Related calculators

Free engineering calculators: every page computes in SI and converts to your units. Results are for engineering estimation; verify critical designs against the referenced standards.

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please retry or reload the page.