Thursday, October 27, 2016

Niven's proof of the irrationality of Pi (Edited)

There is a beautiful short proof of $\pi$'s irrationality due to Ivan Niven, which I'd like to present here. In some sense, one could just read Niven's short one page paper, but I'd like to go over it anyway, if only to assure myself that there are no hidden details! I have presented this proof to a couple of my undergraduate classes, and I am editing this post to try to address some of the points where students tended to get confused.

As with most proofs of irrationality, we assume toward a contradiction that $\pi=a/b$ for some positive integers $a,b$. In other words, we suppose that $\pi=a/b$ and get a contradiction, i.e. a false statement. Since we get a false statement, it means that our initial assumption has to have been incorrect, and so $\pi$ cannot possibly equal $a/b$ for any $a,b$ integers.

Our strategy will be to use $a,b$ to construct a "magic" function, one so magical that it can't possibly exist! Our function will have the following two properties:
  1. $\int_0^\pi f(x)\sin x\,dx$ is a positive integer.
  2. $0<\int_0^\pi f(x)\sin x\,dx<1$
This is of course impossible, and is the desired contradiction. 

Now define the magic function to be of the form $$f(x)=\frac{x^n(a-bx)^n}{n!}$$
where $n$ is a positive integer which we will now determine. Let us look at $f(x)$ on the interval $[0,\pi]$. The biggest $x^n$ can be is $\pi^n$, whereas the biggest $(a-bx)^n$ can be is $a^n$ (when $x=0$). So $f(x)\leq \frac{\pi^na^n}{n!}$. This is a crude upper bound, it is not the exact maximum, but that's okay. Also, $f(x)>0$ when $0<x<\pi=a/b$ since one can easily see that $(a-bx)>0$ for $x<\pi$. So we have
$$ 0<\int_0^\pi f(x)\sin x\,dx \leq \frac{\pi^na^n}{n!}\cdot \pi,$$
because the integrand is bounded by $\frac{\pi^na^n}{n!}$ and the length of the interval is $\pi$. It is a calculus exercise to show that $\lim_{n\to\infty} \pi\frac{\pi^na^n}{n!}=0$. One way to solve this exercise is to note that this limit is equal to $\pi\lim_{n\to\infty} \frac{c^n}{n!}$ for $c=\pi a$, and $\sum_{n=0}^\infty \frac{c^n}{n!} =e^c$ is a power series which converges everywhere. So in particular $\lim_{n\to\infty} \frac{c^n}{n!}=0$. So now that we know the limit is $0$, we may pick a large $n$ so that $\int_0^\pi f(x)\sin x\,dx<1$ since the integral is bounded by a sequence tending to $0$. This establishes the second property we want for our "magic" function $f$.

To establish the first property, we use integration by parts to calculate  $\int_0^\pi f(x)\sin x\,dx$.
$$\begin{align*}
 \int f(x) \sin x\,dx&= -f(x)\cos x+\int f'(x)\cos x\,dx\\
&=-f(x)\cos x+f'(x)\sin x -\int f''(x)\sin x\,dx\\
&=-f(x)\cos x+f'(x)\sin x + f''(x)\cos x -\int f'''(x)\cos x\,dx\\
&\vdots\\
&=-f(x)\cos x+f'(x)\sin x + f''(x)\cos x-f''(x)\sin x+\cdots \pm f^{(2n)}(x)\cos x
\end{align*}
 $$
The reason this eventually terminates is that $f(x)$ is a polynomial of degree $2n$. So $f^{(2n+1)}(x)=0$.  We now have an antiderivative for $f(x)\sin x$, which we can use to calculate $\int_0^\pi f(x)\sin x\,dx$  by plugging in $\pi$ and subtracting off the value at $0$. Notice that all the $\sin$ terms disappear since $\sin(0)=\sin(\pi)=1$. We get
$\begin{multline*} \int_0^\pi f(x)\sin x\,dx= f(\pi)-f^{(2)}(\pi)+f^{(4)}(\pi)-\cdots\pm f^{(2n)}(\pi)\\
 +f(0)-f^{(2)}(0)+\cdots \mp f^{(2n)}(0)
\end{multline*}
$

Hence, in order to show $\int_0^\pi f(x)\sin x\,dx$ is an integer, it will suffice to show that all derivatives of $f$ evaluated at $\pi$ and $0$ are integers. In fact, it is not difficult to check that $f(\pi-x)=f(x)$ using that $\pi=a/b$ by direct algebraic computation. Taking the derivative of both sides, using the chain rule, we get:
$$\begin{align*}
f(\pi-x)&=f(x)\\
-f'(\pi-x)&=f'(x)\\
f''(\pi-x)&=f''(x)\\
&\vdots\\
(-1)^kf^{(k)}(\pi-x)&=f^{(k)}(x)
\end{align*}$$
Plugging in $x=\pi$, we get $(-1)^k f^{(k)}(0)=f^{(k)}(\pi)$. So if we can show that $f^{(k)}(0)$ are integers, then it will automatically follow that $f^{(k)}(\pi)$ are integers, since they differ only by a sign.

So, now our proof will finally be done if we can show that $f^{(k)}(0)$ are integers. There is a nice trick for computing $f^{(k)}(0)$ for polynomials $f(x)$. Taylor's theorem says the coefficient of $x^k$ is $f^{(k)}(0)/k!$, or to put it another way $$f^{(k)}(0)=k! \times \text{ coefficient of }x^k.\,\,(\dagger)$$
We can compute the coefficients of powers of $x$ in $f(x)$ using the binomial theorem. First of all, because we are multiplying by $x^n$, the powers of $x$ in $f(x)$ range from $x^n$ to $x^{2n}$. So $f^{(k)}(x)=0$ for all $k<2n$.  Now, for $0\leq d\leq n$, the term involving $x^d$ in $(a-bx)^n$ is given by $\binom{n}{d}(-bx)^da^{n-d}=\binom{n}{d}(-b)^da^{n-d} x^d$. So the coefficient of $x^{n+d}$ in $\frac{1}{n!} x^n(a-bx)^n$ is given by
$\frac{1}{n!}\binom{n}{d}(-b)^da^{n-d}$. So, by the above formula $(\dagger)$ for calculating derivatives, we have
$$f^{(n+d)}(0)=\frac{(n+d)!}{n!}\binom{n}{d}(-b)^da^{n-d}.$$
This is an integer because $\frac{(n+d)!}{n!}=\frac{(n+d)(n+d-1)\cdots (n+1)n(n-1)\cdots 1}{n(n-1)\cdots1}=(n+d)(n+d-1)\cdots (n+1)$ is an integer. 

So in summary, the polynomial $f(x)$ only has nonzero derivatives $f^{(k)}(0)$ for $n\leq k\leq 2n$ and these derivatives have the explicit form given in the above formula, establishing that they are integers.

 It would be interesting to figure out exactly what was needed about $\pi$ to make this argument work. Can it be modified to show other numbers are irrational?

Edit: Matt Baker's Blog has a discussion on how to generalize this in a motivated way.  



4 comments: