Skip to main content

CLP-2 Integral Calculus

Section 3.7 Optional — Rational and irrational numbers

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 nth decimal place by dn, then there are two positive integers k and p such that dn+p=dn whenever n>k. So the part of the decimal expansion after the decimal point looks like
    .a1a2a3akb1b2bpb1b2bpb1b2bp
    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 b1=0, so that the decimal expansion ends with an infinite string of zeros.
  • e is irrational.
  • π is irrational.

Subsection 3.7.1 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<x<1. 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.

Subsection 3.7.2 Eventually periodic implies rational

Let us assume that a number 0<x<1 has a decimal expansion that is eventually periodic. Hence we can write
x=0.a1a2a3akb1b2bpb1b2bpb1b2bp
Let α=a1a2a3ak and β=b1b2bp. In particular, α has at most k digits and β has at most p digits. Then we can (carefully) write
x=α10k+β10k+p+β10k+2p+β10k+3p+=α10k+β10k+pj=010p

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

=α10k+β10k+p1110p=α10k+β10k110p1=110k(α+β10p1)=α(10p1)+β10k(10p1)
This is a ratio of integers, so x is a rational number.

Subsection 3.7.3 Rational implies eventually periodic

Let 0<x<1 be rational with x=ab, 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 10k(10p1)q with k, p and q integers, we will be in business because ab=aq10k(10p1). 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, p, q such that 10k+p10k=bq. To do so consider the powers of 10 up to 10b:
1,101,102,103,,10b
For each j=0,1,2,,b, find integers cj and 0rj<b so that
10j=bcj+rj
To do so, start with 10j and repeatedly subtract b from it until the remainder drops strictly below b. The rj’s can take at most b different values, namely 0, 1, 2, , b1, and we now have b+1 rj’s, namely r0, r1, , rb. So we must be able to find two powers of 10 which give the same remainder
 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>m, then at least one box must contain more than one item.
. That is there must be 0k<lb so that rk=rl. Hence
10l10k=(bcl+rl)(bck+rk)=b(clck)since rk=rl.
and we have
b=10k(10p1)q
where p=lk and q=clck are both strictly positive integers, since l>k so that 10l10k>0. Thus we can write
ab=aq10k(10p1)
Next divide the numerator aq by 10p1 and compute the remainder. That is, write aq=α(10p1)+β with 0β<10p1. Notice that 0α<10k, as otherwise x=ab1. That is, α has at most k digits and β has at most p digits. This, finally, gives us
x=ab=α(10p1)+β10k(10p1)=α10k+β10k(10p1)=α10k+β10k+p(110p)=α10k+β10k+pj=010pj
which gives the required eventually periodic expansion.

Subsection 3.7.4 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 
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>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.
— 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.

Subsubsection 3.7.4.1 Proof 1

This proof is due to Fourier. Let us assume that the number e is rational so we can write it as
e=ab
where a,b are positive integers. Using the Maclaurin series for ex we have
ab=e1=n=01n!
Now multiply both sides by b! to get
ab!b=n=0b!n!
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
n=0b!n!=n=0bb!n!=A+n=b+1b!n!=B
The first sum, A, is finite sum of integers:
A=n=0bb!n!=n=0b(n+1)(n+2)(b1)b.
Consequently A must be an integer. Notice that we simplified the ratio of factorials using the fact that when bn we have
b!n!=12n(n+1)(n+2)(b1)b12n=(n+1)(n+2)(b1)b.
Now we turn to the second sum. Since it is a sum of strictly positive terms we must have
B>0
We complete the proof by showing that B<1. To do this we bound each term from above:
b!n!=1(b+1)(b+2)(n1)nnb factors1(b+1)(b+1)(b+1)(b+1)nb factors=1(b+1)nb
Indeed the inequality is strict except when n=b+1. Hence we have that
B<n=b+11(b+1)nb=1(b+1)+1(b+1)2+1(b+1)3+

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

=1(b+1)111b+1=1b+11=1b
And since b is a positive integer, we have shown that
0<B<1
and thus B cannot be an integer.
Thus we have that
ab!binteger=Ainteger+Bnot integer
which gives a contradiction. Thus e cannot be rational.

Subsubsection 3.7.4.2 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
e=ab,
where a,b are positive integers. This means that we can write
e1=ba.
Using the Maclaurin series for ex we have
ba=e1=n=0(1)nn!
Before we do anything else, we multiply both sides by (1)a+1a! — 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
(1)a+1ba!a=n=0(1)n+a+1a!n!
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:
n=0(1)n+a+1a!n!=n=0a(1)n+a+1a!n!=A+n=a+1(1)n+a+1a!n!=B
We will show that A is an integer while 0<B<1; 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:
A=n=0a(1)n+a+1a!n!=n=0a(1)n+a+1(n+1)(n+2)(a1)a
Let us now examine the series B. Again clean up the ratio of factorials:
B=n=a+1(1)n+a+1a!n!=n=a+1(1)n+a+1(a+1)(a+2)(n1)n=(1)2a+2a+1+(1)2a+3(a+1)(a+2)+(1)2a+4(a+1)(a+2)(a+3)+=1a+11(a+1)(a+2)+1(a+1)(a+2)(a+3)
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
1a+1and1a+11(a+1)(a+2)=1a+2
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.

