# Thread: If r is a rational solution r = p/q and p and q are coprime, show that q|an and p|a0.

1. ## If r is a rational solution r = p/q and p and q are coprime, show that q|an and p|a0.

Suppose that r is a solution of the equation:

anxn + a(n−1)x(n−1) + . . . + a1x + a0 = 0

where the coefficients ak belongs to Z for k = 0, 1, . . . n, and n is greater or equal to 1. If r is a rational solution r = p/q, where p, q belong to Z and p and q are
coprime, show that q|an and p|a0.

Im not even sure where to begin, im so confused, what am i trying to prove? and how do i prove it.

2. You have been given a polynomial in which if you substitute x by $\frac{p}{q}$, it evaluates to 0. You have to prove that q divides the coefficient of $x^n$ and p divides the constant.

Replace x by $\frac{p}{q}$. Take LCM etc. , multiply both sides by whatever required to get an expression only in terms of integers. Can you see something after you do all this ?

3. Your current situation is that you have a polynomial

$a_nx^n+a_{n-1}x^{n-1}+\cdots+a_1x+a_0,$

where all coefficients are integers, $a_n\neq 0$, and $n\geq 1$, and you know that the rational number $r=\frac{p}{q}$ is a root of this polynomial, where $p$ and $q$ are coprime.

Your problem in this setup is to prove that the numerator $p$ of $r$ divides $a_0$, and that the denominator $q$ of $r$ divides $a_n$, the coefficient of $x^n$.

Here's how one could go about doing it. Since r is a root of the polynomial, we have:

$a_nr^n+a_{n-1}r^{n-1}+\cdots+a_1r+a_0=0.$

We know that $r=\frac{p}{q}$, so replace $r$ by $\frac{p}{q}$ in the expression to get:

$a_n(\frac{p}{q})^n+a_{n-1}(\frac{p}{q})^{n-1}+\cdots+a_1\frac{p}{q}+a_0=0.$

Multiply each term of this equation by $q^n$ (check this carefully) to get:

$a_np^n+a_{n-1}qp^{n-1}+\cdots+a_1q^{n-1}p+q^na_0=0.$

I will refer to this equation as (*). In (*), take all but the first term and move them to the right hand side:

$a_np^n=-a_{n-1}qp^{n-1}-\cdots-a_1q^{n-1}p-q^na_0.$

Notice how $q$ is a factor of each of the terms on the right hand side, which is why $q$ divides the entire right hand side. But the right hand side is equal to the left hand side, and so $q$ also divides the expression

$a_np^n.$

However, the integers $p$ and $q$ were chosen to be coprime, which means that they have no common factor. So for $q$ to divide $a_np^n$, it must divide $a_n$. This is part of what you were supposed to show.

You should also show that $p$ divides $a_0$. To do this, start out with (*) again, and make some slight changes to what just happened. This will lead you to what you want.

4. Wow, thanks so much, i understand it now, and was able to find the solution for p divides ao. Thanks alot!