# Prove that if $x^n + a_{n-1}x^{n-1}+ \dots + a_0 = 0$ for some integers $a_{n-1}, \dots, a_0$, then $x$ is irrational unless $x$ is an integer.

This is an exercise from Spivak's "Calculus" 4th edition.

18.a. Prove that if $$x$$ satisfies $$x^n + a_{n-1}x^{n-1}+ \dots + a_0 = 0$$ for some integers $$a_{n-1}, \dots, a_0$$, then $$x$$ is irrational unless $$x$$ is an integer.

The solution is given as

Suppose $$x = p/q$$ where $$p$$ and $$q$$ are natural numbers with no common factor. Then $$\frac{p^n}{q^n} + a_{n-1}\frac{p^{n-1}}{q^{n-1}}+ \dots + a_0 = 0$$, so $$\tag{*} p^n + a_{n-1}p^{n-1}q + \dots + a_0 q^n = 0$$ Now if $$q \neq \pm 1$$, then $$q$$ has some prime number as a factor. This prime factor divides every term of (*) other than $$p^n$$, so it must divide $$p^n$$ also. Therefore it divides $$p$$, a contradiction. So $$q = \pm 1$$, which means that $$x$$ is an integer.

I am confused about the conclusions in bold above. How does every other term of (*) being divisible by the prime factor affect $$p^n$$? Also, I've been struggling to prove that if $$k$$ is prime and $$k|p^n$$, then $$k|p$$, which seems to be the lemma used above.

• $p^n =- a_{n-1}p^{n-1}q - \dots - a_0 q^n$ and that factor of $q$ divides every term on the right-hand side. – See also “rational root theorem”. – Martin R Jun 13 '20 at 18:39
• @MartinR Thanks! That makes sense now. – Iyeeke Jun 13 '20 at 18:43
• Great, elegant solution! – UmbQbify Jun 13 '20 at 19:02
• Sorry but I don't understand the bar notation, to my understanding it means, if k divides pⁿ then k also divides p? – UmbQbify Jun 13 '20 at 19:04
• @AshWhole Yes, that is correct. – Iyeeke Jun 13 '20 at 19:34

Every other terms has a $$q$$ factor explicitly besides $$p^n$$.
Since $$p^n = -q(a_{n-1}p^{n-1} + \ldots + a_0q^{n-1})$$
Hence $$q$$ must divide $$p^n$$.
As for your second quesiton, let a prime factor of $$q$$ be $$q_0$$. Consider the prime factorization of $$p=\prod_{i=1}^m q_i^{r_i}$$, then $$p^n=\prod_{i=1}^{m} q_i^{nr_i}$$, if $$q_0$$ divide $$p^n$$ is a prime, then $$q_0$$ must be one of the $$q_i$$ with positive $$r_i$$ power. Hence $$q_0$$ divide $$p$$.
• Thanks for your response! Is there a more formal argument for the second question? I don't think that $p$ has to be prime in this case. It was given as a natural number. – Iyeeke Jun 13 '20 at 18:48