Leibniz formula for pi
From Wikipedia, the free encyclopedia
- See Leibniz formula for other formulas known under the same name.
In mathematics, Leibniz' formula for π, due to Gottfried Leibniz, states that
The expression on the left is an infinite series called the Leibniz series, which converges to π ⁄ 4. Using summation notation:
Note that the formula was possibly discovered by Madhava of Sangamagrama some 300 years before Leibniz.
Contents |
[edit] Proof
Consider the infinite geometric series
Integrating both sides gives a power series for the inverse tangent:
Plugging in x = 1 yields the Leibniz formula (the inverse tangent of 1 being π ⁄ 4). The problem with this line of reasoning is that 1 is not within the radius of convergence of the power series. Therefore, some additional argument is required to show that the series converges to tan−1(1) at x = 1. One approach is to show that the Leibniz series converges using the alternating series test, and then apply Abel's theorem to show that it must converge to tan−1(1). However, an entirely elementary argument is also possible.
[edit] Elementary argument
Consider the following decomposition:
For |x| < 1, the fraction on the right is the sum of the remaining terms of the geometric series. However, the equation above does not involve infinite series, and indeed holds for every real value of x. Integrating both sides from 0 to 1 gives the following:
As , the terms other than the integral converge to the Leibniz series. Meanwhile, the integral converges to zero:
This proves the Leibniz formula.
[edit] Efficiency in π calculation
Practically speaking, Leibniz's formula is very inefficient for either mechanical or computer-assisted π calculation, as it requires an enormous number of steps to be performed to achieve noticeable precision. Calculating π to 10 correct decimal places using Leibniz' formula requires over 10,000,000,000 mathematical operations, and will take longer for most computers to calculate than calculating π to millions of digits using more efficient formulas.
However, 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 5,000,000 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
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. In 1992, Jonathan Borwein and Mark Limber used the first thousand Euler numbers to calculate π to 5,263 decimal places with Leibniz' formula.
Additionally, by computing the Leibniz series in a somewhat more clever way by taking the midpoints of partial sums, it can be made to converge much faster than a brute force calculation. Let
and then define
for all
then computing π10,10 will take similar computation time to computing 150 terms of the original series in a brute force manner, and , correct to 9 decimal places. This computation is an example of the Van Wijngaarden transformation[1].
[edit] References
- 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.
- ^ A. van Wijngaarden, in: Cursus: Wetenschappelijk Rekenen B, Process Analyse, Stichting Mathematisch Centrum, (Amsterdam, 1965) pp 51-60