TITLE: Monic $f(x)\in\Bbb Z[x]$ has no rational root if $f(0)\ \&\ f(1)$ odd [Parity Root Test, Modular Root Test]
QUESTION [5 upvotes]: A polynomial problem from my old algebra textbook:

$f(x)\in\Bbb Z[x]$ with leading coefficient $1$, $\deg f(x)\ge 1$, and both $f(0)$ and $f(1)$ are odd numbers, prove:
  $f(x)$ has no root within $\Bbb Q$

Eisenstein's criterion seems to be of little help here because we know virtually nothing about the coefficients. So I tried some other approach.
Let
$$f(x)=a_0+a_1x+a_2x^2+\cdots+a_{n-1}x^{n-1}+x^n\in \Bbb{Z}[x]$$
What we have known so far is
$$f(0)=a_0\text{ is an odd number}$$
and
$$f(1)=a_0+a_1+a_2+\cdots+a_{n-1}+1 \text{ is an odd number}$$
from which we can also conclude that
$$f(1)-f(0)=a_1+a_2+\cdots+a_{n-1}+1\text{ is an even number}$$
To be honest I don't know how to proceed now. It isn't until just now that I realized "irreduicible" is not equivalent to "has no roots".. So all my previous attempt is fundamentally wrong..
Can anybody help or drop a hint? Best regards!

REPLY [6 votes]: Suppose that $f$ has a rational root $r$, then $r$ must be an integer by rational root theorem. Now observe that we have
$$
r-0|f(r)-f(0)=-f(0)\implies r\text{ is odd}
$$
And also
$$
r-1|f(r)-f(1)=-f(1)\implies r\text{ is even}
$$
Which contradicts...