Tuesday, August 31, 2010

Vedic Mathematics Lesson 43: Polynomial Division 1

Most of us are familiar with the multiplication of polynomials. It is one of the first things taught in algebra. Polynomial multiplication, as you are well aware, involves the application of the distributive property of multiplication over addition, the addition of exponents, collecting of like terms, etc. to get a new polynomial from two or more other polynomials. However, the division of one polynomial by another is not familiar to most because it is seldom taught or even mentioned.

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
Multipli! cation S pecial 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
Quadratic Equations 1
Quadratic Equations 2
Quadratic Equations 3
Quadratic Equations 4
Cubic Equations
Quartic Equations

In the previous lesson, we identified one of the solutions to a quartic equation based on the values of the coefficients of the different powers of the unknown variable, x. Once the solution is identified, we needed to perform a polynomial division to get the residual cubic equation from the given quartic equation and one of its solutions. We touched upon the procedure for performing this tangentially, but we did not take it up formally. In this lesson, we will formalize the procedure for performing simple polynomial divisions. In particular, we will deal with the div! ision of higher-order polynomials by polynomials of the first degree (linear polynomials) in this lesson. In future lessons, we will deal with divisions where the divisor is a polynomial of higher degree.

In the most general terms, in this lesson, we are dealing with divisions of the following form:

Divide ax^n + bx^(n-1) + ... + constant by (cx + d)

In the previous lesson, (cx + d) was either (x + 1) or (x - 1). But the method we used in that lesson is applicable to other divisors also. We already know how to do some basic divisions without even realizing we are doing polynomial division. As in any other division, the answer will have a quotient and a remainder. In some cases, the remainder may be zero. In some cases, the quotient may be zero too.

Consider the following example of division by a linear polynomial, wh! ich practically anyone can actually perform without any hesita! tion:

Divide 4x^2 + 6x + 7 by 2x.

In this case, c = 2 and d = 0. Just by inspection, we can say that the quotient of this division is 2x + 3, and the remainder is 7. The way to verify whether we obtained the correct answer, just as in the case of arithmetic division is to check whether dividend = quotient * divisor + remainder.

In the above case, we can indeed verify that 4x^2 + 6x + 7 = 2x*(2x + 3) + 7. Thus, we can be confident that our division was correct.

Now, consider another example of polynomial division which may not be readily apparent as polynomial division. Divide 4x^2 + 6x + 7 by 2. In this case c = 0 and d = 2. Once again, just be inspection, we can say that the quotient is 2x^2 + 3x + 3, and the remainder is 1. We can verify that this is the correct answer by seeing that 4x^2 + 6x + 7 = 2*(2x^2 + 3x + 3) + 1.

However, when neither c nor d is zero, the situation becomes trickier. That is the kind of divisio! n that is not dealt with in school in any detail. It is the kind of division that is not taught to students as a normal part of algebra education for whatever reason. It is actually very useful to teach this kind of division, as we will see later in this lesson!

Consider the division of 4x^2 + 6x + 7 by x + 2. Essentially, we have to find (4x^2 + 6x + 7)/(x + 2). How exactly do we perform this division? The answer turns out to be quite simple actually. We have already seen some examples of how we do such a division in the previous lesson. Let us formalize the method in this lesson.

Consider the division of a polynomial ax^n + bx^(n-1) + ... + constant by the first degree expression cx + d. Consider the ratio c/d. The secret to polynomial division is to rewrite the numerator using this ratio just like we did in our lessons on cubic equations and quartic equations.

We have to rewrite the dividend in the form below:

ax^n + e! x^(n-1) + fx^(n-1) + ... + yx + zx + constant1 + constant2

And the coefficients have to satisfy the conditions below:

c/d = a/e = f/g = ... = z/constant1
e + f = b
...
y + z = coefficient of x in the given dividend
constant1 + constant2 = constant

In some cases, constant2 could be zero. When that is the case, the division does not have a remainder. When constant2 is not zero, that is the remainder (at least an intermediate remainder) of the division.

Let us see how these rules are applied in the case of (4x^2 + 6x + 7)/(x + 2). In this case, c/d = 1/2. Thus, we have to rewrite the dividend using the ration 1/2.

4x^2 + 6x + 7 = 4x^2 + ax + bx + constant1 + constant2

