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

\sum_{n=0}^{\infty} \frac{(-1)^n}{2n+1} = \frac{1}{1} - \frac{1}{3} + \frac{1}{5} - \frac{1}{7} + \frac{1}{9} - \cdots = \frac{\pi}{4}.

Contents

[edit] Proof

Consider the infinite geometric series

1 - x^2 + x^4 - x^6 + x^8 - \cdots = \frac{1}{1+x^2}, \qquad |x| < 1.

It is the limit of the truncated geometric series

G_n(x)=1 - x^2 + x^4 - x^6 + x^8 -+ \cdots - x^{4n-2}= \frac{1-x^{4n}}{1+x^2}, \qquad |x| < 1.

Splitting the integrand as

\frac{1} {1+x^2}=\frac{1-x^{4n}}{1+x^2}+\frac{x^{4n}}{1+x^2}=G_n (x)+ \frac{x^{4n}}{1+x^2}

and integrating both sides from 0 to 1, we have

\int_{0}^{1}  \frac{1} {1+x^2}\, dx=  \int_{0}^{1}G_n(x)\, dx+\int_{0}^{1}\frac{x^{4n}}{1+x^2}\, dx  \ .

Integrating the first integral (over the truncated geometric series G_n (x)\,) termwise one obtains in the limit the required sum. The contribution from the second integral vanishes in the limit n \rightarrow \infty as

\int_{0}^{1}\frac{x^{4n}}{1+x^2} \, dx< \int_{0}^{1} x^{4n}\, dx=\frac{1}{4n+1} \ .

The full integral

\int_{0}^{1}  \frac{1} {1+x^2}\, dx

on the left-hand side evaluates to arctan(1) − arctan(0) = π/4, which then yields

\frac{\pi}{4} = \frac{1}{1} - \frac{1}{3} + \frac{1}{5} - \frac{1}{7} + \frac{1}{9} - \cdots.

Q.E.D.

Remark: An alternative proof of the Leibniz formula can be given with the aid of Abel's theorem applied to the power series (convergent for | x | < 1)

\arctan x =\sum_{n \ge 0} (-1)^n {x^{2n+1}\over {2n+1}}

which is obtained integrating the geometric series ( absolutely convergent for | x | < 1)

1 - x^2 + x^4 - x^6 + x^8 - \cdots = \frac{1}{1+x^2}

termwise.

[edit] Efficiency in π calculation

Practically speaking, Leibniz' 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

\frac{\pi}{2} - 2 \sum_{k=1}^{N/2} \frac{(-1)^{k-1}}{2k-1} \sim \sum_{m=0}^{\infty} \frac{E_{2m}}{N^{2m+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. In 1992, Jonathan Borwein and Mark Limber used the first thousand Euler numbers to calculate π to 5,263 decimal places with Leibniz' formula.

[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.

[edit] External Link

use the Leibniz formula to approximate pi

In other languages