Notes on Niven's proof that π is irrational
Fri 03 May 2024 — download

π is a fascinating number, with a lot of cool properties. This is why I'm still salty from when my university math teacher declared, after showing us the classical "$$\sqrt{2}$$ is irrational", that the same goes for $$\pi$$ but that since the proof was more involved, we won't waste time on it. It's indeed a tad more involved, but nothing insurmountable.

Something like 10 years later, I finally spent the time to read a proof of it, namely Ivan Niven's A simple proof that pi is irrational article from November 1946. This article is a cleaned up version of my personal notes, making it a bit more hand-holding than the original article.

Irrational numbers are number that can't be written as a ratio of two integers. The way we're going to prove it here is by doing a proof by contradiction: we''ll assume that $$\pi=\frac{a}{b}$$ is true, do some calculations based on this assumption, and end up with something impossible, meaning that our assumption was wrong.

We start by defining a function: $$f(x) = \frac{x^n(a - bx)^n}{n!}$$, and warm up by proving that $$f(x) = f(\pi -x)$$:

%% \begin{equation} \begin{split} f(\pi - x) &= f(\frac{a}{b} - x) \\ &= \frac{(\frac{a}{b} - x)^n(a - b(\frac{a}{b} - x))^n}{n!} \\ &= \frac{(\frac{a}{b} - x)^n(a - (a - bx))^n}{n!} \\ &= \frac{(\frac{a}{b} - x)^n(bx)^n}{n!} \\ &= \frac{(\frac{1}{b})^n(a-bx)^n(bx)^n}{n!} \\ &= \frac{x^n(a - bx)^n}{n!} \\ &= f(x) \end{split} \end{equation} %%

With this out of the way, let's use the binomial theorem to transform $$(a - bc)^n$$ into $$\sum_{k=0}^{n}\binom{n}{k}a^{n-k}(-bx)^k$$ and move it back in $$f(x)$$ to see if we can simplify things a bit:

%% \begin{split} f(x) &= \frac{x^n(a - bx)^n}{n!} \\ &= \frac{x^n(\sum_{k=0}^{n}\binom{n}{k}a^{n-k}(-bx)^k)}{n!} \\ &= \frac{1}{n!}\sum_{k=0}^{n}\binom{n}{k}a^{n-k}(-bx)^kx^n \\ &= \frac{1}{n!}\sum_{k=0}^{n}\binom{n}{k}a^{n-k}(-b)^kx^{n+k} \\ \end{split} %%

Since we're mostly interested about $$x$$, let's simplify this further by rewriting $$j=k+n$$:

%% \begin{split} f(x) &= \frac{1}{n!}\sum_{k=0}^{n}\binom{n}{k}a^{n-k}(-b)^{k}x^{n+k} \\ &= \frac{1}{n!}\sum_{j=n}^{2n}\binom{n}{j-n}a^{2n-j}(-b)^{j-n}x^{j} \\ \end{split} %%

Way better, we can now clearly see that the coefficients of $$x^0$$, $$x^1$$, …, $$x^{n−1}$$ are all zero, and that the degree of $$f$$ is at most $$2n$$, meaning that, with $$f^{(j)}$$ being the $$j$$th derivative of $$f$$:

%% \begin{equation} f^{(j)}(0) = \begin{cases} 0 &\text{if } j < n \\ 0 &\text{if } j > 2n \end{cases} \end{equation} %%

But what if $$n ≤ j ≤ 2n$$?

%% \begin{equation*} \begin{split} f^{(j)}(0) &= (\frac{1}{n!}\sum_{j=n}^{2n}\binom{n}{j-n}a^{2n-j}(-b)^{j-n}x^{j})^{(j)} \\ &= \frac{j!}{n!}{\binom{n}{j-n}}a^{2n-j}(-b)^{j-n} \\ \end{split} \end{equation*} %%

Since:

%% \begin{rcases} n≤j \implies \frac{j!}{n!} \in \N^*\\ \binom{n}{j-n} \in \N^*\\ a, b \in |, j≤2n \implies a^{2n-j} \in \N^*\\ a, b \in \Z, n≤j \implies -b^{j-n} \in \Z\\ \end{rcases} \implies \forall (n≤j≤2n), f^{(j)}(0), f^{(j)}(\pi) \in \Z %%

Thus from $$\eqref{1}$$ and $$\eqref{2}$$:

%% \boxed{f^{(j)}(0), f^{(j)}(\pi) \in \Z} \label{3}\tag{3} %%

