In this page we discuss the problem of solving a cubic equation with real coefficients. In this case, the cubic equation has at least one real solution, and either none or two complex solutions. For readers familiar with the cubic formula, they will find different ways in which it can be written, and solving the cubic equation (that is, finding all the solutions of the equation) involves operations with complex numbers, even in the case that all solutions are real numbers. This fact certainly does not contribute to the popularization of the cubic formula. In this page we describe how to solve a cubic equation by only performing operations on real numbers, and when we find the complex number solutions we describe how to find the real and imaginary parts. In addition, we also describe how to use primitive cube roots of the unity to write solutions of the cubic equation using real radicals.

The classical way to solve a cubic equation is with one formula, or in practice three. The three formulas provide a way to find each solution, one at the time. We will also do that here. We will write three formulas to find the three solutions of a cubic equation, but will recognize that in order to do so we have to distinguish cases. The formula we use to find the three real solutions of a cubic equation is different from the formula we use to find the solutions of a cubic equation when there are two complex solutions. This analysis is summarized by separating the application of the formulas given here into cases as we discuss below.

Throughout this discussion we will talk about both the cubic equation
*ax ^{3} + bx^{2}+ cx + d = 0* and the corresponding
cubic function

Before we go into details of each formula, we actually need to talk about cubic functions and understand how graphs are constructed in this case.

If one starts with a cubic function *f(x) = ax ^{3} + bx^{2}
+ cx + d,* then when graphing such function we compute its derivative

Case | Explanation |

b^{2} - 3ac > 0 |
There are two critical numbers. The graph of f has a local maximum and a local minimum. |

b^{2} - 3ac = 0 |
There is only one critical number. The function is monotonic. There is one real root
and two complex conjugate roots. The
graph is obtained by translations and dilations of the graph of g(x) = x^{3} |

b^{2} - 3ac < 0 |
There are no critical numbers. The function is monotonic. The function has one real root and two complex conjugate roots. |

Observe that in the case *b ^{2} - 3ac > 0* above we do not
make a statement about the number of real and complex solutions. That is
because the number of real and complex solutions is determined by another
number.

The discriminant of a cubic equation
*ax ^{3} + bx^{2}+ cx + d = 0* is defined as

It can be shown that the discriminant
of the equation *ax ^{3} + bx^{2}+ cx + d = 0*
can be computed by the formula

The interpretation of the discriminant is

Case | Explanation |

Δ > 0 |
The cubic equation has three different real solutions. |

Δ = 0 |
The cubic equation has a repeated solution. |

Δ < 0 |
There is only one real solution and two complex conjugate roots. |

The discriminant of a cubic equation is related to the discriminant of the derivative of the associated cubic function by the inequality \begin{equation} 27a^{2}\Delta \leq 4(b^{2} - 3ac)^{3} \tag{1} \label{eq:inequality} \end{equation} This leads us to the following conclusions:

- If
*b*then^{2}- 3ac < 0,*Δ < 0*. This is consistent with the fact that if*b*then the corresponding cubic function is monotonic, so it is one-to-one, implying that there is only one real solution of the cubic equation, which is what the statement^{2}- 3ac < 0,*Δ < 0*predicts. - If
*Δ > 0,*then*b*. This says that if a cubic equation manages to have 3 solutions it does it by having a local maximum and a local minimum. This is not really enough to conclude that there are three solutions. In order to explain why there are three solutions in this case we need to know that if^{2}- 3ac > 0*x*and_{1}*x*are the critical numbers of the associated cubic function_{2}*f*, then \begin{equation}\label{critical}\tag{2} 27a^{2}f(x_{1})f(x_{2}) = -\Delta. \end{equation} It follows that since*Δ > 0*the critical values of*f*must have opposite signs, which creates a solution between the critical points. The other two solutions can be predicted by comparing the location and sign of the critical values of the corresponding cubic function to the end behavior of such function.

The image above shows that the sign of the discriminant of the equation
does not determine the sign of *b ^{2} - 3ac*. The discriminant
depends on the value of the coefficient

This discussion can be summarized as follows. We divide the solution of the cubic equation into the following cases:

- Case 1:
*b*, when the graph of^{2}- 3ac = 0*f*is a transformation of the graph of*x*.^{3} - Case 2:
*Δ = 0*, when there are repeated roots. - Case 3:
*Δ > 0*, when there are three different real roots. - Case 4:
*Δ < 0*and*b*, when there is only one real root and two critical points on the same side of the^{2}- 3ac > 0*x*-axis. - Case 5:
*b*, when there is only one real root and no critical points. The function is monotonic.^{2}- 3ac < 0