Subsection 3.7.5 Irrationality of π

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 π 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.
Assume that π is a rational number and so can be written as π=ab with a,b positive integers. Now let n be a positive integer and define the polynomial
f(x)=xn(abx)nn!.
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 π is rational — that, if n is really big, then
In=0πf(x)sin(x)dx
is an integer and it also lies strictly between 0 and 1, giving the required contradiction.

Subsubsection 3.7.5.1 Bounding the integral

Consider again the polynomial
f(x)=xn(abx)nn!.
Notice that
f(0)=0f(π)=f(a/b)=0.
Furthermore, for 0xπ=a/b, we have xab and abxa so that
0x(abx)a2/b.
We could work out a more precise
 3 
You got lots of practice finding the maximum and minimum values of continuous functions on closed intervals when you took calculus last term.
upper bound, but this one is sufficient for the analysis that follows. Hence
0f(x)(a2b)n1n!
We also know that for 0xπ=a/b, 0sin(x)1. Thus
0f(x)sin(x)(a2b)n1n!
for all 0x1. Using this inequality we bound
0<In=0πf(x)sin(x)dx<(a2b)n1n!.
We will later show that, if n is really big, then (a2b)n1n!<1. We’ll first show, starting now, that In is an integer.

Subsubsection 3.7.5.2 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
x2sin(x)dx
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. Using integration by parts with u=f(x), dv=sin(x) and v=cos(x) gives us
f(x)sin(x)dx=f(x)cos(x)+f(x)cos(x)dx

Use integration by parts again with u=f(x), dv=cos(x) and v=sin(x).

=f(x)cos(x)+f(x)sin(x)f(x)sin(x)dx

Use integration by parts yet again, with u=f(x), dv=sin(x) and v=cos(x).

=f(x)cos(x)+f(x)sin(x)+f(x)cos(x)f(x)cos(x)dx
And now we can see the pattern; we get alternating signs, and then derivatives multiplied by sines and cosines:
f(x)sin(x)dx=cos(x)(f(x)+f(x)f(4)(x)+f(6)(x))=+sin(x)(f(x)f(x)+f(5)(x)f(7)(x)+)
This terminates at the 2nth derivative since f(x) is a polynomial of degree 2n. We can check this computation by differentiating the terms on the right-hand side:
ddx(cos(x)(f(x)+f(x)f(4)(x)+f(6)(x)))=sin(x)(f(x)+f(x)f(4)(x)+f(6)(x))+cos(x)(f(x)+f(x)f(5)(x)+f(7)(x))
and similarly
ddx(sin(x)(f(x)f(x)+f(5)(x)f(7)(x)+))=cos(x)(f(x)f(x)+f(5)(x)f(7)(x)+)+sin(x)(f(x)f(4)(x)+f(6)(x))
When we add these two expressions together all the terms cancel except f(x)sin(x), as required.
Now when we take the definite integral from 0 to π , all the sine terms give 0 because sin(0)=sin(π)=0. Since cos(π)=1 and cos(0)=+1, we are just left with:
0πf(x)sin(x)dx=(f(0)f(0)+f(4)(0)f(6)(0)++(1)nf(2n)(0))=+(f(π)f(π)+f(4)(π)f(6)(π)++(1)nf(2n)(π))
So to show that In is an integer, it now suffices to show that f(j)(0) and f(j)(π) are integers.

Subsubsection 3.7.5.3 The derivatives are integers

Recall that
f(x)=xn(abx)nn!
and expand it:
f(x)=c0n!x0+c1n!x1++cnn!xn++c2nn!x2n
All the cj are integers, and clearly cj=0 for all j=0,1,,n1, because of the factor xn in f(x).
Now take the kth derivative and set x=0. Note that, if j<k, then dk dxkxj=0 for all x and, if j>k, then dk dxkxj is some number times xjk which evaluates to zero when we set x=0. So
f(k)(0)=dk dxk(ckk!xk)=k!ckn!
If k<n, then this is zero since ck=0. If k>n, this is an integer because ck is an integer and k!/n!=(n+1)(n+2)(k1)k is an integer. If k=n, then f(k)(0)=cn is again an integer. Thus all the derivatives of f(x) evaluated at x=0 are integers.
But what about the derivatives at π=a/b? To see this, we can make use of a handy symmetry. Notice that
f(x)=f(πx)=f(a/bx)
You can confirm this by just grinding through the algebra:
f(x)=xn(abx)nn!now replace x with a/bxf(a/bx)=(a/bx)n(ab(a/bx))nn!start cleaning this up:=(abxb)n(aa+bx)nn!=(abxb)n(bx)nn!=(abx)nxnn!=f(x)
Using this symmetry (and the chain rule) we see that
f(x)=f(πx)

and if we keep differentiating

f(k)(x)=(1)kf(k)(πx)
Setting x=0 in this tells us that
f(k)(0)=(1)kf(k)(π)
So because all the derivatives at x=0 are integers, we know that all the derivatives at x=π are also integers.
Hence the integral we are interested in
0πf(x)sin(x)dx
must be an integer.

Subsubsection 3.7.5.4 Putting it together

Based on our assumption that π=a/b is rational, we have shown that the integral
In=0πxn(abx)n!sin(x)dx
satisfies
0<In<(a2b)n1n!
and also that In 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 a2n (we showed this in Example 3.6.8), and consequently
0<In<(a2b)n1n!<1
Which means that the integral cannot be an integer. This gives the required contradiction, showing that π is irrational.