How to Solve Cubic Equations

••• PeopleImages/iStock/GettyImages

Solving polynomial functions is a key skill for anybody studying math or physics, but getting to grips with the process – especially when it comes to higher-order functions – can be quite challenging. A cubic function is one of the most challenging types of polynomial equation you may have to solve by hand. While it might not be as straightforward as solving a quadratic equation, there are a couple of methods you can use to find the solution to a cubic equation without resorting to pages and pages of detailed algebra.

What Is a Cubic Function?

A cubic function is a third-degree polynomial. A general polynomial function has the form:

f(x) = ax^n +bx^{n-1} + cx^{n-2} ... vx^3+wx^2+zx+k

Here, x is the variable, n is simply any number (and the degree of the polynomial), k is a constant and the other letters are constant coefficients for each power of x. So a cubic function has n = 3, and is simply:

f(x) = ax^3 +bx^2 + cx^1+d

Where in this case, d is the constant. Generally speaking, when you have to solve a cubic equation, you’ll be presented with it in the form:

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

Each solution for x is called a “root” of the equation. Cubic equations either have one real root or three, although they may be repeated, but there is always at least one solution.

The type of equation is defined by the highest power, so in the example above, it wouldn’t be a cubic equation if a = 0, because the highest power term would be bx2 and it would be a quadratic equation. This means the following are all cubic equations:

2x^3 + 3x^2 + 6x −9 = 0 \\ x^3 −9x + 1 = 0\\ x^3 −15x^2 = 0

Solving Using the Factor Theorem and Synthetic Division

The easiest way to solve a cubic equation involves a bit of guesswork and an algorithmic type of process called synthetic division. The start, though, is basically the same as the trial and error method for cubic equation solutions. Try to work out what one of the roots is by guessing. If you have an equation where the first coefficient, a, equals 1, then it’s a little easier to guess one of the roots, because they’re always factors of the constant term which is represented above by d.

So, looking at the following equation, for example:

x^3 − 5x^2 − 2x + 24 = 0

You have to guess one of the values for x, but since a = 1 in this case you know that whatever the value is, it has to be a factor of 24. The first such factor is 1, but this would leave:

1 – 5 – 2 + 24 = 18

Which isn’t zero, and −1 would leave:

−1 – 5 + 2 + 24 = 20

Which is again not zero. Next, x = 2 would give:

8 – 20 – 4 + 24 = 8

Another fail. Trying x = −2 gives:

−8 – 20 + 4 + 24 = 0

This means x = −2 is a root of the cubic equation. This shows the benefits and downsides of the trial and error method: You can get the answer without much thought, but it is time-consuming (especially if you have to go to higher factors before finding a root). Luckily, when you’ve found one root, you can solve the rest of the equation easily.

The key is incorporating the factor theorem. This states that if x = s is a solution, then (xs) is a factor that can be pulled out of the equation. For this situation, s = −2, and so (x + 2) is a factor we can pull out to leave:

(x + 2) (x^2 + ax + b) = 0

The terms in the second group of brackets have the form of a quadratic equation, so if you find the appropriate values for a and b, the equation can be solved.

This can be accomplished using synthetic division. First, write down the coefficients of the original equation on the top row of a table, with a dividing line and then the known root on the right:

\def\arraystretch{1.5} \begin{array}{cccc:c} 1 & -5 & -2 & 24 & x=-2 \\ & & & & \\ \hline & & & & \end{array}

Leave one spare row, and then add a horizontal line below it. First, take the first number (1 in this case) down to the row below your horizontal line

\def\arraystretch{1.5} \begin{array}{cccc:c} 1 & -5 & -2 & 24 & x=-2 \\ & & & & \\ \hline 1 & & & & \end{array}

Now multiply the number you’ve just brought down by the known root. In this case, 1 × −2 = −2, and this is written below the next number in the list, as follows:

\def\arraystretch{1.5} \begin{array}{cccc:c} 1 & -5 & -2 & 24 & x=-2 \\ & -2 & & & \\ \hline 1 & & & & \end{array}

