This post is, once again, a summary of a longer post authored by me on my own blog. My blog covers a lot of areas, including Vedic Mathematics. If you are interested in reading my thoughts on other topics, please feel free to visit my blog and post comments on the other articles you find there also! Thank you!

Just as in the case of quadratic equations, a cubic equation also has closed-form solutions. Unfortunately, the cubic formula is quite complicated and is not taught to students in the normal course of their mathematics education. You can see why when you see the form of the cubic formula, reproduced below from Wikipedia!

In this lesson, we will try to derive a simpler way to solve cubic equations. The method presented here is modeled after the method used to solve standard quadratic equations without using the quadratic formula. Since we did not deal with quadratic equations presented in standard form in our lessons on quadratic equations, I will start with a brief introduction to the solution of such quadratic equations without the use of the quadratic formula.

As you know, a quadratic equation in standard form can be written as ax^2 + bx + c = 0. One of the solution techniques used for the solution of such equations is to factorize it into two linear factors. Since the product of the two linear factors would equal zero, one can then individually set each of the factors to zero to get the solutions to the quadratic equation. This is a method that is commonly taught to students in school even before their introduction to the quadratic formula, so I am not going to spend too much time on this technique. This technique can, however, be illustrated using the example below:

5x^2 + 6x – 8 = 0 can be rewritten as

5x^2 + 10x – 4x – 8 = 0, which can then be rewritten as

5x(x + 2) – 4(x + 2) = 0, which gives us the factorized form of the quadratic equation as

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

We can then use the factors above to get the roots of the equation as x = 4/5 and x = -2.

In general, the steps in performing the factorization are as follows:

Let the given equation by ax^2 + bx + c = 0

It is written as ax^2 + dx + ex + c = 0 with the following conditions:

d + e = b, and

a/d = e/c

These conditions enable us to rewrite the equation appropriately so that common factors emerge from the final factorization. Notice that the second condition above can be rewritten as:

ac = de

The product ac is the product of the two extreme terms of the rewritten quadratic equation, while de is the product of the middle two terms of that equation. Making them equal to each other is the principle explained in cryptic terms by the sutra “Madhyamadhyena Adhyamantyena”. Literally it means “the product of the middle terms is equal to the product of the end terms”. It is commonly used to solve direct ratio problems, but this is another application of this sutra.

Let us illustrate this using the following example:

Take the equation x^2 + 2x + 1 = 0. We have to split the middle term into two terms, d and e, such that two conditions have to be satisfied:

d + e = 2, and

1/d = e/1

When we know that the equation has real roots, this is usually possible to do by trial and error (note that the two conditions form a system of 2 simultaneous equations in 2 variables, but since they are not linear equations, their solution by anything other than trial and error can be complicated). We find that d = 1 and e = 1 is the solution we are looking for since 1 + 1 = 2, and also 1/1 = 1/1. Therefore, we can rewrite the given equation as below:

x^2 + x + x + 1 = 0

This can then be factorized in the two steps below:

x(x + 1) + 1(x + 1) = 0, which gives us

(x + 1)(x + 1) = 0

Thus the two solutions of the given quadratic equation are both x = -1.

This method has some limitations, chief among which is that it is difficult, if not impossible, to find irrational roots using this method. It is also mostly useless for finding non-real roots. However, if the given equation has real, rational roots, this method can usually be used to find such roots, even if it takes a bit of trial and error. More importantly, this method is extensible to equations of practically any degree. In this lesson, we will restrict ourselves us to the solution of cubic equations using this method, but there is no inherent limitation in the method that prevents it from being used to solve quartic, pentic or higher-degree equations. Given that all cubic equations have at least one real root, we know that this method can be used to get at least one of the roots (if we are willing to live with some approximations in the case of irrational roots, as we shall see).

In general, given a cubic equation of the form ax^3 + bx^2 + cx + d = 0, the first step is to rewrite it as below:

