Solve a Cubic Equation

The first time you encounter a cubic equation (which take the form ax3 + bx2 + cx + d = 0), it may seem more or less unsolvable. However, the method for solving cubics has actually existed for centuries! Discovered in the 1500s by Italian mathematicians Niccolò Tartaglia and Gerolamo Cardano, the method for solving cubics was one of the first formulas not known to the ancient Greeks and Romans. Solving cubics can be quite difficult, but with the right approach (and a good amount of foundational knowledge), even the trickiest cubics can be tamed.

Steps

Solving with the Quadratic Formula

  1. Check whether your cubic contains a constant. As noted above, cubic equations take the form ax3 + bx2 + cx + d = 0. b, c, and d can be 0 without affecting whether the equation is cubic or not — this basically means that a cubic equation doesn't have to include all of the bx2, cx, or d terms to be a cubic. To start using this relatively easy method of solving cubics, check to see whether your equation has a constant (i.e., a d value). If it doesn't, you can use the quadratic equation to find the answers to the equation after a little mathematical legwork.
    • If, on the other hand, your equation does contain a constant, you'll need to use another solving method. See below for alternate approaches.
  2. Factor an x out of the equation. Since your equation doesn't have a constant, every term in the equation has an x variable in it. This means that one x can be factored out of the equation to simplify it. Do this and re-write your equation in the form x(ax2 + bx + c).
    • For example, let's say that our starting cubic equation is 3x3 + -2x2 + 14x = 0. Factoring a single x out of this equation, we get x(3x2 + -2x + 14) = 0.
  3. Use the quadratic formula to solve the portion in parentheses. You may have noticed that the portion of your new equation contained in parentheses matches the form of a quadratic equation (ax2 + bx + c). This means that we can find the values for which this quadratic equation equals zero by plugging a, b, and c into the quadratic formula ({-b +/-√ (b2- 4ac)}/2a). Do this to find two of the answers to you cubic equation.
    • In our example, we would plug our a, b, and c values (3, -2, and 14, respectively) into the quadratic equation as follows:
      {-b +/-√ (b2- 4ac)}/2a
      {-(-2) +/-√ ((-2)2- 4(3)(14))}/2(3)
      {2 +/-√ (4 - (12)(14))}/6
      {2 +/-√ (4 - (168)}/6
      {2 +/-√ (-164)}/6
    • Answer 1:
      {2 + √(-164)}/6
      {2 + 12.8i}/6
    • Answer 2:
      {2 - 12.8i}/6
  4. Use zero and the quadratic answers as your cubic's answers. While quadratic equations have two solutions, cubics have three. You already have two of these — they're the answers you found to the "quadratic" portion of the problem in parentheses. In cases where your equation is eligible for this "factoring" method of solving, your third answer will always be 0. Congratulations — you've just solved your cubic.
    • The reason this works has to do with the fundamental fact that any number times zero equals zero. When you factor your equation into the form x(ax2 + bx + c) = 0, you essentially split it into two "halves": one half is the x variable on the left and the other is the quadratic portion in parentheses. If either of these "halves" equals zero, the entire equation will. Thus, the two answers to the quadratic portion in parentheses, which will make that "half" equal zero, are answers to the cubic, as is 0 itself, which will make the left "half" equal zero.

Finding Integer Solutions with Factor Lists

  1. Ensure your cubic has a constant. While the method described above is convenient because you don't have to learn any new mathematical skills to use it, it won't always be able to help you solve cubics. If your equation in the form ax3 + bx2 + cx + d = 0 has a nonzero value for d, the factoring trick above won't work, so you'll need to use either the method in this section or the one below to solve.
    • For example, let's say we're given the equation 2x3 + 9x2 + 13x = -6. In this case, getting a 0 on the right side of the equals sign requires us to add 6 to both sides. In our new equation, 2x3 + 9x2 + 13x + 6 = 0, d = 6, so we can't use the factoring trick above.
  2. Find the factors of a and d. To solve your cubic, start by finding the factors of a (the coefficient of the x3 term) and d (the constant at the end of the equation). As a quick reminder, factors are the numbers that can multiply together to make another number. For example, since you can make 6 by multiplying 6 &time; 1 and 2 × 3, 1, 2, 3, and 6 are the factors of 6.
    • In our example problem, a = 2 and d = 6. The factors of 2 are 1 and 2. The factors of 6 are 1, 2, 3, and 6.
  3. Divide the factors of a by the factors of d. Next, make a list of the values you get by dividing each factor of a by each factor of d. This will usually result in lots of fractions and a few whole numbers. The integer solutions to your cubic equation will either be one of the whole numbers in this list or the negative of one of these numbers.
    • In our equation, taking the factors of a (1, 2) over the factors of d (1, 2, 3, 6) gets this list: 1, 1/2, 1/3, 1/6, 2, and 2/3. Next, we add the negatives to the list to make it complete: 1, -1, 1/2, -1/2, 1/3, -1/3, 1/6, -1/6, 2, -2, 2/3, and -2/3. Our cubic equation's integer solutions are somewhere in this list.
  4. Use synthetic division or check your answers manually. Once you have your list of values, you can find the integer answers to your cubic equation by quickly plugging each integer in manually and finding which ones equal zero. However, if you don't want to spend the time doing this, there is a slightly quicker method that involves a technique called synthetic division. Basically, you'll want to synthetically divide your integer values by the original a, b, c, and d coefficients in your cubic equation. If you get a remainder of 0, your value is one of the cubic equation's answers.
    • Synthetic division is a complex topic — see the link above for more information. Here's a sample of how to find one of the solutions to our cubic equation with synthetic division:
      -1 | 2 9 13 6
      __| -2-7-6
      __| 2 7 6 0
      Since we got a final remainder of 0, we know that one of our cubic's integer solutions is -1.

Using a "Discriminant" Approach

  1. Write out the values of a, b, c, and d. For this method of finding a cubic equation's solutions, we'll be dealing heavily with the coefficients of the terms in our equation. For this reason, it's wise to record your a, b, c, and d terms before you begin so you don't forget what each one is.
    • For example, for the equation x3 - 3x2 + 3x - 1, we would write a = 1, b = -3, c = 3, and d = -1. Don't forget that when an x variable doesn't have a coefficient, it's implicitly assumed that its coefficient is 1.
  2. Calculate Δ0 = b2 - 3ac. The discriminant approach to finding a cubic equation's solution requires some complicated math, but if you follow the process carefully, you'll find that it's an invaluable tool for figuring out those cubic equations that are hard to crack any other way. To start, find Δ0, the first of several important quantities we'll need, by plugging the appropriate values into the formula b2 - 3ac.
    • In our example, we'd solve as follows:
      b2 - 3ac
      (-3)2 - 3(1)(3)
      9 - 3(1)(3)
      9 - 9 = 0 = Δ0
  3. Calculate Δ1= 2b3 - 9abc + 27a2d. The next important quantity we'll need, Δ1, requires a little more work, but is found in essentially the same way as Δ0. Plug the appropriate values into the formula 2b3 - 9abc + 27a2d to get your value for Δ1.
    • In our example, we'd solve as follows:
      2(-3)3 - 9(1)(-3)(3) + 27(1)2(-1)
      2(-27) - 9(-9) + 27(-1)
      -54 + 81 - 27
      81 - 81 = 0 = Δ1
  4. Calculate Δ = Δ12 - 4Δ03) ÷ -27a2. Next, we'll calculate the discriminant of the cubic from the values of Δ0 and Δ1. A discriminant is simply a number that gives us information about the roots of a polynomial (you may already unconsciously know the quadratic discriminant: b2 - 4ac). In the case of the cubic, if the discriminant is positive, then the equation has three real solutions. If the discriminant is zero, then the equation has either one or two real solutions, and some of those solutions are shared. If it is negative, then the equation has only one solution. (A cubic equation always has at least one real solution, because the graph will always cross the x-axis at least once.)
    • In our example, since both Δ0 and Δ1 = 0, finding Δ will be a piece of cake. We'd simply solve as follows:
      Δ12 - 4Δ03) ÷ -27a2
      (0)2 - 4(0)3) ÷ -27(1)2
      0 - 0 ÷ 27
      0 = Δ, so our equation has 1 or 2 answers.
  5. Calculate C = 3√(√((Δ12 - 4Δ03) + Δ1)/ 2). The last important value we need to calculate is C. This important quantity will allow us to finally find our three roots. Solve as normal, substituting Δ1 and Δ0 as needed.
    • In our example, we would find C as follows:
      3√(√((Δ12 - 4Δ03) + Δ1)/ 2)
      3√(√((02 - 4(0)3) + (0))/ 2)
      3√(√((0 - 0) + (0))/ 2)
      0 = C
  6. Calculate the three roots with your variables. The roots (answers) to your cubic equation are given by the formula (b + unC + (Δ0/unC)) / 3a, where u = (-1 + √(-3))/2 and n is either 1, 2, or 3. Plug in your values as needed to solve — this requires lots of mathematical legwork, but you should receive three viable answers!
    • In our example, we might solve by checking the answer when n is equal to 1, 2, and 3. The answers we get from these tests are the possible answers to our cubic equation — any that give an answer of 0 when plugged into the equation are correct. For example, if we got an answer of 1 for one of our tests, since plugging 1 into x3 - 3x2 + 3x - 1 gives an answer of 0, 1 is thus one of the answers to our cubic equation.