Then add the numbers in the second column and put the result below the horizontal line:

\def\arraystretch{1.5} \begin{array}{cccc:c} 1 & -5 & -2 & 24 & x=-2 \\ & -2 & & & \\ \hline 1 & -7 & & & \end{array}

Now repeat the process you’ve just been through with the new number below the horizontal line: Multiply by the root, put the answer in the empty space in the next column, and then add the column to get a new number on the bottom row. This leaves:

\def\arraystretch{1.5} \begin{array}{cccc:c} 1 & -5 & -2 & 24 & x=-2 \\ & -2 & 14 & & \\ \hline 1 & -7 & 12 & & \end{array}

And then go through the process a final time.

\def\arraystretch{1.5} \begin{array}{cccc:c} 1 & -5 & -2 & 24 & x=-2 \\ & -2 & 14 & -24 & \\ \hline 1 & -7 & 12 & 0 & \end{array}

The fact that the last answer is zero tells you that you’ve got a valid root, so if this isn’t zero, then you’ve made a mistake somewhere.

Now, the bottom row tells you the factors of the three terms in the second set of brackets, so you can write:

(x^2 − 7x + 12) = 0

And so:

(x+2)(x^2 − 7x + 12) = 0

This is the most important stage of the solution, and you can finish from this point onwards in many ways.

Factoring Cubic Polynomials

Once you have removed a factor, you can find a solution using factorization. From the step above, this is basically the same problem as factoring a quadratic equation, which can be challenging in some cases. However, for the expression:

(x^2 − 7x + 12)

If you remember that the two numbers you put in the brackets need to add to give the second coefficient (7) and multiply to give the third (12), it’s fairly easy to see that in this case:

(x^2 − 7x + 12) = (x – 3) (x – 4)

You can multiply this out to check, if you like. Don’t feel discouraged if you can’t see the factorization straight away; it does take a little bit of practice. This leaves the original equation as:

(x + 2) (x – 3) (x – 4) = 0

Which you can immediately see has solutions at x = −2, 3 and 4 (all of which are factors of 24, the original constant). In theory, it may also be possible to see the whole factorization starting from the original version of the equation, but this is much more challenging, so it’s better to find one solution from trial and error and use the approach above before trying to spot a factorization.

If you’re struggling to see the factorization, you can use the quadratic equation formula:

x={-b\pm\sqrt{b^2 – 4ac}\above{1pt}2a}

To find the remaining solutions.

Using the Cubic Formula

Although it’s much bigger and less simple to deal with, there is a simple cubic equation solver in the form of the cubic formula. This is like the quadratic equation formula in that you just input your values of a, b, c and d to get a solution, but is just much longer.

It states that:

x = (q + [q^2 + (r−p^2)^3]^{1/2})^{1/3} + (q − [q^2 + (r−p^2)^3]^{1/2})^{1/3} + p


p = {−b \above{1pt}3a}
q = p^3 + {bc−3ad \above{1pt}6a^2}


r = {c \above{1pt}3a}

Using this formula is time-consuming, but if you don’t want to use the trial and error method for cubic equation solutions and then the quadratic formula, this does work when you go through it all.

Related Articles

How to Factor Cubic Trinomials
How to Factor Polynomials of Degree 3
How to Find the Roots of a Quadratic
How to Factor Higher Exponents
How to Use the Quadratic Formula
Tips For Solving Quadratic Equations
How to Solve Trinomials With Fractional Exponents
How to Simplify Rational Expressions: Step-by-Step
Tricks for Factoring Quadratic Equations
How to Factor Binomial Cubes
Polynomials: Adding, Subtracting, Dividing & Multiplying
How to Factor Polynomials & Trinomials
How to Check the Answers in Quadratic Equations
How to Find Vertical & Horizontal Asymptotes
How to Factor on a TI 84 Plus
How to Solve Binomial Equations by Factoring
How to Factor Polynomials With 4 Terms
Methods for Factoring Trinomials
SAT Math Prep: Solving Systems of Linear Equations
How to Help With Polynomials