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.
 A: Hint $\displaystyle\ \ 0 = q^n P(\frac{p}q) = a_n\ p^n + \color{#c00}q\,  (\overbrace{\!\cdots^{\phantom :\!}}^{\!\large \in\, \Bbb Z}\!)\ \Rightarrow\ \color{#c00}q\mid a_n\,p^n\ \!\overset{(q,\,p)\,=\,1}\Longrightarrow\! q\mid a_n\ $ by Euclid's Lemma.
Note $ $  This result is usually called RRT = Rational Root Test / Theorem, not Gauss' polynomial theorem. It is special case of Gauss's Lemma for polynomials, i.e.  if $\,\alpha\,$ is an algebraic number with primitive minimal polynomial $\, f(x)\in \mathbb Z[x]\,$ and if $\, g(\alpha) = 0\,$ for $\, g(x)\in \mathbb Z[x]\,$ then $\,f\mid g\,$ in $\,\Bbb Q[x]\,$ hence $\,f\mid g\,$ in $\,\mathbb Z[x]\,$ by Gauss. So the leading coefficient of $\,f\,$ divides the leading coefficient of $\,g,\,$ and ditto for the constant coefficients. RRT is just the special case when $\,f\,$ has degree $= 1.\,$ Indeed $\ \alpha = p/q\in \mathbb Q\,$ with $\,(p,q)=1\,$ has primitive minimal polynomial $\, f(x) = q\,x - p\,$. Therefore if $\,g(\alpha) = 0\,$ above $\Rightarrow (q\,x-p)\,|\,g\ \ in\ \ \mathbb Z[x]\,$ thus $\,q\,|\,g_n,\ p\,|\,g_0\,\ {\rm in}\,\ \mathbb Z,\,$ which is precisely RRT.
A: If you know how to prove the first part, just apply it to the polynomial $t^n P(t^{-1})$.
