Friday, 23 December 2022

Formula for Pi

I have to remind myself from time to time what a fertile source of information is the website Cantor's Paradise. Today, I came across a tweet from the site's Twitter feed that mentioned a particularly interesting formula for \(\pi\) from Ramanujan. See Figure 1.


Figure 1: link

I'll rewrite the formula below for clarity:$$\frac{1}{\pi}=\frac{2\sqrt{2}}{9801}  \sum_{n=0}^{\infty} \frac{(4n)! (1103+26390n)}{(n!)^4 396^{4n}}$$Now when \(n=0\), we get$$  \frac{1}{ \pi } \approx \frac{1103 \sqrt{8}}{9801} \text{ and } \pi \approx \frac{9801}{1103 \sqrt{8}} $$Now how accurate is this approximation? Permalink

3.1415926535897932385 ... actual digits of pi to 20 decimal places

3.1415927300133056603 approximated digits of pi when \(n=0\) (first term)

This is a pretty impressive approximation for the first term of an infinite series! As the website says:

This gives the accurate value of \(\pi\) up to 6 decimal places, but this is only the 1st term in another infinite series. This number alone is sufficient to calculate the circumference of the Earth with a maximum error of just 1 meter. It is to be noted that while Ramanujan’s formula takes one formula to calculate up to 6 decimal places, it takes Leibniz about 5 million terms. Ramanujan’s formula could do it in one term though and each successive term adds up another 8 decimal places to the value of π. This formula holds absolutely true for finding the value of π, but there is no clear understanding of how he came up with the numbers in his formula like 9801 and 1103. Mathematicians use this formula today to find the value of π to an insurmountable extent.

Let's set \(n=1\) Permalink:

3.1415926535897932385 actual digits of pi to 20 decimal places

3.1415926535897938780 approximated digits of pi when \(n=1\) (first two terms)

So far we've only displayed \( \pi \) to 20 decimal places but with the addition of another term, there is a need for more accuracy. Here's the result of \(n=2\) Permalink:

3.14159265358979323846264338328 actual digits of pi to 30 decimal places 
3.14159265358979323846264906570 approximated digits of pi when \(n=2\) (first three terms)

There's no need to go further, the improving accuracy is obvious as a result of this amazing formula. Yesterday was Ramanujan's birthday and the twitterverse has been awash with posts about his life and his formulae. He was born on December 22nd 1887 in Tamil Nadu's Erode. 

ADDENDUM: January 16th 2023

Here is another formula for the digits of \( \pi\) that I came across in a tweet:


I won't say anymore about the formula here. I'm just mentioning it and maybe it can form the basis of a future post.

No comments:

Post a Comment