- Leibniz formula for pi
:"See
Leibniz formula for other formulas known under the same name."In
mathematics , the Leibniz formula for π, named afterGottfried Leibniz , states that:
The expression on the left is an
infinite series called the Leibniz series, which converges to π ⁄ 4. It is also called the Gregory-Leibniz series, recognizing the work of Leibniz' contemporary James Gregory. Usingsummation notation::
The formula was first discovered in the 15th century by
Madhava of Sangamagrama , an Indian mathematician and founder of theKerala school of astronomy and mathematics , some 300 years before Leibniz. In recognition of Madhava's work, the formula is sometimes known as the Madhava-Leibniz series. [citation|title=Special Functions|last=George E. Andrews, Richard Askey|first=Ranjan Roy|publisher=Cambridge University Press |year=1999|isbn=0521789885|page=58] [citation|first=R. C.|last=Gupta|title=On the remainder term in the Madhava-Leibniz's series|journal=Ganita Bharati|volume=14|issue=1-4|year=1992|pages=68-71]Proof
Consider the infinite
geometric series :
Integrating both sides gives a
power series for theinverse 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 thealternating series test , and then applyAbel's theorem to show that it must converge to tan−1(1). However, an entirely elementary argument is also possible.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.
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.Fact|date=October 2008
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 number s "En" according to theasymptotic 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 andMark 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 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 [A. van Wijngaarden, in: Cursus: Wetenschappelijk Rekenen B, Process Analyse, Stichting Mathematisch Centrum, (Amsterdam, 1965) pp 51-60] .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.
External links
* [http://timjoh.com/calculating-pi-in-ti-basic-using-the-leibniz-formula/ Implementation of the Leibniz formula for TI Basic]
* [http://sethborders.googlepages.com/Calculatepi.html use the Leibniz formula to approximate pi]
* [http://mattst88.com/programming/?page=leibniz Leibniz Formula in C, x86 FPU Assembly, x86-64 SSE3 Assembly, and DEC Alpha Assembly]
Wikimedia Foundation. 2010.