Even From Gregory-Leibniz Series Computed: An Example of How Convergence of Series Can Be Accelerated
Even From Gregory-Leibniz Series Computed: An Example of How Convergence of Series Can Be Accelerated
Vito Lampret
University of Ljubljana, Ljubljana, Slovenia
j+1
(−1)
Abstract. Gregory-Leibniz series Σ∞ j=1 2j−1 = π4 , is discussed in
literature as an example of beautiful, interesting and simple analytic ex-
pression for π. Unfortunately, this series is considered by most authors
as unsuitable for computation of π. It is shown that, using a simple
transformation of the series and applying the Euler–Maclaurin summa-
tion formula, slow convergence can be accelerated to the point where
numerical computation of π can be performed accurately to several dec-
imal places. It is also suggested that the Euler–Maclaurin formula, of
some low order, should be included in the undergraduate mathematics
curriculum.
Key words and phrases. acceleration, alternating, convergence, esti-
mate, Euler-Maclaurin, Gregory-Leibniz, remainder, series.
2000 AMS Mathematics Subject Classification. 40A05, 40A25, 65B10,
65B15, 97D30, 97D40.
j+1
(−1)
Resumen. La serie de Gregory-Leibniz Σ∞ j=1 2j−1 = π4 , se conoce
en la literatura como un ejemplo de una hermosa, interesante y sen-
cilla expresión analı́tica de π. Desafortunadamente, la mayorı́a de los
autores la consideran inapropiada para el cálculo de π. En esta nota
se usa una simple transformación de la serie y una aplicación de la
fórmula sumación de Euler-Maclaurin para mostrar cómo esta conver-
gencia lenta puede acelerarse hasta el punto de que el cálculo numérico
de π nos produzca un valor bastante preciso con varias cifras decimales.
También se sugiere que la fórmula de Euler-Maclaurin debiera incluirse
en los cursos de matemáticas del pregrado.
∗ Since next year is the third-centenary of Euler’s birth, April 15, 1707, we dedicate this
contribution to him, the main creator of the famous Euler-Maclaurin summation formula.
22 Vito Lampret
is not suitable for computation of π. Indeed, from the well known Leibniz
estimate† [6, p. 216-217]
2 1
(1a) ≤ (−1)n rn ≤ ,
(2n + 1)(2n + 3) 2n + 1
valid for every positive integer n. Unfortunately, this estimate indicates slow
convergence of series (1). To compute π from (1), using (1a), to six decimal
places for example, we need to sum up much more than five millions terms of
series (1) due to rounding the terms of series during the calculations. Figure
1 illustrates relation (1a) by showing the graphs of sequences n → (−1)n rn ≡
π
4 − sn and n → 1/(2n + 1) for series (1).
0.003
0.0025
0.002
0.0015
0.001
0.0005
†
This estimate is sharp as it could be seen from the example of geometric series.
Even from Gregory-Leibniz series π could be computed 23
indexes
2n
n n
(−1)k 1 1
= −
2k + 1 i=1
4i + 1 i=1 4i − 1
k=1
n
−2
= .
i=1
16i2 − 1
The obtained series converges faster than the original one. To accelerate also
convergence in (2) we use the Euler-Maclaurin summation formula of order
four [3, p. 320, Theorem ] or [4, p. 119, Theorem 2]. It says that for any
m ∈ N and any function f ∈ C 4 [1, ∞), such that f (4) (x) does not
∞ change
sign
and limn→∞ f (n) = limn→∞ f (n) = limn→∞ f (3) (n) = 0 and 1 f (4) (x) dx
converges, there exists a number ω(m), depending on m, such that
∞
m−1
∞
f (m) f (m)
(3) f (k) = f (k) + f (x) dx + − + ω(m) · f (3) (m)
m 2 12
k=1 k=1
and
1
(3a) 0 ≤ ω(m) ≤ .
384
The infinite series in (2) originates from function ϕ : [1, ∞) → R, such that
1
(4) ϕ(x) ≡
16x2 −1
32x
(4a) ϕ (x) ≡ − 2 <0
(16x2 − 1)
32 48x2 + 1
(4b) ϕ(2) (x) ≡ 3 >0
(16x2 − 1)
(3) 6144 16x3 + x
(4c) ϕ (x) ≡ − 4 <0
(16x2 − 1)
6144 1280x4 + 160x2 + 1
(4d) ϕ(4) (x) ≡ 5 > 0.
(16x2 − 1)
Because
∞
1 4m + 1
ϕ(x) dx = ln ,
m 8 4m − 1
24 Vito Lampret
we obtain from equations (3)–(3a) and (4)–(4c), for any m ∈ N, the following
expression
∞ m−1
1 1 1 4m + 1 1
2−1
= 2−1
+ ln + 2 − 1)
i=1
16i i=1
16i 8 4m − 1 2 (16m
8m 6144 16m3 + m
+ 2 − ω(m) · 4 .
3 (16m2 − 1) (16m2 − 1)
Hence, from (2) we conclude
(5) π = πm + ρm ,
where
m−1
1 4m + 1 4 64m
(5a) πm = 4− 8 + ln + +
i=1
16i2 − 1 4m − 1 16m2 − 1 3 (16m2 − 1)2
and
(5b)
6144 16m3 + m 32 1
0 ≤ ρm ≤ 8ω(m) · 4 < 4 <
(16m2 − 1) (4m + 1) (4m − 1) (2m − 1)5
for every m ∈ N. Figure 2 shows graphs of sequences m → ρm and m →
(2m − 1)−5 .
-10
3·10
-10
2.5·10
-10
2·10
-10
1.5·10
-10
1·10
-11
5·10
60 80 100 120
Using [7] we find from (5a) that π10 = 3.1415924875 . . . and from (5b) that
0 ≤ ρ10 < 4.04 × 10−7 . Hence 3.141592 ≤ π < 3.141592488 + 4.04 × 10−7 =
3.141592892. This way we determined π to six decimal places π = 3.141592 . . ..
We point out that during this computation we have to sum only 13 terms. To
obtain more decimal places of π we should increase parameter m. However,
sequence m → πm converges relatively slowly and therefore is not suitable
for the computation of large number of digits of π. For example, we have
π − π1000 > 1.6 × 10−17 and ρ1000 < 3.2 × 10−17 . Thus to obtain 17 decimal
places we should sum much more than 1000 terms, due to their rounding during
Even from Gregory-Leibniz series π could be computed 25
References
[1] R. L. Graham, D. E. Knuth and O. Patashnik, Concrete Mathematics,
Addison-Wesley, Reading, MA, 1994.
[2] K. Knopp, Theory and Applicattions of Infinite Series, Hafner Publishing Company,
New York, 1971.
[3] V. Lampret, An Invitation to Hermite’s Integration and Summation: A Comparison
between Hermite’s and Simpson’s Rules, SIAM Rev. 46 (2) (2004), 311–328.
[4] V. Lampret, The Euler-Maclaurin and Taylor Formulas: Twin, Elementary Deriva-
tions, Math. Mag. 74 (2001), 109–122.
[5] V. Lampret, Wallis sequence estimated through the Euler-Maclaurin formula: even
from the Wallis product π could be computed fairly accurately, AustMS Gazette 31 (5)
(2004), 328–339
[6] M. H. Protter and C. B. Morrey, A First Course in Real Analysis 2nd ed,
Springer-Verlag N.Y., UTM 1993.
[7] S. Wolfram, Mathematica, version 5.0, Wolfram Research, Inc., 1988–2003.
(Recibido en septiembre de 2005. Aceptado para publicación en febrero de 2006)
Vito Lampret
Faculty of Civil and Geodetic Engineering
University of Ljubljana
Ljubljana 1000, Slovenia 386
e-mail: [email protected], [email protected]