IRRATIONALITY OF π AND e
KEITH CONRAD
1. Introduction
Numerical estimates for π have been found in records of several ancient civilizations.
These estimates were all based on inscribing and circumscribing regular polygons around a
circle to get upper and lower bounds on the area (and thus upper and lower bounds on π
after dividing the area by the square of the radius). Such estimates are accurate to a few
decimal places. Around 1600, Ludolph van Ceulen gave an estimate for π to 35 decimal
places. He spent many years of his life on this calculation, using a polygon with 2
62
sides!
With the advent of calculus in the 17-th century, a new approach to the calculation of π
became available: infinite series. For instance, if we integrate
1
1 + t
2
= 1 t
2
+ t
4
t
6
+ t
8
t
10
+ ··· , 1 < t < 1
from t = 0 to t = x when 1 < x < 1, then we find
(1.1) arctan x = x
x
3
3
+
x
5
5
x
7
7
+
x
9
9
x
11
11
+ ··· .
This is also true at x = 1, and since arctan 1 = π/4, we get
(1.2)
π
4
= 1
1
3
+
1
5
1
7
+
1
9
1
11
+ ··· ,
a result found by Leibniz in 1673 [2, pp. 247-248] and over 100 earlier in India [9].
1
Despite
the beauty of (1.2), expressing π in terms of the odd numbers, it converges far too slowly
to be numerically useful. For example, truncating the series at 1000 terms and multiplying
by 4 gives the approximation π 3.1405, which is only good to two decimal places.
There are other formulas for π in terms of arctan values, such as
π
4
= arctan
1
2
+ arctan
1
3
= 2 arctan
1
3
+ arctan
1
7
= 4 arctan
1
5
arctan
1
239
.
Since the series in (1.1) converges more rapidly when x is smaller, these other formulas lead
to good estimates of π. The last such calculation before computers was by Shanks in 1873.
He claimed to get π to 707 places. In the 1940s, the first computer estimate for π showed
Shanks made an error in the 528-th digit, so his further calculations were wrong!
Our interest here is not to ponder ever more elaborate methods of estimating π, but
to prove something about the structure of this number: it is irrational. That is, π is not
1
In 1671, Gregory discovered (1.1), but there is no indication he saw it gives a formula for π at x = 1.
1
2 KEITH CONRAD
a ratio of integers. The idea of the proof is to argue by contradiction. This is also the
principle behind the simpler proof that the number
2 is irrational. However, there is an
essential difference between proofs that
2 is irrational and proofs that π is irrational. One
can prove
2 is irrational using only algebraic manipulations with a hypothetical rational
expression for
2 to reach a contradiction. But all known proofs of the irrationality of π
are based on techniques from calculus, which can be used to prove irrationality of other
numbers, such as e and rational powers of e (aside from e
0
= 1).
The remaining sections are organized as follows. In Section 2, we prove π is irrational
with definite integrals. Irrationality of e is proved by infinite series in Section 3. A general
discussion about irrationality proofs is in Section 4, and we apply those ideas to prove
irrationality of nonzero rational powers of e in Section 5. In Section 6 we introduce complex
numbers into a proof from Section 5 in order to obtain another proof that π is irrational.
2. Irrationality of π
The first proof that π is irrational is due to Lambert [7] in 1761. His proof involves an
analytic device that is not covered in calculus courses: continued fractions. (A discussion of
this work is in [5, pp. 68–78].) The irrationality proof for π we give here is due to Niven [8]
and uses integrals instead of continued fractions.
Theorem 2.1. The number π is irrational.
Proof. For a nice function f (x), a double integration by parts shows
Z
f(x) sin x dx = f(x) cos x + f
0
(x) sin x
Z
f
00
(x) sin x dx.
Therefore (using sin(0) = 0, cos(0) = 1, sin(π) = 0, and cos(π) = 1),
Z
π
0
f(x) sin x dx = (f(0) + f(π))
Z
π
0
f
00
(x) sin x dx.
In particular, if f (x) is a polynomial of even degree, say 2n, then repeating this calculation
n times (or reasoning by induction) gives us
(2.1)
Z
π
0
f(x) sin x dx = F (0) + F (π),
where F (x) = f(x) f
00
(x) + f
(4)
(x) ··· + (1)
n
f
(2n)
(x).
To prove π is irrational, we argue by contradiction. Assume π = p/q for positive integers
p and q (since π > 0). We are going to apply (2.1) to a carefully (and mysteriously!) chosen
polynomial f(x) and wind up with an integer that lies between 0 and 1. No such integer
exists, so we have a contradiction and therefore π is irrational.
For a positive integer n, set
(2.2) f
n
(x) = q
n
x
n
(π x)
n
n!
=
x
n
(p qx)
n
n!
.
This polynomial of degree 2n depends on n (and on π!). We are going to apply (2.1) to this
polynomial and find a contradiction when n becomes large.
Before working out the consequences of (2.1) for f(x) = f
n
(x), we note the polynomial
f
n
(x) has two important properties:
for 0 < x < π, f
n
(x) is positive and (when n is large) very small,
all the derivatives of f
n
(x) at x = 0 and x = π are integers.
IRRATIONALITY OF π AND e 3
To show the first property is true, the positivity of f
n
(x) for 0 < x < π is immediate from
its defining formula. To bound f
n
(x) from above when 0 < x < π, note that 0 < π x < π,
so 0 < x(π x) < π
2
. Therefore
(2.3) 0 < f
n
(x) q
n
π
2n
n!
=
(qπ
2
)
n
n!
.
The upper bound tends to 0 as n , so the upper bound is less than 1 for large n.
To show the second property is true, first take x = 0. The coefficient of x
j
in f
n
(x) is
f
(j)
n
(0)/j!. Since f
n
(x) = x
n
(p qx)
n
/n! and p and q are integers, the binomial theorem
tells us the coefficient of x
j
can also be written as c
j
/n! for an integer c
j
. Therefore
(2.4) f
(j)
n
(0) =
j!
n!
c
j
.
Since f
n
(x) has its lowest degree nonvanishing term in degree n, c
j
= 0 for j < n, so
f
(j)
n
(0) = 0 for j < n. For j n, j!/n! is an integer, so f
(j)
n
(0) is an integer by (2.4).
To see the derivatives of f
n
(x) at x = π are also integers, we use the identity f
n
(π x) =
f
n
(x). Differentiate both sides j times and set x = 0 to get (1)
j
f
(j)
n
(π) = f
(j)
n
(0) for all j.
Therefore, since the right side is an integer, the left side is an integer too. This concludes
the proof of the two important properties of f
n
(x).
Now look at (2.1) when f = f
n
. All derivatives of f
n
at 0 and π are integers, so the right
side of (2.1) is an integer when f = f
n
(see the definition of F (x)). Thus
R
π
0
f
n
(x) sin x dx is
an integer for each n. Since f
n
(x) and sin x are positive on (0, π), this integral is a positive
integer. However, when n is large, |f
n
(x) sin x| |f
n
(x)| (qπ
2
)
n
/n! by (2.3). As n ,
(qπ
2
)
n
/n! 0. Therefore
R
π
0
f
n
(x) sin x dx is a positive integer less than 1 when n is very
large. This is a contradiction, so π is irrational.
This proof is quite puzzling. How did Niven choose the polynomials f
n
(x) or know to
compute the integral (2.1)? Here is a reworking of Niven’s proof in terms of recursions, due
to Markov and Zhou [13].
Proof. Set
(2.5) I
n
=
Z
π
0
(x(π x))
n
n!
sin x dx.
The integrand is continuous and positive on (0, π), so I
n
> 0. By explicit calculation, I
0
= 2
and I
1
= 4:
I
0
=
Z
π
0
sin x dx = cos x
π
0
= (1) + 1 = 2
and using integration by parts,
I
1
=
Z
π
0
(πx x
2
) sin x dx
= π
Z
π
0
x sin x dx
Z
π
0
x
2
sin x dx
= π(x cos x + sin x)
π
0
(x
2
cos x + 2x sin x + 2 cos x)
π
0
= π(π(1) 0) ((π
2
(1) + 0 2) 2)
= 4.
4 KEITH CONRAD
Using integration by parts twice, for n 2 we have I
n
= (4n 2)I
n1
π
2
I
n2
. (This is
worked out in Appendix A.) Using that recursion and the initial values I
0
= 2 and I
1
= 4,
explicit values of I
n
for small n can be worked out. The table below gives results for n 6.
n I
n
0 2
1 4
2 2π
2
+ 24
3 24π
2
+ 240
4 2π
4
360π
2
+ 3360
5 60π
4
6720π
2
+ 60480
6 2π
6
+ 1680π
4
151200π
2
+ 1330560
This suggests we can always write I
n
in the form
(2.6) I
n
= c
n,n
π
n
+ c
n1,n
π
n1
+ ··· + c
1,n
π + c
0,n
.
for some integers c
0,n
, . . . , c
n,n
, and it’s left to the reader to prove this by induction using
the recursion for I
n
and its first two values.
Now assume π is rational, so π = p/q for some positive integers p and q. By (2.6), q
n
I
n
=
P
n
k=0
c
k,n
q
n
π
k
=
P
n
k=0
c
k,n
q
nk
p
k
Z. Since I
n
> 0, we have q
n
I
n
Z
+
. At the same
time, since |x(π x)| π
2
for 0 x π we have the bound |q
n
I
n
| q
n
R
π
0
((π
2
)
n
/n!) dx =
π((qπ
2
)
n
/n!), so I
n
0 as n . This contradicts q
n
I
n
being a positive integer for all n,
so we have a contradiction. Thus π is irrational.
3. Irrationality of e
We turn now to a proof that e is irrational. This was first established by Euler [3] in
1737 using continued fractions. We will prove the irrationality in a more direct manner,
using infinite series, by an argument of Fourier from 1815.
2
Theorem 3.1. The number e is irrational.
Proof. Write
e = 1 + 1 +
1
2!
+
1
3!
+ ··· .
For a positive integer n,
e =
1 + 1 +
1
2!
+
1
3!
+ ··· +
1
n!
+
1
(n + 1)!
+
1
(n + 2)!
+ ···
=
1 + 1 +
1
2!
+
1
3!
+ ··· +
1
n!
+
1
n!
1
n + 1
+
1
(n + 2)(n + 1)
+ ···
.
The second term in parentheses is positive and less than the geometric series
1
n + 1
+
1
(n + 1)
2
+
1
(n + 1)
3
+ ··· =
1
n
.
Therefore
(3.1) 0 < e
1 + 1 +
1
2!
+
1
3!
+ ··· +
1
n!
<
1
n · n!
.
2
While the proof of Fourier appeared in [12, pp. 339-341] in 1815, it was not written by him. It is
attributed to Fourier right after the proof.
IRRATIONALITY OF π AND e 5
Write 1 + 1 + 1/2! + ··· + 1/n! in (3.1) as a fraction with common denominator n!: it is
p
n
/n! with p
n
Z, so (3.1) says 0 < e p
n
/n! < 1/(n ·n!). Clear the denominator n! to get
(3.2) 0 < n!e p
n
<
1
n
.
So far everything we have done involves no unproved assumptions. Now we introduce the
rationality assumption. If e is rational, then e = a/b for positive integers a and b, and
n!e = n!a/b = (n!/b)a is an integer when n is large, since n!/b is an integer once n b.
That makes n!e p
n
= (n!/b)a p
n
an integer inside the open interval (0, 1/n) by (3.2),
which is absurd since 1/n 1. We have a contradiction, so e is irrational.
Remark 3.2. We can prove Theorem 3.1 in a manner similar to the second proof of
irrationality of π, by using the integrals
(3.3) J
n
=
Z
1
0
(x(1 x))
n
n!
e
x
dx,
which are positive since the integrand is positive when 0 < x < 1. If 0 x 1, then
0 x(1 x) 1 and e
x
e, so J
n
R
1
0
(e/n!) dx e/n!. We have J
0
= e 1, J
1
= e + 3,
and J
n
= (4n 2)J
n1
+ J
n2
for n 2 using integration by parts (see Appendix A for
details). Further values are J
2
= 7e19 and J
3
= 71e+193. Quite generally, J
n
= a
n
e+b
n
for some integers a
n
and b
n
, so if e is rational with e = p/q for some p and q in Z
+
, then
qJ
n
= a
n
p + b
n
q is an integer for all n. It’s positive since q and J
n
are, and qJ
n
< qe/n!,
which is less than 1 for large n. Thus qJ
n
is an integer between 0 and 1 for large n, which
is a contradiction.
4. General Ideas
It’s time to think more systematically. A basic principle we need to understand is that
numbers can be proved to be irrational if they can be approximated “too well” by rationals.
Of course each number can be approximated arbitrarily closely by rational numbers: use a
truncated decimal expansion. For instance, we can approximate
2 = 1.41421356... by
(4.1)
14142
10000
= 1.4142,
1414213
1000000
= 1.414213.
With truncated decimals, we achieve close estimates at the expense of rather large denom-
inators. To see what this is all about, compare the above approximations with
(4.2)
99
70
= 1.41428571...,
1393
985
= 1.41421319...,
where we have achieved just as close an approximation with much smaller denominators
(e.g., the second one is accurate to 6 decimal places with a denominator of only 3 digits).
These rational approximations to
2 are, in the sense of denominators, much better than
the ones we find from decimal truncation.
To measure the “quality” of an approximation of a real number α by a rational number
p/q, we should think not about the difference |α p/q| being small in an absolute sense,
but about the difference being substantially smaller than 1/q (thus tying the error with the
size of the denominator in the approximation). In other words, we want
|α p/q|
1/q
= q
α
p
q
= |qα p|
to be small in an absolute sense.
6 KEITH CONRAD
Measuring the approximation of α by p/q using |qα p| rather than |α p/q| admittedly
takes some getting used to, if you are new to the idea. Consider what it says about our
approximations to
2. For example, from (4.1) we have
|10000
2 14142| = .135623, |1000000
2 1414213| = .562373,
and these are not small when measured against 1/10000 = .0001 or 1/1000000 = .000001.
On the other hand, from the approximations to
2 in (4.2) we have
|70
2 99| = .005050, |985
2 1393| = .000358,
which are small when measured against 1/70 = .014285 and 1/985 = .001015. We see
vividly that 99/70 and 1393/985 really should be judged as “good” rational approximations
to
2 while the decimal truncations are “bad” rational approximations to
2.
The importance of this point of view is that it gives us a general strategy for proving
numbers are irrational, as follows.
Theorem 4.1. Let α R. If there is a sequence of integers p
n
, q
n
such that q
n
α p
n
6= 0
and |q
n
α p
n
| 0 as n , then α is irrational.
In other words, if α admits a “very good” sequence of rational approximations, then α
must be irrational.
Proof. Since 0 < |q
n
α p
n
| < 1 for large n, by hypothesis, we must have q
n
6= 0 for large
n. Therefore, since only large n is what matters, we may change terms at the start and
assume q
n
6= 0 for all n.
To prove α is irrational, suppose it is rational: α = a/b, where a and b are integers with
b 6= 0. Then
α
p
n
q
n
=
a
b
p
n
q
n
=
q
n
a p
n
b
bq
n
.
Clearing the denominator q
n
,
|q
n
α p
n
| =
q
n
a p
n
b
b
.
Since this is not zero, the integer q
n
a p
n
b is nonzero. Therefore |q
n
a p
n
b| 1, so
|q
n
α p
n
|
1
|b|
.
This positive lower bound contradicts |q
n
α p
n
| tending to 0, so α is irrational.
It turns out the condition in Theorem 4.1 is not just sufficient to prove irrationality, but
it is also necessary: if α is irrational then there is a sequence of integers p
n
, q
n
such that
|q
n
α p
n
| is not zero and tends to 0 as n . We will not have a need for this necessity
(except maybe for its psychological boost) and therefore omit the proof. See [6, p. 277].
Of course, to use Theorem 4.1 to prove irrationality of a number α we need to find the
integers p
n
and q
n
. For the number e, these integers can be found directly from truncations
to the infinite series for e, as we saw in (3.2). In other words, rather than saying e is
irrational because the proof of Theorem 3.1 shows in the end that rationality of e leads
to an integer between 0 and 1, we can say e is irrational because the proof of Theorem
3.1 exhibits a sequence of good rational approximations to e. In other words, the proof of
Theorem 3.1 can stop at (3.2) and then appeal to Theorem 4.1.
IRRATIONALITY OF π AND e 7
While other powers of e are also irrational, it is not feasible to prove their irrationality
by adapting the proof of Theorem 3.1. For instance, what happens if we try to prove e
2
is irrational from taking truncations of the infinite series e
2
=
P
k0
2
k
/k!? Writing the
truncated sum
P
n
k=0
2
k
/k! in reduced form as, say, a
n
/b
n
, numerical data suggest b
n
e
2
a
n
does not tend to 0, (For example, the value of b
n
e
2
a
n
at n = 22, 23, and 24 is roughly
.0026, 1.4488, and .3465. Since the corresponding values of b
n
have 12, 16, and 17 decimal
digits, these differences are not small by comparison with 1/b
n
, so the approximations a
n
/b
n
to e
2
are not that good.) Thus, these rational approximations to e
2
probably won’t fit the
conditions of Theorem 4.1 to let us prove the irrationality of e
2
. (However, a well-chosen
subsequence of the partial sums does work. See Appendix B.)
5. Irrationality of rational powers of e
To find good rational approximations to positive integral powers of e (good enough, that
is, to establish irrationality of those powers), we will not use a series expansion, but rather
use the interaction between e
x
and integration. Some of the mysterious ideas from Niven’s
proof of the irrationality of π will show up in this context.
We will use Theorem 4.1 to prove the following generalization of the irrationality of e.
Theorem 5.1. For every positive integer a, e
a
is irrational.
Before we prove Theorem 5.1, we note two immediate corollaries.
Corollary 5.2. When r is a nonzero rational number, e
r
is irrational.
Proof. Since e
r
= 1/e
r
, it suffices to take r > 0. Then r = a/b for positive integers a and b.
If e
r
is rational, so is (e
r
)
b
= e
a
, but this contradicts Theorem 5.1. Thus e
r
is irrational.
Corollary 5.3. For each positive rational number r 6= 1, ln r is irrational.
Proof. The number ln r is nonzero. If ln r is rational, then Corollary 5.2 tells us e
ln r
is
irrational. But e
ln r
= r is rational. We have a contradiction, so ln r is irrational.
The proof of Theorem 5.1 will use the following lemma, which tells us how to integrate
e
x
f(x) when f(x) is a polynomial.
Lemma 5.4 (Hermite). Let f(x) be a polynomial of degree m 0. For every real number
a > 0,
Z
a
0
e
x
f(x) dx =
m
X
j=0
f
(j)
(0) e
a
m
X
j=0
f
(j)
(a).
Proof. We compute
R
e
x
f(x) dx by integration by parts, taking u = f (x) and dv = e
x
dx.
Then du = f
0
(x)dx and v = e
x
, so
Z
e
x
f(x) dx = e
x
f(x) +
Z
e
x
f
0
(x) dx.
Repeating this process on the new indefinite integral, we eventually obtain
Z
e
x
f(x) dx = e
x
m
X
j=0
f
(j)
(x).
Now evaluate the right side at x = a and x = 0 and subtract.
8 KEITH CONRAD
Remark 5.5. It is interesting to make a special case of this lemma explicit: for f(x) = x
n
,
Z
a
0
e
x
x
n
dx = n!
1
e
a
n
X
j=0
n(n 1) ···(n j + 1)a
nj
.
Letting a (n is fixed), the second term on the right tends to 0, so
R
0
e
x
x
n
dx = n!.
This integral formula for n! is due to Euler.
Now we prove Theorem 5.1.
Proof. Rewrite Hermite’s lemma (Lemma 5.4) by multiplying through by e
a
:
(5.1) e
a
Z
a
0
e
x
f(x) dx = e
a
m
X
j=0
f
(j)
(0)
m
X
j=0
f
(j)
(a).
Equation (5.1) is valid for every positive number a and polynomial f(x). Let a be a positive
integer at which e
a
is assumed to be rational. We want to use for f (x) a polynomial (actually,
a sequence of polynomials f
n
(x)) with two properties:
the left side of (5.1) is positive and (when n is large) very small,
all the derivatives of the polynomial at x = 0 and x = a are integers.
Then the right side of (5.1) will have the properties of the differences q
n
α p
n
in Theorem
4.1, with α = e
a
and the two sums on the right side of (5.1) being p
n
and q
n
.
Our choice of f(x) is
(5.2) f
n
(x) =
x
n
(x a)
n
n!
,
where n 1 is to be determined. (Note the similarity with (2.2) in the proof of the
irrationality of π!) In other words, we consider the equation
(5.3) e
a
Z
a
0
e
x
f
n
(x) dx = e
a
2n
X
j=0
f
(j)
n
(0)
2n
X
j=0
f
(j)
n
(a).
We can see (5.3) is positive by looking at the left side. The number a is positive and the
integrand e
x
f
n
(x) = e
x
x
n
(x a)
n
/n! on the interval (0, a) is positive, so the integral is
positive. Now we estimate the size of (5.3) by estimating the integral on the left side. By
the change of variables x = ay on the left side of (5.3),
Z
a
0
e
x
f
n
(x) dx = a
2n+1
Z
1
0
e
ay
y
n
(y 1)
n
n!
dy,
so we can bound the left side of (5.3) from above by
0 < e
a
Z
a
0
e
x
f
n
(x) dx
e
a
a
2n+1
n!
Z
1
0
e
ay
dy.
As a function of n, this upper bound is a constant times (a
2
)
n
/n!. As n , this bound
tends to 0.
To see that, for each integer n 1, the derivatives f
(j)
n
(0) and f
(j)
n
(a) are integers for every
j 0, first note that the equation f
n
(a x) = f
n
(x) tells us after repeated differentiation
that (1)
j
f
(j)
n
(a) = f
(j)
n
(0). Therefore it suffices to show all the derivatives of f
n
(x) at
x = 0 are integers. The proof that all f
(j)
n
(0) are integers is just like that in the proof of
Theorem 2.1, so the details are left to the reader to check. (The general principle is this:
IRRATIONALITY OF π AND e 9
for a polynomial g(x) that has integer coefficients and is divisible by x
n
, all derivatives of
g(x)/n! at x = 0 are integers.)
The first property of the f
n
’s tells us that q
n
e
a
p
n
is positive, where p
n
=
P
2n
j=0
f
(j)
n
(a)
and q
n
=
P
2n
j=0
f
(j)
n
(a), and q
n
e
a
p
n
tends to 0 as n . The second property of the
f
n
’s tells us that p
n
and q
n
are integers. Therefore the hypotheses of Theorem 4.1 are met,
so e
a
is irrational.
What really happened in this proof? We actually wrote down some very good rational
approximations to e
a
. They came from values of the polynomial
F
n
(x) =
2n
X
j=0
f
(j)
n
(x).
Indeed, Theorem 5.1 tells us F
n
(a)/F
n
(0) is a “good” rational approximation to e
a
when n
is large. (The dependence of F
n
(x) on a is hidden in the formula for f
n
(x).) The following
table illustrates this for a = 2, where the entry at n = 1 is pretty bad since F
1
(0) = 0.
n |F
n
(0)e
2
F
n
(2)|
1 4
2 1.5562
3 .43775
4 .09631
5 .01739
6 .00266
7 .00035
8 .00004
If we take a = 1, the rational approximations we get for e
a
= e by this method are
different from the partial sums
P
n
k=0
1/k!.
Although the proofs of Theorems 2.1 and 5.1 are similar in the sense that both used
estimates on integrals, the proof of Theorem 2.1 did not show π is irrational by exhibiting a
sequence of good rational approximations to π. The proof of Theorem 2.1 was an “integer
between 0 and 1” proof by contradiction. No good rational approximations to π were
produced in that proof. It is simply harder to get our grips on π than it is on powers of e.
Remark 5.6. The irrationality of e
r
for positive rational r can be proved by an “integer be-
tween 0 and 1” method, as indicated in [13]: use the integrals J
n,r
=
R
r
0
(x(r x))
n
/n! e
x
dx,
the bounds 0 < J
n,r
< (r
2n
/n!)re
r
, and the recursion J
n,r
= (4n 2)J
n1,r
+ r
2
J
n2,r
for n 2. Show from the recursion that J
n,r
= a
n
(r)e
r
+ b
n
(r) where a
n
(r) and b
n
(r) are
polynomials in r with integral coefficients of degree at most n. Write r = A/B for positive
integers A and B. If e
r
is rational, say e
r
= p/q, then the formula for J
n,r
in terms of e
r
implies B
n
qJ
n,r
is a positive integer that’s at most q(Br
2
)
n
/n!, which is impossible for large
n since q(Br
2
)
n
/n! 0 as n .
6. Returning to irrationality of π
The proof of Theroem 5.1 gives a broader context for the proof in Theorem 2.1 that π
is irrational. In fact, by thinking about Theorem 5.1 in the complex plane, we are led to a
slightly different proof of Theorem 2.1.
10 KEITH CONRAD
Proof. We are going to use Hermite’s lemma for complex a, where integrals from 0 to a are
obtained using a path of integration between 0 and a (such as the straightline path). The
definition of e
a
for complex a is the infinite series
P
n0
a
n
/n!. In particular, for real t,
breaking up the series for e
it
into its real and imaginary parts yields
e
it
= cos t + i sin t.
Thus |e
it
| = 1 and e
= 1. Consider Hermite’s lemma at a = :
(6.1)
Z
0
e
x
f(x) dx =
m
X
j=0
f
(j)
(0) +
m
X
j=0
f
(j)
().
Extending (5.2) to the complex plane, we will use in (6.1) f(x) = f
n
(x) = x
n
(x )
n
/n!
for some large n to be determined later (so m = 2n as before). To put (6.1) in a more
appealing form, we apply the change of variables x = y. The left side of (6.1) becomes
(6.2)
Z
0
e
x
f
n
(x) dx = i(1)
n
π
2n+1
Z
1
0
e
y
y
n
(y 1)
n
n!
dy.
Let g
n
(y) = y
n
(y 1)
n
/n! (which does not involve i or π), so f
n
(y) = ()
2n
g
n
(y) and
differentiating j times gives
(6.3) ()
j
f
(j)
n
(y) = ()
2n
g
(j)
n
(y).
Feeding (6.2) and (6.3) into (6.1), with f = f
n
,
(6.4) i(1)
n
π
2n+1
Z
1
0
e
y
g
n
(y) dy =
2n
X
j=0
()
2nj
g
(j)
n
(0) +
2n
X
j=0
()
2nj
g
(j)
n
(1).
This is the key equation in the proof. It serves the role for us now that (5.3) did in the
proof of irrationality of powers of e. Notice the numbers g
(j)
n
(0) and g
(j)
n
(1) are all integers.
Suppose (at last) that π is rational, say with positive denominator q. For j < n, g
(j)
n
(x)
vanishes at x = 0 and x = 1, so the sums in (6.4) really only need to start at j = n. That
means the largest power of π in the (nonzero) terms on the right side of (6.4) is π
n
, so the
largest denominator on the right side of (6.4) is q
n
. Multiply both sides by q
n
:
(6.5) i(q)
n
π
2n+1
Z
1
0
e
y
g
n
(y) dy =
2n
X
j=0
()
2nj
q
n
g
(j)
n
(0) +
2n
X
j=0
()
2nj
q
n
g
(j)
n
(1).
We estimate the left side of (6.5). Since |e
y
| = 1, an estimate of the left side is
q
n
π
2n+1
Z
1
0
e
y
g
n
(y) dy
q
n
π
2n+1
n!
= π
(qπ
2
)
n
n!
.
As n , this bound tends to 0.
On the other hand, since the nonzero terms in the sums on the right side of (6.5) only
start showing up at the j = n term, and π
2nj
q
n
Z for n j 2n, the right side of (6.5)
is in the integral lattice Z + Zi. It is nonzero, as we see by looking at the real part of the
left side of (6.5), which is
(q)
n
π
2n+1
Z
1
0
sin(πy)g
n
(y) dy = (q)
n
π
2n+1
Z
1
0
sin(πy)
y
n
(y 1)
n
n!
dy.
IRRATIONALITY OF π AND e 11
The integrand here has constant sign on (0, 1), so (6.5) is in Z + Zi and doesn’t vanish for
integers n 1 since the real part is not 0. A sequence of nonzero elements of Z + Zi can’t
tend to 0. We have a contradiction, so π is irrational.
We used complex numbers in the above proof to stress the close connection to the proof
of Theorem 5.1. If you take the real part of every equation in the above proof (especially
starting with (6.4)), then you will find a proof of the irrationality of π that avoids complex
numbers. (For instance, we showed (6.5) is nonzero by looking only at the real part, so
taking real parts everywhere should not damage the logic of the proof.) By taking real
parts, the goal of the proof changes slightly. Instead of showing the rationality of π leads
to a nonzero element of Z + Zi with absolute value less than 1, showing the rationality of π
leads to a nonzero integer with absolute value less than 1. Is such a “real” proof basically
the same as the first proof we gave that π is rational? As a check, try to adapt the first
proof of Theorem 2.1 to get the following.
Corollary 6.1. The number π
2
is irrational.
Proof. Run through the previous proof, starting at (6.4), but now assume π
2
is rational
with denominator q Z. While it is no longer true that π
2nj
q
n
Z for n j 2n, we
instead have π
2nj
q
n
Z for j even and π
2nj
q
n
(1)Z for j odd. Since i
2nj
is real
when j is even and imaginary when j is odd, we now have (6.5) lying in the set Z + Z(i/π),
whose nonzero elements are not arbitrarily small.
If you write up all the details in this proof and take the real part of every equation, you
will have the proof of the irrationality of π in [11, Chap. 16].
The numbers π and e are not just irrational, but transcendental. That is, neither number
is the root of a nonzero polynomial with rational coefficients. (For comparison,
2 is
irrational but it is a solution of x
2
2 = 0, so it is in some sense linked to the rational
numbers through this equation.) Proofs of their transcendence can be found in [1, Chap. 1],
[4, Chap. II], and [10, Chap. 2]. There is a proof that e is transcendental that is not
too much more complicated than our proof of Theorem 5.1. The idea is to use Hermite’s
lemma and a construction of a sequence of rational functions whose values give good rational
approximations simultaneously to several integral powers of e, not only to one power like e
a
.
3
The construction of such rational functions generalizes the f
n
(x)’s in Theorem 5.1, which
gave good rational approximations to e
a
. By comparison to this, proving transcendence of
π is much more involved than proving its irrationality.
Historically, progress on π always trailed that of e. Euler proved e is irrational in 1737,
and Lambert proved irrationality of non-zero rational powers of e and irrationality of π in
1761. Their proofs used continued fractions, not integrals. (Lambert’s proof for π was really
a result about values of tan x: when r is a nonzero rational number where tan r is defined,
Lambert proved tan r is irrational. Then by tan(π/4) = 1, π/4 must be irrational, so π is
irrational.) Transcendence proofs for e and π came 100 years later, in the work of Hermite
(1873) and Lindemann (1882). In addition to e and π, the numbers 2
2
, log 2, and e
π
are
known to be transcendental. The status of 2
e
, π
e
, π
2
, e + π, e log 2, and Euler’s constant
γ = lim
n→∞
P
n
k=1
1/k log n is still open. Surely these numbers are all transcendental,
but it is not yet proved that even one of them is irrational.
3
See https://kconrad.math.uconn.edu/blurbs/analysis/transcendence-e.pdf.
12 KEITH CONRAD
Appendix A. Recursions using integration by parts
For the integrals
I
n
=
Z
π
0
(x(π x))
n
n!
sin x dx and J
n
=
Z
1
0
(x(1 x))
n
n!
e
x
dx
that were met in (2.5) and (3.3), we want to derive the recursions
(A.1) I
n
= (4n 2)I
n1
π
2
I
n2
and J
n
= (4n 2)J
n1
+ J
n2
for n 2 using integration by parts.
Letting f
n
(x) =
(x(πx))
n
n!
, we have f
0
n
(x) =
(x(πx))
n1
(n1)!
(π 2x), so f
n
(0) = f
n
(π) = 0 for
n 1 and f
0
n
(0) = f
0
n
(π) = 0 for n 2. Therefore by integration by parts where u = f
n
(x)
and dv = sin x dx, so du = f
0
n
(x) dx and v = cos x,
Z
π
0
(x(π x))
n
n!
sin x dx =
Z
π
0
f
n
(x) sin x dx
= f
n
(x) cos x
π
0
+
Z
π
0
f
0
n
(x) cos x dx
=
Z
π
0
f
0
n
(x) cos x dx.
By integration by parts where u = f
0
n
(x) and dv = cos x dx, so du = f
00
n
(x) dx and v = sin x,
Z
π
0
f
0
n
(x) cos x dx =f
0
n
(x) sin x
π
0
Z
π
0
f
00
n
(x) sin x dx =
Z
π
0
f
00
n
(x) sin x dx.
Combining these,
I
n
=
Z
π
0
f
n
(x) sin x dx =
Z
π
0
f
0
n
(x) cos x dx =
Z
π
0
f
00
n
(x) sin x dx.
We can write f
00
n
(x) in terms of f
n1
(x) and f
n2
(x):
f
00
n
(x) = (f
0
n
(x))
0
=
(x(π x))
n1
(n 1)!
(π 2x)
0
=
(x(π x))
n1
(n 1)!
(2) +
(x(π x))
n2
(n 2)!
(π 2x)
2
= 2f
n1
(x) + (π 2x)
2
f
n2
(x).
Since (π 2x)
2
= π
2
4πx + 4x
2
= π
2
4x(π x),
f
00
n
(x) = 2f
n1
(x) + π
2
f
n2
(x) 4x(π x)
(x(π x))
n2
(n 2)!
= 2f
n1
(x) + π
2
f
n2
(x) 4(n 1)f
n1
(x)
= (4n 2)f
n1
(x) + π
2
f
n2
(x).(A.2)
Multiply by sin x and integrate over [0, π] to get the recursion for I
n
in (A.1):
I
n
=
Z
π
0
f
00
n
(x) sin x dx =
Z
π
0
((4n2)f
n1
(x)π
2
f
n2
(x)) sin x dx = (4n2)I
n1
π
2
I
n2
.
IRRATIONALITY OF π AND e 13
Switching to J
n
, let g
n
(x) =
(x(1x))
n
n!
, so J
n
=
R
1
0
g
n
(x)e
x
dx. Since g
n
and g
0
n
vanish
at 0 and 1 when n 2, J
n
=
R
1
0
g
00
n
(x)e
x
dx (not
R
1
0
g
00
n
(x) dx) after integrating by parts
twice. The analogue of (A.2) for g
n
is
g
00
n
(x) = (4n 2)g
n1
(x) + g
n2
(x),
so multiplying by e
x
and integrating over [0, 1] gives us J
n
= (4n 2)J
n1
+ J
n2
.
Appendix B. Irrationality of e
2
In Section 4, we saw that the partial sums of the Taylor series for e
x
at x = 2, namely the
sums
P
n
k=0
2
k
/k!, do not seem to be a sequence of rational approximations to e
2
that allow
us to prove e
2
is irrational via Theorem 4.1. This was circumvented in Theorem 5.1, where
the nonzero integral powers of e (not just e
2
) were proved to be irrational using rational
approximations coming from something other than the Taylor series for e
x
. What we will
show here is that the partial sums
P
n
k=0
2
k
/k! can, after all, be used to prove irrationality
of e
2
by focusing on a certain subsequence of the partial sums and exploiting a peculiar
property of 2. The argument we give is due to Benoit Cloitre.
Write
P
n
k=0
2
k
/k! in reduced form as a
n
/b
n
. Then e
2
> a
n
/b
n
, so b
n
e
2
a
n
> 0. While
numerical data suggest b
n
e
2
a
n
does not go to 0 as n , it turns out that these nonzero
differences tend to 0 as n runs through the powers of 2. The table below has some limited
evidence in this direction.
n b
n
e
2
a
n
2 2.389
4 .3890
8 .5526
16 .0881
32 .0006
64 .0211
128 .0005
256 .0001
If these differences do tend to 0, then this proves e
2
is irrational by Theorem 4.1. To
prove this phenomenon is real, we use Lagrange’s form of the remainder to estimate the
difference between e
2
and
P
n
k=0
2
k
/k! before setting n to be a power of 2. Lagrange’s form
of the remainder says: for an infinitely differentiable function f and integer n 0,
f(x) =
n
X
k=0
f
(k)
(0)
k!
x
k
+
f
(n+1)
(c)
(n + 1)!
x
n
,
where c is between 0 and x. Taking f to be the exponential function and x = 2,
e
2
=
n
X
k=0
2
k
k!
+
e
c
2
n
(n + 1)!
,
where 0 < c < 2. Bring the sum to the left side, multiply by n!/2
n
, and take absolute
values:
(B.1)
n!
2
n
e
2
n!
2
n
n
X
k=0
2
k
k!
e
2
n + 1
.
14 KEITH CONRAD
Set
c
n
=
n!
2
n
n
X
k=0
2
k
k!
, d
n
=
n!
2
n
,
so c
n
/d
n
=
P
n
k=0
2
k
/k! = a
n
/b
n
and (B.1) says |d
n
e
2
c
n
| e
2
/(n+1). Thus |d
n
e
2
c
n
| 0
as n and d
n
e
2
c
n
6= 0. Be careful: the numbers c
n
and d
n
are not themselves integers
(as we will see), so the expression |d
n
e
2
c
n
| is not quite in a form suitable for immediate
application of Theorem 4.1. But we can get good control on the denominators of c
n
and
d
n
.
Writing c
n
= (1/2
n
)
P
n
k=0
(n!/k!)2
k
, since n!/k! is an integer c
n
is an integer divided by
2
n
, so c
n
has a 2-power denominator in reduced form. Since d
n
is an integer divided by 2
n
,
its reduced form denominator is also a power of 2. What are the powers of 2 in the reduced
form for c
n
and d
n
?
For a nonzero rational number r, write ord
2
(r) for the power of 2 appearing in r,
e.g., ord
2
(40) = 3 and ord
2
(21/20) = 2. By unique prime factorization, ord
2
(rr
0
) =
ord
2
(r)+ord
2
(r
0
) for nonzero rationals r and r
0
. Another important formula is ord
2
(r+r
0
) =
min(ord
2
(r), ord
2
(r
0
)) when ord
2
(r) 6= ord
2
(r
0
) and r + r
0
6= 0. (These properties both re-
semble the degree on polynomials and rational functions, except the degree has a max where
ord
2
has a min on sums.)
We want to compute ord
2
(c
n
) and ord
2
(d
n
). As d
n
= n!/2
n
is simpler than c
n
, we look at
it first. Since ord
2
(d
n
) = ord
2
(n!/2
n
) = ord
2
(n!) n, we bring in a formula for the highest
power of 2 in a factorial, due to Legendre: ord
2
(n!) = n s
2
(n), where s
2
(n) is the sum of
the base 2 digits of n. For example, 6! = 2
4
·3
2
·5 and 6 = 2 + 2
2
, so 6 s
2
(6) = 6 2 = 4
matches ord
2
(6!). With this formula of Legendre,
ord
2
(d
n
) = ord
2
(n!) n = (n s
2
(n)) n = s
2
(n).
For n 1 this is negative (there is at least one nonzero base 2 digit in n, so s
2
(n) 1),
which proves d
n
is not an integer.
What about ord
2
(c
n
)? Writing
c
n
=
n
X
k=0
n!2
k
2
n
k!
=
n!
2
n
+
n! · 2
2
n
· 1
+
n! · 4
2
n
· 2
+
n! · 2
3
2
n
· 6
+ ··· + 1,
each term has at worst a 2-power denominator since n!/k! Z when 0 k n. To figure
out the power of 2 in the denominator we will compute ord
2
(n!2
k
/2
n
k!). For k = 0 this is
ord
2
(n!/2
n
) = s
2
(n). For k 1 this is
ord
2
(n!) + k n ord
2
(k!) = s
2
(n) + s
2
(k) > s
2
(n)
since s
2
(k) 1. Therefore every term in the sum for c
n
beyond the k = 0 term has
a larger 2-power divisibility than the k = 0 term, which means ord
2
(c
n
) is the same as
ord
2
(n!/2
n
) = s
2
(n). In other words, c
n
and d
n
have the same denominator: 2
s
2
(n)
.
If we let n be a power of 2 then c
n
and d
n
have denominator 2
1
= 2, so 2c
n
and 2d
n
are
integers. Then the estimate
0 < |2d
n
e
2
2c
n
| = 2|d
n
e
2
c
n
|
2e
2
n + 1
0
proves e
2
is irrational by Theorem 4.1.
It is natural to ask if the same argument yields a proof that e
p
is irrational for prime
p > 2 using the Taylor series for e
x
at x = p. Let c
n
= (n!/p
n
)
P
n
k=0
p
k
/k! and d
n
= n!/p
n
,
IRRATIONALITY OF π AND e 15
so |d
n
e
p
c
n
| e
p
/(n + 1) as before. Legendre’s formula for ord
p
(n!), the highest power
of p in n!, is (n s
p
(n))/(p 1), where s
p
(n) is the sum of the base p digits of n. The
fractions c
n
and d
n
have the same p-power denominator, with exponent ord
p
(n!) n =
n(1 1/(p 1)) + s
p
(n)/(p 1). Alas, for p > 2 this exponent of p in the denominator of
c
n
and d
n
blows up with n because 1 1/(p 1) > 0 for p > 2. When p = 2 this exponent
in the denominator is s
2
(n), which can stay bounded by restricting n to the powers of 2.
References
[1] A. Baker, “Transcendental Number Theory,” Cambridge Univ. Press, Cambridge, 1975.
[2] C. H. Edwards, Jr., “The Historical Development of the Calculus,” Springer-Verlag, New York, 1979.
[3] L. Euler De fractionibus continuis dissertatio, Commentarii Academiae Scientiarum Petropolitanae 9
(1744), 98–137. URL https://scholarlycommons.pacific.edu/euler-works/71/.
[4] A. O. Gelfond, “Transcendental and Algebraic Numbers,” Dover, New York, 1960.
[5] E. Hairer and G. Wanner, “Analysis by its History,” Springer-Verlag, New York, 1996.
[6] K. Ireland and M. Rosen, “A Classical Introduction to Modern Number Theory,” 2nd ed., Springer-
Verlag, New York, 1990.
[7] J. H. Lambert, emoire sur quelques propri´et´es remarquables des quantit´es transcendantes cir-
culaires et logarithmiques, Histoire de l’Acad´emie Royale des Sciences et Belles-Lettres de Berlin,
Ann´ee 1761 17 1768, 265–322. URL http://www.bibnum.education.fr/mathematiques/theorie-des-
nombres/lambert-et-l-irrationalite-de-p-1761. English translation at https://hal.archives-
ouvertes.fr/hal-02984214/document.
[8] I. Niven, A simple proof that π is irrational, Bull. Amer. Math. Soc. 53 (1947), 509.
[9] R. Roy, The Discovery of the Series Formula for π by Leibniz, Gregory and Nilakanth, Math. Mag. 63
(1990), 291–306.
[10] A. Shidlovski, “Transcendental Numbers,” de Gruyter, Berlin 1989.
[11] M. Spivak, “Calculus,” 2nd ed., Publish or Perish, Wilmington, Del., 1967.
[12] J. de Stainville, “M´elange d’analyse Alg´ebrique et de eom´etrie,” Courcier, Paris, 1815. URL http://
www.bibnum.education.fr/mathematiques/theorie-des-nombres/melange-d-analyse-algebrique-et-
de-geometrie.
[13] L. Zhou and L. Markov, Recurrent Proofs of the Irrationality of Certain Trigonometric Values, Amer.
Math. Monthly 117 (2010), 360–362.