Pythagoras, “Father of the Shortcut”, is honored every time someone diagonally traverses their campus lawn rather than taking perpendicular sidewalks to class.

Using Pythagorean’s Theorem and High School-level algebra, I will show you a simple derivation I found for an iterative expression of pi. (Yes, it was once again during a long, boring summer internship with nothing to do.)

Before we begin, we must define pi so that we will know how to find it. Pi (π) is a constant which relates the diameter of a circle to its circumference. In other words, if we know both the diameter and circumference of a circle, dividing the latter by the former will yield pi.

Our approach to finding this constant will be as follows:

- Inscribe a circle with a regular polygon (equal side lengths). Find the circumference (perimeter) of the “circle”, then divide this value by the diameter.
- Double the number of sides of the previous polygon. Find an expression that relates the side length of the new polygon to the side length of the previous polygon, then repeat step 1 with the new polygon.
- Repeat step two indefinitely
- Identify a recurring pattern. Iterate to solve for pi.

Basically, we are taking a polygon and systematically “cutting” off its corners. As we remove more corners (by increasing the number of sides of the inscribing polygon), the polygon will begin to resemble a circle and our approximation for pi will become more accurate. As the number of sides approaches infinity, our approximation for pi will approach the actual value of pi.

Before we begin, here are a few points of clarification concerning the following illustrations and poorly chosen variable indicators:

- “D” variables (D
_{1}, D_{2}, etc.) do not represent the diameter of the circle. They are diagonal lengths from opposite corners of inscribing polygons. We will need to calculate these values for each iteration. - “S” is the length of the shortest line which bisects the approximating polygon. This DOES represent the diameter of the circle. Since all polygons will inscribe the same circle, this value will always be constant.
- “S” variables (S
_{1}, S_{2}, etc.) are the side lengths of polygons. The accompanying number relates to the iteration number. These are not to be confused with “S”, a constant value for the diameter of the circle.

**First Iteration**

The first polygon we will use to approximate the circle will simply be a square. For those of you who don’t remember what a square looks like, you can stop reading this now.

**Finding S**_{1} and the Circumference

_{1}and the Circumference

From the image, we can easily see that S_{1} is just S.The “circumference” of a regular polygon is the number of sides of that polygon times the side length. Thus, in this case,

*Circumference = 4*S _{1} = 4*S.*

**Approximating Pi**

Since the diameter of the “circle” is S, our approximation for pi is simple:

*π = Circumference/Diameter = 4*S/S = 4.*

Of course, 4 is a very bad approximation for pi. But we’ll let it slide since this is just the first iteration.

## Finding D_{1}, the Diagonal Length

The next step is to calculate D_{1}, the diagonal length of the polygon. We will need this value for the next iteration.

Since S_{1}=S,

*D _{1}=S*√2.*

# Second Iteration

Here’s an image showing the second iteration after doubling the number of polygon sides. The first polygon is also shown for reference.

## Finding S_{2} and the Circumference

What is the value for S_{2}? This is where things begin to get a little complicated.

S_{1}, calculated in the previous iteration (we recognized that its value was simply S), is the sum of S_{2} and the two green lines shown in the image above (I apologize if you’re color-blind). The lengths of these green lines are found using Pythagorean’s Theorem:

*Green line = √((S _{2}/2)²+((D_{1}-S)/2)²)*

Adding the value for Green Line to the expression for S1 and taking things a step further, we see that

*(S _{1}-S_{2})² = (S_{2})² + (D_{1}-S)²*

Expanding, swapping S_{1} for S, and isolating S_{2}, we get

*S _{2}=S*(√2-1)*

Our approximation for pi is:

*π = C/D = 8*(√2-1)*S/S = 8*(√2-1).*

This value is, to 4 decimal places, 3.3137. This is a much better approximation, but still not nearly good enough.

## Finding D_{2}, the Diagonal Length

From the Pythagorean Theorem,

*D _{2}=√(S²+S_{2}²)=S√(4-2√2).*

**Third Iteration**

Here is an image of the 16-sided polygon (twice as many sides as the previous polygon) for this iteration.

From the image, we can tell that the derivation for all equations necessary to perform the iteration will be identical to the previous iteration, apart from the doubled number of sides needed to find the circumference. We use Pythagorean’s Theorem to find S_{3}, approximate pi, then use Pythagorean’s Theorem to calculate D_{3} in order to proceed to the fourth iteration.

**Finding an Iterative Expression for Side Length (S**_{n})

_{n})

The equation for find S_{3} is identical to that of finding S_{2}, and will be the same for all future iterations. Using exactly the same equation shown in the second iteration with updated variables for the third iteration, we find that:

*( S_{2}–S_{3})²=S_{3}²+(D_{2}-S)².*

Isolating for S_{3}:

*S _{3 }= -(D_{2}²-2*S*D_{2}+S²-S_{2}²)/(2*S_{2})*

In our last iteration, we calculated that the value for D_{2} is

*D _{2} = √(S² + S_{2}²)*

Plugging in this expression for D2 into the previous equation, we find that

*S _{3}= -(S² – S*√(S^2 + S_{2}²))/S_{2}*

Recall that the value for S is arbitrary. To simplify calculations, I am going to say that S=1. Then,

*S _{2}*

*= (√(1 + S*

_{2}*²*) – 1)/*S*_{2}Here’s this expression in an iterable form:

*S _{n }= [√(1 + S_{n-1}²) – 1]/S_{n-1}*

To work, this expression requires that S1 = 1 (since we just chose S = 1 to simplify the expression, and we already established that S_{1 }= S).

**How to Calculate Pi**

Recall that by definition, pi is the circumference of a circle divided by the diameter. For the our iterations, we have been using an expression like this to find pi:

*π = C/D = N _{n}*S_{n}/S*

where N_{n} is the number of sides of the polygon for that iteration.

For each iteration, the number of sides doubled. We started at 4 sides for the first iteration, 8 for the second, and so on. Thus,

*N _{n}= 2^{n+1}*

where n corresponds to the iteration number.

Our final expression for pi is

*π = C/D = 2^{n+1}*[√(1 + S_{n-1}²) – 1]/S_{n-1} *

where S_{1 }= 1.

Here is an example of how to use this expression:

Note that S_{n} is first solved, then multiplied by N_{n} to find pi.

**Note**

This iterative method will always result in a value for pi that is at least infinitesimally larger than the actual value. This is because the circle will always be inscribed within the polygon and will thus always have a smaller circumference.

Suppose we decided to switch tactics and, rather than dividing the circumference of the approximated “circle” by the selected diameter (S), we used a value corresponding to a circle that, rather than being inscribed by, intersected the midpoints of the polygon edges. This should theoretically give us a value closer to the actual value for pi.

To accomplish this, we modify the diameter to be half of the original diameter (inscribed) and half of the polygon diagonal (characteristic of a circumscribing circle):

`Diameter = S/2 + Dn/2`

where “Dn” represents the diagonal corresponding to the nth iteration.

For n=2, we get

`π = C/D = 8*(√2-1)*S/(S/2+S√(4-2√2)/2) = 16*(√2-1)/(1+√(4-2√2)).`

This gives, to four decimals, 3.1826, which is significantly closer to pi than the original approximation of 3.3137.