The cubic formula is the closed-form solution for a cubic equation, i.e., the roots of a cubic polynomial. A general cubic equation is of the form
|
(1)
|
(the coefficients ,
, and
may be complex, and the
coefficient
of
may be taken as 1 without loss of generality by dividing
the entire equation through by
, where
). The Wolfram
Language can solve cubic equations exactly
using the built-in command Solve[a3
x^3 + a2 x^2 + a1 x + a0 == 0, x]. The solution can also be expressed
in terms of the Wolfram Language algebraic
root objects by first issuing SetOptions[Roots,
Cubics -> False].
The solution to the cubic (as well as the quartic) was published by Gerolamo Cardano (1501-1576) in his treatise Ars Magna. However, Cardano was not the original discoverer of either of these results. The hint for the cubic had been provided by Niccolò Tartaglia, while the quartic had been solved by Ludovico Ferrari. However, Tartaglia himself had probably caught wind of the solution from another source. The solution was apparently first arrived at by a little-remembered professor of mathematics at the University of Bologna by the name of Scipione del Ferro (ca. 1465-1526). While del Ferro did not publish his solution, he disclosed it to his student Antonio Maria Fior (Boyer and Merzbach 1991, p. 283). This is apparently where Tartaglia learned of the solution around 1541.
To solve the general cubic (1), it is reasonable to begin by attempting to eliminate the term by making a substitution of the form
|
(2)
|
Then
|
(3)
| |
The
is eliminated by letting
, so
|
(4)
|
Then
|
(5)
| |||
|
(6)
| |||
|
(7)
|
so equation (1) becomes
|
(8)
| |||
Defining
|
(9)
| |||
|
(10)
|
then allows the shifted cubic to be written in the standard form
|
(11)
|
The simplest way to proceed is to make Vieta's substitution
|
(12)
|
with , which reduces the cubic to the equation
|
(13)
|
which is easily turned into a quadratic equation in by multiplying through by
to obtain
|
(14)
|
(Birkhoff and Mac Lane 1996, p. 106). The result from the quadratic formula is
|
(15)
| |||
where
and
. Unless
, choose one nonzero value
of
from the quadratic
formula. Substituting its three cube roots into
(12) gives the three roots of the cubic equation, counted with multiplicity.
When
, the cubic equation
has the triple root
, and (12)
is undefined at
.
Equation (11) may also be explicitly factored by attempting to pull out a term of the form from the cubic equation,
leaving behind a quadratic equation which can
then be factored using the quadratic formula.
This process gives the same solutions as Vieta's
substitution. First, define the intermediate variables
|
(16)
| |||
|
(17)
|
(which are identical to
and
up to a constant factor). The general cubic equation
(11) then becomes
|
(18)
|
Let
and
be, for the moment, arbitrary constants. An identity satisfied by perfect
cubic polynomial equations is that
|
(19)
|
The general cubic would therefore be directly factorable if it did not have an term (i.e., if
). However, since in general
, add a multiple of
--say
--to both sides of (19) to give the
slightly messy identity
|
(20)
|
which, after regrouping terms, is
|
(21)
|
We would now like to match the coefficients and
with those of equation (18),
so we must have
|
(22)
|
|
(23)
|
Plugging the former into the latter then gives
|
(24)
|
Therefore, if we can find a value of satisfying the above identity, we have factored a linear term
from the cubic, thus reducing it to a quadratic
equation. Writing
gives
. Choosing
and
therefore gives the symmetrical expression
|
(25)
|
The cube roots in this expression must be paired so that . All fractional powers
in the following expansions denote powers or products of these paired cube
roots. Taking the second and third powers of
gives
|
(26)
| |||||
|
(27)
| |||||
Plugging the expression for into the left side of (24) gives
|
(28)
|
so we have indeed found the factor of (18), and we need now only factor
the quadratic part. Plugging
into the quadratic part of (21) and
solving the resulting
|
(29)
|
then gives the solutions
|
(30)
| |||
These can be simplified by defining
|
(31)
| |||
|
(32)
| |||
so that the solutions to the quadratic part can be written
|
(33)
|
Define
|
(34)
| |||
|
(35)
| |||
|
(36)
|
Here
is an auxiliary discriminant. The polynomial
discriminant
of the cubic is related to
by
(Birkhoff and Mac Lane 1996). The cube
roots must be chosen so that
. For
, this can be enforced by setting
rather than choosing the two principal
roots independently. This gives very simple expressions for
and
, namely
|
(37)
| |||
|
(38)
|
Therefore, at last, the roots of the original equation in are then given by
|
(39)
| |||
|
(40)
| |||
|
(41)
|
with
the coefficient of
in the original equation, and
and
as defined above. These three equations giving the three roots of the cubic equation
are sometimes known as Cardano's formula. Note that if the equation is in the standard
form of Vieta
|
(42)
|
in the variable , then
,
, and
, and the intermediate variables have the simple
form (cf. Beyer 1987)
|
(43)
| |||
|
(44)
| |||
|
(45)
|
The solutions satisfy Vieta's formulas
|
(46)
| |||
|
(47)
| |||
|
(48)
|
In standard form (11), ,
, and
, so eliminating
gives
|
(49)
|
for , and eliminating
gives
|
(50)
|
for . In addition, the properties of the symmetric
polynomials appearing in Vieta's formulas
give
|
(51)
| |||
|
(52)
| |||
|
(53)
| |||
|
(54)
|
The discriminant classification and the trigonometric and hyperbolic formulas below assume that the coefficients ,
, and
are real. The equation for
in Cardano's formula does not have
an
appearing in it explicitly while
and
do, but this does not say anything about the number of real and complex roots (since
and
are themselves, in general, complex).
However, determining which roots are real
and which are complex can be accomplished by noting
that if the polynomial discriminant
, one root is real
and two are complex conjugates; if
, all roots are real
and at least two are equal; and if
, all roots
are real and unequal. Equivalently, these three cases
have
,
, and
, respectively. If
, define
|
(55)
|
Then the real solutions are of the form
|
(56)
| |||
|
(57)
| |||
|
(58)
|
If
in the standard form (11), its real
solution is
. For
, the trigonometric approach can be generalized using
the identity
|
(59)
|
(Dickson 1914) and setting
|
(60)
|
(Birkhoff and Mac Lane 1996, pp. 90-91), then
|
(61)
|
|
(62)
|
|
(63)
|
If , then use
|
(64)
|
to obtain
|
(65)
|
If
and
, use
|
(66)
|
and if
and
, use
|
(67)
|
to obtain
|
(68)
|
The solutions to the original equation are then
|
(69)
|
An alternate approach to solving the cubic equation is to use Lagrange resolvents (Faucette 1996).
Here
denotes the Lagrange resolvent
, where
is a cube root of unity.
Let
, define
|
(70)
| |||
|
(71)
| |||
|
(72)
|
where
are the roots of
|
(73)
|
and consider the equation
|
(74)
|
where
and
are complex numbers. The roots
are then
|
(75)
|
for , 1, 2. Multiplying through gives
|
(76)
|
which matches the depressed cubic equation (11), provided that
|
(77)
| |||
|
(78)
|
Some curious identities involving the roots of a cubic equation due to Ramanujan are given by Berndt (1994).