# How to calculate Pi: better Google or the sausages? (Part 1)

The discovery of Pi (henceforth π) seems to be due to Archimedes of Syracuse, the scientist and inventor originally from Magna Graecia, best known for his exclamations in the bathtub. To Archimedes the calculations did not fit: he wondered what was the link between the diameter of the circle and the perimeter. The p of the π derives from the word periphéria (περιϕέρεια), that is, perimeter or outline (however, this thing was introduced only 300 years ago).

Our hero seems to have realized that the circle can be considered as a regular polygon with an infinite number of sides.

εὕρηκα!11!!1!

Enthusiasm is fine, but there is no need to use such exclamations.

Therefore, by approximating the circle to a polygon with many, many sides, it is possible to approach the relationship between the length of a circumference and its diameter.
We just need to start from a regular polygon (for example an equilateral triangle or a square) whose perimeter and radius we can calculate.

Gradually, we can increase the number of sides of the polygon. The method described is called the exhaustion method (perhaps because if you continue with this method, sooner or later you exhaust your self) and it already shows a very interesting aspect of this number:

there is no simple formula or equation to calculate π.

Only a process that can potentially last indefinitely allows us to compute π, just as its digits are infinite.

Seen in more detail, for the method we can start from a regular polygon of our choice.
No, not that …
No, another come on …
Oh well, I choose: we draw an inscribed hexagon (the vertices touch the circumference from the inside) and a circumscribed hexagon (the sides touch the circumference from the outside) to a circle of radius R. Then the perimeter of the inscribed hexagon in will be less than the perimeter of the circle p which will, in turn, be less than the perimeter of the circumscribed hexagon circ.
In other words, we can just say

in < p < circ.

The inscribed hexagon has a perimeter of 6R (you can take it as a dogma or you can simply count the sides), while the perimeter of the circumscribed hexagon is 6.93R (this is a bit more complicated and to calculate it we need the tangent of 30 degrees).
Dividing everything by the 2R diameter we obtain

3 < p/2R < 3.46

Ta daaaaan! Obviously the p/2R ratio is the constant that interests us and to which we give the name of π. And now we have discovered that the value of the ratio is between 3 and 3.46, so we can confirm that π starts with the digit 3. But in order to be able to confirm even the first decimal digit, we need to repeat the procedure with a 14-sided polygon, with which we will find

3.11 < p/2R < 3.19.

While to confirm the second decimal place you need a 57-sided polygon.

At this point, to get better and better approximations, you can proceed with the same idea for polygons with even more sides.
Incidentally, in this way, Archimedes laid the foundations for the integral calculus without having the slightest idea of what it was.

And if you think you have wasted your time reading up to here and trying to calculate a few π digits, maybe you don’t know that in 2019 Google spent about \$ 200,000 to calculate 31.4 (tells you nothing?) Trillions of digits of π. Not bad, huh? But only a few months later, Timothy Mullican, by collecting some second-hand hardware, managed to calculate 50 trillion digits (though spending about \$ 10,000). And he did it as a hobby.
To clarify your ideas, 50 trillion you write 50'000'000'000'000 (that is, 50 with 12 other zeros) and all these figures must be saved somewhere, otherwise, it is all useless.
For this task, Mullican needed about 281 terabytes for the disk (consider that, usually, when you buy a normal pc it has 1 terabyte or less). While the amount of memory (RAM) required was around 345 gigabytes.
Of course, both Google and Mullican did not use Archimedes’ method for their calculations. They used a slightly more effective procedure, that is, a procedure that allows you to find figures faster. But it is also much less immediate to understand. In case you are curious, here is the Chudnovsky Algorithm.

All this effort for what purpose? The π today is known for its central role in geometry and consequently in all the fields that use it: arithmetic and statistics, physics and biology, etc. Consider that there are innumerable series and integrals that converge to some real value from which π can be derived.
You will find plenty of them on the dedicated Wikipedia page: from the Basel series to trigonometric integrals! Vice versa, this is of help to those who need to calculate average values, especially in physics, since the integrals that emerge from the calculations are often Gaussian integrals that have the reputation of converging to powers of the root of π to less than a few factors.

The presence of π in physics then derives almost exclusively from the geometry of space.
Assuming that the average reader knows what it means to average readers, the explanation is this: let’s imagine averaging some quantity with angles. Going to add all the angles from 0 to 2π it is clear that π can remain inside the result as a geometric factor. In fact, theoretical physicists do not care and sometimes remove the geometric factor, at least when the accounts serve to conceptually direct the research.

Mathematicians, that cannot hide it under the carpet, have much more respect for π. Indeed, they enjoy finding new methods to calculate it with an insane PRECISION even if there is no PRECISE reason to do that (haha …).
These methods can be a lot of fun, so it’s worth describing some of them later. In addition, mathematicians have fun together with biologists to look for π in living things. Some other mathematician, on the other hand, likes to think that if there was a river of infinite length, the ratio between the distance as the crow flies from the source and the actual length of the river would be nothing but π!
In short, more than a practical meaning, it has the wonderful peculiarity of being funny, in spite of the other real numbers!

In the next episode, we will see how to use food waste to calculate a good approximation of π.

We write about many things. Do not take us too seriously.