Before we present the cubic formula in all different cases above we
introduce one more ingredient in the solution. This ingredient appears
naturally when we graph the corresponding cubic function. An inflection
point is found by solving the equation *f''(x) = 0*. Since
*f''(x) = 3ax + b*, the solution of *f''(x) = 0* is
$$
x = -\frac{b}{3a},
$$
and has ordinate
$$
y = f\left(-\frac{b}{3a}\right) = \frac{27a^{2}d + 2b^{3} - 9abc}{27a^{2}}.
$$

The number that will appear in the solution of a cubic equation is
*27a ^{2}y = 27a^{2}d + 2b^{3} - 9abc.*

The solution of the equation *f''(x) = 0* we found above is an inflection
point because *f''(x)* has a change in sign at that point and *f*
is continuous there.

The formulas we present below contain both the abcissa and the ordinate of the inflection point of the cubic function. A better geometric explanation of what the terms in the formulas for solving the cubic equation mean will be given below.

Case 1: *b ^{2} - 3ac = 0.* Transformation of the graph of

In this case the real solution of the equation *ax ^{3} + bx^{2} + cx + d = 0*
is
$$
r_{k} = -\frac{b}{3a} + \omega^{k}\sqrt[3]{\frac{b^{3}}{27a^{3}} - \frac{d}{a}},
$$
where

Case 2: *Δ = 0*. Repeated solutions.

We can assme that *b ^{2} - 3ac ≠ 0*, because in the case that

In this case, the double solution of the equation
*ax ^{3} + bx^{2} + cx + d = 0* is given by
$$
r = \frac{9ad - bc}{2(b^{2} - 3ac)},
$$
and the remaining solution is given by
$$
r = \frac{b}{a} - \frac{9ad - bc}{b^{2} - 3ac}.
$$

Case 3: *Δ > 0*. Three real solutions.

Recall that in this case we must have *b ^{2} - 3ac > 0*

The solutions of the equation
*ax ^{3} + bx^{2} + cx + d = 0* are given by
$$
r_{k} = -\frac{b}{3a}
+ \frac{2\sqrt{b^{2} - 3ac}}{3a}
\sin{\left(\frac{k\pi + (-1)^{k}\arcsin{\left(\frac{27a^{2}d + 2b^{3} - 9abc}{2(b^{2} - 3ac)^{3/2}}\right)}}{3}\right)},
$$
where

Case 4: *Δ < 0* and *b ^{2} - 3ac > 0*. One real solution, two critical points.

The real solution of the equation
*ax ^{3} + bx^{2} + cx + d = 0* is given by
$$
x = -\frac{b}{3a}
- \frac{2\lambda\sqrt{b^{2} - 3ac}}{3a}
\cosh
\left(
\frac{\cosh^{-1}{(|p|)}}{3}
\right),
$$
where
$$
p = \frac{27a^{2}d + 2b^{3} - 9abc}{2(b^{2} - 3ac)^{3/2}},
$$
and
$$
\lambda = \text{sign}{(27a^{2}d + 2b^{3} - 9abc)} = \text{sign}{(p)}.
$$
The complex solutions are given by
$$
x = -\frac{b}{3a} + \frac{\lambda\sqrt{b^{2} - 3ac}}{3a}
\left(
\cosh
\left(
\frac{\cosh^{-1}{(|p|)}}{3}
\right)
\pm
i\sqrt{3}\sinh
\left(
\frac{\cosh^{-1}{(|p|)}}{3}
\right)
\right).
$$

Case 5: *b ^{2} - 3ac < 0*. One real solution, no critical points.

The real solution of the equation
*ax ^{3} + bx^{2} + cx + d = 0* is given by
$$
x = -\frac{b}{3a}
- \frac{2\sqrt{|b^{2} - 3ac}|}{3a}
\sinh
\left(
\frac{\sinh^{-1}{(p)}}{3}
\right),
$$
where
$$
p = \frac{27a^{2}d + 2b^{3} - 9abc}{2|b^{2} - 3ac|^{3/2}}.
$$
The complex solutions are given by
$$
x = -\frac{b}{3a} + \frac{\sqrt{|b^{2} - 3ac|}}{3a}
\left(
\sinh
\left(
\frac{\sinh^{-1}{(p)}}{3}
\right)
\pm
i\sqrt{3}\cosh
\left(
\frac{\sinh^{-1}{(p)}}{3}
\right)
\right).
$$

Since the formulas for cases 1 and 2 above are for boundary cases we will refer the reader to the proof of these formulas for more details on their meanings. We are going to concentrate our discussion on cases 3 through 5.

