# If $f\in\mathbb{Q}[X]$ and $f(\mathbb{Q})=\mathbb{Q}$ then $\deg f=1$

Could you give me any hint how to prove that if $f\in\mathbb{Q}[X]$ and $f(\mathbb{Q})=\mathbb{Q}$ then degree of $f$ is equal to $1$? I have tried to prove it by using Bézout's theorem but I guess it is not the best way to do it... Thanks in advance.

-
I changed \mbox{deg}f to \deg f. One of the differences is clearly visible: $\mbox{deg}f$, $\deg f$. One should NEVER NEVER use \mbox for that kind of purpose. Please see this. That essay does not apply only to Wikipedia. – Michael Hardy Oct 28 '11 at 22:15

Suppose that $f$ has degree $k\ge 2$. Without loss of generality we may assume that $f$ has integer coefficients. Let $p$ be a prime that is not a factor of the leading coefficient, and assume there is an $x$ such that $f(x)=1/p$. Let us say that $x=m/n$ in lowest terms. Then $$f(x)=\frac{a_km^k+a_{k-1}m^{k-1}n+\cdots+a_0n^k}{n^k}$$ For this to equal $1/p$, clearly $p$ must divide $n^k$ and thus also $n$ itself. But then actually $p^k$ divides the denominator, so $p^{k-1}$ must divide the numerator. All terms except the first are multiples of $p$, so $p$ must also divide $a_km^k$. However neither $a_k$ nor $m^k$ is divisible by $p$, and since $p$ was prime this is a contradiction. Thus $1/p \not\in f(\mathbb Q)$.

-
I think you meant $p^k$ divides the denominator, so $p^{k-1}$ must divide the numerator. =) – Patrick Da Silva Oct 28 '11 at 22:58
I was trying to do something like this but it was getting quite nasty. Good job brother! – Patrick Da Silva Oct 28 '11 at 22:59
Whoops, fixed. Thanks. – Henning Makholm Oct 28 '11 at 23:31
@Henning Makholm Thank you very much for the clear solution. – dawid Oct 28 '11 at 23:45
@André Nicolas I also thought to use the Rational Roots Theorem but unfortunately quickly gave up this idea, Thanks. – dawid Oct 28 '11 at 23:50

Presumably the solution below is not the intended one. Perhaps you can translate the idea into one more algebraic in spirit.

Suppose that $f$ has degree $\ge 2$. Without loss of generality we may assume that $f$ has positive lead coefficient, and integer coefficients. Note that $f$ must have odd degree, else $f$ misses all large enough negative rationals.

Suppose that the lead coefficient of $f$ is $a$, and the constant term is $c$. Finally, let $p$ be a very large prime.

We look at the equation $f(x)=p+c$, and show that it has no rational roots, meaning that $f(\mathbb{Q})$ misses $p+c$. By the Rational Roots Theorem, any such root has to be of the form $\pm 1/d$ or $\pm p/d$, where $d$ is a divisor of $a$. The negative possibilities can be discarded, as can $1/d$ (too small), so any rational solution has to be $\ge p/a$. This is impossible, for when $p$ is huge, $f(p/a)$ is much larger than $p$ if $f$ has degree $\ge 2$.

-