Calculus/Leibniz' formula for pi

From testwiki
Jump to navigation Jump to search

In mathematics, the Madhava-Leibniz formula for π, was discovered in India by Indian mathematician and astronomer Madhava of Sangamagrama, Kerala in 14th or 15th century. It was rediscovered and named after 17th century mathematician Template:W, states that

113+1517+19=π4,

an alternating series. While the series is easy to write and calculate, it is a very inefficient method for calculating π, so it is seldom used in modern calculations of π.

Proof

By the Template:W, this series converges. It satisfies both of the test's criteria:

  • I) The terms decrease monotonically in absolute value.
  • II) The terms tend to 0 as the index n tends to infinity.

Leibniz' formula for π is a special case of the Gregory's series for the arctangent,

arctanx=xx33+x55x77+,

discovered by mathematician James Gregory in 1668.

Since tanπ4=1, and thus, arctan1=π4, the formula is derived, and proved, by plugging x=1 into Gregory's series.

It is worth noting that x=1 lies on the boundary of the circle of convergence for Gregory's series. For x>1, the alternating series fails both criteria: for x>1, the terms increase in absolute value, and the terms tend to infinity, the opposite of what needs to be true for an alternating series to converge. Even a value of x very close to 1, but still greater than it, such as x=1.0001, still lies outside the series' radius of convergence.

Table

The following is a table of the first 10 partial sums and a selected list of other notable partial sums. This series converges to π4, which to 16 significant figures, is 0.7853981633974483. The approximations for π itself, found by multiplying the partial sums by four, are also shown. To 16 significant figures, π=3.1415926535897932.

Note: The second and third partial sums are exactly 23 and 1315, respectively. Both decimals feature a repeating "6"; for these entries, only the first three sixes are shown, followed by three dots to show that the sixes repeat endlessly. For all later terms, the sums are rounded to 9 digits after the decimal point, or the nearest billionth.

n Partial Sum Approximation for pi
1 1 1
2 0.666... 2.666...
3 0.8666... 3.4666...
4 0.723809524 2.895238095
5 0.834920635 3.339682540
6 0.744011544 2.976046176
7 0.820934621 3.283738484
8 0.754267954 3.017071817
9 0.813091484 3.252365935
10 0.760459905 3.041839619
11 0.808078952 3.232315809
12 0.764600691 3.058402766
50 0.780398663 3.121594653
100 0.782898226 3.131592903
250 0.784398167 3.137592670
500 0.784898164 3.139592656
1000 0.785148163 3.140592654
5000 0.785348163 3.141392654
10000 0.785373163 3.141492654
25000 0.785388163 3.141552654

An interesting curiosity

You may have noticed that the later partial sums chosen at "round" numbers like 100 or 5000, look very similar to the limiting sums. For example, the partial sum of 3.131592903 at 100 terms, even after disagreeing with "3.14159265..." with a "3" instead of a "4" on the second digit, agrees for the next four digits, sharing the "1592" part. And the partial sum of 3.140592654 at 1000 terms differs on the third digit, but then goes on to agree with pi on the "59265" part. Similar behavior can also be seen in the second column of partial sums, such as the 250th term, which disagrees on the third digit but agrees from the fourth digit to the eighth digit (0.78439816 instead of 0.78539816). This pattern is very consistent throughout the remaining partial sums in the table. This is not an accident. This can be predicted using the Template:W. For any positive integer n, one can get a very close approximation of the nth approximation for π with the following formula:

  • If n is odd, the nth approximation for π is approximately π+1n, and the nth partial sum is approximately π4+14n.
  • If n is even, the nth approximation for π is approximately π1n, and the nth partial sum is approximately π414n.

The error of this approximation is on the order of n3 so this approximation is remarkably accurate even for relatively small values of n. Even after only four terms, the approximation of 0.722898163 predicted by the formula differs from the true partial sum of 0.723809524 by only about 11100, which is less than 10−3. The error is less than 10−6 for all n>40 and less than 10−10 for all n>856.

Template:BookCat