Let us start our discussion by talking about cases 4 and 5. These are the cases in which
there is only one real solution and two complex solutions. In both cases the formulas
for finding the solutions have the form
\begin{equation}\label{complex}\tag{3}
\begin{array}{rcl}
x_{1} & = & -\frac{b}{3a} - 2\rho \\
x_{2} & = & -\frac{b}{3a} + \rho + i\xi \\
x_{3} & = & -\frac{b}{3a} + \rho - i\xi\\
\end{array}
\end{equation}
for some real numbers *ρ* and *ξ*.

In these formulas, *ρ* and *ξ* depend on certain hyperbolic
functions and their inverses. For example, if *b ^{2} - 3ac > 0*
the number

A similar comment can be made when
*b ^{2} - 3ac < 0*. In this case

In both cases the formula depends on the square root of
|*b ^{2} - 3ac*| and the ordinate of the inflection point
of the graph of the corresponding cubic function. Specifically, these
formulas depend on the number
\begin{equation}\label{p}\tag{4}
p = \frac{27a^{2}d + 2b^{3} - 9abc}{2|b^{2} - 3ac|^{3/2}}
\end{equation}

In addition, in the case *b ^{2} - 3ac > 0* the number

The number *ξ* depends on the co-hyperbolic function of the hyperbolic
function that appears in *ρ*. If the hyperbolic function in *ρ*
is hyperbolic cosine, then the function in *ξ* is hyperbolic sine, and
viceversa. The argument of the hyperbolic function in *ξ* is the same as
argument in the hyperbolic function in *ρ*.

Since the formulas for the complex number solutions of the cubic equation depend on the hyperbolic cosine and hyperbolic sine of the same number, and these are coordinates of a point in a hyperbola, it is not surprising that the complex solutions of a cubic equation are in the hyperbola with equation $$ \left(x + \frac{b}{3a}\right)^{2} - \frac{y^{2}}{3} = \frac{b^{2} - 3ac}{9a^{2}}. $$

This hyperbola has center at *(-b/3a, 0)* and asymptotes that make angles
of *60* and *120* degrees with the positive direction of the *x*-axis.

If *b ^{2} - 3ac > 0* the hyperbola intersects the

The general form of the complex solutions in \eqref{complex} implies that the center
of gravity of the triangle formed by the solutions is at the center
of this hyperbola. Following this reasoning, the coefficient *2*
next to the number *ρ* in the real solution and the coefficient
*1* of the coefficient *ρ* in the complex solutions
represents the fact that the center of gravity of a triangle divides
a median in the *2:1* ratio. This means that the geometrical
meaning of the number *-b/3a* in the cubic formula is that it
represents the center of the hyperbola that contains two of the
complex solutions of the equation.

In addition, the general form of the complex solutions in \eqref{complex} implies that the real and complex solutions are on opposite sides of the center of the hyperbola. If the real solution is to the left of the center of the hyperbola, the complex solutions are to the right of the center of the hyperbola, and viceversa. This provides a geometric way to find the complex number solutions of the equation given the real number solution.

In case 3 we showed how to solve a cubic equation that has three real solutions.
The solution is expressed in terms on the sine and one-third of the inverse sine function
of some angle, just like we found out in the case for solving the cubic equation
when there are two complex number solutions. The three solutions are in three different
regions, one is to the left of the leftmost critical points, another is between
the critical points, and the latter one is to the right of the rightmost critical point.
We can obtain each solution by setting the value of *k* to *-1, 0,* or
*1*. In the case that *a > 0*, following the increasing order
of *k* also increases the solution we obtain.

One of then things we notice from the formulas in this case is that since *|sin(α)| ≤ 1*
for any angle *α*, then every solution *r _{k}* must satisfy
$$
-\frac{b}{3a} - \frac{2\sqrt{b^{2} - 3ac}}{3a} \leq r_{k} \leq
-\frac{b}{3a} + \frac{2\sqrt{b^{2} - 3ac}}{3a}
$$
for any

Later on we will refer to the left point of this interval as *x _{3}*
and the right point of this interval as

The formula for the solution in this case asks to trisect an angle whose sine
is given by equation \eqref{p}. We can construct geometrically
the angle that we need to trisect as follows. The inflection point of a cubic
equation is halfway between the critical points of *f*. Recall that
the critical points of *f* are at opposite sides of the *x*-axis,
so a circle with center at the inflection point of the graph of *f*
and radius the difference between the value of the local maximum and the
ordinate of the inflection point will intersect the *x*-axis at two
points, as the image below shows.

In the image above *I* represents the inflection point of the graph. The
points *P* and *Q* represent the points where the circle with center
*I* and diameter the distance between the ordinate of the local
maximum and the ordinate of the local minimum
of *f* intersects the *x*-axis, and the point *O* corresponds to the
orthogonal projection of *I* onto the *x*-axis

