Categories

# Geometrically Approximating Pi

Archimedes found good estimates of pi by computing the perimeter of regular polygons that fit snugly inside and outside a circle. I’d like to take this basic approach and add some more modern twists. I say more modern, but I don’t mean cutting-edge. Taylor series are from the 1700s CE, compared to Archimedes living in the 200s BCE.

Working with a unit circle, the perimeter of the interior polygon is $P_1$, and the exterior polygon is $P_2$. The number of sides is indicated by n. Let’s do some Taylor series, assuming a near-infinite number of sides. That is, do a change of variables with $m=1/n$, and expand around $m=0$:

\begin{aligned} \frac{1}{2} P_1 &= n_1 \sin \left( \frac{\pi}{n_1} \right) \\ &= \pi - \frac{\pi^3 m^2}{6} + O[m]^4 \\ \frac{1}{2} P_2 &= n_2 \tan \left( \frac{\pi}{n_2} \right) \\ &= \pi + \frac{\pi^3 m^2}{6} + O[m]^4 \end{aligned}

Looking at these series, I notice that we can eliminate the quadratic term in two ways: with a different number of sides inside and out, or a weighted sum with the same number of sides. In the second case, we need $n_2=n_1 \sqrt{2}$.

\begin{aligned} \frac{2 P_1[n_1]+P_2[n_2=n_1]}{6} &= \pi + \frac{\pi^5 m^4}{20} + O[m]^6 \\ \frac{ P_1[n_1]+P_2[n_2=n_1 \sqrt{2}]}{4} &= \pi + \frac{\pi^5 m^4}{48} + O[m]^6 \end{aligned}

The second case is more than twice as accurate as the first. Neat.

What about using areas? Do those converge more quickly?

\begin{aligned} A_1 &= \frac{n_1}{2} \sin \left( \frac{2\pi}{n_1} \right) \\ &= \pi - \frac{2 \pi^3 m^2}{3} + O[m]^4 \\ A_2 &= n_2 \tan \left( \frac{\pi}{n_2} \right) \\ &= \pi + \frac{\pi^3 m^2}{3} + O[m]^4 \end{aligned}

As with the perimeter, we have the same sort of options. With different numbers of sides, this needs $n_2=n_1/ \sqrt{2}$. The results:

\begin{aligned} \frac{A_1[n_1]+2 A_2[n_2=n_1]}{3} &= \pi + \frac{2\pi^5 m^4}{15} + O[m]^6 \\ \frac{ A_1[n_1]+A_2[n_2=n_1/\sqrt{2}]}{2} &= \pi + \frac{\pi^5 m^4}{3} + O[m]^6 \end{aligned}

Nope, the area-based approach is worse. Oh well. And combining the areas and perimeters doesn’t give a better result than the second perimeter method.

Unfortunately, these series are meant for large numbers of sides. How well do they hold up when the number is small? Let’s parameterize the problem based on the total number of sides used.
Additionally, I’ll use an extra approximation that uses either $(P_1+k P_2)/(2(1+k))$ or$(k P_1+ P_2)/(2(1+k))$ (to abuse notation, I’ll do the same with the area). And I’ll use another modern tool: computers. They’re really useful for checking lots of discrete values.

The following plot shows that the new approximations are always better than the analytic methods, for small numbers of sides. Also, the perimeter-based approximation is generally better than area-based.

The most outstanding results were:

\begin{aligned} \frac{10 P_i[5]+P_2[3]}{22} &\approx \pi+ 2.54x10^{-3} \\ \frac{40 P_i[10]+P_2[3]}{82} &\approx \pi - 5.73x10^{-5} \\ \frac{24 P_i[12]+P_2[4]}{50} &\approx \pi + 2.75x10^{-6} \end{aligned}.

These don’t give particularly compact expressions, but it was fun to mess with old methods. Each of these polygons are also constructible by compass and straight edge!

This site uses Akismet to reduce spam. Learn how your comment data is processed.