where

1/2 = 4/a = b/constant1
a + b = 6
constant1 + constant2 = 7

We see that we can accomplish this by writing the dividend as below:

4x^2 + 8x - 2x - 4 + 11

This can then be factorized as below:

4x(x + 2) - 2(x + 2) + 11
This then tells that the quotient of the division is (4x - 2), and the remainder is 11. As you can see, the method itself is quite simple and straightforward. If you can work with ratios, then you can perform polynomial division! We will spend some time on a couple more examples, then we will move on to some special cases, and then conclude with a very useful practical application of the technique.

Consider (4x^3 + 6x^2 - 8x + 15)/(2x - 1). In this case, c/d = -2/1. Thus, we rewrite the dividend using this ratio as below:

4x^3 -2x^2 + 8x^2 - 4x - 4x + 2 + 13

We can then factorize the expression above as below:

2x^2(2x - 1) + 4x(2x - 1) - 2(2x - 1) + 13

Thus, the quotient of the division is 2x^2 + 4x - 2, and the remainder is 13.

Now, consider (3x^4 + 4x^3 - 11x^2 + 6x - 5)/(2x + 1). In this case c/d = 2/1. Thus, we rewrite the dividend using this ratio as below:

3x^4 + 1.5x^3 + 2.5x^3 + ! 1.25x^2 - 12.25x^2 - 6.125x + 12.125x + 6.0625 - 11.0625
!
We can then factorize the expression as below:

1.5x^3(2x + 1) + 1.25x^2(2x + 1) - 6.125x(2x + 1) + 6.0625(2x + 1) - 11.0625

The quotient is then (1.5x^3 + 1.25x^2 - 6.125x + 6.0625), and the remainder is -11.0625. We can rewrite the quotient as 24x^3/16 + 20x^2/16 - 98x/16 + 97/16, and the remainder as -177/16. Thus, the quotient can be rewritten as (24x^3 + 20x^2 - 98x + 97)/16, and the remainder is -177/16.

Thus, we see that the quotient and remainder can contain fractional terms. And, in this case, the remainder was negative too! Thus, polynomial division can result in some results that can cause us to scratch our heads. But, we can verify that the answer we got is correct by simply multiplying the quotient with the divisor, and adding the remainder to the result to see whether we get back our original dividend.

Now consider a division as below:

(2x^3 + 5x^2 - 6x + 8)/(2x + 2)

We see that the ratio c/d ! in this case is 2/2 = 1. Thus, we could rewrite the dividend expression as below:

2x^3 + 2x^2 + 3x^2 + 3x - 9x - 9 + 17

We would then factorize it as below:

2x^2(x + 1) + 3x(x + 1) - 9(x + 1) + 17

We immediately see that the expressions in the parentheses are x + 1, not our divisor, 2x + 2. Thus, if we decide, based on the factorization, that our quotient is 2x^2 + 3x - 9, with a remainder of 17, we will find that we are wrong. In fact, (2x^2 + 3x - 9)(2x + 2) + 17 = 4x^3 + 10x^2 - 12x - 1, which is not what we started with as our original dividend. This, then tells us that the actual factorization of the rewritten dividend is as below:

x^2(2x + 2) + (3x/2)(2x + 2) - (9/2)(2x + 2) + 17

Thus, the quotient would be (x^2 + 3x/2 - 9/2) and the remainder would be 17. This can be verified as the correct answer. Thus, we need to pay extra attention when the ratio c/d can be simplified by the presence of common! factors. The common factor, in this case, prevented us from ! getting the divisor as a common factor during the factorization when we factorized the rewritten dividend. We then had to introduce fractions during the factorization to get the divisor as the common factor during the factorization.

A simpler solution to the above problem would be to take the common factor out of the divisor and divide the dividend by this common factor in advance. In this case, the common factor in the divisor is 2. So, we can convert the dividend to x^3 + (5/2)x^2 - 3x + 4 before we attempt the division. Now, our division problem is reduced to (x^3 + (5/2)x^2 - 3x + 4)/(x + 1). The ratio of terms in the divisor is 1/1 = 1. Thus, we can perform the division by rewriting the dividend as below:

x^3 + x^2 + (3/2)x^2 + (3/2)x - (9/2)x - 9/2 + 17/2

