Polynomials - rational root - divisibility This is a simple (almost obvious) question but I somehow cannot find an elementary solution yet.
$$f(x) = a_0x^n + a_1x^{n-1} + ... + a_{n-1}x + a_n$$
is a polynomial with integer coefficients.
$$\frac{p}{q}$$ is a rational root of $f(x)$,
where $p,q$ are whole numbers and $(p,q) = 1$
Prove that $(p-mq)$ | $f(m)$ for every whole number $m$
Assume the solution has to be explained to someone in 7th or 8th grade
i.e. one who doesn't know much about any complicated theory of polynomials.
E.g. I know that $f(x)$ can be written as $$a_0\left(x-\frac{p}{q}\right)R(x)$$
where $R(x)$ is a polynomial but can I claim $R(x)$ has integer
coefficients. If I can, then the desired statement follows easily, it seems.
But why can I claim this?
Note: you can assume I (or the student to whom I must explain this)
know that $p/a_n$ and $q/a_0$, this was proved already.
At some point I thought of using induction (on $m$) but that
seems somewhat complicated and I don't know if it will work at all.
 A: Suppose $R = x^{n-1} + \dots + b_{1}x + b_{0}$, then $$ f = a_0 \left(x - \frac{p}{q} \right) R = a_0 x^n + \left(a_0 b_{n-2} - a_0 \frac{p}{q} \right) x^{n-1} + \left(a_0 b_{n-3} - \frac{p}{q} \right) x^{n-2} + \dots + \left(-a_0 b_0 \frac{p}{q} \right).$$ So $a_0 b_{n-k} - a_0 \frac{p}{q} \in \mathbb{Z}$. Thus, the $a_0 b_{n-k} \in \frac{1}{q} \mathbb{Z}$. On the other hand, $\operatorname{gcd}(q,p-mq) = 1$, so since $a_0 R \in \frac{1}{q} \mathbb{Z}[x]$, your desired result follows.
A: How about this solution?
We will use induction on $n$ (the degree of $f$)
for the statement we are trying to prove which is
$(p-mq)$ | $f(m)$ for every whole number $m$
The base case $n=1$ is very easy. So let's assume we have this already.
We know that $q\ |\ a_0 \tag{1}$
So let's denote $a_0 = q \cdot c_0 \tag{2}$
Note that $c_0$ is a whole number (as are all $a_i$).
OK... then we get:
$$f(x) = a_0x^n + a_1x^{n-1} + ... + a_{n-1}x + a_n = $$
$$ = c_0 q x^n + a_1x^{n-1} + ... + a_{n-1}x + a_n = $$
$$ = (xq - p) c_0 x^{n-1} + (a_1 + pc_0)x^{n-1} + a_2 x^{n-2} + ... + a_{n-1} x + a_n \tag{3}$$
Now we know that $p/q$ is a root of $f(x)$ and obviously it is also a root of the first term $(xq - p) c_0 x^{n-1}$ from the sum above.
So $p/q$ must also be a root of
$$h(x) = (a_1 + pc_0)x^{n-1} + a_2 x^{n-2} + ... + a_{n-1} x + a_n$$
But this polynomial $h(x)$ is of degree $(n-1)$ so we can apply the induction hypothesis. From it we get that $$(p-mq)\ |\ h(m) \tag{4}$$ for every whole number $m$.
But then from (3) we can see that $$f(m) = (mq - p) \cdot m^{n-1} + h(m) \tag{5}$$
for every whole number $m$.
And then from (4) and (5), we obtain that
$(p-mq)$ divides also $f(m)$ for every whole number $m$.
Is this proof good enough? Or does this proof have some subtle flaw?
If it's good enough, then the statement is indeed easy because everything was straightforward in the induction that we did, and we used just the fact that $q\ |\ a_0$.
