Skip to main content
Mathematics LibreTexts

3.7: Optional — Rational and irrational numbers

  • Page ID
    91730
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    \( \newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\)

    ( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\)

    \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

    \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\)

    \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)

    \( \newcommand{\Span}{\mathrm{span}}\)

    \( \newcommand{\id}{\mathrm{id}}\)

    \( \newcommand{\Span}{\mathrm{span}}\)

    \( \newcommand{\kernel}{\mathrm{null}\,}\)

    \( \newcommand{\range}{\mathrm{range}\,}\)

    \( \newcommand{\RealPart}{\mathrm{Re}}\)

    \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

    \( \newcommand{\Argument}{\mathrm{Arg}}\)

    \( \newcommand{\norm}[1]{\| #1 \|}\)

    \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)

    \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    \( \newcommand{\vectorA}[1]{\vec{#1}}      % arrow\)

    \( \newcommand{\vectorAt}[1]{\vec{\text{#1}}}      % arrow\)

    \( \newcommand{\vectorB}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vectorC}[1]{\textbf{#1}} \)

    \( \newcommand{\vectorD}[1]{\overrightarrow{#1}} \)

    \( \newcommand{\vectorDt}[1]{\overrightarrow{\text{#1}}} \)

    \( \newcommand{\vectE}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash{\mathbf {#1}}}} \)

    \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    In this optional section we shall use series techniques to look a little at rationality and irrationality of real numbers. We shall see the following results.

    • A real number is rational (i.e. a ratio of two integers) if and only if its decimal expansion is eventually periodic. “Eventually periodic” means that, if we denote the \(n^{\rm th}\) decimal place by \(d_n\text{,}\) then there are two positive integers \(k\) and \(p\) such that \(d_{n+p}=d_n\) whenever \(n \gt k\text{.}\) So the part of the decimal expansion after the decimal point looks like

      \begin{gather*} .\underbrace{a_1 a_2 a_3 \cdots a_k} \underbrace{b_1 b_2\cdots b_p} \underbrace{b_1 b_2\cdots b_p} \underbrace{b_1 b_2\cdots b_p} \cdots \end{gather*}

      It is possible that a finite number of decimal places right after the decimal point do not participate in the periodicity. It is also possible that \(p=1\) and \(b_1=0\text{,}\) so that the decimal expansion ends with an infinite string of zeros.
    • \(e\) is irrational.
    • \(\pi\) is irrational.

    Decimal expansions of rational numbers

    We start by showing that a real number is rational if and only if its decimal expansion is eventually periodic. We need only consider the expansions of numbers \(0 \lt x \lt 1\text{.}\) If a number is negative then we can just multiply it by \(-1\) and not change the expansion. Similarly if the number is larger than \(1\) then we can just subtract off the integer part of the number and leave the expansion unchanged.

    Eventually periodic implies rational

    Let us assume that a number \(0 \lt x \lt 1\) has a decimal expansion that is eventually periodic. Hence we can write

    \begin{align*} x &= 0.\underbrace{a_1 a_2 a_3 \cdots a_k} \underbrace{b_1 b_2\cdots b_p} \underbrace{b_1 b_2\cdots b_p} \underbrace{b_1 b_2\cdots b_p} \cdots \end{align*}

    Let \(\alpha = a_1 a_2 a_3\cdots a_k\) and \(\beta = b_1 b_2\cdots b_p\text{.}\) In particular, \(\alpha\) has at most \(k\) digits and \(\beta\) has at most \(p\) digits. Then we can (carefully) write

    \[\begin{align*} x &= \frac{\alpha}{10^k} + \frac{\beta}{10^{k+p}} + \frac{\beta}{10^{k+2p}} + \frac{\beta}{10^{k+3p}} + \cdots\\ &= \frac{\alpha}{10^k} + \frac{\beta}{10^{k+p}} \sum_{j=0}^\infty 10^{-p}\\ \end{align*}\]

    This sum is just a geometric series (see Lemma 3.2.5) and we can evaluate it

    \begin{align*} &= \frac{\alpha}{10^k} + \frac{\beta}{10^{k+p}} \cdot \frac{1}{1-10^{-p}} = \frac{\alpha}{10^k} + \frac{\beta}{10^k} \cdot \frac{1}{10^p-1}\\ &= \frac{1}{10^k} \left( \alpha + \frac{\beta}{10^p-1} \right) =\frac{\alpha(10^p-1)+\beta}{10^k(10^p-1)} \end{align*}

    This is a ratio of integers, so \(x\) is a rational number.

    Rational implies eventually periodic

    Let \(0 \lt x \lt 1\) be rational with \(x=\frac{a}{b}\text{,}\) where \(a\) and \(b\) are positive integers. We wish to show that \(x\)'s decimal expansion is eventually periodic. Start by looking at the last formula we derived in the “eventually periodic implies rational” subsection. If we can express the denominator \(b\) in the form \(\frac{10^k(10^p-1)}{q}\) with \(k\text{,}\) \(p\) and \(q\) integers, we will be in business because \(\frac{a}{b}=\frac{aq}{10^k(10^p-1)}. \) From this we can generate the desired decimal expansion by running the argument of the last subsection backwards. So we want to find integers \(k\text{,}\) \(p\text{,}\) \(q\) such that \(10^{k+p} -10^k = b\cdot q\text{.}\) To do so consider the powers of \(10\) up to \(10^b\text{:}\)

    \begin{gather*} 1, 10^1, 10^2, 10^3, \cdots , 10^b \end{gather*}

    For each \(j=0,1,2,\cdots,b\text{,}\) find integers \(c_j\) and \(0\leq r_j \lt b\) so that

    \begin{gather*} 10^j = b \cdot c_j + r_j \end{gather*}

    To do so, start with \(10^j\) and repeatedly subtract \(b\) from it until the remainder drops strictly below \(b\text{.}\) The \(r_j\)'s can take at most \(b\) different values, namely \(0\text{,}\) \(1\text{,}\) \(2\text{,}\) \(\cdots\text{,}\) \(b-1\text{,}\) and we now have \(b+1\) \(r_j\)'s, namely \(r_0\text{,}\) \(r_1\text{,}\) \(\cdots\text{,}\) \(r_b\text{.}\) So we must be able to find two powers of 10 which give the same remainder 1. That is there must be \(0 \leq k \lt l \leq b\) so that \(r_k = r_l\text{.}\) Hence

    \begin{align*} 10^l - 10^k &= (bc_l +r_l) - (bc_k + r_k)\\ &= b (c_l-c_k) & \text{since $r_k=r_l$.} \end{align*}

    and we have

    \begin{align*} b &= \frac{10^k(10^p-1)}{q} \end{align*}

    where \(p=l-k\) and \(q=c_l-c_k\) are both strictly positive integers, since \(l \gt k\) so that \(10^l-10^k \gt 0\text{.}\) Thus we can write

    \begin{align*} \frac{a}{b} &= \frac{aq}{10^k (10^p-1)} \end{align*}

    Next divide the numerator \(aq\) by \(10^p-1\) and compute the remainder. That is, write \(aq =\alpha (10^p-1) + \beta\) with \(0\leq \beta \lt 10^p-1\text{.}\) Notice that \(0\leq \alpha \lt 10^k\text{,}\) as otherwise \(x=\frac{a}{b} \geq 1\text{.}\) That is, \(\alpha\) has at most \(k\) digits and \(\beta\) has at most \(p\) digits. This, finally, gives us

    \begin{align*} x &= \frac{a}{b} = \frac{\alpha(10^p-1) + \beta}{10^k (10^p-1)}\\ &= \frac{\alpha}{10^k} + \frac{\beta}{10^k(10^p-1)}\\ &= \frac{\alpha}{10^k} + \frac{\beta}{10^{k+p}(1-10^{-p})}\\ &= \frac{\alpha}{10^k} + \frac{\beta}{10^{k+p}}\sum_{j=0}^\infty 10^{-pj} \end{align*}

    which gives the required eventually periodic expansion.

    Irrationality of \(e\)

    We will give 2 proofs that the number \(e\) is irrational, the first due to Fourier (1768–1830) and the second due to Pennisi (1918–2010). Both are proofs by contradiction 2 — we first assume that \(e\) is rational and then show that this implies a contradiction. In both cases we reach the contradiction by showing that a given quantity (related to the series expression for \(e\)) must be both a positive integer and also strictly less than 1.

    Proof 1

    This proof is due to Fourier. Let us assume that the number \(e\) is rational so we can write it as

    \begin{align*} e &= \dfrac{a}{b} \end{align*}

    where \(a,b\) are positive integers. Using the Maclaurin series for \(e^x\) we have

    \begin{align*} \frac{a}{b} &= e^1 = \sum_{n=0}^\infty \frac{1}{n!} \end{align*}

    Now multiply both sides by \(b!\) to get

    \begin{align*} a \frac{b!}{b} &= \sum_{n=0}^\infty \frac{b!}{n!} \end{align*}

    The left-hand side of this expression is an integer. We complete the proof by showing that the right-hand side cannot be an integer (and hence that we have a contradiction).

    First split the series on the right-hand side into two piece as follows

    \begin{align*} \sum_{n=0}^\infty \frac{b!}{n!} &= \underbrace{\sum_{n=0}^b \frac{b!}{n!}}_{=A} + \underbrace{\sum_{n=b+1}^\infty \frac{b!}{n!}}_{=B} \end{align*}

    The first sum, \(A\text{,}\) is finite sum of integers:

    \begin{align*} A &= \sum_{n=0}^b \frac{b!}{n!} = \sum_{n=0}^b (n+1)(n+2)\cdots(b-1)b. \end{align*}

    Consequently \(A\) must be an integer. Notice that we simplified the ratio of factorials using the fact that when \(b\geq n\) we have

    \begin{align*} \frac{b!}{n!} &= \frac{1 \cdot 2 \cdots n (n+1)(n+2) \cdots (b-1) b}{1 \cdot 2 \cdots n} = (n+1) (n+2)\cdots (b-1) b. \end{align*}

    Now we turn to the second sum. Since it is a sum of strictly positive terms we must have

    \begin{align*} B & \gt 0 \end{align*}

    We complete the proof by showing that \(B \lt 1\text{.}\) To do this we bound each term from above:

    \begin{align*} \frac{b!}{n!} &= \frac{1}{ \underbrace{(b+1)(b+2)\cdots (n-1)n}_{n-b\ \text{factors}} }\\ & \leq \frac{1}{ \underbrace{(b+1)(b+1)\cdots (b+1)(b+1)}_{n-b\ \text{factors}} } = \frac{1}{(b+1)^{n-b}} \end{align*}

    Indeed the inequality is strict except when \(n=b+1\text{.}\) Hence we have that

    \[\begin{align*} B & \lt \sum_{n=b+1}^\infty \frac{1}{(b+1)^{n-b}}\\ & = \frac{1}{(b+1)} +\frac{1}{(b+1)^2} +\frac{1}{(b+1)^3} +\cdots\\ \end{align*}\]

    This is just a geometric series (see Lemma 3.2.5) and equals

    \begin{align*} &= \frac{1}{(b+1)}\frac{1}{1-\frac{1}{b+1}}\\ &= \frac{1}{b+1-1} = \frac{1}{b} \end{align*}

    And since \(b\) is a positive integer, we have shown that

    \begin{gather*} 0 \lt B \lt 1 \end{gather*}

    and thus \(B\) cannot be an integer.

    Thus we have that

    \begin{align*} \underbrace{a \frac{b!}{b}}_{\text{integer}} &= \underbrace{A}_{\text{integer}} + \underbrace{B}_{\text{not integer}} \end{align*}

    which gives a contradiction. Thus \(e\) cannot be rational.

    Proof 2

    This proof is due to Pennisi (1953). Let us (again) assume that the number \(e\) is rational. Hence it can be written as

    \begin{align*} e &= \dfrac{a}{b}, \end{align*}

    where \(a,b\) are positive integers. This means that we can write

    \begin{align*} e^{-1} &= \dfrac{b}{a}. \end{align*}

    Using the Maclaurin series for \(e^x\) we have

    \begin{align*} \dfrac{b}{a} &= e^{-1} = \sum_{n=0}^\infty \frac{(-1)^n}{n!} \end{align*}

    Before we do anything else, we multiply both sides by \((-1)^{a+1} a!\) — this might seem a little strange at this point, but the reason will become clear as we proceed through the proof. The expression is now

    \begin{align*} (-1)^{a+1} b \dfrac{a!}{a} &= \sum_{n=0}^\infty \frac{(-1)^{n+a+1} a!}{n!} \end{align*}

    The left-hand side of the expression is an integer. We again complete the proof by showing that the right-hand side cannot be an integer.

    We split the series on the right-hand side into two pieces:

    \begin{align*} \sum_{n=0}^\infty \frac{(-1)^{n+a+1} a!}{n!} &= \underbrace{\sum_{n=0}^a \frac{(-1)^{n+a+1} a!}{n!}}_{=A} + \underbrace{\sum_{n=a+1}^\infty \frac{(-1)^{n+a+1} a!}{n!}}_{=B} \end{align*}

    We will show that \(A\) is an integer while \(0 \lt B \lt 1\text{;}\) this gives the required contradiction.

    Every term in the sum \(A\) is an integer. To see this we simplify the ratio of factorials as we did in the previous proof:

    \begin{align*} A &= \sum_{n=0}^a \frac{(-1)^{n+a+1} a!}{n!} = \sum_{n=0}^a (-1)^{n+a+1} (n+1)(n+2)\cdots (a-1) a \end{align*}

    Let us now examine the series \(B\text{.}\) Again clean up the ratio of factorials:

    \begin{align*} B &= \sum_{n=a+1}^\infty \frac{(-1)^{n+a+1} a!}{n!} = \sum_{n=a+1}^\infty \frac{(-1)^{n+a+1} } {(a+1)\cdot (a+2)\cdots (n-1) \cdot n}\\ &= \frac{(-1)^{2a+2}}{a+1} + \frac{(-1)^{2a+3}}{(a+1)(a+2)} + \frac{(-1)^{2a+4}}{(a+1)(a+2)(a+3)} + \cdots\\ &= \frac{1}{a+1} - \frac{1}{(a+1)(a+2)} + \frac{1}{(a+1)(a+2)(a+3)} - \cdots \end{align*}

    Hence \(B\) is an alternating series of decreasing terms and by the alternating series test (Theorem 3.3.14) it converges. Further, it must converge to a number between its first and second partial sums (see the discussion before Theorem 3.3.14). Hence the right-hand side lies between

    \begin{align*} \frac{1}{a+1} && \text{and} && \frac{1}{a+1} - \frac{1}{(a+1)(a+2)} = \frac{1}{a+2} \end{align*}

    Since \(a\) is a positive integer the above tells us that \(B\) converges to a real number strictly greater than \(0\) and strictly less than 1. Hence it cannot be an integer.

    This gives us a contradiction and hence \(e\) cannot be rational.

    Irrationality of \(\pi\)

    This proof is due to Niven (1946) and doesn't require any mathematics beyond the level of this course. Much like the proofs above we will start by assuming that \(\pi\) is rational and then reach a contradiction. Again this contradiction will be that a given quantity must be an integer but at the same time must lie strictly between \(0\) and \(1\text{.}\)

    Assume that \(\pi\) is a rational number and so can be written as \(\pi = \frac{a}{b}\) with \(a,b\) positive integers. Now let \(n\) be a positive integer and define the polynomial

    \begin{align*} f(x) &= \frac{x^n(a-bx)^n}{n!}. \end{align*}

    It is certainly not immediately obvious why and how Niven chose this polynomial, but you will see that it has been very carefully crafted to make the proof work. In particular we will show — under our assumption that \(\pi\) is rational — that, if \(n\) is really big, then

    \begin{gather*} I_n=\int_0^\pi f(x) \sin(x) \, d{x} \end{gather*}

    is an integer and it also lies strictly between \(0\) and \(1\text{,}\) giving the required contradiction.

    Bounding the integral

    Consider again the polynomial

    \begin{align*} f(x) &= \frac{x^n(a-bx)^n}{n!}. \end{align*}

    Notice that

    \begin{align*} f(0) &= 0\\ f(\pi) &= f(a/b) = 0. \end{align*}

    Furthermore, for \(0 \leq x \leq \pi=a/b\text{,}\) we have \(x\le\frac{a}{b}\) and \(a-bx\le a\) so that

    \begin{gather*} 0 \leq x(a-bx) \leq a^2/b. \end{gather*}

    We could work out a more precise 3 upper bound, but this one is sufficient for the analysis that follows. Hence

    \begin{gather*} 0 \leq f(x) \leq \left( \frac{a^2}{b} \right)^n \frac{1}{n!} \end{gather*}

    We also know that for \(0\leq x \leq \pi=a/b\text{,}\) \(0\leq \sin(x) \leq 1\text{.}\) Thus

    \begin{gather*} 0 \leq f(x)\sin(x) \leq \left( \frac{a^2}{b} \right)^n \frac{1}{n!} \end{gather*}

    for all \(0 \leq x \leq 1\text{.}\) Using this inequality we bound

    \begin{gather*} 0 \lt I_n=\int_0^\pi f(x)\sin(x) \, d{x} \lt \left( \frac{a^2}{b} \right)^n \frac{1}{n!}. \end{gather*}

    We will later show that, if \(n\) is really big, then \(\big( \frac{a^2}{b} \big)^n \frac{1}{n!} \lt 1\text{.}\) We'll first show, starting now, that \(I_n\) is an integer.

    Integration by parts

    In order to show that the value of this integral is an integer we will use integration by parts. You have already practiced using integration by parts to integrate quantities like

    \begin{gather*} \int x^2\sin(x)\,\, d{x} \end{gather*}

    and this integral isn't much different. For the moment let us just use the fact that \(f(x)\) is a polynomial of degree \(2n\text{.}\) Using integration by parts with \(u=f(x)\text{,}\) \(\, d{v}=\sin(x)\) and \(v=-\cos(x)\) gives us

    \[\begin{align*} \int f(x) \sin(x) \,\, d{x} &= -f(x)\cos(x) + \int f'(x)\cos(x)\,\, d{x}\\ \end{align*}\]

    Use integration by parts again with \(u=f'(x)\text{,}\) \(\, d{v}=\cos(x)\) and \(v=\sin(x)\text{.}\)

    \begin{align*} &= -f(x)\cos(x) + f'(x)\sin(x) - \int f''(x)\sin(x)\,\, d{x}\\ \end{align*}

    Use integration by parts yet again, with \(u=f''(x)\text{,}\) \(\, d{v}=\sin(x)\) and \(v=-\cos(x)\text{.}\)

    \begin{align*} &= -f(x)\cos(x) + f'(x)\sin(x) + f''(x)\cos(x) - \int f'''(x)\cos(x)\,\, d{x} \end{align*}

    And now we can see the pattern; we get alternating signs, and then derivatives multiplied by sines and cosines:

    \begin{align*} \int f(x) \sin(x) \, d{x} &= \cos(x)\left(-f(x)+f''(x)-f^{(4)}(x)+f^{(6)}(x) - \cdots \right)\\ &\phantom{=} + \sin(x)\left(f'(x)-f'''(x)+f^{(5)}(x)-f^{(7)}(x) + \cdots \right) \end{align*}

    This terminates at the \(2n^\mathrm{th}\) derivative since \(f(x)\) is a polynomial of degree \(2n\text{.}\) We can check this computation by differentiating the terms on the right-hand side:

    \begin{gather*} \frac{d}{dx}\left( \cos(x)\left(-f(x)+f''(x)-f^{(4)}(x)+f^{(6)}(x) - \cdots \right) \right)\\ = -\sin(x)\left(-f(x)+f''(x)-f^{(4)}(x)+f^{(6)}(x) - \cdots \right)\\ + \cos(x)\left(-f'(x)+f'''(x)-f^{(5)}(x)+f^{(7)}(x) - \cdots \right) \end{gather*}

    and similarly

    \begin{gather*} \frac{d}{dx} \left( \sin(x)\left(f'(x)-f'''(x)+f^{(5)}(x)-f^{(7)}(x) + \cdots \right) \right)\\ = \cos(x)\left(f'(x)-f'''(x)+f^{(5)}(x)-f^{(7)}(x) + \cdots \right)\\ + \sin(x) \left(f''(x)-f^{(4)}(x)+f^{(6)}(x) - \cdots \right) \end{gather*}

    When we add these two expressions together all the terms cancel except \(f(x)\sin(x)\text{,}\) as required.

    Now when we take the definite integral from \(0\) to \(\pi\), all the sine terms give \(0\) because \(\sin(0)=\sin(\pi)=0\text{.}\) Since \(\cos(\pi)=-1\) and \(\cos(0)=+1\text{,}\) we are just left with:

    \begin{align*} \int_0^\pi f(x) \sin(x) \, d{x} &= \left( f(0) -f''(0) + f^{(4)}(0) - f^{(6)}(0) + \cdots + (-1)^n f^{(2n)}(0) \right)\\ &\phantom{=} + \left( f(\pi) -f''(\pi) + f^{(4)}(\pi) - f^{(6)}(\pi) + \cdots + (-1)^n f^{(2n)}(\pi) \right) \end{align*}

    So to show that \(I_n\) is an integer, it now suffices to show that \(f^{(j)}(0)\) and \(f^{(j)}(\pi)\) are integers.

    The derivatives are integers

    Recall that

    \begin{align*} f(x) &= \frac{x^n (a-bx)^n}{n!} \end{align*}

    and expand it:

    \begin{align*} f(x) &= \frac{c_0}{n!} x^0 + \frac{c_1}{n!} x^1 + \cdots + \frac{c_n}{n!} x^n + \cdots + \frac{c_{2n}}{n!} x^{2n} \end{align*}

    All the \(c_j\) are integers, and clearly \(c_j=0\) for all \(j=0,1,\cdots,n-1\text{,}\) because of the factor \(x^n\) in \(f(x)\text{.}\)

    Now take the \(k^{th}\) derivative and set \(x=0\text{.}\) Note that, if \(j \lt k\text{,}\) then \(\frac{\, d{}^k\ }{\, d{}x^k}x^j=0\) for all \(x\) and, if \(j \gt k\text{,}\) then \(\frac{\, d{}^k\ }{\, d{}x^k}x^j\) is some number times \(x^{j-k}\) which evaluates to zero when we set \(x=0\text{.}\) So

    \begin{align*} f^{(k)}(0) &= \frac{\, d{}^k\ }{\, d{}x^k}\left(\frac{c_k}{k!}x^k\right) = \frac{k! c_k}{n!} \end{align*}

    If \(k \lt n\text{,}\) then this is zero since \(c_k=0\text{.}\) If \(k \gt n\text{,}\) this is an integer because \(c_k\) is an integer and \(k!/n! = (n+1)(n+2)\cdots(k-1)k\) is an integer. If \(k=n\text{,}\) then \(f^{(k)}(0)=c_n\) is again an integer. Thus all the derivatives of \(f(x)\) evaluated at \(x=0\) are integers.

    But what about the derivatives at \(\pi=a/b\text{?}\) To see this, we can make use of a handy symmetry. Notice that

    \begin{align*} f(x) &= f(\pi-x) = f(a/b - x) \end{align*}

    You can confirm this by just grinding through the algebra:

    \begin{align*} f(x) &= \frac{x^n(a-bx)^n}{n!} & \text{now replace $x$ with $a/b-x$}\\ f(a/b-x) &= \frac{(a/b-x)^n(a-b(a/b-x))^n}{n!} & \text{start cleaning this up:}\\ &= \frac{ \left( \frac{a-bx}{b} \right)^n (a-a+bx)^n }{n!}\\ &= \frac{ \left( \frac{a-bx}{b} \right)^n (bx)^n }{n!}\\ &= \frac{ (a-bx)^n x^n }{n!} = f(x) \end{align*}

    Using this symmetry (and the chain rule) we see that

    \[\begin{align*} f'(x) &= - f'(\pi-x)\\ \end{align*}\]

    and if we keep differentiating

    \begin{align*} f^{(k)}(x) &= (-1)^k f^{(k)}(\pi-x) \end{align*}

    Setting \(x=0\) in this tells us that

    \begin{align*} f^{(k)}(0) &= (-1)^k f^{(k)}(\pi) \end{align*}

    So because all the derivatives at \(x=0\) are integers, we know that all the derivatives at \(x=\pi\) are also integers.

    Hence the integral we are interested in

    \begin{gather*} \int_0^\pi f(x) \sin(x) \, d{x} \end{gather*}

    must be an integer.

    Putting it together

    Based on our assumption that \(\pi =a/b\) is rational, we have shown that the integral

    \begin{align*} I_n &= \int_0^\pi \frac{x^n(a-bx)}{n!} \sin(x) \, d{x} \end{align*}

    satisfies

    \begin{gather*} 0 \lt I_n \lt \left(\frac{a^2}{b} \right)^n\frac{1}{n!} \end{gather*}

    and also that \(I_n\) is an integer.

    We are, however, free to choose \(n\) to be any positive integer we want. If we take \(n\) to be very large — in particular much much larger than \(a\) — then \(n!\) will be much much larger than \(a^{2n}\) (we showed this in Example 3.6.8), and consequently

    \begin{gather*} 0 \lt I_n \lt \left(\frac{a^2}{b} \right)^n\frac{1}{n!} \lt 1 \end{gather*}

    Which means that the integral cannot be an integer. This gives the required contradiction, showing that \(\pi\) is irrational.

     

    1. This is an application of the pigeon hole principle — the very simple but surprisingly useful idea that if you have \(n\) items which you have to put in \(m\) boxes, and if \(n \gt m\text{,}\) then at least one box must contain more than one item.
    2. Proof by contradiction is a standard and very powerful method of proof in mathematics. It relies on the law of the excluded middle which states that any given mathematical statement \(P\) is either true or false. Because of this, if we can show that the statement \(P\) being false implies something contradictory — like \(1=0\) or \(a \gt a\) — then we can conclude that \(P\) must be true. The interested reader can certainly find many examples (and a far more detailed explanation) using their favourite search engine.
    3. You got lots of practice finding the maximum and minimum values of continuous functions on closed intervals when you took calculus last term.

    This page titled 3.7: Optional — Rational and irrational numbers is shared under a CC BY-NC-SA 4.0 license and was authored, remixed, and/or curated by Joel Feldman, Andrew Rechnitzer and Elyse Yeager via source content that was edited to the style and standards of the LibreTexts platform; a detailed edit history is available upon request.

    • Was this article helpful?