In algebra, the rational root theorem (or rational root test, rational zero theorem, rational zero test or p/q theorem) states a constraint on rational solutions of a polynomial equation
a
n
x
n
+
a
n
−
1
x
n
−
1
+
⋯
+
a
0
=
0
{\displaystyle a_{n}x^{n}+a_{n-1}x^{n-1}+\cdots +a_{0}=0}
with integer coefficients
a
i
∈
Z
{\displaystyle a_{i}\in \mathbb {Z} }
and
a
0
,
a
n
≠
0
{\displaystyle a_{0},a_{n}\neq 0}
. Solutions of the equation are also called roots or zeros of the polynomial on the left side.
The theorem states that each rational solution
x
=
p
q
{\displaystyle x={\tfrac {p}{q}}}
written in lowest terms (that is, p and q are relatively prime), satisfies:
p is an integer factor of the constant term a0, and
q is an integer factor of the leading coefficient an.
The rational root theorem is a special case (for a single linear factor) of Gauss's lemma on the factorization of polynomials. The integral root theorem is the special case of the rational root theorem when the leading coefficient is an = 1.
Contents
Application
The theorem is used to find all rational roots of a polynomial, if any. It gives a finite number of possible fractions which can be checked to see if they are roots. If a rational root x = r is found, a linear polynomial (x – r) can be factored out of the polynomial using polynomial long division, resulting in a polynomial of lower degree whose roots are also roots of the original polynomial.
Cubic equation
The general cubic equation
a
x
3
+
b
x
2
+
c
x
+
d
=
0
{\displaystyle ax^{3}+bx^{2}+cx+d=0}
with integer coefficients has three solutions in the complex plane. If the rational root test finds no rational solutions, then the only way to express the solutions algebraically uses cube roots. But if the test finds a rational solution r, then factoring out (x – r) leaves a quadratic polynomial whose two roots, found with the quadratic formula, are the remaining two roots of the cubic, avoiding cube roots.
Proofs
Elementary proof
Let
P
(
x
)
=
a
n
x
n
+
a
n
−
1
x
n
−
1
+
⋯
+
a
1
x
+
a
0
{\displaystyle P(x)\ =\ a_{n}x^{n}+a_{n-1}x^{n-1}+\cdots +a_{1}x+a_{0}}
with
a
0
,
…
,
a
n
Proof using Gauss's lemma
Should there be a nontrivial factor dividing all the coefficients of the polynomial, then one can divide by the greatest common divisor of the coefficients so as to obtain a primitive polynomial in the sense of Gauss's lemma; this does not alter the set of rational roots and only strengthens the divisibility conditions. That lemma says that if the polynomial factors in Q[X], then it also factors in Z[X] as a product of primitive polynomials. Now any rational root p/q corresponds to a factor of degree 1 in Q[X] of the polynomial, and its primitive representative is then qx − p, assuming that p and q are coprime. But any multiple in Z[X] of qx − p has leading term divisible by q and constant term divisible by p, which proves the statement. This argument shows that more generally, any irreducible factor of P can be supposed to have integer coefficients, and leading and constant coefficients dividing the corresponding coefficients of P.
Examples
First
In the polynomial
2
x
3
+
x
−
1
,
{\displaystyle 2x^{3}+x-1,}
any rational root fully reduced should have a numerator that divides 1 and a denominator that divides 2. Hence, the only possible rational roots are
±
1
2
{\textstyle \pm {\tfrac {1}{2}}}
and
±
1
{\textstyle \pm 1}
; since neither of these equates the polynomial to zero, it has no rational roots.
Second
In the polynomial
x
3
−
7
x
+
6
{\displaystyle x^{3}-7x+6}
the only possible rational roots would have a numerator that divides 6 and a denominator that divides 1, limiting the possibilities to ±1, ±2, ±3, and ±6. Of these, 1, 2, and –3 equate the polynomial to zero, and hence are its rational roots (in fact these are its only roots since a cubic polynomial has only three roots).
Third
Every rational root of the polynomial
P
=
3
x
3
−
5
x
2
+
5
x
−
2
{\displaystyle P=3x^{3}-5x^{2}+5x-2}
must be one of the 8 numbers
±
1
,
±
2
,
±
1
3
,
±
2
3
.
{\displaystyle \pm 1,\pm 2,\pm {\tfrac {1}{3}},\pm {\tfrac {2}{3}}.}
These 8 possible values for x can be tested by evaluating the polynomial. It turns out there is exactly one rational root, which is
Fourth
If
a
,
b
{\displaystyle a,b}
and
a
2
b
+
b
2
a
{\displaystyle {\tfrac {a^{2}}{b}}+{\tfrac {b^{2}}{a}}}
are integers (
a
≠
0
,
b
≠
0
{\displaystyle a\neq 0,b\neq 0}
), then both
a
2
b
{\displaystyle {\tfrac {a^{2}}{b}}}
and
b
2
a
{\displaystyle {\tfrac {b^{2}}{a}}}
must be integer.