Supriya Ghosh (Editor)

Leibniz formula for π

Updated on
Edit
Like
Comment
Share on FacebookTweet on TwitterShare on LinkedInShare on Reddit
Leibniz formula for π

In mathematics, the Leibniz formula for π, named after Gottfried Leibniz , states that

Contents

1 1 3 + 1 5 1 7 + 1 9 = π 4 .

It is also called Madhava–Leibniz series as it is a special case of a more general series expansion for the inverse tangent function, first discovered by the Indian mathematician Madhava of Sangamagrama in the 14th century. The series for the inverse tangent function, which is also known as Gregory's series, can be given by:

arctan x = x x 3 3 + x 5 5 x 7 7 +

The Leibniz formula for π/4 can be obtained by plugging x = 1 into the above inverse-tangent series.

It also is the Dirichlet L-series of the non-principal Dirichlet character of modulus 4 evaluated at s = 1, and therefore the value β(1) of the Dirichlet beta function.

Proof

π 4 = arctan ( 1 ) = 0 1 1 1 + x 2 d x = 0 1 ( k = 0 n ( 1 ) k x 2 k + ( 1 ) n + 1 x 2 n + 2 1 + x 2 ) d x = ( k = 0 n ( 1 ) k 2 k + 1 ) + ( 1 ) n + 1 ( 0 1 x 2 n + 2 1 + x 2 d x ) .

Considering only the integral in the last line, we have:

0 < 0 1 x 2 n + 2 1 + x 2 d x < 0 1 x 2 n + 2 d x = 1 2 n + 3 0  as  n .

Therefore, by the squeeze theorem, as n → ∞ we are left with the Leibniz series:

π 4 = k = 0 ( 1 ) k 2 k + 1

For a more detailed proof, together with the original geometric proof by Leibniz himself, see Leibniz's Formula for Pi.

Convergence

Leibniz's formula converges extremely slowly: it exhibits sublinear convergence. Calculating π to 10 correct decimal places using direct summation of the series requires about five billion terms because 1/2k + 1 < 10−10 for k > 5 × 1091/2.

However, the Leibniz formula can be used to calculate π to high precision (hundreds of digits or more) using various convergence acceleration techniques. For example, the Shanks transformation, Euler transform or Van Wijngaarden transformation, which are general methods for alternating series, can be applied effectively to the partial sums of the Leibniz series. Further, combining terms pairwise gives the non-alternating series

π 4 = n = 0 ( 1 4 n + 1 1 4 n + 3 ) = n = 0 2 ( 4 n + 1 ) ( 4 n + 3 )

which can be evaluated to high precision from a small number of terms using Richardson extrapolation or the Euler–Maclaurin formula. This series can also be transformed into an integral by means of the Abel–Plana formula and evaluated using techniques for numerical integration.

Unusual behavior

If the series is truncated at the right time, the decimal expansion of the approximation will agree with that of π for many more digits, except for isolated digits or digit groups. For example, taking five million terms yields

3.1415924535897932384646433832795027841971693993873058...

where the underlined digits are wrong. The errors can in fact be predicted; they are generated by the Euler numbers En according to the asymptotic formula

π 2 2 k = 1 N 2 ( 1 ) k 1 2 k 1 m = 0 E 2 m N 2 m + 1

where N is an integer divisible by 4. If N is chosen to be a power of ten, each term in the right sum becomes a finite decimal fraction. The formula is a special case of the Boole summation formula for alternating series, providing yet another example of a convergence acceleration technique that can be applied to the Leibniz series. In 1992, Jonathan Borwein and Mark Limber used the first thousand Euler numbers to calculate π to 5,263 decimal places with the Leibniz formula.

Euler product

The Leibniz formula can be interpreted as a Dirichlet series using the unique non-principal Dirichlet character modulo 4. As with other Dirichlet series, this allows the infinite sum to be converted to an infinite product with one term for each prime number. Such a product is called an Euler product. It is:

π 4 = ( p 1 ( mod 4 ) p p 1 ) ( p 3 ( mod 4 ) p p + 1 ) = 3 4 5 4 7 8 11 12 13 12 17 16

In this product, each term is a superparticular ratio, each numerator is an odd prime number, and each denominator is the nearest multiple of 4 to the numerator.

References

Leibniz formula for π Wikipedia