Leibniz formula for π
|Part of a series of articles on the|
|mathematical constant π|
- See List of things named after Gottfried Leibniz for other formulas known under the same name.
Using summation notation:
The infinite series above has also been called the Leibniz series or Gregory–Leibniz series (after the work of James Gregory), or more recently Madhava-Leibniz series, after the discovery that it is a special case of a more general series expansion for the inverse tangent function, first discovered by Indian mathematician Madhava of Sangamagrama in 14th century. The series for the inverse tangent function, which is also known as Gregory's series, can be given by:
The Leibniz formula for π can be obtained by plugging x = 1 into the above inverse-tangent series.
Considering only the integral in the last line, we have:
Therefore, as n → ∞ we are left with the Leibniz series:
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 for .
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
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.
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
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.
The Leibniz formula can be interpreted as a Dirichlet series using the (unique) 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:
- Jonathan Borwein, David Bailey & Roland Girgensohn, Experimentation in Mathematics - Computational Paths to Discovery, A K Peters 2003, ISBN 1-56881-136-5, pages 28–30.