'Mean' appearance of $\pi$...

238 Views Asked by At

I just came across a strange result, where $\pi$ unexpectedly pops up.

Consider two real numbers $a$ and $b$, now repeat the following steps-

  1. Replace $a$ by the arithmetic mean of the two numbers.
  2. Replace $b$ by the geometric mean of the two numbers.

In mathematical terms,

$\forall a,b \in R$, We define a sequence $a_i$ and $b_i$ such that $a_n=\dfrac{a_{n-1}+b_{n-1}}{2}$ and $b_n=\sqrt{a_{n}b_{n-1}}$.

After sufficient numbers of iterations of the same steps, it is observed that $a\text{~}b$, that is $a_\infty=b_\infty$, which we can easily prove.

At $a=1$ and $b=2$, I get the following value of convergence: 1.6539866862653758, which turns out to be equal to $\frac{3\sqrt3}{\pi}$!


Python code below:

a=1
b=2
while(a!=b):
     a=(a+b)/2 #Arithmatic mean
     b=pow((a*b),0.5) #Geometric mean
print(a)
#print(3*pow(3,0.5)/a) which equals pi

Here is a method which explains, and generalizes the case for all values of $a$ and $b$, but I am still looking for a better intuition...

$"Let (a=b\cos\theta)\\ Given(a_{1}=\displaystyle \dfrac{a+b}{2}) \\(\displaystyle { a }_{ 1 }=\dfrac { b\cos { \theta +b } }{ 2 } =b\cos ^{ 2 }{ \dfrac { \theta }{ 2 } } ) \\(b_{ 1 }=\sqrt { a_{ 1 }b } =\sqrt { { b }^{ 2 }\cos ^{ 2 }{ \dfrac { \theta }{ 2 } } } =b\cos { \dfrac { \theta }{ 2 } }) Given \\(\displaystyle a_{ 2 }=\dfrac { a_{ 1 }+b_{ 1 } }{ 2 } =\dfrac { b\cos ^{ 2 }{ \dfrac { \theta }{ 2 } +b\cos { \dfrac { \theta }{ 2 } } } }{ 2 } =\dfrac{b \cos \dfrac{\theta}{2}(\cos \dfrac{\theta}{2}+1)}{2}=b\cos { \dfrac { \theta }{ 2 } } \cos ^{ 2 }{ \dfrac { \theta }{ 4 } } ) \\( \displaystyle b_{2}=\sqrt{a_{2}b_{1}}) \\(\displaystyle =\sqrt { { b }^{ 2 }\cos ^{ 2 }{ \frac { \theta }{ 2 } } \cos ^{ 2 }{ \frac { \theta }{ 4 } } } ) \\(\displaystyle b_{2}=b\cos { \frac { \theta }{ 2 } } \cos { \frac { \theta }{ 4 } } )Similarly, \\(\displaystyle b_{ 3 }=b\cos { \frac { \theta }{ 2 } } \cos { \frac { \theta }{ 4 } } \cos { \frac { \theta }{ 8 } } )So,\\(b_{ n }=b\cos { \dfrac { \theta }{ 2 } } \cos { \dfrac { \theta }{ 4 } } \cos { \dfrac { \theta }{ 8 } } ......\cos { \dfrac { \theta }{ { 2 }^{ n } } } )Now, \\(b_{ \infty }=\displaystyle \lim _{ n\rightarrow \infty }{ { b }_{ n } } )\text{we can reduce} \\(b_n=\dfrac {b\cos { \dfrac { \theta }{ 2 } } \cos { \dfrac { \theta }{ 4 } } \cos { \dfrac { \theta }{ 8 } } ......2 \sin { \dfrac { \theta }{ { 2 }^{ n } }} \cos { \dfrac { \theta }{ { 2 }^{ n } } }}{2 \sin { \dfrac { \theta }{ { 2 }^{ n } }}}=\dfrac {b\cos { \dfrac { \theta }{ 2 } } \cos { \dfrac { \theta }{ 4 } } \cos { \dfrac { \theta }{ 8 } } ...... \cos { \dfrac { \theta }{ { 2 }^{ n-1 } } }}{2 \sin { \dfrac { \theta }{ { 2 }^{ n } }}} )\text{and thus reducing so on, we get}\\(=\displaystyle \lim _{ n\rightarrow \infty }{ \displaystyle \dfrac { (\dfrac { \theta }{ { 2 }^{ n } } )b\sin { \theta } }{ \theta \sin { (\displaystyle\frac { \theta }{ { 2 }^{ n } } } ) } } =\dfrac { b\sin { \theta } }{ \theta } =\dfrac { \sqrt { 1-\dfrac { { a }^{ 2 } }{ { b }^{ 2 } } } }{ \cos ^{ -1 }{ (\dfrac { a }{ b } ) } } =\dfrac { \sqrt {{ { b }^{ 2 }-{ a }^{ 2 } }} }{ \cos ^{ -1 }{ (\dfrac { a }{ b } ) } } )"$

Hence, at $a=1$ and $b=2$, we get the $\pi$ through the inverse of cos term. It is counterintuitive that $\pi$ turns up here through mere substitution, and I am hopeful that there exists a more natural, better understanding of this problem than the one mentioned above, which connects together the seemingly unreleated areas of maths.

Can anyone please help me with any alternative, more elegant, or visual solution?


P.S.--

This doesn't answer my question, and just is another form of the proof given above. I am looking for a more intuitive/visual/elegant proof for why pi turns up here....


EDIT-- have tried adding an image of the convergence table of the sequence

Convergece