Rational root theorem

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

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, written in lowest terms so that p and q are relatively prime, satisfies: 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.

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.

The general cubic equation

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.

Suppose P(p/q) = 0 for some coprime p, q ∈ ℤ:

To clear denominators, multiply both sides by qn:

But p is coprime to q and therefore to qn, so by Euclid's lemma p must divide the remaining factor a0.

On the other hand, shifting the an term to the right side and factoring out q on the left side produces:

[1] 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. In the polynomial

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 and ±1; since neither of these equates the polynomial to zero, it has no rational roots.

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.

These 8 possible values for x can be tested by evaluating the polynomial.

However, these eight computations may be rather tedious, and some tricks allow to avoid some of them.

all terms of P become negative, and their sum cannot be 0; so, every root is positive, and a rational root must be one of the four values

is a polynomial in t with the same first coefficient 3 and constant term 1.

[2] The rational root theorem implies thus that a rational root of Q must belong to

This shows again that any rational root of P is positive, and the only remaining candidates are 2 and 2\3.

To show that 2 is not a root, it suffices to remark that if

needs to be computed to verify that it is a root of the polynomial.