The acute angle that is being trisected in the formula for solving
the cubic equation can be seen in the image above as the angle
*∠ OPI* measured counterclockwise. The sine of angle
*∠ OPI* is given by the number *p* in equality \eqref{p}.

Observe that in the case that there are three real solutions, and
in the case that *a > 0* the formula to solve the equation predicts
that the solution *x _{-1}* is to the left of the inflection
point, while it predicts that

In the figure below we can see a process that leads geometrically from the solution
between the critical points, called *s _{0}* below, to the other
two solutions

Let us reflect the solution *s _{0}* across the abcissa

From this geometric perspective the number *-b/3a* that appears in the
formula to solve a cubic equation when there are three real solutions could
represent the abcissa of the inflection point, because the circle with center
at the inflection point is used to construct an angle which is needed to be
trisected, or it could represent the center of the ellipse
that leads to the other two solutions from the solution between the critical
points. Whatever interpretation, the most important point is that there is
geometry that explains the terms in the formulas for the solution of the
cubic equation.

In order to understand what happens when we change the value of *d*
let us assume that *a > 0*. In this case we know that *f*
has a local maximum, say at *x _{1}*, and
a local minimum, say at

So let us assume now that we pick *d* sufficiently large so
that the local minimum of *f* is above the *x*-axis,
and let us see what happens with the three solutions of the corresponding
cubic equation as we decrease *d*.

As we start decreasing *d*, we start with *Δ < 0*,
and while we keep the local minimum above the *x*-axis, the
real solution will start moving
towards the right, while the complex solutions will start approaching
each other. When the local minimum lands on the *x*-axis
the equation will have a double root at *x _{4}*
and therefore

At the moment that the graph of *f* touches the *x*-axis the real
solution has been moving towards and now is landing on *x _{3}*, that is the
real solution lands at the leftmost value of any real solution when a
cubic equation has three real solutions, and as we can see here, this is never reached
when there are truly three different solutions.

One way to think about what happened so far is that the two complex solutions are
travelling towards each other and at the time that the local minimum touches
the *x*-axis they crash into each other becoming one real solution. As we
keep decreasing *d* these solutions split apart, one travels towards the
left, the other towards the right. Meanwhile, the solution that was originally
at *x _{3}* also continued moving towards the right. We are now in the
region where

Finally, as we keep decreasing *d* the local maximum becomes negative
and we move to the region where *Δ < 0*. The two real solutions
that had met at the critical point start to separate and become complex
number solutions, one travelling up and another down symmetrically over
the left branch of the hyperbola. The real solution that started at
*x _{4}* will continue moving towards the right as we
keep decreasing

The end points of the interval that holds the three real solutions,
*x _{3}* and

When *Δ < 0* the solutions of a cubic equation can be written in terms
of radicals. Algebraically this follows from the fact that in this case one
can transform hyperbolic functions of their inverses into cube and square roots.

The solutions are expressed in terms of primitive cube roots of the unity, namely $$ \omega = \frac{-1 + i\sqrt{3}}{2}, \text{ or } \omega = \frac{-1 - i\sqrt{3}}{2}. $$

The formulas are as follows:

- If
*b*, then the three solutions are $$ x_{k} = -\frac{b}{3a} - \frac{\omega^{k}\sqrt[3]{\sqrt{-27a^{2}\Delta} + 27a^{2} + 2b^{3} - 9abc}} {3a\sqrt[3]{2}} - \frac{\sqrt[3]{2}(b^{2} - 3ac)\omega^{2k}} {3a\sqrt[3]{\sqrt{-27a^{2}\Delta} + 27a^{2} + 2b^{3} - 9abc}}, $$ where^{2}- 3ac < 0*k ∈ {0, 1, 2}*. - If
*Δ < 0*and*b*, then the three solutions are $$ x_{k} = -\frac{b}{3a} + \frac{\lambda\omega^{k}\sqrt[3]{\sqrt{-27a^{2}\Delta} + |27a^{2} + 2b^{3} - 9abc|}} {3a\sqrt[3]{2}} + \frac{\lambda\sqrt[3]{2}(b^{2} - 3ac)\omega^{2k}} {3a\sqrt[3]{\sqrt{-27a^{2}\Delta} + |27a^{2} + 2b^{3} - 9abc|}}, $$ where^{2}- 3ac > 0*k ∈ {0, 1, 2}*and*λ = sign(27a*.^{2}d + 2b^{3}- 9abc)

Useful links

Posted on Sun 30 Apr 2023 08:12:28 PM MDT

Last Updated Mon 22 May 2023 12:14:30 PM MDT

Posted on Sun 30 Apr 2023 08:12:28 PM MDT

Last Updated Mon 22 May 2023 12:14:30 PM MDT