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 coefficient of
may be taken as 1 without loss of generality by dividing
the entire equation through by
). 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)
| |
(4)
| |
(5)
|
The is eliminated by letting
, so
(6)
|
Then
(7)
| |||
(8)
| |||
(9)
|
so equation (◇) becomes
(10)
| |
(11)
| |
(12)
|
Defining
(13)
| |||
(14)
|
then allows (◇) to be written in the standard form
(15)
|
The simplest way to proceed is to make Vieta's substitution
(16)
|
which reduces the cubic to the equation
(17)
|
which is easily turned into a quadratic equation in by multiplying through by
to obtain
(18)
|
(Birkhoff and Mac Lane 1996, p. 106). The result from the quadratic formula is
(19)
| |||
(20)
| |||
(21)
|
where
and
are sometimes more useful to deal with than are
and
. There are therefore six solutions for
(two corresponding to each sign for each root
of
). Plugging
back in to (19) gives three pairs of
solutions, but each pair is equal, so there are three solutions to the cubic equation.
Equation (◇) 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 is equivalent to making Vieta's substitution,
but does a slightly better job of motivating Vieta's "magic" substitution,
and also at producing the explicit formulas for the solutions. First, define the
intermediate variables
(22)
| |||
(23)
|
(which are identical to
and
up to a constant factor). The general cubic equation (◇) then becomes
(24)
|
Let
and
be, for the moment, arbitrary constants. An identity satisfied by perfect
cubic polynomial equations is that
(25)
|
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 (25) to give the
slightly messy identity
(26)
|
which, after regrouping terms, is
(27)
|
We would now like to match the coefficients and
with those of equation (◇), so we must have
(28)
|
(29)
|
Plugging the former into the latter then gives
(30)
|
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. The trial solution accomplishing this miracle turns out to be the symmetrical
expression
(31)
|
Taking the second and third powers of gives
(32)
| |||
(33)
| |||
(34)
| |||
(35)
| |||
(36)
| |||
(37)
| |||
(38)
|
Plugging
and
into the left side of (◇) gives
(39)
|
so we have indeed found the factor of (◇), and we need now only factor the quadratic
part. Plugging
into the quadratic part of (◇) and solving the resulting
(40)
|
then gives the solutions
(41)
| |||
(42)
| |||
(43)
|
These can be simplified by defining
(44)
| |||
(45)
| |||
(46)
| |||
(47)
|
so that the solutions to the quadratic part can be written
(48)
|
Defining
(49)
| |||
(50)
| |||
(51)
|
where
is the polynomial discriminant (which
is defined slightly differently, including the opposite sign,
by Birkhoff and Mac Lane 1996) then gives very simple expressions for
and
, namely
(52)
| |||
(53)
|
Therefore, at last, the roots of the original equation in are then given by
(54)
| |||
(55)
| |||
(56)
|
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
(57)
|
in the variable ,
then
,
, and
, and the intermediate variables have the simple form
(cf. Beyer 1987)
(58)
| |||
(59)
| |||
(60)
|
The solutions satisfy Vieta's formulas
(61)
| |||
(62)
| |||
(63)
|
In standard form (◇), ,
, and
, so eliminating
gives
(64)
|
for ,
and eliminating
gives
(65)
|
for .
In addition, the properties of the symmetric
polynomials appearing in Vieta's formulas
give
(66)
| |||
(67)
| |||
(68)
| |||
(69)
|
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. If
,
define
(70)
|
Then the real solutions are of the form
(71)
| |||
(72)
| |||
(73)
|
This procedure can be generalized to find the real roots for any equation in the standard form (◇) by using the identity
(74)
|
(Dickson 1914) and setting
(75)
|
(Birkhoff and Mac Lane 1996, pp. 90-91), then
(76)
|
(77)
|
(78)
|
If ,
then use
(79)
|
to obtain
(80)
|
If
and
,
use
(81)
|
and if
and
,
use
(82)
|
to obtain
(83)
|
The solutions to the original equation are then
(84)
|
An alternate approach to solving the cubic equation is to use Lagrange resolvents (Faucette 1996). Let , define
(85)
| |||
(86)
| |||
(87)
|
where
are the roots of
(88)
|
and consider the equation
(89)
|
where
and
are complex numbers. The roots
are then
(90)
|
for ,
1, 2. Multiplying through gives
(91)
|
which can be written in the form (88), where
(92)
| |||
(93)
|
Some curious identities involving the roots of a cubic equation due to Ramanujan are given by Berndt (1994).