# If $a_nx^n+a_{n-1}x^{n-1}+\cdots+a_1x+a_0=0$, must we have always $-\frac{a_0}{a_n} \in \mathbb{Z}$?

Let consider the polynomial with integer coefficients: $$f(x)=a_nx^n+a_{n-1}x^{n-1}+\cdots+a_1x+a_0$$ If $f(x)=0$ and $x \in \mathbb{Z}$ with $a_n\neq 0$

If all the roots are integers, must we always have $-\frac{a_0}{a_n} \in \mathbb{Z}$?

• Maybe you mean all the roots are $\in Z$ – user261263 Aug 16 '15 at 20:04
• @Eugen, That is correct. – user97615 Aug 16 '15 at 20:07
• The text of your problem doesn't say that – user261263 Aug 16 '15 at 20:09
• I agree. I did not spell it out explicitly. I edited it. Thanks. – user97615 Aug 16 '15 at 20:12

Yes. If a polynomial with all integer coefficients has only integer roots then it must be the case that it factors into: $p(x) = c(x-k_1)(x-k_2)(x-k_3)\dots(x-k_n)$ where $c$ and each $k$ are integers. So $a_n= c$ and $a_0 = \pm ck_1k_2k_3\dots k_n$. So $a_n$ divides $a_0$.

Yes. the ratio $-\frac{a_0}{a_n}$ must always be an integer otherwise at least one of the roots is an indivisible fraction. let suppose that all the roots of the polynomial are $x_i \in \mathbb{Z}$ with $1 \leq x \leq n$ Therefore, $$(x-x_1)(x-x_2)\cdots(x-x_n)=0$$ After expansion, we have: $$x_1+x_2+\cdots+x_n=-a_{n-1}$$

$$x_1x_2\cdots x_n=\pm a_0/a_n$$ depending on the parity of $n$ If since $x_i$ is an integer for all $i$ then the product is also an integer.

However, the inverse is not always true. For instance, if that ratio is an integer, it can mean the roots are the inverse of one another.

Here there is an answer to an older version of the question where we didn't have the assumption that all roots are integer (thanks to berto for the suggestion!)

In other words, are you asking "if $f(x)=a_nx^n+\ldots+a_0 \in \mathbf{Z}[x]$ has a integer root $r$ then $a_n$ divides $a_0$?"

The assumption is equivalent to $0=a_nr^n+\ldots+a_1r+a_0$. There is no such implication.

Counterexample: $f(x)=2x^2-3x+1$ and $f(1)=0$.

• by $x \in \mathbb{Z}$, i mean if all of the roots of the polynomial are integers, shouldn't $-\frac{a_0}{a_n}$ also be an integer? In your example, clearly $x=1/2$ is also a solution but it is NOT an integer. – user97615 Aug 16 '15 at 20:05
• You edited your question.. – Paolo Leonetti Aug 16 '15 at 20:14
• i did for clarity but i did mention that $x \in \mathbb{Z}$ – user97615 Aug 16 '15 at 20:29
• @PaoloLeonetti Because the question was edited after you answered, I think you can leave your answer here, but it seems a good idea to write something like Here's an answer to an older version of the question where we didn't have the assumption that all roots are integer. in the very beginning of your answer. – Bart Michels Aug 17 '15 at 10:30
• @barto you're right thank you – Paolo Leonetti Aug 17 '15 at 12:57