|
Calculating Pi
From Antiquity to Modern Times
by George Beck and Michael Trott
Why is the same in and ?
We slice up a circle like a pie and rearrange the sectors to form a figure that is roughly a rectangle. As the sectors become thinner, the rectangle's left and right sides become more vertical and the top and bottom become flatter. We can imagine that in the limit we get an actual rectangle.









The height of the rectangle equals the radius of the circle, . Because the top and bottom of the rectangle are made up of all the small arcs that add up to the circumference of the circle, the rectangle has length . Since the rectangle has the same area as the circle, the length times the height is . Dividing by and multiplying by 2 gives .

Approximating Using Areas of Polygons—the Method of Archimedes
Sandwiching 
A circle of radius has area , so the area of a circle of radius 1 is . Therefore is sandwiched between the areas of the regular -sided polygons inscribed and circumscribed around the circle. PiPolygons[n] draws the three figures and prints the corresponding inequality for the areas.
PiPolygons[5];

Finding the Area of the Inscribed Polygon
Break the inscribed polygon into triangles of height and base , where is the angle .
The area is .
Finding the Area of the Circumscribed Polygon
For the circumscribed polygon, the triangles each have height 1 and base . The area is .

Vieta's Formula for 
We continue the discussion on approximating by calculating the areas of a circle using inscribed and circumscribed regular polygons. We illustrate Vieta's formula, developed in 1593, the oldest exact result derived for .
The Formula
Vieta's formula expresses as an infinite product of nested square roots.
Quality of Approximation
The graph in the middle is the approximation from Vieta's formula, which calculates the area of a regular polygon of sides. In contrast, the upper and lower graphs show the estimates to based on the areas of the n-sided regular polygons circumscribed and inscribed around a circle of radius 1.

The second column shows the number of sides of the regular polygons, while the third shows the approach to . The numbers in the fourth column are the differences between and the partial products of the infinite product.
Why is It True?
To derive Vieta's formula we need to combine several results from calculus and trigonometry. We will illustrate these results without proof.
Finding a Limit
When is large, and are rather different.

But when is small, and are approximately the same.

Mathematically, this is expressed in terms of limits.
If is any fixed number, tends to 0 as gets large.
So will tend to 1.
Therefore tends to .
This limit can be rewritten more simply.
Applying a Trigonometric Rule
We apply and keep reapplying the following rule to Sin[t].
Each of these products is equal to . We showed earlier that the product of the first and last terms in such a product, , tends to as tends to infinity.
Taking the limit and dividing by , we get a formula of Euler:
We substitute for .
Applying Another Trigonometric Rule
All that is left to do is to verify that the cosines are nested square roots. Mathematically this would be proved by induction. We illustrate the result for the fifth term by repeatedly applying another trigonometric rule.
This simplifies to the form of nested square roots at the very beginning.
Computing with Series
A Classical Sum
This is Leibniz' series, developed in 1674.
Summing up to an finite limit gives an approximation for . Here are the differences between and the first 15 partial sums.
Two Elegant Series that Converge Slowly
This series is due to Euler, developed in 1748.
The series doesn't converge particularly fast, so it is not useful in practice for calculating .
Here is a similar series.
This series also converges too slowly to be used to calculate many digits of .
A Series Based on 
Historically the calculations of the first few tens of digits of were based on various identities involving the function. Here is such an identity, developed by Machin in 1706.
has the following series representation.
This sum converges much faster.
Another Identity
In the spirit of the last series, Lehmer in 1938 used the following identity to calculate .
This sum converges even better.
A Formula Based on Modular Forms
In 1914 Ramanujan gave the following formula for based on modular identities.
The sum of the series can be expressed in terms of hypergeometric functions.
This series converges much faster than the previous ones, making it necessary to increase the value of $MaxExtraPrecision.
Another Formula Based on Modular Forms
In 1989 D. V. Chudnovsky and G. V. Chudnovsky gave another formula for based on modular identities.
This sum converges even faster than the previous one. Each new term gains roughly 14 more digits of accuracy.
Computing by Iterative Processes
An Iteration Formula
In 1989 Borwein expressed as the limit of a sequence defined by an iteration, .
Here the first term of the sequence.
It is an algebraic number that is a root of the following polynomial.
The series approximations for give roughly a fixed number of digits per term. In comparison, the number of correct digits in iteration formulas grows quadratically with the iteration number.
The quantity is bounded by .
An Improved Iteration Formula
In 1996 Bailey gave an improved iteration formula for the calculation of . Again the result is that .
Here is the first term of this sequence.
It is an algebraic number that is a root of the following polynomial.
Here is how close the sequence is to for the first few iterations.
The quantity is bounded by .
Implementation
Usage Messages
Function Definitions
|