## Wednesday, February 24, 2010

### Vedic Mathematics Lesson 41: Cubic Equations

A cubic equation in one variable is an equation of the sort below:

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

where a ≠ 0. In other words, it is a polymomial of degree 3. In general, cubic equations have 3 roots. Every cubic equation with real coefficients, a, b, c and d, has at least one real root.

You can find all my previous posts about Vedic Mathematics below:

Introduction to Vedic Mathematics
A Spectacular Illustration of Vedic Mathematics
10's Complements
Multiplication Part 1
Multiplication Part 2
Multiplication Part 3
Multiplication Part 4
Multiplication Part 5
Multiplication Special Case 1
Multiplication Special Case 2
Multiplication Special Case 3
Vertically And Crosswise I
Vertically And Crosswise II
Squaring, Cubing, Etc.
Subtraction
Division By The Nikhilam Method I
Division By The Nikhilam Method II
Division By The Nikhilam Method III
Division By The Paravartya Method
Digital Roots
Straight Division I
Straight Division II
Vinculums
Divisibility Rules
Simple Osculation
Multiplex Osculation
Solving Equations 1
Solving Equations 2
Solving Equations 3
Solving Equations 4
Mergers 1
Mergers 2
Mergers 3
Multiple Mergers
Complex Mergers
Simultaneous Equations 1
Simultaneous Equations 2

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

Let us now try to solve a couple of depressed cubic equations using this information. First consider the equation x^3 - 3x^2 + 4 = 0. We see that the ratios and sums are satisfied when we rewrite the equation as below:

x^3 + x^2 - 4x^2 -4x + 4x + 4 = 0

This can then be factorized as below:

x^2(x + 1) - 4x(x + 1) + 4(x + 1), which can be written as
(x^2 - 4x + 4)(x + 1) = 0

This then gives us one root as x = -1. Factorizing the quadratic gives us the other two roots as x = 2 (this is a repeated root).

Once again, the factors in this case are (x + 1), (x - 2) and (x - 2). The product of the sums of the coefficients is 2 x -1 x -1 = 2. The sum of coefficients in the product (x^3 - 3x^2 + 4), is 1 - 3 + 4 = 2, thus the factorization passes the sniff test.

Now consider the depressed cubic equation 4x^3 + 7x + 4 = 0. We see that the ratios and sums are satisfied when we rewrite the equation as below for factorization:

4x^3 + 2x^2 - 2x^2 - x + 8x + 4 = 0, which can be factorized by the two steps below:

2x^2(2x + 1) -x(2x + 1) + 4(2x + 1) = 0
(2x^2 - x + 4)(2x + 1) = 0

This then gives us x = -1/2 as one of the solutions. The other solutions have to be derived by solving the quadratic equation. We see that in this case, the quadratic equation actually does not have any real roots, so our method for factorizing quadratics will not work whatever ratio we try. The equation thus has only one real root and two complex roots (which are outside the scope of this lesson). Notice that, as we mentioned in the beginning of this lesson, this method will produce at least one solution if we are willing to spend enough time trying different ratios because cubic equations have at least one real root.

In this case, our factors were (2x^2 - x + 4), and (2x + 1). The product of sum of coefficients in these two factors is 5 x 3 = 15. The sum of the coefficients in the product (4x^3 + 7x + 4) is also 4 + 7 + 4 = 15, thus satisfying our basic sanity check.

What happens when the equation has only irrational roots? Consider the equation x^3 - 11x^2 - 22x - 3 = 0. Let us try a few ratios as below:

+1.0: 1/1 = -12/-12 ≠ -10/-3 (-3.333)
-1.0: 1/-1 = -10/10 ≠ -32/-3 (-10.667)
+0.5: 1/2 = -13/-26 ≠ 4/-3 (-1.333)
-0.5: 1/-2 = -9/18 ≠ -40/-3 (13.333)
+0.25: 1/4 = -15/-60 ≠ 38/-3 (-12.6667)
+0.75: 1/1.333 = -12.333/-16.444 ≠ -5.556/-3 (1.852)
+0.67: 1/1.5 = -12.5/-18.75 ≠ -3.25/-3 (1.0833)
+0.60: 1/1.6667 = -12.66667/-21.1111 ≠ -0.8889/-3 (0.2963)

Notice that we are getting closer and closer to satisfying the last ratio. We see that the last ratio in the last line has dipped well below the target ratio whereas it is a little higher than the target ratio in the last but one line. So, the target ratio is probably somewhere between 0.67 and 0.60. Let us therefore try 0.63.

+0.63: 1/1.5873 = -12.5873/-19.9798 ≠ -2.0202/-3 (0.6734)

The last ratio is still very slightly higher than the target ratio. So, let us try 0.625.

+0.625: 1/1.6 = -12.6/-20.16 ≠ -1.84/-3 (0.6133)

We see that the ratio has now slipped just below the target ratio. But we could consider this ratio "close enough" and decide to proceed with this (the alternative is to try and fine-tune the ratio further). If we decide to do so, we can rewrite the given equation as below:

x^3 + 1.6x^2 - 12.6x^2 - 20.16x - 1.84x - 3 = 0 which then becomes
x^2(x + 1.6) - 12.6x(x + 1.6) - 1.84(x + 1.6) = 0

Notice how we have approximated 3/1.84 as 1.6 to provide us with a common factor across all three terms. That is because we decided to use an approximate ratio without fine-tuning it further. The equation above then can be factorized as:

(x^2 - 12.6x - 1.84)(x + 1.6) = 0

This gives us the first root as x = -1.6. The other two roots have to be derived from the quadratic equation x^2 - 12.6x - 1.84 = 0. Solving this by the quadratic formula gives us the roots as -0.1444 and 12.7444. Thus, we can say that the given equation has roots of x = -1.6, x = -0.1444 and x = 12.7444. The exact roots, using the cubic formula actually turn out to be x = 12.7447, x = -0.1474 and x = -1.5973. Thus our approximation did not throw us too far off-track.

As you can see, solving equations with irrational roots is not easy. And no system of mathematics is going to make it easy to do so. However, if we are willing to live with some approximations, we may be able to get close to the exact answers by following the factorization method explained here. 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. Good luck, and happy computing!

## Content From TheFreeDictionary.com

In the News

Article of the Day

This Day in History

Today's Birthday

Quote of the Day

Word of the Day

Match Up
 Match each word in the left column with its synonym on the right. When finished, click Answer to see the results. Good luck!

Hangman

Spelling Bee
difficulty level:
score: -