# How to Solve a Cubic Equation 0 = ax^3 + bx^2 + cx + d

Cubic polynomials have the form f(x) = ax^3 + bx^2 + cx + d, where a is a non-zero constant. They are also called 3rd degree polynomials since the highest power of x is 3. To find the roots of a 3rd degree polynomial you must solve the cubic equation

ax^2 + bx^2 + cx + d = 0

If a, b, c, and d are real numbers (as opposed to complex or imaginary coefficients) then the equation will either have three real numbered solutions, or two complex and one real solution. Unlike quadratic equations for which a simple formula exists for finding the roots, cubic equations have a very complicated root formula that can sometimes yield answers in weird forms.

However, since a cubic equation with real coefficients always has at least one real solution, you can recover all the solutions without resorting to the complicated cubic formula. This article will show you how to find the roots by hand without the use of a graphing calculator or cubic equation solver.

## Step 1: Newton-Raphson Method to Extract First Root

The first step in finding the solutions of ax^3 + bx^2 + cx + d = 0 is to use the Newton-Raphson algorithm (also called Newton's Method) to find one of the roots. The Newton-Raphson method is a calculus-based root finding algorithm that approximates roots of a function F(X) with the recursive formula

X_{n+1} = X_{n} - F(X_{n})/F* '*(X

_{n})

In the case of a cubic equation, the function F(X) is aX^3 + bX^2 + cX + d, and F* '*(X) = 3aX^2 + 2bX + c, therefore the recursive equation is

X_{n+1} = X_{n} - (aX_{n}^3 + bX_{n}^2 + cX_{n} + d)/(3aX_{n}^2 + 2bX_{n} + c)

= (2aX_{n}^3 + bX_{n}^2 - d)/(3aX_{n}^2 + 2bX_{n} + c)

With an initial guess of X_{0}, chosen by you, the recursion will converge to one of (or the only) root of the cubic). Luckily it doesn't matter what value of X_{0} you choose, so for convenience you can pick X_{0} = 0. If the cubic has a critical point at x = 0, then the denominator of the fraction will be 0, so in that case you must pick another value of X_{0}.

## Step 2: Polynomial Long Division to Reduce to Quadratic

The next step after finding one of the roots is to use polynomial long division, or equivalently synthetic division, to reduce the cubic to a quadratic. In mathematical terms, if one of the roots of the equation ax^3 + bx^2 + cx + d = 0 is x = r, then you can factor the cubic into

ax^3 + bx^2 + cx + d = (x - r)(ax^2 + px + q)

where p and q are coefficients to be determined by the division algorithm.

## Step 3: Find Roots of ax^2 + px + q with Quadratic Formula

Since

ax^3 + bx^2 + cx + d = (x - r)(ax^2 + px + q)

and

ax^3 + bx^2 + cx + d = 0

it follows that

(x - r)(ax^2 + px + q) = 0

as well. Since we already know that x = r is one root of the function, the other two roots are found by solving

(ax^2 + px + q) = 0

with the well-known quadratic formula. These roots may be real or complex conjugates. The next sections will demonstrate how to apply all of these steps with an example, the cubic polynomial x^3 - 5x^2 + 2x + 4.

## EXAMPLE: Solving x^3 - 5x^2 + 2x + 4 = 0

### Step 1

First we use Newton's Method with X_{0} = 0 and the F(X) = X^3 - 5X^2 + 2X + 4. This gives us the recursive equation

X_{n+1} = (2X_{n}^3 - 5X_{n}^2 - 4)/(3X_{n}^2 - 10X_{n} + 2)

Using X_{0} = 0 gives us the following converging sequence values from the recursion formula:

## More Algebra Homework Help

Related tutorials on solving other types of algebra problems.

X_{0} = 0

X_{1} = -2

X_{2} = -1.1765

X_{3} = -0.7913

X_{4} = -0.6888

X_{5} = -0.6814

X_{6} = -0.6813

X_{7} = -0.6813

Seven iterations of the algorithm is enough to give us one root of the equation accurate to four places, x = -0.6813.

### Step 2

Next we need to divide the original expression x^3 - 5x^2 + 2x + 4 by the linear factor x - (-0.6813), or equivalently x + 0.6813. This is shown in the following diagram of synthetic division of a cubic polynomial.

The function (x^3 - 5x^2 + 2x + 4)/(x + 0.6813) reduces to the quadratic polynomial x^2 - 5.6813x + 5.8709 with polynomial long division.

### Step 3

Finally we solve the quadratic x^2 - 5.6813x + 5.8709 = 0 with the quadratic formula. Doing so gives us the two values of x

x = (5.6813 + sqrt(32.2775 - 23.4835))/2 = 4.3234

x = (5.6813 - sqrt(32.2775 - 23.4835))/2 = 1.3579

Thus, all three solutions to the original cubic equation x^3 - 5x^2 + 2x + 4 = 0 are

**x = -0.6813****x = 4.3234****x = 1.3579**

** **

## Comments

How can you solve x^4 - 16x^2 + 21x - 6 = 0 with this method?