A recent question reminded me that we have not yet covered the Rational Root Theorem (or Rational Zero Theorem), though it has been occasionally mentioned (e.g. here and here and here and here). It allows us to find any roots of a polynomial equation (that is, zeros of the polynomial) that might happen to be rational (that is, fractions or integers).
What the theorem says
We can start with this question, from 1998:
Rational Root Theorem My son doesn't know how to solve the following problem: List all possible rational zeros of the each function. Then determine the rational zeros. A sample problem is: f(x) = x^3 - 4x^2 + x + 2 We would greatly appreciate your help.
Don’t miss the difference between a possible rational zero (a fraction that could perhaps be a zero of the function) and an actual rational zero. We are to first decide what fractions have a chance of making \(x^3-4x^2+x+2=0\), and then find which of those really do.
Doctor Pat was the first to answer:
Bill (and son), This is called the Rational Root Theorem, and I think it is usually credited to Descartes. What it says is that if you have a polynomial, like the one you have above, if it has a rational root (it may not) then the root must be of a specific type. To use the rule you need to know that when polynomials are written in the traditional order, as above with the biggest power first and the constant last, the number in front of the largest term is called a(n) and the constant term is called a(0). In your case a(n) = 1 (we usually don't write a coefficient of 1 in a polynomial) and a(0) = 2. According to the Rational Root Theorem, the rational root must be a fraction whose numerator is a factor of a(0) and whose denominator is a factor of a(n); but they can be positive or negative.
His notation represents subscripts for the coefficients of the general polynomial $$a_nx^n+a_{n-1}x^{n-1}+\dots+a_2x^2+a_1x+a_0$$ In our polynomial \(x^3-4x^2+x+2\), with \(n=3\), we have \(a_n=a_3=1\) and \(a_0=2\). The theorem says that if any fraction \(\frac{p}{q}\), written in lowest terms, makes the polynomial zero, then p must be a factor of \(a_0=2\), and q must be a factor of \(a_n=1\).
(The theorem is, indeed credited to Descartes, who evidently used it in his most famous book, though he did not explicitly state it as a theorem.)
Since the only factor of a(n) is 1, the denominator must be 1 (or -1). a(0) has two factors -- 1 and 2 so either of these may be the numerator. The possible choices are then: 2/1, 1/1, -2/1, or -1/1 That is, there are only four possible numbers. The good thing is, if none of these work, you know for sure there are not any others.
The four possible rational zeros in this case are therefore \(1,-1,2,-2\). But these are “possible” only in the sense that this theorem allows them to be; that is, by this theorem, any other rational number can’t be a zero. Another theorem may restrict the list further (such as eliminating the positive numbers, as we’ll see); but this question is focused on this one theorem.
In fact, it turns out (as we’ll see) that only one of these is actually a zero, namely \(x=1\); the other two zeros are irrational real numbers. And sometimes, there are no rational zeros (or even no real zeros).
A second example
Here is one more example to make sure: f(x)= 2x^4 + 5x^2 + 7x + 6 Notice that we can ignore all the messy middle stuff and focus on the 2, our a(n) and the 6 which is a(0). The factors of 2 are 1 and 2, so either of these can be the denominator. The factors of 6 are 1, 2, 3, and 6, so any of these can be the numerator. So these are our choices for possible rational roots: 1/2, 2/2, 3/2, 6/2, 1/1, 2/1, 3/1, 6/1, or the negatives of any of these You will probably notice that some of these are duplicates. That is okay, and we just throw out repeats leaving us with: 1/2, 1, 3/2, 3, 2, 6, and the negatives of each of these. To check if these are actually roots to our equation, we need to plug them into the function, and see if we get 0. That's really all there is to it. Hope that helps you both.
In this case, it turns out that only \(-\frac{3}{2}\) is actually a zero. The other two zeros are both non-real complex numbers. To be precise, when we divide \(2x^4+5x^2+7x+6\) by \(x+\frac{3}{2}\), we find that $$2x^4+5x^2+7x+6=\left(x+\frac{3}{2}\right)(2x^2+2x+4),$$ and that quadratic factor has zeros $$\frac{-2\pm\sqrt{-28}}{4}=-\frac{1}{2}\pm\frac{\sqrt{7}}{2}i$$
There is nothing special about the other “possible” rational zeros, beyond the fact that this theorem doesn’t say they can’t be zeros.
By the way, you may notice that the second factor contains a common factor 2; if we move that to the first factor, we get $$2x^4+5x^2+7x+6=\left(2x+3\right)(x^2+x+2),$$ with integer coefficients. If you carry out that multiplication, you’ll notice that the leading term comes from multiplying the 2 in \((2x+3)\), the denominator of the root, by 1; and the constant term comes from multiplying the 3 in \((2x+3)\), the numerator of the root, by 2. That may suggest why the theorem is true.
Here’s one more thing to notice: If we called the rational root \(-\frac{6}{4}\), then it would not be true that the denominator is a factor of the leading term! This shows why a complete statement of the theorem has to assume that the fraction is written in lowest terms.
In other words …
Doctor Margaret answered a few hours later, stating the theorem a little more fully:
Hi Bill, Thanks for writing to Dr. Math. It's nice to see a parent taking an interest in his child's schoolwork. Good for you! Now on to the task at hand. This assignment comes from a theorem called the Rational Zeros Theorem. The theorem goes as follows: Let p be any polynomial function with integer coefficients. The only rational numbers that can possibly be zeros of p are the numbers of the form r/s, where r is a divisor of the constant term, and s is a divisor of the leading coefficient. If none of these numbers actually turns out to be a zero, then p has no rational zeros. Let me explain. A zero of a polynomial (called p(x)) is a number that when substituted for x will make the polynomial equal to zero. These numbers were relatively easy to find for polynomials of the form: p(x) = ax^2 + bx + c This polynomial, when set to zero becomes a quadratic equation which is solved by factoring (remember FOIL?) or by using the quadratic formula.
In this case (a quadratic polynomial \(p(x)=ax^2+bx+c\)), if we can factor it as \((s_1x-r_1)(s_2x-r_2)\), then the zeros will be \(\frac{r_1}{s_1}\) and \(\frac{r_2}{s_2}\). and it is clear that \(r_1\) and \(r_2\) are factors of c, while \(s_1\) and \(s_2\) are factors of a. But the point here is simply that we have routine ways to find these zeros. Our theorem helps us find zeros when factoring is harder.
For polynomials of a higher degree (3 and up) there is one method that is described in the theorem and it works for all polynomials, but involves some trial and error using synthetic division. We need numbers of the form r/s, where r is a divisor (factor) of the constant term, and s a factor of the leading (first) coefficient. In your example, the constant term is 2, which has factors of +/-1 and +/-2. The leading coefficient (of x^3) is 1 and its only factor is +/-1. So now we have: r +/- 1,2 --- = --------- s +/- 1 Notice how we must also use the negative numbers because the factors of 1 may be 1 * 1 but may also be -1* -1. In this case, the possible zeros are: +1, -1, +2, -2
The notation she used to represent all the possibilities at once, which I would write just a little differently, as $$\pm\frac{1,2}{1},$$ is just a tool to remind us to take any of the numerators, over any of the denominators, and either sign.
Again, these are the values that this theorem permits to be zeros; there is no guarantee that any of them actually are.
Using division to find the actual zeros
Now, I mentioned synthetic division. If we can divide your polynomial by any of these numbers and come up with no remainder, we have a zero, the algorithm is as follows to divide a polynomial x of n degrees: On the top line, at the left, write the alleged zero (call it c for now). Write all the coefficients of p(x) in order of decreasing powers of x, include any zero coefficients. Bring down the leading coefficient to the bottom line. Multiply each entry on the bottom line by c and add the product to the next coefficient to get the new entry on the bottom line. Now watch this. The first n entries on the bottom line are the coefficients of a new polynomial, call it q(x). The last entry on the bottom is the remainder. If there is a zero here, then we have a zero for p(x): 1 | 1 -4 1 2 | 1 -3 -2 |______________ 1 -3 -2 | 0 We have a zero, so P(1) = 0. For any zero or root there is a factor. Now we have a kinder, gentler q(x) = x^2 - 3x - 2 to work with. This polynomial can now be factored to get the other zeros. Notice that there will be three zeros for a polynomial function of the third degree. Well, that's it. The explanation is a little complicated but the process is really very simple. If you need extra help with the synthetic division or if there is something that is not clear, please write back.
The division shows that $$x^3-4x^2+x+2=(x-1)(x^2-3x-2).$$
Sometimes you can factor the quotient; in this case, we can’t, but we can use the quadratic formula to obtain $$x=\frac{3\pm\sqrt{(-3)^2-4(1)(-2)}}{2(1)}=\frac{3\pm\sqrt{17}}{2}$$ Note that these are irrational; 1 is the only rational zero.
If the degree of the given polynomial were greater than 3, then we would need to keep looking for more rational roots until the degree of the quotient gets down to 2, or until we see another way to finish. Not all polynomials can be factored this way!
An example with more possibilities
Here is another question, from 1999, which will give us more possible roots:
Rational Root Theorem I do not know how to figure out a question like this: Find all possible rational roots of: 4x^3 + 3x^2 + 6x + 10 I have no idea where even to start. Please help!
Doctor Rob answered:
The Rational Root Theorem says that if you have a polynomial with whole number coefficients, like the above, and it has a rational root, then the numerator of the root is a positive or negative divisor of the constant term (10 in this case) and the denominator is a positive divisor of the coefficient of the highest power term (4 in this case). Then, the numerator can be 10, 5, 2, 1, -1, -2, -5, or -10, and the denominator can be 1, 2, or 4. Furthermore, the numerator and denominator would not share a common factor. That reduces the list of possibilities to: 10/1, 5/1, 5/2, 5/4, 2/1, 1/1, 1/2, 1/4, -1/1, -1/2, -1/4, -2/1, -5/1, -5/2, -5/4, -10/1. These sixteen fractions (those with denominator 1 are actually whole numbers) are the only possible rational numbers that could be roots of the above equation. You can test them, one at a time. That will tell you which are roots, if any.
Using the notation we saw before, we can represent all of these as $$\pm\frac{1,2,5,10}{1,2,4}.$$ We might initially list all of these, crossing out fractions that are not in lowest terms (which turn out to be duplicates): $$\require{cancel}\frac{1}{1},\frac{2}{1},\frac{5}{1},\frac{10}{1},\frac{1}{2},\cancel{\frac{2}{2}},\frac{5}{2},\cancel{\frac{10}{2}},\frac{1}{4},\cancel{\frac{2}{4}},\frac{5}{4},\cancel{\frac{10}{4}},$$ and then simplify those that remain: $$1,2,5,10,\frac{1}{2},\frac{5}{2},\frac{1}{4},\frac{5}{4},$$ then include the negatives, $$-1,-2,-5,-10,-\frac{1}{2},-\frac{5}{2},-\frac{1}{4},-\frac{5}{4}.$$ We can see that with 4 factors on top and 3 on the bottom, we could have had as many as \(4\times3\times2=24\) possible roots, but duplicates reduced that number to 16.
But we can sometimes reduce the number even more:
By the way, it is not very hard to see that none of the positive numbers can be roots because if you substitute them into the equation, since all the coefficients are positive, the result will be a positive number, and not zero. That will reduce your search to eight possibilities.
Another way to reduce the number of tries is discussed in Bounds on Zeros of a Polynomial, which generalizes the idea used here.
When we check whether any of these 16 numbers is a zero of the polynomial, we find that none of them work! Did you notice that the question only asked for a list of possible roots, and did not ask for actual roots? It is just an exercise in the first part of the process. In fact, it has only one real root (which you can see by graphing, namely \(x\approx-1.21282\). Lesson 1: When you are given a problem like this, don’t do more than you were asked! Lesson 2: The theorem’s “possible” doesn’t mean anything more than “it’s worth trying”.
If we change the middle coefficients to anything else, we will still have the same list of possible zeros, but there may be one or more that work.
For \(4x^3+9x^2+13x+10\), only \(-\frac{5}{4}\) works.
For \(4x^3+17x^2+23x+10\), \(-1,-2,\text{ and }-\frac{5}{4}\) work.
Proving the theorem
But why is it true? Let’s close with a question from 2000:
Proof of the Rational Root Theorem I have been asked to prove the Rational Root Theorem, and I am lost. I was wondering if you could help?
Doctor Rob answered again:
Thanks for writing to Ask Dr. Math, Jacob. The theorem states that if a polynomial has a rational root, then the denominator of the root must divide the coefficient of the highest power term of the polynomial, and the numerator of the root must divide the constant term of the polynomial. Start with a general polynomial equation with integer coefficients. a(n)*x^n + a(n-1)*x^(n-1) + ... + a(1)*x + a(0) = 0 Suppose it has a rational root r/s, where r and s are integers, and r/s is reduced to lowest terms (so r and s have no common factor). Substitute r/s for x in this equation.
He didn’t explicitly say in his statement of the theorem that the numerator and denominator must be in lowest terms, but he does in this paragraph of the proof.
We have the equation $$a_nx^n+a_{n-1}x^{n-1}+\dots+a_1x+a_0=0,$$ and let \(x=\frac{r}{s}\): $$a_n\left(\frac{r}{s}\right)^n+a_{n-1}\left(\frac{r}{s}\right)^{n-1}+\dots+a_1\left(\frac{r}{s}\right)+a_0=0.$$ This simplifies to $$\frac{a_nr^n}{s^n}+\frac{a_{n-1}r^{n-1}}{s^{n-1}}+\dots+\frac{a_1r}{s}+a_0=0.$$
First multiply this equation through by s^(n-1). You'll see that all but the first term are integers, and the first term is a(n)*r^n/s That implies that a(n)*r^n/s must be an integer, so s divides evenly into a(n)*r^n. Since r and s have no common factor, it must be that s divides evenly into a(n).
The multiplication yields $$\frac{a_nr^n}{s}+a_{n-1}r^{n-1}+\dots+a_1rs^{n-2}+a_0s^{n-1}=0.$$ This implies that $$\frac{a_nr^n}{s}=-a_{n-1}r^{n-1}-\dots-a_1rs^{n-2}-a_0s^{n-1},$$ which must be an integer, so that s must be a divisor of \(a_n\).
Next multiply the equation through by s^n/r. You'll see that all but the last term are integers, and the last term is a(0)*s^n/r You finish.
This multiplication yields $$a_nr^{n-1}+a_{n-1}r^{n-2}s+\dots+a_1s^{n-1}+\frac{a_0s^n}{r}=0.$$ This implies that $$\frac{a_0s^n}{r}=-a_nr^{n-1}-a_{n-1}r^{n-2}s-\dots-a_1s^{n-1},$$ which must be an integer, so that r must be a divisor of \(a_0\).
I like to point out that the simplest possible case provides both a reason to believe the theorem might be true, and a way to remember with coefficient goes where, if we forgot: If our polynomial is \(p(x)=ax+b\), then its only zero is \(x=-\frac{b}{a}\), whose numerator is [a factor of] b, and whose denominator is [a factor of] a. So the theorem works in that case, and we can see why it works as it does.