Methods for evaluating pi by Elizabeth

Elizabethof Cambridge 's entry into Varsity Tutor's July 2017 scholarship contest

  • Rank:
  • Unranked
Elizabeth of Cambridge , MA
Vote for my essay with a tweet!
Embed

Methods for evaluating pi by Elizabeth - July 2017 Scholarship Essay

If I was to give a TED Talk, my talk would be about the longest and most in depth research paper I have ever written. Over the course of 1 year I researched different methods for solving for pi, wrote computer programs to solve for these methods and wrote a paper containing all of this and evaluating the differences between the methods and their strengths and weaknesses. The following is my abstract from this research paper.
Abstract: As an irrational number pi has infinite digits, meaning no estimation, approximation, or calculation can ever perfectly represent the ratio between the diameter and circumference of a circle. However, for thousands of years, humans have been trying to find this number to the best of their ability leading to countless approaches for finding the digits of pi. The goal of this paper is to evaluate 5 different methods to find pi. This will be accomplished by writing computer programs to carry out large repetitions of series and calculate the value of pi based on each tactic. The result and difficulty of the process will then be compared in an attempt to find the most accurate and the simplest of the methods studied. My hypothesis is that although using geometry to solve for pi will be the simplest, it will also be the most inaccurate. On the other hand, the Nilakantha method will be the most accurate, while Archimedes method will be the most difficult. After investigating the methods I discovered that the geometric method was indeed the least accurate as from my calculations it was only accurate to one digit, and the Nilakantha series provided the best estimate of the 5 methods tested, as it was accurate to up to 14 digits of pi.

The following is the explanation for my first method:
Method 1: Archimedes Method
When researching pi, one of the first mathematicians to appear is Archimedes. Since he is generally accredited with discovering an accurate method for solving for pi, this was the first test I ran. His method begins by drawing a circle, with a square inscribed and a second square circumscribed around the circle. This is demonstrated in diagram 1. By increasing the side numbers of the inscribed and circumscribed polygons, the difference between the perimeter of the polygon and the circumference of the circle decreases, and the estimation for pi grows more and more accurate. In order to calculate the pi, the perimeter of the inscribed and circumscribed polygons are found using respectively. These numbers are then added together and divided by twice the diameter. This number is the estimate of pi. Alternatively, the two equations can be combined and evaluated as a limit that converges to pi. Here is that equation:

Here is the code for the Archimedes Method:
Archimedes Code:
import java.util.Scanner; //Allows program to later use Scanner object to read user input
public class Archimedes //Creates and names class for calculations
{ public static void main(String[] args) //Initiates class for program
{ Scanner scan = new Scanner(System.in); //Initiates scanner for program input System.out.print("Enter the desired number of repetitions: "); //Displays quotation
int repetitions = scan.nextInt(); //Records user input
double sides = 3; //Sets the number of sides for 1st calculation
double radius = 2; //Sets the radius for the circle
for (int i = 1; i <= repetitions; i ++) //Initiates loop to repeat the following calculations {double inscribed=sides*radius*Math.sqrt(2-(2*Math.cos(Math.toRadians(360.0/sides))));
/*Calculates perimeter of inscribed polygon equal to formula: */
double circumscribed = (2*sides*radius*Math.tan(Math.toRadians(180.0/sides)));
/*Calculates perimeter of circumscribed polygon equal to formula: */
double piGuess = (inscribed + circumscribed)/(4.0*radius); // Calculates pi estimate
System.out.println(i+ ": " + sides + "-gon: " + piGuess); // Display n-gon and pi estimate
sides++; } } } //Increases the number of sides by 1 and repeats for desired repetitions

This research paper was particularly interesting to me because of the combination of both mathematics and computer science which are the two areas I plan to study in college. Additionally all my hard work on this paper paid off, and if I had the opportunity to I would share the knowledge I learned and the combination of math and computer science with other students. Additionally, one of my teachers felt that projects like this are great for cross over learning and wanted to implement something similar to his computer science classes and math classes.

Votes