This will then enable us to perform the factorization as below:

x^2(x + 1) + (3x/2)(x + 1) - (9/2)(x + 1) + 17/2

The quotient is then x^2 + 3x/2 + 9/2. But since w! e divided the numerator and denominator by the common factor, 2, remember that the remainder is now to be multiplied by this common factor to get the final remainder. Thus, the remainder is not 17/2, but is instead 17!

Having fractional terms as part of the dividend may appear a little intimidating. So, another solution would be to take the common factor out of the divisor and keep it aside. Perform the division as usual, then divide the resulting quotient by the common factor.

In this case, our initial division resulted in a quotient of 2x^2 + 3x - 9. We see that we can then divide this by the common factor, 2, to get the correct quotient. Remember not to divide the remainder by the common factor!

Now, let us consider the last special case. Consider the division of 6x + 7 by x + 1. In this case, the dividend is also a linear polynomial. But the method is still the same as before. The ratio, c/d, in this case is 1/1 = 1. Thus, we r! ewrite the dividend expression as below in preparation for fac! torizati on:

6x + 6 + 1

This then leads to the factorization as below:

6(x + 1) + 1

We then conclude that the quotient is 6 and the remainder is 1.

Let us now record our observations about polynomial division, with a first-degree polynomial as the divisor, below:

  • The quotient will be a polynomial of one degree lower than the original dividend (thus, if the dividend is also a linear expression, as in our last example, then the quotient will be just a constant with no x term)
  • The remainder will be a constant, but can be either positive or negative
  • If the divisor has a constant as a common factor, we can set the constant aside, divide by the divisor reduced to lowest terms, then divide the quotient by the common factor to get the correct quotient (no change needs to be made to the remainder)
  • Alternatively, we can divide the dividend by the common factor, then perform the division by the div! isor reduced to lowest terms to get the quotient, then multiply the remainder by the common factor to get the correct remainder

As you can see, the division of a polynomial by a linear polynomial is quite easy once the method of ratios is laid out. This is an application of the Madhyamadhyena Adhyamanthyena sutra. Now, as promised, let us examine why this technique is useful. The secret to its usefulness lies in the insight that practically every real number is a polynomial. Consider the number 324, for instance.

324 = 3*10^2 + 2*10 + 4

This is the same as 3x^2 + 2x + 4, where x = 10! In fact, we can even express it is 3x^2 + 3x - 6, where x = 10. In fact there are several ways to express a given number as a polynomial, even using just x = 10. Using a different value of x enables us to rewrite the number in other bases (such as octal, where x = 8, hexadecimal, where x = 16 and binary, where x = 2). Because of this, it is easy to ! see that we can use our insights from polynomial division to p! erform r egular arithmetic division with just as much ease! In fact, this is the practical application of polynomial division that I have been hinting at since the beginning of this lesson!!

Take the case of 324/11 for instance. This can be rewritten as (3x^2 + 2x + 4)/(x + 1), where x = 10. We already know how to do this with no problems. We rewrite the dividend expression as below:

3x^2 + 3x - x - 1 + 5

We then factorize it to get:

3x(x + 1) -1(x + 1) + 5

We then conclude that the quotient is 3x - 1 and the remainder is 5. 3x - 1 when x = 10 is 29. Thus, we have just performed the division, 324/11 and found that the quotient is 29 with a remainder of 5. I encourage you to verify that this is indeed correct! Let us now take on a few more examples to see just how easy the method is.

Take 372/12 for instance. This can be rewritten as (3x^2 + 7x + 2)/(x + 2) where x = 10. The ratio, c/d, is then 1/2. We can th! en rewrite the dividend expression as below, and factorize it:

3x^2 + 6x + x + 2, which can be factorized as
3x(x + 2) + 1(x + 2)

Thus, we see that the quotient is 3x + 1 (or 31 with 10 as the value of x), and the remainder is 0!

Now, let us take a few slightly trickier cases. Consider 412/12, for instance. This can be rewritten as (4x^2 + x + 2)/(x + 2), where x = 10. The ratio, c/d is once again 1/2. Then, the dividend can be rewritten and factorized as below:

4x^2 + 8x - 7x - 14 + 16 which can be factorized as
4x(x + 2) - 7(x + 2) + 16