ax^3 + ex^2 + fx^2 + gx + hx + d = 0

The following conditions have to be satisfied by the new coefficients we have introducted into the equation:

a/e = f/g = h/d

e + f = b

g + h = c

Notice that, as in the case of quadratic equations, the above conditions represents a system of 4 simultaneous equations in 4 variables. The first condition provides us with 2 independent equations, and the each of the other two conditions is an independent equation, giving us a total of 4. And we have 4 unknowns, e, f, g, and h. Unfortunately, the equations are not all linear, complicating the solution of the system. In general, it is better to solve the system by trial and error.

Let us see how the trial and error method works. Consider the cubic equation x^3 + 5x^2 + 2x – 8 = 0. We see that a = 1, b = 5, c = 2 and e = -8. We now have to find e, f, g, and h such that:

e + f = 5

g + h = 2

a/e = f/g = h/-8

For the trial and error method, I find it easiest to try different values of the first ratio. This fixes the value of e. The value of f is fixed as soon as you choose a value of e because of the first sum. Because of the middle ratio, the value of g is then fixed, which then gives us a value of h from the second sum. We just have to check whether the last ratio is equal to the first two ratios. The degree of difference between the value we chose for the first ratio, and the value of the last ratio can guide us towards the right direction in most cases.

In this case, let us try a value for the first ratio of 1. This gives us:

1/1 = 4/4 ≠ -2/8

Let us therefore try a value of -1 for the first ratio. This gives us:

1/-1 = 6/-6 = 8/-8

We can then rewrite the equation as below:

x^3 – x^2 + 6x^2 – 6x + 8x – 8 = 0, which can be rewritten as

x^2(x – 1) + 6x(x – 1) + 8(x – 1) = 0, which gives the factors as below:

(x^2 + 6x + 8)(x – 1) = 0

This gives us x = 1 as one of the roots right away. We are then left with a quadratic equation. We can choose to solve this equation using the quadratic formula or by using the factorization method. Using the factorization method, we get:

x^2 + 6x + 8 can be rewritten as

x^2 + 2x + 4x + 8 = 0, which can be rewritten as

x(x + 2) + 4(x + 2) = 0, which gives us the factors:

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

This gives us the other two roots of the equation, x = -2, and x = -4. Thus, the three roots of the given equation are x = 1, x = -4, and x = -2.

Before we go any further, let us consider another important sutra in the context of factorization of polynomials, like we did above. We factorized the polynomial x^3 + 5x^2 + 2x – 8 to be product of the factors (x – 1), (x + 4), and (x + 2). How do we know that this factorization is correct. We can use the principle expressed succinctly by another vedic sutra that reads: “Gunakasamuccaya Samuccayagunaka”. Sometimes the sutra is also written as “Gunitasamuccaya Samuccayagunita”. Literally, it means “the product of the sum of the coefficients in the factors is equal to the sum of the coefficients in the product.”

In this case, the factors we found are (x – 1), (x + 4) and (x + 2). The sum of the coefficients in the first factor is 1 – 1 = 0. The sum of the coefficients of the second factor is 1 + 4 = 5. The sum of the coefficients in the third factor is 1 + 2 = 3. The product of the three sums is 0 x 5 x 3 = 0 (obviously, we could have stopped right after finding the sum of coefficients of the first factor to be zero, but we found the sums from all three factors in this case for this illustration). Now, the sutra says that the sum of the coefficients in the product is the same as the product we calculated above. Indeed, we find that the sum of the coefficients in the original cubic equation is 1 + 5 + 2 – 8 = 0. Obviously, we could have interchanged the coefficients and the sutra would not have alerted us to it. But it is still a useful check when factorizing polynomials.

The same principle is used when we check multiplication results using digital roots as in this earlier lesson. We did not formally identify this sutra by name in that lesson, but the principle there was based on this sutra too!

Now, consider the equation 24x^3 + 98x^2 + 133x + 60 = 0

