Earlier, we have discussed addition, subtraction and multiplication of polynomials. As indicated, we have a problem if we wish to divide one polynomial by another, since the answer may not be a polynomial again.
Let us take an example of u(x) = x3+ x, v(x) = x2+ x + 1. It seems obvious that
the ratio u(x)v(x) is not a polynomial.
But we want to really prove this! Here is how we argue. Suppose, if possible, it is equal to some polynomial w(x) and write the equation:
u(x)
v(x) = w(x) or u(x) = w(x)v(x). We write this equation out and compare both sides.
x3+ x = (w(x))(x2+ x + 1).
By comparing the degrees of both sides, it follows that w(x) must have degree 1 in x. 5
Let us write w(x) = ax + b. Then we get
x3+ x = (ax + b)(x2 + x + 1) = ax3+ (a + b)x2+ (a + b)x + b. Comparing coefficients of x on both sides, we see that we have:
a = 1 , a + b = 0 , (a + b) = 1 , b = 0.
Obviously these equations have no chance of a common solution, they are incon- sistent!
This proves that w(x) is not a polynomial! We therefore make this:
Definition: Divisibility of polynomials. We say that a polynomial v(x) divides a polynomial u(x), if the remainder r(x) obtained by dividing u(x) by v(x) becomes zero.
The zero polynomial can divide only a zero polynomial.
But perhaps we are being too greedy. What if we only try to solve the first two equations?
5Note that deg
3.3. DIVISION ALGORITHM IN POLYNOMIALS. 45
Thus we solve a = 1 and a + b = 0 to get a = 1, b = −1. Then we see that using a = 1, b = −1:
u(x) = x3 + x = (x − 1)(x2+ x + 1) + x + 1. Let us name x − 1 as q(x) and x + 1 as r(x). Then we get:
u(x) = v(x)q(x) + r(x).
where r(x) has degree 1 which is smaller than the degree of v(x) which is 2.
Thus, when we try to divide u(x) by v(x), then we get the best possible division as q(x) = x − 1 and a remainder x + 1.
We now formalize this idea.
Definition: Division Algorithm. Suppose that u(x) = axn+ · · · and v(x) =
bxm+ · · · are polynomials of degrees n, m respectively and that v(x) is not the zero
polynomial. Then there are unique polynomials q(x) and r(x) which satisfy the following conditions:
1. u(x) = q(x)v(x) + r(x).
2. Moreover, either r(x) = 0 or degx(r(x)) < degx(v(x)).
When the above conditions are satisfied, we declare that q(x) is the quotient and r(x) is the remainder when we divide u(x) by v(x). Some people use the word division, in place of the word quotient.
The quotient q(x) and the remainder r(x) always exist and are uniquely deter- mined by u(x) and v(x). 6
First, we explain how to find q(x) and r(x) systematically.
Let us redo the problem with u(x) = x3+ x and v(x) = x2+ x + 1 again. Since u
has degree 3 and v has degree 2, we know that q must have degree 3 − 2 = 1.
For convenience, we often drop the x from our notation and simply write u, v, q, r in place of u(x), v(x), q(x), r(x).
What we want is to arrange u − qv to have a degree as small as possible; this means that either it is the zero polynomial or its degree is less than 2.
Start by guessing q = ax. Calculate
u − (ax)v = x3+ x − (ax)(x2+ x + 1) = (1 − a)x3+ (−a)x2 + (1 − a)x. This means a = 1 and then we get
u − (x)v = (−1)x2.
6Hint for the proof: Suppose that u − q
1v = r1 and u − q2v = r2 where r1, r2 are either 0 or have
degrees less than m.
Subtract the second equation from the first and consider the two sides (q2− q1)v and (r1− r2).
If both are 0, then you have the proof that q2 = q1 and r2= r1. If one of them is zero, then the
other must be zero too, giving the proof.
Finally, if both are non zero, then the left hand side has degree bigger than or equal to m while the right hand side has degree less than m; a clear contradiction!
Our right hand side has degree 2 which is still not small enough! So we need to improve our q. Add a next term to the current q = x and make it q = x + b.
Recalculate: 7
u − (x + b)v = u − xv − bv
= (−1)x2− b(x2+ x + 1)
= (−1 − b)x2+ (−b)x + (−b)
Thus, if we make −1 − b = 0 by taking b = −1, we get q = x − 1 and u − qv = (−(−1))x + (−(−1)) = x + 1 = r.
Let us summarize this process:
1. Suppose u(x), v(x) have degrees n, m respectively where n ≥ m. (Note that we are naturally assuming that these are non zero polynomials.)
As above, for convenience we shall drop x from our notations for polynomi- als.
2. Start with a guess q = ax(n−m) and choose a such that u − qv has degree less
than n.
3. Note that the whole term ax(n−m) can simply be thought of as:
ax(n−m) = the leading term of u the leading term of v.
This formula is useful, but often it is easier to find the term by inspection. In our example above, this first term of q came out to be x3
x2 = x. Thus, the
starting guess for q is q = x.
4. Using this current value of q, if u − qv is zero or if its degree is less than m, then stop and set u − qv as the final remainder r.
5. If not, add a next term to q to make the degree of u − qv even smaller. This next term can be easily found as:
leading term of the current u − qv
leading term of v .
In our example this was −x2
x2 = −1. Thus, the new guess for q is q = x − 1.
7Note that we use the already done calculation of u − xv and don’t waste time redoing the steps.
3.3. DIVISION ALGORITHM IN POLYNOMIALS. 47
6. Continue until u − qv becomes 0 or its degree drops below m.
In our example, q = x − 1 gives the remainder x + 1 whose degree is clearly less than 2 and we stop.
What we are describing is the process of long division that you learned in high school. We are going to learn more efficient methods for doing it below.
For comparison, we present the long division process for the same polynomials. Compare the steps for better understanding:
x x2+ x + 1 ) x3 x −x3 −x2 −x −x2 x −1 x2+ x + 1 ) x3 x −x3 −x2 −x −x2 x2 x 1 x 1
There are two lucky situations where we get our q, r without any further work. Let us record these for future use.
1. In case u is the zero polynomial, we take q(x) = 0 and r(x) = 0. Check that this has the necessary properties!
2. In case u has degree smaller than that of v (i.e. n < m), we take q(x) = 0 and get r(x) = u(x). Check that this is a valid answer as well.
3. One important principle is to “let the definition be with you!!” If you somehow see an answer for q and r which satisfies the conditions, then don’t waste time in the long division.
We will see many instances of this later.