\(% Differentiation % https://tex.stackexchange.com/a/60546/ \newcommand{\Diff}{\mathop{}\!\mathrm{d}} \newcommand{\DiffFrac}[2]{\frac{\Diff #1}{\Diff #2}} \newcommand{\DiffOp}[1]{\frac{\Diff}{\Diff #1}} \newcommand{\Ndiff}[1]{\mathop{}\!\mathrm{d}^{#1}} \newcommand{\NdiffFrac}[3]{\frac{\Ndiff{#1} #2}{\Diff {#3}^{#1}}} \newcommand{\NdiffOp}[2]{\frac{\Ndiff{#1}}{\Diff {#2}^{#1}}} % Evaluation \newcommand{\LEvalAt}[2]{\left.#1\right\vert_{#2}} \newcommand{\SqEvalAt}[2]{\left[#1\right]_{#2}} % Epsilon & Phi \renewcommand{\epsilon}{\varepsilon} \renewcommand{\phi}{\varphi} % Sets \newcommand{\NN}{\mathbb{N}} \newcommand{\ZZ}{\mathbb{Z}} \newcommand{\QQ}{\mathbb{Q}} \newcommand{\RR}{\mathbb{R}} \newcommand{\CC}{\mathbb{C}} \newcommand{\PP}{\mathbb{P}} \renewcommand{\emptyset}{\varnothing} % Probabililty \DeclareMathOperator{\Cov}{Cov} \DeclareMathOperator{\Corr}{Corr} \DeclareMathOperator{\Var}{Var} \DeclareMathOperator{\Expt}{E} \DeclareMathOperator{\Prob}{P} % Distribution \DeclareMathOperator{\Binomial}{B} \DeclareMathOperator{\Poisson}{Po} \DeclareMathOperator{\Normal}{N} \DeclareMathOperator{\Exponential}{Exp} \DeclareMathOperator{\Geometric}{Geo} \DeclareMathOperator{\Uniform}{U} % Complex Numbers \DeclareMathOperator{\im}{Im} \DeclareMathOperator{\re}{Re} % Missing Trigonometric & Hyperbolic functions \DeclareMathOperator{\arccot}{arccot} \DeclareMathOperator{\arcsec}{arcsec} \DeclareMathOperator{\arccsc}{arccsc} \DeclareMathOperator{\sech}{sech} \DeclareMathOperator{\csch}{csch} \DeclareMathOperator{\arsinh}{arsinh} \DeclareMathOperator{\arcosh}{arcosh} \DeclareMathOperator{\artanh}{artanh} \DeclareMathOperator{\arcoth}{arcoth} \DeclareMathOperator{\arsech}{arsech} \DeclareMathOperator{\arcsch}{arcsch} % UK Notation \DeclareMathOperator{\cosec}{cosec} \DeclareMathOperator{\arccosec}{arccosec} \DeclareMathOperator{\cosech}{cosech} \DeclareMathOperator{\arcosech}{arcosech} % Paired Delimiters \DeclarePairedDelimiter{\ceil}{\lceil}{\rceil} \DeclarePairedDelimiter{\floor}{\lfloor}{\rfloor} \DeclarePairedDelimiter{\abs}{\lvert}{\rvert} \DeclarePairedDelimiter{\ang}{\langle}{\rangle} % Vectors \newcommand{\vect}[1]{\mathbf{#1}} \newcommand{\bvect}[1]{\overrightarrow{#1}} % https://tex.stackexchange.com/a/28213 % \DeclareMathSymbol{\ii}{\mathalpha}{letters}{"10} % \DeclareMathSymbol{\jj}{\mathalpha}{letters}{"11} % \newcommand{\ihat}{\vect{\hat{\ii}}} % \newcommand{\jhat}{\vect{\hat{\jj}}} \newcommand{\ihat}{\textbf{\^{ı}}} \newcommand{\jhat}{\textbf{\^{ȷ}}} \newcommand{\khat}{\vect{\hat{k}}} % Other Functions \DeclareMathOperator{\sgn}{sgn} \DeclareMathOperator{\tr}{tr} % Other Math Symbols \DeclareMathOperator{\modulo}{mod} \newcommand{\divides}{\mid} \newcommand{\notdivides}{\nmid} \newcommand{\LHS}{\text{LHS}} \newcommand{\RHS}{\text{RHS}} \newcommand{\degree}{^{\circ}}\)
By definition, \[ f(x) = \sum _{k = 0}^{n} a_k x^k \] where \(a_n = 1\).
Hence, \begin {align*} q^{n - 1} f\left (\frac {p}{q}\right ) & = q^{n - 1} \sum _{k = 0}^{n} a_k \left (\frac {p}{q}\right )^k \\ & = q^{n - 1} \sum _{k = 0}^{n} a_k p^k q^{-k} \\ & = \sum _{k = 0}^{n} a_k p^k q^{n - k - 1}. \end {align*}
For the terms with \(k = 0, 1, 2, \ldots , n - 1\), we have \(n - k - 1 \geq 0\) and hence the terms \(a_k p^k q^{n - k - 1}\) is an integer, and hence the sum from \(k = 0\) to \(k = n - 1\) is an integer as well.
If \(\frac {p}{q}\) is a rational root of \(f\), \(f\left (\frac {p}{q}\right ) = 0\), and since all the rest of the terms are integers, the term where \(k = n\) must be an integer as well. When \(k = n\), \[ a_k p^k q^{n - k - 1} = a_n p^n q^{-1} = \frac {p^n}{q} \] must be an integer. But since \(p\) and \(q\) are co-prime, this can be an integer if and only if \(q = 1\).
Therefore, \(\frac {p}{q} = p\) is an integer as well, and any rational root to \(f(x) = 0\) must be an integer.
Consider the polynomial \(f(x) = x^n - 2\). The \(n\)th root of \(2\) must satisfy \(1 < \sqrt [n]{2} < 2\), for \(n \geq 2\). This is because \(1^n = 1 < 2\) and \(2^n = 2 \cdot 2^{n - 1} > 2 1 = 2\).
The \(n\)th root of \(2\) is a root to \(f\). If it is rational, then it must be integer. But \(1 < \sqrt [n]{2} < 2\) and so the \(n\)th root of \(2\) cannot be an integer. Therefore, it must be irrational.
Consider the polynomial \(f(x) = x^3 - x + 1\). If the roots to this polynomial are rational, then they must be integer.
Under modulo \(2\), \(x^3 \equiv x\) since \(1^3 \equiv 1\) and \(0^3 \equiv 0\). Hence, \(f(x) \equiv x^3 - x + 1 \equiv 0 + 1 \equiv 1\) modulo \(2\). This means there is no integer root to \(f(x) = 0\) since the right-hand side is congruent to \(0\) modulo \(2\), and hence there are no rational roots.
Consider the polynomial \(f(x) = x^n - 5x + 7\). If the roots to this polynomial are rational, then they must be integer.
For \(n \geq 2\), under modulo \(2\), \(x^n \equiv 5x\) since \(1^n \equiv 1 \equiv 5 \equiv 5 \cdot 1\) and \(0^n \equiv 0 \equiv 5 \cdot 0\). Hence, \(f(x) \equiv x^n - 5x + 7 \equiv 0 + 7 \equiv 1\) modulo \(2\). This means there is no integer root to \(f(x) = 0\) since the right-hand side is congruent to \(0\) modulo 2, and hence there are no rational roots.