Let us try a ratio of 1 first. We get:

24/24 = 74/74 ≠ 59/60

A ratio of 2 gives us:

24/12 = 86/43 ≠ 90/60

A ratio of -1 gives us:

24/-24 = 126/-126 ≠ 259/60

A ratio of -2 gives us:

24/-12 = 110/-55 ≠ 188/60

Let us try a ratio of 1/2 next:

24/48 = 50/100 ≠ 33/60

Let us try a ratio of 2/3:

24/36 = 62/93 = 40/60

Thus we have found that the given equation can be rewritten as 24x^3 + 36x^2 + 62x^2 + 93x + 40x + 60 = 0 for factorization. We then get the following from that:

12x^2(2x + 3) + 31x(2x + 3) + 20(2x + 3) = 0, giving us

(12x^2 + 31x + 20)(2x + 3) = 0

This tells us that one of the roots of the equation is x = -3/2. We factorize the quadratic below to get the other two roots:

12x^2 + 31x + 20 = 0 can be rewritten as

12x^2 + 15x + 16x + 20 = 0, giving us

3x(4x + 5) + 4(4x + 5) = 0, giving us

(3x + 4)(4x + 5) = 0

This then tells us that the other too roots of the equation are x = -4/3 and x = -5/4.

Let us check our factorization by using the Gunitasamuccaya Samuccayagunita sutra once again. The three factors we found are (2x + 3), (3x + 4) and (4x + 5). The sum of the coefficients in each term are 2 + 3 = 5, 3 + 4 = 7, and 4 + 5 = 9. The product of these sums is 5 x 7 x 9 = 315. The cubic polynomial we factorized was 24x^3 + 98x^2 + 133x + 60. The sum of the coefficients in the product is 24 + 98 + 133 + 60, which is also equal to 315. Thus, we can be reasonably confident that we performed the factorization correctly!

As you can see, the process of factorizing the cubic can be quite time-consuming, requiring several trials for the right value of e, f, g, and h. Unfortunately, in most cases, it is either this or the application of the cubic formula in all its glory!

There are certain cubic equations that don’t have one or more of the 4 terms a normal cubic equation has (all cubic equations have the cubic term, otherwise they are not considered cubic equations). These may be equations of the sort ax^3 + cx + d = 0, or ax^3 + bx^2 + d = 0, or ax^3 + bx^2 + cx = 0, or even ax^3 + d = 0.

The last of these is easy to solve since all we have to do in that case is find the cube root of -d/a to solve the equation. Similarly, if the constant term is missing, one of the roots is x = 0. We can then reduce the equation to a quadratic by removing the common factor from all three terms, and solve it using either the factorization method or the quadratic formula.

Equations of the first two types are called depressed cubic equations. We use the same factorization scheme as before, but because of the missing term, some simplifications can be made. Consider the equation ax^3 + bx^2 + d = 0, for instance. We can rewrite it as below to aid in factorization:

ax^3 + ex^2 + fx^2 + gx + hx + d = 0

where

a/e = f/g = h/d

e + f = b

g + h = 0

Using the last condition, we can rewrite the equation to be factorized as below:

ax^3 + ex^2 + fx^2 + gx – gx + d = 0

where

a/e = f/g = -g/d

e + f = b

Similarly, the other form of the depressed cubic equation, ax^3 + cx + d = 0, can be rewritten for factorization as below:

ax^3 + ex^2 – ex^2 + gx + hx + d = 0

where

a/e = -e/g = h/d

g + h = c

For some examples of solving depressed cubic equations using the method outlined above please visit the full lesson here. The full lesson also has an example of solving a cubic equation by trial and error using the factorization method when the equation has only irrational roots.

Use of the factorization method to solve equations requires practice. So, I hope you will take the time to work out some equations using these methods to become more proficient at it. Always remember to check your factorization using the Gunitasamuccaya Samuccayagunita sutra! Good luck, and happy computing!!