Pi Calculations
Pi (π) is defined as the Circumpherence (C) of a circle divided by its diameter (d).
Table of Contents
1. Using Trigonometry
2. Using Differential Calculus
3. Using Integral Calculus
4. Using Polygons
5. Precision
6. History of Pi
1. Using Trigonometry
Key:
| C | Circumference |
| Ci | Circumference, inner polygon |
| d | diameter |
| r | radius |
| xi | point x-inner value |
| yi | point y-inner value |
| θ | theta, angle at the center |
| ψ | psi, angle at the periphery near the circle |
Method
Take a generic polygon, in this case a hexagon (6 sides), and divide it as shown.
Notice that you can divide the triangle to the upper right and create a length of yi.
In this case, you can use yi as a rough estimate of the radius (r).
By taking ever smaller values of angle (π), and ever smaller values of yi, then multiply inversely proportional to the angle to get a rough estimate of the circumpherence (C), you can then divide this by the diameter (d) to get pi (π).
Formulae
sin θ =
Since r = 1:
sin θ = y i
π = =
Calculations
θ = 60° = 1.047 radians
sin(1.047) = yi = 0.866
6 yi = 6 x 0.866 = 5.196 < C
π = = = 2.598076211
Note: this is only a first approximation. If you double the divisions from 6 to 12 to 24, and so on, you can build a table of calculations that follows. As you approach 18 iterations, or 786,432 divisions, you approximate π by six decimal points. You can carry out his calculation to get as much precision as necessary. π is an irrational number, so that the series repeats to infinity.
Table
| # | Div | Deg | Rads | yi | mult | π (÷2) |
|---|---|---|---|---|---|---|
| 1 | 6 | 60 | 1.047 | 0.866 | 5.196 | 2.598076211 |
| 2 | 12 | 30 | 0.524 | 0.500 | 6.000 | 3.000000000 |
| 3 | 24 | 15 | 0.262 | 0.259 | 6.212 | 3.105828541 |
| 4 | 48 | 7.5 | 0.131 | 0.131 | 6.265 | 3.132628613 |
| 5 | 96 | 3.75 | 0.065 | 0.065 | 6.279 | 3.139350203 |
| 6 | 192 | 1.875 | 0.033 | 0.033 | 6.282 | 3.141031951 |
| 7 | 384 | 0.9375 | 0.016 | 0.016 | 6.283 | 3.141452472 |
| 8 | 768 | 0.46875 | 0.008 | 0.008 | 6.283 | 3.141557608 |
| 9 | 1,536 | 0.234375 | 0.004 | 0.004 | 6.283 | 3.141583892 |
| 10 | 3,072 | 117.19 x10-3 | 0.002 | 0.002 | 6.283 | 3.141590463 |
| 11 | 6,144 | 58.59 x10-3 | 0.001 | 0.001 | 6.283 | 3.141592106 |
| 12 | 12,288 | 29.30 x10-3 | 0.001 | 0.001 | 6.283 | 3.141592517 |
| 13 | 24,576 | 14.65 x10-3 | 0.000 | 0.000 | 6.283 | 3.141592619 |
| 14 | 49,152 | 7.32 x10-3 | 0.000 | 0.000 | 6.283 | 3.141592645 |
| 15 | 98,304 | 3.66 x10-3 | 0.000 | 0.000 | 6.283 | 3.141592651 |
| 16 | 196,608 | 1.83 x10-3 | 0.000 | 0.000 | 6.283 | 3.141592653 |
| 17 | 393,216 | 915.53 x10-6 | 0.000 | 0.000 | 6.283 | 3.141592653 |
| 18 | 786,432 | 457.76 x10-6 | 0.000 | 0.000 | 6.283 | 3.141592654 |
| ∞ | 3.141592654 |
Graph
2. Using Differential Calculus
Key:
| C | Circumference |
| d | diameter |
| r | radius |
| xo | point x at the initial iteration, on the circle |
| yo | point y at the initial iteration, on the circle |
| xn | point x after n iterations |
| yn | point y after n iterations |
| θo | angle theta, at the initial iteration |
| θn | angle theta, after n interstions |
Method
Take ever smaller values for theta (θ), using the differential equation listed below.
Formulae
sin θ =
r = 1
Therefore, we simply to:
sin θ = yo
From Trigonometry, we know that:
→ 1
Substitute π/n for θ:
→ 1
Simplify the expression on the left by inverting the ratio:
[sin π/n] → 1
Multiply both sides of the expression by π:
n [sin π/n] → π
Calculations
First, let us take n = 6:
sin(π/n) = sin(π/6) = 0.5
n sin(π/n) = 6 x 0.5 = 3.0
Therefore, π must be greater than 3.0. If we take iterations of n by doubling the value 6 to 12, then 12 and so forth, we can create a table that follows.
Table
| # | n | sin(π/n) | n sin(π/n) |
|---|---|---|---|
| 1 | 6 | 0.500 | 3.000000 |
| 2 | 12 | 0.259 | 3.105829 |
| 3 | 24 | 0.131 | 3.132629 |
| 4 | 48 | 0.066 | 3.139350 |
| 5 | 96 | 0.033 | 3.141032 |
| 6 | 192 | 0.016 | 3.141452 |
| 7 | 384 | 0.008 | 3.141558 |
| 8 | 768 | 0.004 | 3.141584 |
| 9 | 1,536 | 0.002 | 3.141590 |
| 10 | 3,072 | 0.001 | 3.141592 |
| 11 | 6,144 | 0.0005 | 3.141593 |
| 12 | 12,288 | 0.0003 | 3.141593 |
Note: after 11 iterations, π has been calculated to six decimal points.
Graph
3. Using Integral Calculus
Key
| C | Circumference |
| d | diameter |
| r | radius |
| A | Area, in this case half a circle |
Formulae
C = 2 π r
A = π r2
½ A =
r = 1
½ A =
x2 + y2 = r2
Solve this as a function of x:
f(x) = sqrt(r2 - x2)
f(x) = sqrt(1 - x2)
Take the integral from -1 to 1, which is ½ A:
π = 2
If you divide the area by 0.5 increments, and use the above formula to calculate the height of each rectangle, you shall have four areas to measure to produce the following table:
Table, divide the half circle by 4 rectangles
| x | x-diff | f(x) | An |
|---|---|---|---|
| -1 | 0.000 | ||
| -0.5 | 0.5 | 0.866 | 0.433 |
| 0 | 0.5 | 1.000 | 0.500 |
| 0.5 | 0.5 | 0.866 | 0.433 |
| 1 | 0.5 | 0.000 | 0.000 |
| ½πi | 1.366 | ||
| πi | 2.732 |
Continue by creating 8 rectangles under the half circle:
Table, divide the half circle by 8 rectangles
| x | x-diff | f(x) | An |
|---|---|---|---|
| -1 | |||
| -0.75 | 0.25 | 0.661 | 0.165 |
| -0.5 | 0.25 | 0.866 | 0.217 |
| -0.25 | 0.25 | 0.968 | 0.242 |
| 0 | 0.25 | 1.000 | 0.250 |
| 0.25 | 0.25 | 0.968 | 0.242 |
| 0.5 | 0.25 | 0.866 | 0.217 |
| 0.75 | 0.25 | 0.661 | 0.165 |
| 1 | 0.25 | 0.000 | 0.000 |
| ½πi | 1.498 | ||
| πi | 2.996 |
You will notice quickly that the value of π is increasing. You can continue the process repeatedly until you have has many digits of accuracy as you wish. In my case, I shall continue until I have 6 digits:
Table, iterating the area of a half circle, then multiply by 2
Continue by creating 16 rectangles:
Table, divide the half circle by 16 rectangles
| x | x-diff | f(x) | An |
|---|---|---|---|
| -1 | |||
| -0.875 | 0.125 | 0.484 | 0.061 |
| -0.75 | 0.125 | 0.661 | 0.083 |
| -0.625 | 0.125 | 0.781 | 0.098 |
| -0.5 | 0.125 | 0.866 | 0.108 |
| -0.375 | 0.125 | 0.927 | 0.116 |
| -0.25 | 0.125 | 0.968 | 0.121 |
| -0.125 | 0.125 | 0.992 | 0.124 |
| 0 | 0.125 | 1.000 | 0.125 |
| 0.125 | 0.125 | 0.992 | 0.124 |
| 0.25 | 0.125 | 0.968 | 0.121 |
| 0.375 | 0.125 | 0.927 | 0.116 |
| 0.5 | 0.125 | 0.866 | 0.108 |
| 0.625 | 0.125 | 0.781 | 0.098 |
| 0.75 | 0.125 | 0.661 | 0.083 |
| 0.875 | 0.125 | 0.484 | 0.061 |
| 1 | 0.125 | 0.000 | 0.000 |
| ½π | 1.545 | ||
| π | 3.090 |
Continue dividing until you reach the desired number of digits:
Table, with divisions (Div) and the value of pi (π)
| Div | π |
|---|---|
| 4 | 2.732051 |
| 8 | 2.995709 |
| 16 | 3.089819 |
| 32 | 3.123253 |
| 64 | 3.135102 |
| 128 | 3.139297 |
| 256 | 3.140781 |
| 512 | 3.141306 |
| 1024 | 3.141491 |
| 2048 | 3.141557 |
| 4096 | 3.141580 |
| ∞ | 3.141593 |
Graph
4. Using Polygons
![]() |
![]() |
![]() |
![]() |
![]() |
Key
| C | Circumference |
| Ci | Circumference, inner polygon |
| Co | Circumference, outer polygon |
| d | diameter |
| r | radius |
| xi | point x-inner value |
| yi | point y-inner value |
| xo | point x-outer value |
| yo | point y-outer value |
| li | line, inner value, inside the circle |
| lo | line, outer value, outside the circle |
| θ | theta, angle at the center |
| θi | theta, inner angle at the center |
| θo | theta, outer angle at the center |
| ψ | psi, angle at the periphery near the circle |
| ψi | psi, inner angle at the periphery |
| ψo | psi, outer angle at the periphery |
Method
Take a generic polygon, say the Pentagon, and define the inner line (li) and the outer line(lo). Calculate each of these values and multiply by the number of divisions: in this case 5. The inner lines give the lower limit and the outer lines give the upper limit of π. Take higher orders of polygons to narrow the range.
Formulae
sin θi = yi
sin ψi =
sin θo = yo
sin ψo =
r = 1
π = =
Calculations
Inner Pentagon
θi = 72° = 1.257 rads
sin θi = yi
sin (1.257) = yi
yi = 0.951
sin ψi =
ψi = 54° = 0.942 rads
li = = = 1.176
Ci = 5 li = 5 x 1.176 = 5.878
πi = = = 2.940
Outer Pentagon
θo = 36° = 0.628 rads
sin θo = yo
sin (0.628) = yo = 0.588
ψo = 54° = 0.942 rads
lo = = = 1.453
Co = 5 lo = 5 x 1.453 = 7.265
πo = = = 3.633
Therefore:
πi < π < πo
2.939772 < π < 3.632713
Note: you can do the same calculations for a series of polygons and create the following tables:
Table of Angles used in the calculations
| n | Polygon | θi | ψi | θo | ψo |
|---|---|---|---|---|---|
| 3 | Triangle | 60 | 60 | ||
| 4 | Square | 45 | 45 | ||
| 5 | Pentagon | 72 | 54 | 36 | 54 |
| 6 | Hexagon | 60 | 60 | 30 | 60 |
| 7 | Heptagon | 51.43 | 64.29 | 25.71 | 64.29 |
| 8 | Octagon | 45 | 67.50 | 22.5 | 67.5 |
| 9 | Nonagon | 40 | 70 | 20 | 70 |
| 10 | Decagon | 36 | 72 | 18 | 72 |
Table of Calculations using Polygons
| n | πi | range | πo |
|---|---|---|---|
| 3 | 2.598076 | < π < | 5.196152 |
| 4 | 2.828427 | < π < | 4.000000 |
| 5 | 2.938926 | < π < | 3.632713 |
| 6 | 3.000000 | < π < | 3.464102 |
| 7 | 3.037186 | < π < | 3.371022 |
| 8 | 3.061467 | < π < | 3.313708 |
| 9 | 3.078181 | < π < | 3.275732 |
| 10 | 3.090170 | < π < | 3.249197 |
Graph
Special Case of the Triangle and Square
You will notice that the triangle and square represent special cases with regards to the polygons. The calculations are included here for completeness.
Triangle
Inner Triangle
θ = θi
θi = 60° = 1.047 rads
sin θi = yi
sin(1.047) = yi = 0.866
Ci = 6 x 0.866 = 5.196
πi = = = 2.598076
Outer Triangle
θ = θo
θo = 60° = 1.047 rads
sin θo =
cos θo =
Solving for (r+lv):
r + lv =
r + lv =
Then, equating the two expressions gives:
yo =
yo = = 1.732
Co = 6 x 1.732 = 10.392
πi = = = 5.196152
Square
Inner Square
θ = 45° = 0.785 rads
sin θ = yi
sin(0.785) = yi = 0.707
Ci = 8 x yi = 8 x 0.707 = 5.657
πi = = = 2.828427
Outer Square
yo = r
Co = 8 x r = 8 x 1 = 8
πo = = = 4.000000
5. Precision
I have calculated π to six decimal places: 3.141593. π to 9 decimal places is 3.141592654. The difference between these two values is 346 x10-9, or a ratio of 1:2,890,173.412, or roughly 1 in 3 million! This begs the question, how precise do you need to be?
In 1873, William Shanks calculated π to 527 decimal points. According to Live Science and ScienceAlert, π has been calculated to 314 trillion digits using a Dell PowerEdge R7725 server. These are just exercises of endurance and prestige, respectively. According to NASA, they need to use π to 15 decimal places (3.141592653589793) for interplanetary navigation.
According to Wikipedia, the following is a timeline with regards to the accuracy of calculations of π:
top of page6. History of Pi
Pi (π), the mathematical constant representing the ratio of a circle's circumference to its diameter, has been a subject of fascination for mathematicians and scientists for thousands of years. The history of π is a rich and complex one, spanning ancient civilizations, philosophical debates, and groundbreaking discoveries.
Ancient Civilizations (circa 2000 BC - 500 AD)
The earliest recorded approximation of π was found on an ancient Babylonian tablet from circa 1900-1600 BC. The tablet showed a calculation of π as 3.125, which was remarkably close to the actual value. Similarly, the ancient Egyptians and Greeks also made efforts to approximate pi, with the Greek mathematician Archimedes (287-212 BC) making significant contributions to the field.
Archimedes' most notable contribution was his discovery of the method of exhaustion, a precursor to integration, which allowed him to calculate π with remarkable accuracy. He approximated π as 3.1418 by inscribing and circumscribing polygons around a circle and calculating their perimeters.
Middle Ages (circa 500-1500 AD)
During the Middle Ages, mathematicians in the Islamic Golden Age made significant contributions to the calculation of pi. The Persian mathematician Muhammad ibn Musa al-Khwarizmi (c. 780-850 AD) wrote a treatise on algebra, which included a calculation of π as 3.125.
The Indian mathematician Aryabhata (476 AD) also made significant contributions to the calculation of pi, approximating it as 3.1416. These early calculations laid the foundation for later mathematicians to build upon.
Renaissance and Enlightenment (circa 1500-1800 AD)
During the Renaissance, mathematicians such as Ludovico Ferrari (1542-1625 AD) and Ludolph van Ceulen (1540-1610 AD) made significant contributions to the calculation of pi. Ferrari calculated π to 12 decimal places, while van Ceulen calculated it to 35 decimal places.
The development of calculus and the invention of the decimal system also facilitated the calculation of pi. Mathematicians such as Isaac Newton (1643-1727 CE) and Gottfried Wilhelm Leibniz (1646-1716 AD) made significant contributions to the field of calculus, which laid the foundation for later mathematicians to calculate π with greater accuracy.
Modern Era (circa 1800-present)
In the 19th century, mathematicians such as Leonhard Euler (1707-1783 AD) and Carl Friedrich Gauss (1777-1855 AD) made significant contributions to the calculation of pi. Euler calculated π to 35 decimal places, while Gauss calculated it to 38 decimal places.
In the 20th century, the development of computers and mathematical software enabled mathematicians to calculate π with greater accuracy and speed. In 1949, the first computer calculation of π was performed by John von Neumann, who calculated it to 2,037 decimal places.
In 2019, a team of mathematicians and computer scientists calculated π to over 31.4 trillion digits using a supercomputer. This calculation set a new record for the most digits of π ever calculated.
Philosophical Debates
Throughout history, philosophers have debated the nature of π and its relationship to the mathematical universe. Some philosophers have argued that π is a mathematical constant that represents an inherent property of the universe, while others have argued that π is a human construct, created by mathematicians to describe a particular aspect of reality.
In ancient Greece, the philosopher Pythagoras (c. 570-495 BC) argued that π was a fundamental aspect of the universe, representing the ratio of the circle's circumference to its diameter. This view was later adopted by mathematicians and scientists, who saw π as a fundamental constant that governed the behavior of physical systems.
In conclusion, the history of π is a rich and complex one, spanning thousands of years and multiple civilizations. From ancient Babylonian tablets to modern computer calculations, mathematicians and scientists have continued to refine and improve our understanding of this fundamental mathematical constant. As we continue to calculate π with greater accuracy and speed, we are reminded of the power and beauty of mathematics to describe and understand the world around us.
(Written by AI using ollama version 3.2)











