Polynomial Long Division is a technique for dividing polynomial by another polynomial. It works in the same way as long division of numbers, but here you are dealing with variables.
You perform division step by step, by "guessing" terms of a quotient. Division is finished, when degree of the result is less than degree of the divisor.
Example 1. Divide x3−2x2−8x+21 by x+3.
Write division in special form:
x+3)x3−2x2−8x+21
Let's carefully think what to do next.
The goal is to get rid of the leading term of dividend x3−2x2−8x+21.
In other words, we need to get rid of x3.
To do it, we divide x3 by the leading term of divisor x+3, i.e. x (divide monomials): xx3=x2.
Now, we subtract x2(x+3) from x3−2x2−8x+21:
x3−2x2−8x+21−x2(x+1)=x3−2x2−8x+21−(x3+3x2)= (multiply monomial by polynomial)
=x3−2x2−8x+21−x3−3x2=−5x2−8x+21.
Nice, we got rid of x3 and ended up with a polynomial of lower degree.
Let's write it in vertical division:
x2−2x2−8x+21x+3)x3−2x2−8x+21−(x3+3x2)−8x+21
You need to be careful with minus sign (we subtract polynomials). The best way is to change signs of terms, and discard parenthesis and minus sign in front of parenthesis, in other words add polynomials.
x2−2x2−8x+21x+3)x3−2x2−8x+21−x3−3x2−8x+21
Next, perform addition:
x2−2x2−8x+21x+3)x3−2x2−8x+21−x3−3x2−8x+21−5x2−8x+21
Now, repeat above steps.
We need to get rid of −5x2.
To do it, we divide −5x2 by the leading term of divisor x+3, i.e. x: x−5x2=−5x.
Next, subtract −5x(x+3) from −5x2−8x+21:
−5x2−8x+21−(−5x(x+3))=−5x2−8x+21−(−5x2−15x)= (multiply monomial by polynomial)
=−5x2−8x+21+5x2+15x=7x+21.
We got rid of −5x2 and ended up with a polynomial of lower degree:
x2−5x−8x2+21x+3)x3−2x2−8x+21−x3−3x2−8x+21−5x2−8x+21+5x2+15x+217x+21
Finally, get rid of 7x by multiplying x+3 by 7:
x2−5x+7x+21x+3)x3−2x2−8x+21−x3−3x2−8x+21−5x2−8x+21+5x2+15x+217x+21−7x−210
We are done, because remainder is 0.
Thus, we can write that x+3x3−2x2−8x+21=x2−5x+7.
From another side it means, that x3−2x2−8x+21=(x+3)(x2−5x+7).
To better understand the process of long division, let's write, that
x3−2x2−8x+21=x2(x+3)+(−5x)(x+3)+7(x+3) (you can simplify right hand side to make sure, that this is equality).
Each summand in the right hand side corresponds to the step in the division process.
Now, above equality can be divided by (x+3): x+3x3−2x2−8x+21=x+3x2(x+3)+x+3−5x(x+3)+x+37(x+3)=x2−5x+7.
Note, how x+3's in the denominators and numerators were cancelled.
Answer: x+3x3−2x2−8x+21=x2−5x+7.
Now, when you understood how to perform polynomial long division, it's time to consider harder examples.
First example was a "nice" example.
But in most cases there will be not "nice" cases.
Non-Zero Remainder. First not "nice" case is when remainder is not 0.
Similarly to division with remainder for numbers, in most cases you will end up with non-zero remainder (polynomial). But such cases are handled in the same way.
Example 2. Perform the long division: 3x2+2x−16x3−17x2−8x+2.
I will do this example a bit faster.
2x−3−7−8x2+213x2+2x−1)6x3−17x2−8x+2−6x3−4x2+2x+21−21x2−6x+2+21x2+14x−78x−5
We are done, because degree of the remainder 8x−5 is less than degree of the divisor 3x2+2x−1, however, remainder is not zero.
We can write now (according to the steps), that
6x3−17x2−8x+2=2x(3x2+2x−1)−7(3x2+2x−1)+(8x−5).
Or 6x3−17x2−8x+2=(2x−7)(3x2+2x−1)+8x−5 (distributive property of multiplication: ac−bc=(a−b)c).
Finally, 3x2+2x−16x3−17x2−8x+2=2x−7+3x2+2x−18x−5.
Answer: 3x2+2x−16x3−17x2−8x+2=2x−7+3x2+2x−18x−5, quotient is 2x−7, remainder is 8x−5.
Missing Terms. Another not "nice" case is when there are missing terms.
In some cases, during division process, there can appear terms that are not present in the dividend.
There are two options to fix this problem:
- add missing terms with zero coefficient
- add gaps during long division.
First option, actually, creates gaps at the beginning of the process, so you need not to worry about gaps later. However, second option is better, because often you don't know when and where to fill gaps.
Example 3. Find quotient and remainder of 2x+8x3−1.
When we perform long division, there will appear terms involving x and x2. However, there are no such terms in x3−1.
To fix situation, we add mentioned terms with zero coefficient: x3−1=x3+0x2+0x−1. We haven't changed anything, because adding zero doesn't change anything.
Now, perform long division:
21x2−2x+8x−12x+8)x3+0x2+0x−1−x3−4x2+0x−1−4x2+0x−1+4x2+16x−116x−1−16x−64−65
Therefore, x3−1=(21x2−2x+8)(2x+8)−65.
Answer: Quotient is 21x2−2x+8, remainder is −65.
Finally, you can divide polynomials, that contain many variables, can also be divided.
Example 4. Divide 3x3y3+x2y3+x2y2+xy2−2xy by xy+1.
3x2y2−2xy+xy2+x2y3+x2y2xy+1)3x3y3+x2y2−2xy+x2y3+xy2−3x3y3−3x2y2+x2y3+xy2−2xy−2x2y2−2xy+x2y3+xy2+2x2y2+2xy+x2y3+xy20+x2y3+xy2−x2y3−xy20
Note, that we swapped some terms to perform division.
Answer: x+13x3y3+x2y3+x2y2+xy2−2xy=3x2y2−2xy+xy2.
Now, it is time to exercise.
Exercise 1. Divide x3−3x2−3x+5 by x−1.
Answer: x2−2x−5.
Exercise 2. Find quotient and remainder of x+4x3+7x2+10x−3.
Answer: Quotient is x2+3x−2, remainder is 5.
Exercise 3. Divide the following: x2+1x3−2x2+3.
Answer: x2+1x3−2x2+3=x−2+x2+15−x.
Exercise 4. Perform long division: a+b+2ab2a3b3+a3b2+a2b3−6a2b−3a2−3ab.
Answer: a2b2−3a.