This then tells us that the quotient is 4x - 7 (or 33, since x = 10), and the remainder is 16. This can not be correct. We can verify using a calculator that the quotient in this case should be 34 and the remainder should be 4. It turns out that our solution is correct, but it does not meet the standards for normal division. In particular, in this case, the remainder ! turned out to be bigger than the divisor. To correct this, ad! d one to the quotient and reduce the remainder by the divisor. If necessary, repeat the operation until the remainder becomes less than the divisor. Following this procedure, we can then adjust our solution to a quotient of 34 (add one to 33), and a remainder of 4 (subtract the divisor, 12, from the original remainder of 16). Now, we can say that the answer is in truly correct form!

Now consider the case of 271/13. This can be rewritten as (2x^2 + 7x + 1)/(x + 3), where x = 10. The ratio, c/d is 1/3 in this case. We can then rewrite the dividend expression, and do the factorization as below:

2x^2 + 6x + x + 3 - 2 which can be factorized as
2x(x + 3) + 1(x + 3) - 2

We can then interpret this as saying that the quotient is (2x + 1), or 21 since x = 10, and the remainder is -2. Once again, we are left with an answer that seems wrong. We are not used to dealing with negative remainders when we do divisions normally. But the correction for t! his problem, once again, is very simple. We simply subtract one from the quotient and add the divisor to the remainder. Repeat this until the remainder is positive. Thus, we can correct our answer to a quotient of 20 (subtract 1 from 21), and a remainder of 11 (add the divisor, 13, to -2). It is easy to verify that a quotient of 20 and a remainder of 11 is indeed correct.

Next, let us consider 4878/18. We can write it as (4x^3 + 8x^2 + 7x + 8)/(x + 8), where x = 10. But the ratio, c/d now becomes 1/8. Using that ratio, we would be forced to rewrite the dividend expression as below:

4x^3 + 32x^2 - 24x^2 - 192x + 199x + 1592 - 1584

Obviously, this is correct, and does give us the following factorization:

4x^2(x + 8) - 24x(x + 8) + 199(x + 8) - 1584

This then translates to a quotient of 4x^2 - 24x + 199, which equals 400 - 240 + 199 = 359, and a remainder of -1584. To get this answer to standard form would require ! a lot of subtractions of 1 from the quotient and additions of ! 18 to th e remainder!

Instead, let us consider a different approach to this problem. We can rewrite the given problems as (4x^3 + 8x^2 + 7x + 8)/(2x - 2), where x = 10. Now, we see that c/d = -1 and the divisor has a common factor of 2. Let us take the common factor out initially and do the rewriting and factorization as below:

4x^3 - 4x^2 + 12x^2 - 12x + 19x - 19 + 27 which can be factorized as
4x^2(x - 1) + 12x(x - 1) + 19(x - 1) + 27

This translates to a quotient of 4x^2 + 12x + 19, which can be translated as 539 by substituting x = 10. Now, remember to divide the quotient by 2 (the common factor in the divisor), and we get 269.50. Since the remainder is greater than 18, we also have to subtract 18 from it and add 1 to the quotient. This gives us a quotient of 270.50 and a remainder of 9. Since 0.50*18 is 9, we can further simplify it to a quotient of 270 with a remainder of 18 (subtract the 0.50 from the quotient and add 0.50*18 to the! remainder), which once again can be reduced to a quotient of 271 with no remainder. We can verify that this is indeed the correct answer.

The approach we took the second time around is reminiscent of the use of vinculums in various arithmetic operations. Vinculums are dealt with in great detail in a lesson dedicated to them. It may be useful to review that lesson once more for more insights into the usefulness of the concept of vinculums.

Now, let us consider a more tricky case. We will try 3421/77. This can be rewritten as (3x^3 + 4x^2 + 2x + 1)/(7x + 7), where x = 10. We see that there is a common factor of 7 in the divisor, and a c/d ratio of 1. Using the ratio, we can rewrite the dividend and factorize it as below:

3x^3 + 3x^2 + x^2 + x + x + 1, which can be factorized as
3x^2(x + 1) + x(x + 1) + 1(x + 1)

