The Cubic Formula
David W. Hansen
© 2003
The general cubic equation is ax3 + bx2 + cx + d = 0. Dividing both sides by a, it can be simplified to
x3 + px2 + qx + r = 0. By a simple substitution, which is shown below, the quadratic term may be
eliminated, leaving us with x3 + mx = n.
Scipione del Ferro (about 1515) is reputed to have been the first to have discovered a formula for
solving x3 + mx = n. [1] As given by Cardano in his Ars Magna, the proof is as follows.
We know that (a - b)3 = a3 - 3a2b + 3ab2 - b3,
or (a - b)3 + 3a2b - 3ab2 = a3 - b3,
and (a - b)3 + 3ab (a - b) = a3 - b3. (1)
Letting x = a - b in (1) above, we have x3 + 3abx = a3 - b3, or x3 + mx = n,
where m = 3ab (2) and n = a3 - b3. (3)
To find a, we solve for b in (2) to get b = m / (3a). Substituting this value of b into (3), we get
n = a3 - [ m / (3a) ]3, or n = a3 - m3 / (27a3). (4)
Multiplying (4) by 27a3, we have 27na3 = 27a6 - m3,
or 27a6 - 27na3 - m3 = 0, which is a quadratic in a3.
Letting y = a3 gives us 27y2 - 27ny - m3 = 0. By the quadratic formula,
_______________ _______________________
y = [ 27n +/ - Ö (27n)2 + 4(27)m3 ] / 2(27) = 27n / 2(27) +/ - Ö [ (27n)2 + 4(27)m3 ] / 4(272)
______________________________
y = (n / 2) +/ - Ö 272n2 / 4(272) + 4(27)m3 / 4(272)
_________________
y = (n / 2) +/ - Ö n2 / 4 + m3 / 27
_________________
y = (n / 2) +/ - Ö (n / 2)2 + (m / 3)3 . Replacing y by a3, we have
_________________
a3 = (n / 2) +/ - Ö (n / 2)2 + (m / 3)3
3 _______________________________
a = Ö (n / 2) +/ - [ (m / 3)3 + (n / 2)2 ]1/2 . (5)
To find b, we now solve for a in (2) above and substitute its value into (3) which, after solving
for b by the same procedure as for a, gives us
3 _______________________________
b = Ö - (n / 2) +/ - [ (m / 3)3 + (n / 2)2 ]1/2 . (6)
Thus, the solution to x3 + mx = n is x = a - b, where a and b are given by equations (5) and (6).
Example 1. Use the cubic formula to solve x3 + 63x = 316. Using formulas (5) and (6) above
with m = 63 and n = 316, we have m/3 = 21, n/2 = 158, and
__________ _____________
a3 = 158 +/ - Ö 213 + 1582 = 158 +/- Ö 9261 + 24964
______
= 158 +/ - Ö34225 = 158 +/ - 185.
Using the + root, a3 = 158 + 185 = 343, and a = 7. (7a)
Using the - root, a3 = 158 - 185 = - 27, and a = - 3. (8a)
_________ _____________
Also, b3 = - 158 +/ - Ö 213 + 1582 = - 158 +/ - Ö 9261 + 24964
______
= - 158 +/ - Ö 34225 = - 158 +/ - 185.
Using the + root, b3 = - 158 + 185 = 27, and b = 3, (7b)
Using the - root, b3 = - 158 - 185 = - 343, and b = - 7. (8b)
Since x = a - b, using (7a) and (7b), we have x = 7 - 3 = 4.
Using (8a) and (8b), we have x = ( - 3) - ( - 7) = 4 again. Thus, we can eliminate the negative
root in formulas (5) and (6) for a and b above giving us
___________________________________________________________________
The Cubic Formula
If x3 + mx = n, then x = a - b, where a3 = (n / 2) + D, b3 = - (n / 2) + D
_______________
and D = Ö (m / 3)3 + (n / 2)2 .
__________________________________________________________________
Example 2. Solve x3 + 6x = 7. Since m = 6 and n = 7, we have
_____________ _________ _____
D = Ö (6/ 3)3 + (7/ 2)2 = Ö 8 + (49 / 4) = Ö 81 / 4 = 9 / 2.
a3 = 7/2 + 9/2 = 16/2 = 8, and a = 2.
b3 = - 7/2 + 9/2 = 1, and b = 1. Thus, x = a - b = 2 - 1 = 1.
Example 3. Solve x3 + 6x = - 7. With m = 6 and n = - 7, we have
_______________ ___________ _____
D = Ö (6/ 3)3 + ( - 7/ 2)2 = Ö 8 + (49 / 4) = Ö 81 / 4 = 9 / 2.
a3 = - 7/2 + 9/2 = 2/2 = 1, and a = 1.
b3 = 7/2 + 9/2 = 8, and b = 2. Thus, x = a - b = 1 - 2 = - 1.
Example 4. Solve x3 - 3x = 2. With m = - 3 and n = 2, we have
______________ _______ __
D = Ö ( - 3/ 3)3 + (2/ 2)2 = Ö ( -1) + 1 = Ö 0 = 0.
a3 = 2/2 + 0 = 1, and a = 1.
b3 = - 2/2 + 0 = - 1, and b = - 1. Thus, x = a - b = 1 - ( -1 ) = 2.
Example 5. Solve x3 - 6x = - 9. With m = - 6 and n = - 9, we have
________________ ___________ _____
D = Ö ( - 6/ 3)3 + ( - 9/ 2)2 = Ö - 8 + (81 / 4) = Ö 49 / 4 = 7 / 2.
a3 = - 9/2 + 7/2 = - 1, and a = - 1.
b3 = 9/2 + 7/2 = 8, and b = 2. Thus, x = a - b = - 1 - 2 = - 3.
Example 6. Solve 8x3 + 168x + 279 = 0. First, we must put this equation in the standard form of
x3 + mx = n. Thus, dividing the equation by 8 and moving the constant term to the right-hand side, we
get x3 + 21x = - 279 / 8. Then, m = 21, n = - 279 / 8, and we have
__________________ _________________
D = Ö (21/ 3)3 + ( - 279 / 16)2 = Ö 343 + (77,841 / 256)
_________________________ ____________
= Ö (87,808 / 256) + (77,841 / 256) = Ö(165,649 / 256) = 407 / 16.
So, a3 = - 279/16 + 407/16 = 128/16 = 8, and a = 2.
b3 = 279/16 + 407/16 = 686/16 = 343/8, and b = 7/2.
Thus, x = a - b = 2 - 7/2 = 4/2 - 7/2 = - 3/2.
Now let’s solve a cubic equation with an x2 term. Consider x3 + px2 + qx + r = 0. To eliminate the
x2 term, we will let x = y - h, getting
(y - h)3 + p(y - h)2 + q(y - h) + r = 0,
y3 - 3y2h + 3yh2 - h3 + py2 - 2pyh + ph2 + qy - qh + r = 0,
y3 + (- 3h + p) y2 + (3h2 - 2ph + q) y + ( - h3 + ph2 - qh + r) = 0.
This last equation is a cubic equation in y. If we wish to eliminate the y2 term, we simply make its
coefficient zero. Thus, - 3h + p = 0, so h = p / 3. Then, x = y - h = y - p / 3 and we have
_____________________________________________________________
To eliminate the x2 term from the cubic equation x3 + px2 + qx + r = 0,
simply replace x by y - p / 3, and simplify the equation.
_____________________________________________________________
Example 7. Solve 2x3 + 24x2 + 114x + 148 = 0. We first divide by 2, the coefficient of
the x3 term, to put the equation in the standard form x3 + px2 + qx + r = 0. This gives us
x3 + 12x2 + 57x + 74 = 0. Then, p = 12, and to eliminate the x2 term, we replace x
by y - p / 3 = y - 4. So, x = y – 4. (9)
This gives us (y - 4)3 + 12(y - 4)2 + 57(y - 4) + 74 = 0,
y3 - 12y2 + 48y - 64 + 12y2 - 96y + 192 + 57y - 228 + 74 = 0,
and y3 + 9y - 26 = 0, or y3 + 9y = 26, which is in the form y3 + my = n.
Using the cubic formula with m = 9 and n = 26, we get
______________ _______ ________ ___
D = Ö (9/ 3)3 + (26/ 2)2 = Ö 33 + 132 = Ö 27 + 169 = Ö196 = 14 .
a3 = 26/2 + 14 = 13 + 14 = 27 and a = 3.
b3 = - 26/2 + 14 = -13 + 14 = 1 and b = 1.
Thus, y = a - b = 3 - 1 = 2, and from (9) above, x = y - 4 = 2 - 4 = - 2.
And now we come to the most challenging types of cubic equations; namely, those which involve
finding cube roots of complex numbers to obtain a solution.
Example 8. Solve x3 - 21x = - 20. Here, we have m = - 21 and n = - 20. Then,
_________________ ____________ _________ ____ _
D = Ö( - 21/ 3)3 + ( - 20/ 2)2 = Ö( - 7)3 + ( - 10)2 = Ö- 343 + 100 = Ö- 243 = 9iÖ3,
_ _
and a3 = - 10 + 9i Ö3, b3 = 10 + 9i Ö3.
3 _________ 3 ___________
Thus, x = a - b = Ö -10 + 9iÖ3 - Ö 10 + 9iÖ3 , which is a decidedly complicated
answer! However, (2 + iÖ3 )3 = - 10 + 9iÖ 3, and ( - 2 + i Ö3 )3 = 10 + 9iÖ3.
Thus, a = 2 + iÖ3, b = - 2 + iÖ3 , and x = a - b = (2 + iÖ3 ) - ( -2 + iÖ3 ) = 2 - ( - 2) = 4 !
( To find these cube roots, we can use the method developed in this article. However, in general, If
we can’t find the cube roots of a3 and b3, then we must leave our answer in terms of the difference
between two cube roots. Not a nice result!)
Example 9. Find a cubic equation which has a root of 2Ö2. Then, solve this equation using the
cubic formula to verify that 2Ö2 is indeed a root. Since x = a - b, we must select values for
a and b which make x equal to 2Ö2 . There are many choices for a and b; let’s pick a = 1 + Ö2 and
b = 1 - Ö2 . Then, x = a - b = (1 + Ö2 ) - (1 - Ö2 ) = 2Ö2 . To find m and n for x3 + mx = n,
formulas (2) and (3) give us m = 3ab and n = a3 - b3.
Now, a3 = (1 + Ö2 )3 = 1 + 3Ö2 + 6 + 2Ö2 = 7 + 5Ö2 , (9)
and b3 = (1 - Ö2 )3 = 1 - 3Ö2 + 6 - 2Ö2 = 7 - 5Ö2. (10)
So, m = 3ab = 3(1 + Ö2 )(1 - Ö2 ) = 3(1 - 2) = - 3 ,
and n = a3 - b3 = (7 + 5Ö2 ) - (7 - 5Ö2 ) = 10Ö2 .
Thus, x3 - 3x = 10Ö2 is a cubic equation with a root of 2Ö2 .
To solve this equation using the cubic formula, we have m = - 3 and n = 10Ö2. Then,
_________________ ____________ _______ __
D = Ö( - 3/ 3)3 + ( 10Ö2 / 2)2 = Ö( - 1)3 + (5Ö2 )2 = Ö - 1 + 50 = Ö49 = 7,
a3 = 5Ö2 + 7 = 7 + 5Ö2, and b3 = - 5Ö2 + 7 = 7 - 5Ö2 .
To find the cube roots of a3 and b3, note that (9) and (10) above tell us that a = 1 + Ö2 and b = 1 - Ö2
are the cube roots of a3 and b3 respectively. Thus, x = a - b = (1 + Ö2 ) - (1 - Ö2 ) = 2Ö2, as
predicted.
_________________________________________________________________________________