Let's build another function based on $$f(x)$$: $$F(x)$$, the alternating sum of $$f$$ and its first $$n$$ even derivatives.

%% F(x) = \sum_{j=0}^{n}(-1)^jf^{(2j)}(x) = f(x) - f^{(2)}(x) + f^{(4)}(x) - ... + (-1)^jf^{(2j)}(x) + ... + (-1)^nf^{(2n)}(x) %%

From $$\eqref{3}$$, we can deduce that $$F(0), F(\pi) \in \Z$$, and thus

%% \boxed{F(0) + F(\pi) \in \Z} \label{4}\tag{4} %%

We can also remark that:

%% \begin{equation*} \begin{split} F''(x) &= \sum_{j=0}^{n}(-1)^jf^{(2j+2)}(x) \\ &= f^{(2)}(x) - f^{(4)}(x) + f^{(6)}(x) - ... + (-1)^jf^{(2j+2)}(x) + ... + (-1)^nf^{(2n+2)}(x) \\ &= f(x) - (f(x) - f^{(2)}(x) + f^{(4)}(x) - ... + (-1)^jf^{(2j)}(x) + ... + (-1)^nf^{(2n)}(x)) \\ &= f(x) - F(x) \\ \end{split} \end{equation*} %%

Time to introduce our last equation: $$\frac{d}{dx}\{F'(x)sin(x) - F(x)cos(x)\}$$, and try to express it in terms of $$f(x)$$, using the Leibniz rule:

%% \begin{equation*} \begin{split} \frac{d}{dx}\{F'(x)sin(x) - F(x)cos(x)\} &= F''(x)sin(x) + F'(x)cos(x) - (F'(x)cos(x) - F(x)sin(x)) \\ &= F''(x)sin(x) + F(x)sin(x) \\ & = (F''(x) - F(x)) sin(x) \\ & = f(x)sin(x) \\ \end{split} \end{equation*} %%

By integrating this result, we get an interesting equality:

%% \begin{equation*} \begin{split} \int^{\pi}_{0}f(x)sin(x)dx &= [F'(x)sin(x) - F(x)cos(x)]_0^\pi \\ &= F'(\pi)sin(\pi) - F(\pi)cos(\pi) - (F'(0)sin(0) - F(0)cos(0)) \\ &= F'(\pi)sin(\pi) - F(\pi)cos(\pi) - F'(0)sin(0) + F(0)cos(0) \\ &= F(\pi) + F(0) \\ \end{split} \end{equation*} %%

Meaning that from $$\eqref{4}$$:

%% \boxed{\int^{\pi}_{0}f(x)sin(x)dx \in \Z} \label{5}\tag{5} %%

With $$0 < x < \pi$$, both $$f(x)$$ and $$sin(x)$$ are positive, giving:

%% \boxed{0 < x < \pi, 0 < f(x)sin(x)} \label{6}\tag{6} %%

from $$\eqref{5}$$ and $$\eqref{6}$$, we can deduce:

%% \boxed{0 < x < \pi, 1 ≤ \int^{\pi}_{0}f(x)sin(x)dx} \label{7}\tag{7} %%

Still with $$0 < x < \pi$$, we can rewrite $$\eqref{6}$$ as:

%% \begin{equation*} \begin{split} f(x)sin(x) &= \frac{x^n(a - bx)^n}{n!}sin(x) \\ &≤ \frac{x^n(a - bx)^n}{n!} \\ &≤ \frac{x^na^n}{n!} \\ \end{split} \end{equation*} %%

therefore, from the inequality properties of integrals:

%% \begin{equation*} \begin{split} \int^{\pi}_{0}f(x)sin(x)dx &≤ \int^{\pi}_{0} \frac{x^{n}a^{n}}{n!} \\ &≤ \frac{\pi^{n+1}a^n}{n!} \end{split} \end{equation*} %%

we can summarize this and $$\eqref{7}$$ as:

%% \boxed{ 0 < x < \pi, 1 ≤ \int^{\pi}_{0} f(x) sin(x) dx ≤ \frac{\pi^{n+1}a^n}{n!} } \label{8}\tag{8} %%

But now we have a problem: because we can make $$n$$ as big as we want, making $$\frac{\pi^{n+1}a^n}{n!} < 1$$, which is a direct contradiction with $$\eqref{8}$$. Thus our initial supposition, $$\pi = \frac{a}{b}$$ is wrong, meaning that $$\pi$$ can't be a rational ∎.