This directly translates to a quotient of 311 with a remaind! er of 0. We now have to remember to divide the quotient by the common factor, 7. This presents us problems since we are left with another division problem almost as difficult as the original problem. However, we have reduced the problem by at least an order of magnitude, and in fact, we can perform the division by 7 in our heads to get a final quotient of 44 and a remainder of 3. Notice that this remainder is from a division by 7 while the real remainder needs to be from a division by 77. So, to get the true remainder to the problem, we now multiply this remainder of 3 from this step by 77/7 (original divisor/common factor), which is 11. Thus, the final answer is 44 with a remainder of 33.

An easier way to remember this might be to express the answer as 44 and 3/7 with a remainder of 0. Now, we convert the 3/7 to the final remainder by multiplying by the divisor, 77, to get 33 as the final remainder. We can verify that 44*77 + 33 = 8843, so we know our answer is c! orrect.

To obviate the need for a manual division, we can once again the use the concept of vinculums to rewrite the given problem as (3x^3 + 4x^2 + 2x + 1)/(8x - 3). This then gives us a c/d ratio of -8/3. But this leads to new problems as we see below:

3x^3 + 4x^2 + 2x + 1 can be rewritten with a ratio of -8/3 as
3x^3 - (9/8) x^2 + (41/8)x^2 - (123/64)x + (251/64)x - 753/512 + 1264/512 which can be factorized as
(3/8)x^2(8x - 3) + (64/41)x(8x - 3) + (512/251)(8x - 3) + 1264/512

This then gives us a quotient of 300/8 + 640/41 + 512/251 (after substituting x = 10 in the expression above) with a remainder of 1264/512. As you can see, this is not a very convenient expression to work with and convert into a standard form for presentation as a normal quotient and remainder. So, the lesson to take away from this is to be careful and not carried away by vinculums too much!

The concept of polynomial division is useful to le! arn since it can translate directly into an easy method for ar! ithmetic division also. But, sometimes, it does not produce results any faster or easier than other methods of division. This is important to recognize as a shortcoming of the method. Different methods have their own strengths and weaknesses. If the ratio we need to work with is inconvenient and can not be converted into a more convenient ratio by the use of vinculums or other tricks, we have to recognize that polynomial division may not be the best approach to the division problem.

Moreover, in this lesson, we have dealt with only linear divisors. This can limit the technique to just 2-digit divisors under most conditions. We will leave this lesson with an example of a division by a 3-digit divisor, but in general, we will deal with division by more digits in the next lesson, when we will deal with polynomial division where the divisor is not linear.

Consider the division problem 8843/126. This can be expressed as (8x^3 + 8x^2 + 4x + 3)/(x^2 + 2x + 6), ! where x = 10, but this does not leave us with a linear divisor. Instead, let us rewrite this as (8x^3 + 8x^2 + 4x + 3)/(12x + 6), where x = 10. Now, we have a linear divisor, so we can proceed as before. We see that the ratio c/d = 2, and 6 is a common factor in the divisor. We will set aside the common factor for now, and rewrite and factorize the dividend as below:

8x^3 + 4x^2 + 4x^2 + 2x + 2x + 1 + 2 which can be factorized as
4x^2(2x + 1) + 2x(2x + 1) + 1(2x + 1) + 2

This then translates to a quotient of 421, and a remainder of 2. Since we took out a common factor of 6 from the divisor, we now divide the quotient by 6. Dividing 421 by 6 gives us the new quotient of 70 and a remainder of 1. To convert this remainder to a remainder that would be obtained by division by 126 rather than by 6, we need to multiply it by 126/6, which is 21. Now, we add this remainder to the remainder from the factorization to get a final remainder of 23.

An easier way to remember this might be to express the ! result o f the division as 70 and 1/6. To move the 1/6 to the remainder, we need to multiply it by the divisor, 126. This gives us 21, which is then added to the already existing remainder of 2 to give us a final remainder of 23. We can verify that 70*126 + 23 = 8443, so we know that our answer is correct.

As you can see, polynomial division has several uses, chief among them, the factorization of polynomial expressions. But, as we saw in this lesson, it can also translate into an easier way to do some arithmetic divisions also. Hope you will take the time to practice some of the techniques, both with polynomial expressions as well as with arithmetic expressions, so that you can be confident about their application when it is appropriate. Good luck, and happy computing!

how to do polynomials

No comments:

Post a Comment