2^n-gons

There’s nothing at all new about this, in fact it’s ancient, but maybe it’s new to you? So here goes.

Here’s a square inscribed in a unit circle:

Or to keep down the clutter, here’s just one quadrant of that:

One side of the square along with the radii at each endpoint forms a triangle. The length of one side of the square we’ll call s_4 and it is of course \sqrt 2. That means the perimeter of the square is p_4 = 4\sqrt 2\approx 5.656854249.

Now consider an inscribed octagon. Again, here’s just one quadrant.

One side of the square is labeled s_8; what’s its length? Well, drop a perpendicular from the vertex in the middle:

And now notice the right triangle with hypotenuse 1 and sides x_8 and h_8 is just half of a quadrant of an inscribed square, which means h_8=s_4/2. Then x_8^2 = 1-h_8^2 = 1-s_4^2/4. From that you can get y_8=1-x_8 and from that, s_8^2=h_8^2+y_8^2. The perimeter of the octagon is then p_8 = 8s_8\approx 6.122934918.

Well, that was so much fun, let’s do it again. Here’s a quadrant of a 16-gon:

The right triangle with hypotenuse 1 and sides x_{16} and h_{16} is just half of an eighth of an inscribed octagon, which means h_{16}=s_8/2. Then x_{16}^2 = 1-h_{16}^2 = 1-s_8^2/4, y_{16}=1-x_{16}, and s_{16}^2=h_{16}^2+y_{16}^2. The perimeter of the 16-gon is then p_{16} = 16s_{16}\approx 6.242890305.

You know the rest, right? From here you can do the 32-gon, 64-gon, 128-gon, and so on, getting x_{2n}^2 = 1-h_{2n}^2 = 1-s_n^2/4, y_{2n}=1-x_{2n}, s_{2n}^2=h_{2n}^2+y_{2n}^2, and perimeter = p_{2n} = 2ns_{2n}. For n = 1024, the perimeter is p_{1024}\approx 6.283175451 = 2\times 3.1415877255. As n increases, the perimeter gets closer and closer to the circumference of the circle, so this gives a way to calculate \pi.

What about circumscribed polygons? If you look at the figures above, you can see the ratio of the size of a circumscribed square to an inscribed square is 1/x_8. Likewise the ratio of the size of a circumscribed octagon to an inscribed octagon is 1/x_{16}, and so on. So the perimeter of a circumscribed n-gon is P_n = p_n/x_{2n}. As n increases, P_n approaches 2\pi from above. And the average of p_n and P_n is a better approximation to 2\pi than either, though not by a lot.

nh_nx_ny_ns_np_nP_naverage
41.414213565.656854258.000000006.82842712
80.707106780.707106780.292893220.765366866.122934926.627417006.37517596
160.382683430.923879530.076120470.390180646.242890306.365195766.30404303
320.195090320.980785280.019214720.196034286.273096986.303449816.28827340
640.098017140.995184730.004815270.098135356.280662316.288236776.28444954
1280.049067670.998795460.001204540.049082466.282554506.284447266.28350088
2560.024541230.999698820.000301180.024543086.283027606.283500746.28326417
5120.012271540.999924700.000075300.012271776.283145886.283264166.28320502
10240.006135880.999981180.000018820.006135916.283175456.283205026.28319024

This is something like the way Archimedes calculated \pi around 250 BC (I told you this was ancient), although he started with a hexagon rather than a square and only went up to a 96-gon. He didn’t have Google Sheets, though.

Advertisements