Wallis Formula

Steven R. Dunbar
Department of Mathematics
203 Avery Hall
University of Nebraska-Lincoln
Lincoln, NE 68588-0130
http://www.math.unl.edu
Voice: 402-472-3731
Fax: 402-472-8466
Topics in
Probability Theory and Stochastic Processes
Steven R. Dunbar
Wallis’ Formula
Rating
Mathematically Mature: may contain mathematics beyond calculus with
proofs.
1
Section Starter Question
Can you think of a sequence or a process that approximates π? What is the
intuition or reasoning behind that sequence?
Key Concepts
1. Wallis’ Formula is the amazing limit
2 · 2 · 4 · 4 · 6 · 6 . . . (2n) · (2n)
π
lim
= .
n→∞
1 · 3 · 3 · 5 · 5 . . . (2n − 1) · (2n − 1) · (2n + 1)
2
2. One proof of Wallis’ formula uses a recursion formula developed from
integration of trigonometric functions.
3. Another proof uses only basic algebra, the Pythagorean Theorem, and
the formula πr2 for the area of a circle of radius r.
4. Yet another proof uses Euler’s infinite product representation for the
sine function.
Vocabulary
1. Wallis’ Formula is the amazing limit
2 · 2 · 4 · 4 · 6 · 6 . . . (2n) · (2n)
π
= .
lim
n→∞
1 · 3 · 3 · 5 · 5 . . . (2n − 1) · (2n − 1) · (2n + 1)
2
2
Mathematical Ideas
Introduction
Wallis’ Formula is the amazing limit
π
2 · 2 · 4 · 4 · 6 · 6 . . . (2n) · (2n)
lim
= .
n→∞
1 · 3 · 3 · 5 · 5 . . . (2n − 1) · (2n − 1) · (2n + 1)
2
(1)
Another way to write this is
∞
π Y
(2j)2
=
.
2 j=1 (2j − 1)(2j + 1)
A “closed form” expression for the product in Wallis formula is
π
24n · (n!)4
=
2
n→∞ ((2n)!) (2n + 1)
2
lim
or equivalently
lim
n→∞
2n 2
n
24n
(2n + 1)
=
π
.
2
Note that Wallis Formula is equivalent to saying that the “central binomial term” has the asymptotic expression
s
1 2n
2
∼
.
2n
2
n
(2n + 1)π
See the subsection Central Binomial below for a proof of an equivalent inequality.
In the form
wn =
n
Y
(2j)2
=
(2j − 1)(2j + 1)
j=1
3
2n 2
n
24n
(2n + 1)
(2)
wn
2
π/2
1.5
1
0.5
0
0
1
2
3
4
5
6
7
8
9 10 11 12 13 14 15 16 17 18 19 20
n
Figure 1: Convergence of the Wallis formula to π/2.
4
it is easy to see that the sequence wn is increasing since 4n2 /(4n2 − 1) > 1.
This is illustrated in Figure 1.
Doing a numerical linear regression of log(π/2 − wn ) versus log n on the
domain n = 1 to n = 30 indicates that wn approaches π/2 at a rate which is
O(1/n).
A proof using integration and recursion
Theorem 1 (Wallis’ Formula).
π
2 · 2 · 4 · 4 · 6 · 6 . . . (2n) · (2n)
= .
lim
n→∞
1 · 3 · 3 · 5 · 5 . . . (2n − 1) · (2n + 1)
2
(3)
R π/2
Proof. Consider Jn = 0 cosn (x) dx. Integrating by parts with u = cosn−1 (x)
and dv = cos(x) shows
Z
0
π/2
n
cos (x) dx = (n − 1)
Z
π/2
cosn−2 (x) sin2 (x) dx
0
Z
π/2
cosn−2 (x)(1 − cos2 (x)) dx
0
Z π/2
Z π/2
n−2
cosn (x) dx .
cos (x) dx −(n − 1)
= (n − 1)
= (n − 1)
0
0
Gathering terms, we get nJn = (n − 1)Jn−2 .
2·4
Now J1 = 1 so recursively J3 = 23 , J5 = 3·5
and inductively
J2n+1 =
Likewise J2 =
π
,
2·2
and J4 =
J2n =
2 · 4 · · · (2n − 2) · (2n)
.
1 · 3 · · · (2n − 1) · (2n + 1)
3·π
,
2·4·2
J6 =
3·5·π
2·4·6·2
(4)
and inductively
3 · 5 · · · (2n − 3) · (2n − 1) · π
.
2 · 4 · · · (2n − 2) · (2n) · 2
For 0 ≤ x ≤ π/2, 0 ≤ cos(x) ≤ 1, so cos2n (x) ≥ cos2n+1 (x) ≥ cos2n+2 (x),
implying in turn that J2n ≥ J2n+1 ≥ J2n+2 . Then
1≥
J2n+1
J2n+2
2n + 1
≥
=
.
J2n
J2n
2n + 2
5
J2n+1
J2n
Hence limn→∞
That is,
lim
n→∞
= 1.
2 · 2 · 4 · 4 · 6 · 6 . . . (2n) · (2n) 2
1 · 3 · 3 · 5 · 5 . . . (2n − 1) · (2n + 1) π
=1
or equivalently
lim
n→∞
2 · 2 · 4 · 4 · 6 · 6 . . . (2n) · (2n)
1 · 3 · 3 · 5 · 5 . . . (2n − 1) · (2n + 1)
=
π
.
2
An elementary proof of Wallis formula
The following proof is adapted and expanded from [7]. The proof uses only
basic algebra, the Pythagorean Theorem, and the formula πr2 for the area
of a circle of radius r. Another important property used implicitly is the
completeness property of the reals.
Define a sequence of numbers by s1 = 1 and for n ≥ 2,
sn =
2n − 1
3 5
· ···
.
2 4
2n − 2
(5)
These are the reciprocals of the subsequence J2n−1 defined in equation (4).
The partial products of Wallis’ formula (1) with an odd number of terms
in the numerator are
on =
2n
22 · 42 · · · (2n − 2)2 · 2n
= 2,
2
2
1 · 3 · · · (2n − 1)
sn
(6)
while those with an even number of factors in the numerator are of the form
en =
22 · 42 · · · (2n − 2)2
2n − 1
.
=
2
2
1 · 3 · · · (2n − 3) · (2n − 1)
s2n
Here e1 = 1 should be interpreted as an empty product. Since
(2n)(2n+2)
(2n+1)2
(7)
(2n)2
(2n−1)(2n+1)
>
1, clearly en < en+1 . Since
< 1, clearly on > on+1 . Also, en < on .
Therefore
e1 < e2 < e3 < · · · en < on < · · · < o3 < o2 < o1
6
for any n. Furthermore, for 1 ≤ i ≤ n,
2i
= oi ≥ on
s2i
and
2i − 1
= ei ≤ en
s2i
from which it follows that
2i − 1
2i
≤ s2i ≤ .
en
on
(8)
For convenience, define s0 = 0 so that inequality (8) holds also for i = 0.
Denote the successive difference an = sn+1 − sn so a0 = s1 − s0 = 1 and for
n≥1
sn
1 3
2n − 1
2n + 1
−1 =
= · ···
.
an = sn+1 − sn = sn
2n
2n
2 4
2n
Lemma 2. For the sequence ai we have the identity
ai aj =
j+1
i+1
ai aj+1 +
ai+1 aj
i+j+1
i+j+1
for any i and j.
Proof. Make the substitutions
ai+1 =
2i + 1
ai
2(i + 1)
aj+1 =
2j + 1
aj
2(j + 1)
and
the right side of the proposed identity (9) becomes
2j + 1
j+1
2i + 1
i+1
ai aj
·
+
·
= ai aj .
2(j + 1) i + j + 1 2(i + 1) i + j + 1
7
(9)
Lemma 3.
1 = a20 = a0 a1 + a1 a0
= a0 a2 + a21 + a2 a0
...
= a0 an + a1 an−1 + · · · + an a0
Proof. Start from a20 = 1 and repeatedly apply the identity (9). At stage n
applying the identity (9) to every term the sum
a0 an + a1 an−1 + · · · + an a0
becomes
1
2
n−1
1
a0 an + a1 an−1 +
a1 an−1 + a2 an−2 + · · · +
an−1 a1 + an a0 .
n
n
n
n
Collecting terms, this simplifies to a0 an + a1 an−1 + · · · + an a0 .
Now divide the positive quadrant of the xy-plane into rectangles by drawing the vertical lines y = sn and the horizontal lines y = sn for all n. Let
Ri,j be the rectangle with lower left corner (si , sj ) and upper right corner
(si+1 , sj+1 ). The area of Ri,j is ai aj . Thus the identity 1 = a0 an + a1 an1 +
· · · + an a0 states that the total area of the rectangles Ri,j for which i + j = n
is 1. Let Pn be the polygonal region consisting of all rectangles Ri,j for which
i + j < n. Hence the area of Pn is n.
The outer corners of Pn are the points (si , sj ) for which i + j = n + 1 and
1 ≤ i, j, ≤ n.qBy the Pythagorean theorem, the distance of such a point to
the origin is s2i + s2j . By (8 ) this distance is bounded above by
s
2(i + j)
=
on
s
2(n + 1)
.
on
Similarly the inner corners of Pn are the points (si , sj ) for which i + j = n
and 0 ≤ i, j ≤ n. The distance of such a point to the origin is bounded from
below by
s
s
2(i + j − 1)
2(n − 1)
=
.
en
en
8
p
Therefore, Pn contains a quarter circle
of
radius
2(n − 1)/en and is conp
tained in a quarter circle of radius 2(n + 1)/on . See Figure 2 for a diagram
of the polygonal region Pn and the corresponding inner and outer quarter
circles for n = 4.
Since the area of a quarter circle of radius r is equal to πr2 while the area
of Pn is n, this leads to the bounds
(n + 1)π
(n − 1)π
<n<
2en
2on
(10)
from which it follows that
(n + 1)π
(n − 1)π
< en < on <
.
2n
2n
Now it is clear that as n → ∞, en and on both approach π/2.
Wallis’ Formula and the Central Binomial Coefficient
This subsection gives a detailed proof that Wallis’ Formula gives an explicit
inequality bound on the central binomial term that in turn implies the asymptotic formula for the central binomial coefficient. This proof is motivated by
the derivation in [1].
Start from the expansion (2) for the Central Binomial Coefficient:
wn =
n
Y
(2j)2
=
(2j
−
1)(2j
+
1)
j=1
Rearrange it to
2n 2
n
24n
.
(2n + 1)
2
n
2n
16n Y (2j − 1)(2j + 1)
=
2n + 1 j=1
(2j)2
n
and use the definitions (6) and (7) of the partial products of the Wallis
formula to obtain
2
2n
16n
2n + 2
=
n
(2n + 1) (2n + 1)on+1
and
2
2n
16n
1
=
.
(2n + 1) en+1
n
9
y
s4
R0,3
s3
R0,2
R1,2
R0,1
R1,1
R2,1
R0,0
R1,0
R2,0
s2
s1
s1
s2
R3,0
s3
s4
p
r = 2(4 − 1)/e4
r=
p
2(4 +x1)/o4
Figure 2: A diagram of the regions Ri,j and the inner and outer quarter
circles for the case n = 4.
10
Rearrange the inequality (10) to obtain
2n + 2
1
1
2n + 2
<
and
<
.
π(n + 2)
on+1
en+1
nπ
Then
16n
(2n + 2)2
<
(2n + 1) (2n + 1)(n + 2)π
2
2n
16n (2n + 2)
<
n
(2n + 1) nπ
and taking square roots and slightly rearranging again
s
r
n
2n
4n
4
2(n + 1)2
(n + 1)
p
<
<p
.
n
n
(2n + 1)(π/2) (2n + 1)(n + 2)
(2n + 1)(π/2)
To simplify, take a series expansion of the square roots of the rational expressions and truncate, leaving
4n
2n
4n
1
1
p
<
<p
.
1−
1+
2n
n
2n
(2n + 1)(π/2)
(2n + 1)(π/2)
A proof using the product expansion of the sine function
Theorem 4. The expansion of sin(z) as an infinite product is
sin(z) = z
∞ Y
m=1
z2
1− 2 2
mπ
.
Proof. See [6, page 312] for the proof. The article in the Mathworld.com
article on http://mathworld.wolfram.com/Sine.html also gives references to
Edwards 2001, pages 18 and 47; and Borwein et al. 2004, page 5.
Although the common proof uses complex analysis, as in the texts cited
above, a proof using only elementary analysis is possible. The following proof
is adapted from [4].
Proof. Start with the definition of the Chebyshev polynomials Tn (x) from
the trigonometric identity cos(nx) = Tn (cos(x)). Then
cos(2kx) = Tk (cos(2x)) = Tk (1 − 2 sin2 x).
11
Together with the sine product identity
sin((2k + 1)x) − sin((2k − 1)x) = 2 sin(x) · cos(2kx)
this inductively shows that there is a polynomial Fm of degree m such that
sin((2m + 1)x) = sin(x) · Fm (sin2 (x)).
(In fact, using the definition Un (cos(x)) = sin((n+1)x)
for the Chebyshev polysin(x)
√
nomials of the second kind, it is easy to show that Fm (x) = U2n ( 1 − x).)
kπ
Substituting xk = 2m+1
and noting that sin((2m + 1)xk ) = 0 shows that Fm
2
kπ
has zeros at sin ( 2m+1 for k = 1, 2, . . . , m. These zeros are distinct, so Fm
has no other zeros, then
!
m
Y
y
1−
Fm (y) = Fm (0)
2
kπ
sin
2m+1
k=1
and
Fm (0) = lim
x→0
sin((2m + 1)x)
= 2m + 1.
sin(x)
Therefore
sin((2m + 1)x) = (2m + 1) sin(x)
m
Y
sin2 (x)
1−
kπ
sin2 2m+1
k=1
and changing variables
sin(x) = (2m + 1) sin
x
2m + 1
Y
m
k=1
1−
sin2
sin2
!
!
x
2m+1
kπ
2m+1
.
(11)
The goal now is to estimate the product terms. For all real t, et ≥ 1+t and
1
therefore e−t ≤ 1+t
. For u < 1, the choice t = u/(1−u) gives e−u/(1−u) ≤ 1−u.
Then for every collection of numbers uk ∈ [0, 1), we have
P uk
X uk
Y
P
−
1−
≤ e k 1−uk ≤
(1 − uk ) ≤ e− k uk ≤ 1.
(12)
1 − uk
k
k
P
If in addition k uk < 1, then we also know that
e−
P
k
uk
≤
1+
12
1
P
k
uk
(13)
and subtracting the first and third terms of (12) from 1 and using (13
P
Y
X uk
k uk
P
≤ 1 − (1 − uk ) ≤
.
(14)
1 + k uk
1
−
u
k
k
k
Let m and N be positive integers with m > N . Take x such that |x| <
and πx ∈
/ Z. Then define uk by
1
Nπ
4
uk =
sin
sin
!2
x
2m+1
kπ
2m+1
,
k = 1, 2, . . . , m.
Use (11) by dividing the leading factor and the first N factors onto the left
side to obtain
(2m + 1) sin
sin(x)
QN
x
2m+1
k=1 (1
− uk )
=
m
Y
(1 − uk ).
k=N +1
Then use the first, third and fifth terms of (12) to see that
1−
For 0 ≤ t ≤
m
X
uk
sin(x)
≤
≤ 1.
QN
x
1 − uk
(2m + 1) sin 2m+1
k=1 (1 − uk )
k=N +1
π
2
we have sin(t) ≥ π2 t, so we see that
uk ≤
thus
(2m + 1) sin
2k
x
2m+1
uk
x2
≤
1 − uk
(2k)2 − x2
Hence
!2
≤
x 2
;
2k
fork > N.
m
X
uk
x2
≤
.
1 − uk
2N − |x|
k=N +1
Thus it follows from (15) that
1−
sin(x)
x2
≤
≤ 1.
QN
x
2N − |x|
(2m + 1) sin 2m+1
(1
−
u
)
k
k=1
13
(15)
Let m → ∞ so that
1−
sin(x)
x2
≤ QN
≤ 1.
2N − |x|
x k=1 (1 − uk )
Now let N → ∞ and we obtain for
x
π
∈
/Z
∞ Y
x2
sin x = x
1− 2 2 .
k π
k=1
For
x
π
∈ Z this equality is also true.
The following somewhat probabilistic proof of Euler’s infinite product
formula is adapted from [2].
Proof. Start with the integral
Z n
0
x n
xt−1 1 −
dx
n
and integrate by parts once:
x n
u= 1−
n
x n−1
du = − 1 −
dx
n
1
v = xt
t
dv = xt−1 dx .
Then
Z
0
n
x
t−1
Z n
x n
x n n
x n−1
1 t
x 1−
1−
dx = 1 −
dx
+
n
n
n
0
0 t
Z
1 n t
x n−1
=
x 1−
dx
t 0
n
Integrate by parts again:
x n−1
u= 1−
n
n−1
x n−2
1−
dx
du = −
n
n
14
v=
1 t+1
x
t+1
dv = xt dx
so
Z
0
n
x
t−1
x n
(n − 1)
1−
dx =
n
t(t + 1)n
Z
n
0
x n−2
xt+1 1 −
dx .
n
After integration by parts n times:
Z n
Z n
x n
(n − 1)!
t−1
1−
x
xt+n−1 dx
dx =
n
t(t + 1) . . . (t + n − 1)nn−1 ) 0
0
n
(n − 1)!
xt+n =
t(t + 1) . . . (t + n − 1)nn−1 ) t + n 0
n! nt
=
.
t(t + 1) . . . (t + n)
Then by dominated convergence it follows that
Z ∞
n! nt
Γ(t) =
xt−1 e−x dx = lim
.
n→∞ t(t + 1) . . . (t + n)
0
Note that limit definition of the Gamma function is also http://dlmf.nist.gov/5.8
E1. It follows that for −1 < t < 1 that
Γ(1 + t)Γ(1 − t) =
∞
Y
1
.
2 /k 2
1
−
t
k=1
For X and Y independent exponential random variables, both with expectation 1 we have that
Z ∞
t
E X =
xt e−x dx = Γ(1 + t)
0
and likewise E [Y −t ] = Γ(1 − t). Then using the independence and symmetry
Γ(1 + t)Γ(1 − t) = E X t E Y −t = E (X/Y )t = E (X/Y )|t|
The distribution function for the random variable X/Y is
P [X/Y ≤ u] = P [Y ≥ X/u] = E e−X/u =
u
u+1
for u > 0. Then the probability density is
d
1
P [X/Y ≤ u] =
,
du
(1 + u)2
15
u > 0.
This gives by integration by parts, for −1 < t < 1, that
Z ∞
Z ∞
u|t|
|t|u|t|−1
|t|
E (X/Y ) =
du
du
=
(u + 1)2
u+1
0
0
The last integral is known to be πt/ sin(πt). For example, this is formula
613, page 445 in the 18th Edition of the CRC Standard Mathematical Tables.
It can also be accomplished with contour integration in the complex plane
Z 0
Z +∞
|t|u2πi(|t|−1)
|t|u|t|−1
|t|−1
du −2πi(−1)
+
du = 0
u+1
u+1
+∞
0
so
Z ∞
|t|u|t|−1
du 1 − e2πi|t| = −2πieπi|t| .
u+1
0
Thus
Z ∞
|t|u|t|−1
|t|2πieπi|t|
π|t|
πt
du = 2πi|t|
=
=
.
u+1
e
−1
sin(π|t|)
sin(πt)
0
Hence, for −1 < t < 1
πt
.
Γ(1 + t)Γ(1 − t) = E (X/Y )t =
sin(πt)
A standard integration-by-parts gives the fundamental Gamma function recursion Γ(t) = Γ(1 + t)/t. Using this to define Γ(t) for t < 0, it follows that
for all real t,
π
.
sin(πt) =
Γ(t)Γ(1 − t)
Combining all results above,
∞ Y
t2
1− 2 .
sin(πt) = πt
k
k=1
Corollary 1 (Wallis’ Formula).
2 · 2 · 4 · 4 · 6 · 6 . . . (2n) · (2n)
π
= .
n→∞ 1 · 3 · 3 · 5 · 5 . . . (2n − 1) · (2n − 1) · (2n + 1)
2
lim
Proof. Substitute z = π/2 in the product expansion of sin(z).
Remark. In [5] Ciaurri uses Tannery’s Theorem for Infinite Products, a trig
identity for cotangent and tangent, and Wallis formula to provide an elementary proof of product expansion of the sine function. In this sense, the
product expansion of the sine function is equivalent to Wallis’ formula.
16
Sources
This section is adapted from a sketch of the proof of Wallis’ Formula in
Kazarinoff [3] and the short note by Wästlund [7]. The elementary proofs of
the sine product are from [4] and [2].
Problems to Work for Understanding
1. Show that
24n · (n!)4
2 · 2 · 4 · 4 · 6 · 6 . . . (2n) · (2n)
=
.
2
((2n)!) (2n + 1)
1 · 3 · 3 · 5 · 5 . . . (2n − 1) · (2n + 1)
2. Numerically find the rate at which the sequence
2 · 2 · 4 · 4 · 6 · 6 . . . (2n) · (2n)
1 · 3 · 3 · 5 · 5 . . . (2n − 1) · (2n + 1)
approaches π/2 by calculating values and using regression.
3. Use induction to prove
J2n+1 =
and
J2n =
(2n) · (2n − 2) . . . 4 · 2
(2n + 1) · (2n − 1) . . . 3 · 1
(2n − 1) · (2n − 3) . . . 3 · π
.
(2n) · (2n − 2) . . . 4 · 2 · 2
4. The simple proof of the sine product formula uses the polynomial Fm
of degree m such that
sin((2m + 1)x) = sin(x) · Fm (sin2 (x)).
Explicitly find F0 (x), F1 (x), F2 (x), F3 (x), F4 (x) and plot them on [−1, 1].
17
5. Give a detailed proof that
Z n
x n
n! nt
xt−1 1 −
.
dx =
n
t(t + 1) . . . (t + n)
0
6. Provide a careful and detailed proof that if X and Y are independent
exponential random variables, both with expectation 1 we have that
E (X/Y )t = E (X/Y )|t| .
7. Provide a detailed proof using contour integration in the complex plane
to show that
Z ∞
|t|u|t|−1
|t|2πieπi |t|
πt
du = 2πi|t|
=
.
u+1
e
−1
sin(πt)
0
Reading Suggestion:
References
[1] Michael D. Hirschhorn. Wallis’s product and the central binomial coefficient. American Mathematical Monthly, 122(7):689, August-September
2015.
[2] Lars Holst. A proof of Euler’s infinite product for the sine. American
Mathematical Monthly, 119:518–521, June-July 2012.
[3] Nicholaus D. Kazarinoff. Analytic Inequalities. Holt, Rinehart and Winston, 1961.
P∞ 1
2
[4] R. A. Kortram. Simple proofs for
= π6 and sin x =
k=1 k2
Q
x2
x ∞
k=1 1 − k2 π 2 . Mathematics Magazine, 69(2):123–125, April 1996.
18
[5] Óscar Ciaurri. Euler’s product expansion for the sine: An elementary proof. American Mathematical Monthly, 122(7):693–695, AugustSeptember 2015.
[6] S. Saks and A. Zygmund. Analytic Functions. Elsevier Publishing, 1971.
[7] Johan Wästlund. An elementary proof of the wallis product formula for
pi. American Mathematical Monthly, 114(10):914–917, December 2007.
Outside Readings and Links:
1.
2.
3.
4.
I check all the information on each page for correctness and typographical
errors. Nevertheless, some errors may occur and I would be grateful if you would
alert me to such errors. I make every reasonable effort to present current and
accurate information for public use, however I do not guarantee the accuracy or
timeliness of information on this website. Your use of the information from this
website is strictly voluntary and at your risk.
I have checked the links to external sites for usefulness. Links to external
websites are provided as a convenience. I do not endorse, control, monitor, or
guarantee the information contained in any external website. I don’t guarantee
that the links are active at all times. Use the links here with the same caution as
you would all information on the Internet. This website reflects the thoughts, interests and opinions of its author. They do not explicitly represent official positions
or policies of my employer.
Information on this website is subject to change without notice.
19
Steve Dunbar’s Home Page, http://www.math.unl.edu/~sdunbar1
Email to Steve Dunbar, sdunbar1 at unl dot edu
Last modified: Processed from LATEX source on November 18, 2015
20