Proving Gauss' polynomial theorem (Rational Root Test) Let $P \in \mathbb{Z}[x], P(x) = \displaystyle\sum\limits_{j=0}^n a_j x^j, a_n \neq 0$ and $a_0 \neq 0$; if $p/q$ is a root of P (with p and q coprimes) then $p|a_0$ and $q|a_n$
I've managed to prove the first part ($p|a_0$) and I suppose I'm not far from proving the second, though I'd really like some feedback since I'm just starting with making proofs of my own.
Proof:
$P(x) = a_n(x-p/q)\displaystyle\prod\limits_{j=2}^n (x-r_j)$, with $r_j$ being the other n-1 roots of P(x).
It follows that $a_0 = a_n(-p/q)\displaystyle\prod\limits_{j=2}^n (-r_j)$
Then, $-p/q|a_0$ and obviously $p/q|a_0$. Rephrasing, $a_0 = l\frac{p}{q} = \frac{l}{q} p$ with $l \in \mathbb{Z}$.
This implies $p|a_0$ if $l/q \in \mathbb{Z}$, but this is trivial since $q|lp$ and q and p are coprimes, so $q|l$.
Therefore, $p|a_0$.
As for the second part, we want to see that $q_i|a_n \forall i \leq n$. 
We define $d$ as the least common multiple of $\{q_1, q_2,...,q_n\}$. Then, $q_i|a_n \forall i \leq n \iff d|a_n$.
Also, it follows that $d|\displaystyle\prod\limits_{j=1}^n q_j$, so we want to see that $a_n = l \displaystyle\prod\limits_{j=1}^n q_j$ with $l \in \mathbb{Z}$. Here's where I have my doubts with the proof as I have no way to show that l is indeed an integer.
Rearranging the previously given equation for $a_0$:
$a_n = a_0 \displaystyle\prod\limits_{j=1}^n \frac{-q_j}{p_j}$
Using the previous reasoning, as $p_i|a_0 \forall i \leq n$, then $a_0 = k \displaystyle\prod\limits_{j=1}^n p_j$.
Replacing $a_0$:
$a_n = k \displaystyle\prod\limits_{j=1}^n -q_j$, which is equivalent to $q|a_n$ as shown earlier.

If you know how to prove the first part, just apply it to the polynomial $t^n P(t^{-1})$.
