Вы находитесь на странице: 1из 5

Lecturas Matem´aticas Volumen 27 (2006), p´aginas 21–25

Even from Gregory-Leibniz series π could be computed: an example of how convergence of series can be accelerated

Vito Lampret

University of Ljubljana, Ljubljana, Slovenia

Abstract. Gregory-Leibniz series Σ

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.

= π , is discussed in

j

=1 ( 1) j +1

2

j1

4

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.

π , se conoce

Resumen. La serie de Gregory-Leibniz Σ

en la literatura como un ejemplo de una hermosa, interesante y sen- cilla expresi´on anal´ıtica de π. Desafortunadamente, la mayor´ıa de los autores la consideran inapropiada para el c´alculo de π. En esta nota se usa una simple transformaci´on de la serie y una aplicaci´on de la ormula sumaci´on de Euler-Maclaurin para mostrar c´omo esta conver- gencia lenta puede acelerarse hasta el punto de que el c´alculo num´erico de π nos produzca un valor bastante preciso con varias cifras decimales. Tambi´en se sugiere que la f´ormula de Euler-Maclaurin debiera incluirse en los cursos de matem´aticas del pregrado.

j

=1 ( 1) j +1

2

j1

=

4

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

It seems that the Gregory-Leibniz series, figuring in the identities

(1)

π

4 =

j

=1

(1)

j

+1

2j

1

=1+

k

=1

(1) k 2k + 1 ,

is not suitable for computation of π . Indeed, from the well known Leibniz estimate [6, p. 216-217]

0 a n +1 a n +2 (1) n r n a n +1

of remainder r n := = n +1 a k of alternating series =1 (1) k +1 a k , where a n monotonically decreasingly converges to zero, we obtain, for the remainder in series (1), the estimate

k

k

(1a)

2

(2n + 1)(2n + 3) (1) n r n

1

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 r
1 illustrates relation (1a) by showing the graphs of sequences n →
(−1) n r n ≡
π
− s n and n →
1/(2n + 1) for series (1).
4
0.003
0.0025
0.002
0.0015
0.001
0.0005
200
400
600
800
1000
Figure 1: Graphs of sequences n → (−1) n r n and n →
1/(2n + 1).

In order to accelerate convergence in (1) we first substitute alternating con- ditionally convergent series (1) by absolutely convergent one. Indeed, in partial sums of (1) with even indexes, we collect pairwise the terms with odd and even

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

2 n

k =1

(1) k

2k + 1

n

1

i =1

n

n

i =1

=

4i + 1

2

16i 2 1 .


=

i =1

1

4i 1

This way, using (1), we get the expression

(2)

π

4

= 1 2

i =1

1

16i 2 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

f (4) (x) dx

and lim n f (n) = lim n f (n) = lim n f (3) (n) = 0 and converges, there exists a number ω (m ), depending on m , such that

1

(3)

k

=1

f (k ) =

m1

k

=1

f (k ) +

m

f (x) dx + f (m )

2

f (m )

12

+ ω (m ) · f (3) (m )

and

(3a)

0 ω (m )

1

384 .

The infinite series in (2) originates from function ϕ : [1, ) R, such that

(4)

(4a)

(4b)

(4c)

(4d)

Because

ϕ (x)

1

16x 2 1

ϕ

ϕ (x) ≡ −

32x

2

(16x 1)

2

(2)

(x)

32 48x 2 + 1

2

(16x 1)

3

< 0

> 0

ϕ

(3)

(x) ≡ −

6144 16x 3 + x

2

(16x 1)

4

< 0

ϕ (4) (x) 6144 1280x 4 + 160x 2 + 1

2

(16x 1)

5

m

ϕ (x) dx =

1 ln 4m + 1

4m 1

8

,

> 0.

24

Vito Lampret

we obtain from equations (3)–(3a) and (4)–(4c), for any m N, the following expression

i

=1

1

16i 2 1 =

m1

i

=1

1 1 + 1

8 ln 4m + 1 4m 1

16i 2

+

1

2 (16m 2 1)

+

8m 1) 2 ω (m ) · 6144 16m 3 + m

(16m 2 1) 4

3 (16m 2

.

Hence, from (2) we conclude

(5)

where

π = π m + ρ m ,

(5a) π m = 4 8

m1

i

=1

1 1 + ln 4m + 1

4m 1

16i 2

+

4 1 +

3 (16m 2 1) 2

64m

16m 2

and

(5b)

0 ρ m 8 ω (m ) · 6144 16m 3 + m

(16m 2 1) 4

<

32

(4m + 1) (4m 1) 4 <

1

(2m 1) 5

for every m N. Figure 2 shows graphs of sequences m ρ m and m (2m 1) 5 .

3·10 -10 2.5·10 -10 2·10 -10 1.5·10 -10 1·10 -10 5·10 -11 60 80 100
3·10 -10
2.5·10 -10
2·10 -10
1.5·10 -10
1·10 -10
5·10 -11
60
80
100
120

Figure 2: Graphs of sequences m ρ m and m (2m 1) 5 .

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

Using [7] we find from (5a) that π 10 = 3.1415924875

Even from Gregory-Leibniz series π could be computed

25

the computation. Faster convergent sequence, originating in series (2), could be obtained using the Euler-Maclaurin formula of higher order than four [4].

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´on en febrero de 2006)

Vito Lampret Faculty of Civil and Geodetic Engineering University of Ljubljana Ljubljana 1000, Slovenia 386 e-mail: vlampret@fgg.uni-lj.si, vito.lampret@fgg.uni-lj.si