Home
This page uses JavaScript, which is not available on your web browser.
.
Numerical approximation (calculation) of pi using infinite series.
0
The value of pi is approximated (calculated) using the infinite series of Euler's solution of the Basel problem:
pi2 / 6 = (1 / 12) + (1 / 22) + (1 / 32) + (1 / 42) + ... ----------(1)
Or, rearranging:
pi = square root ( 6 x ( (1 / 12) + (1 / 22) + (1 / 32) + (1 / 42) + ... ) ) ----------(2)
Or using Summation notation:
pi = Sum { square root ( 6 / n2) } ----------(3)
where n=1 to infinity
The error will stop getting smaller for large n, due to the limited accuracy that the computer uses to store numbers. This means that even if 1 / n2 can still be calculated, the value will be so small that the estimated pi will not change. This is due to rounding errors in the computer's maths subroutines.The computer calculates a + b = a, when b is very small compared to a.
Notice that the estimated pi is always less than the real value of pi, never more. As random methods are not used, the error does not fluctuate up and down. Instead, it steadily decreases with each additional calculation.
This method gives accurate results much more quickly than the Monte Carlo and digital sampling methods. However, you need to be a mathematician to understand why it works, let alone come up with the formula in the first place.
Even faster (but more complicated) formulas exist, such as those by Srinivasa Ramanujan. These formulas "converge" more quickly to pi, meaning that the error is less for a given n.
This demonstrates an important characteristic of simple numerical methods like the Monte Carlo Method. They may be slow, but can be invaluable where more intelligent analytical solutions have not been found. This is especially so in today's world of cheap and fast computers. Many real-world problems are too complicated to be analyzed with formulas alone. Instead, numerical solutions are calculated using computers.
Like all methods of calculating pi, this method only gives an approximate value, as we will never be able to get the "real" value of pi, only pi accurate to x number of decimal digits. This is why the terms "calculating pi" and "approximating pi" can mean the the same thing.
http://en.wikipedia.org/wiki/Pi
http://en.wikipedia.org/wiki/History_of_numerical_approximations_of_p