## 3 Ways of Knowing that π = 3.14159…

I bet you anything— pi is the most famous
figure in maths… maybe after the number one. If you take any circumference and try to figure
the measure of its edge, you’ll find that it always is three times its diameter… and
a little bit more. That number of times is the number pi. The thing is that knowing how much that “little
more” actually is a real challenge— greek mathematicians spent some time thinking about
it, and even the Bible, indirectly, makes an attempt. And you could think it’s easy, that you
only need to draw some circles and measure them properly. This may be useful to get the first numbers,
but you’re going to get in trouble if you try to go further— not only because measuring
distances accurately is hard, also because every circumference that you draw, sculpt
or model is going to be imperfect, even if its flaws are tiny. Never forget that perfect circles exists only
in our minds, and that’s where we have to solve this problem. And that’s how, after centuries of brooding
over it, mathematicians have found several methods of reaching this value without having
to use rulers and compasses. In this video, I will show you how these three
methods work. Besides, I’ll also leave in the description
three links to three codes (programmed and commented by me) so your computer can carry
out each method. If you’ve never played with C++, you can
also find more complete instructions— But enough chatter, let’s get mathematic. These are the three ways of knowing that pi
equals 3.14159 and all the rest. The first method is based on the utilisation
of polygons, those flat thingies whose sides are equal. For example, this triangle is a three-sided
polygon, a hexagon has got six sides and a dodecagon has got twelve. I’m sure that you’ve noticed that, the
more sides a polygon has, the more it looks like a circumference. Let’s exploit this, let’s calculate the
“pi” of the polygon. This is the way used by Archimedes, Zu Chongzhi
and Liu Hui, they started with a simple polygon, such as a square and, using their geometric
superpowers, they calculated in each step the measures of a polygon with more and more
sides. This means that, if we end in an octagon,
we will obtain that our pi equals 3.18— not the best result, which is normal. An octagon is not the best circumference in
the world. But with a hundred sides we obtain 3.142,
with a thousand we obtain 3.1416… And if we get to one million sides we will
obtain 12 figures of accuracy. Check the code for more information. Let’s get to the next one: this time we
will use random numbers, which is commonly known as a Monte Carlo method. This is how we do it: we build a square and
draw a circle in it. Let’s say that I try to divide the area
of the square by the area of the circle. As it is well known, the square’s area is
its side squared, while the circle’s is the result of the multiplication of pi and
is the half of the square’s side, so you simplify the sides and, manipulating them,
we obtain that pi equals four times the area of the circle divided by the area of the square. This means that obtaining the value of pi
depends on our ability measuring this areas— bad news, if we already have a hard time measuring
the perimeter, imagine the headache of measuring the entire surface. We use random numbers for that purpose. Let’s think the square is some kind of target
towards which we are going to throw some darts completely randomly. We know they will fall inside the square,
but we are not sure if they’ll fall inside the circle. Be aware of the fact that if I threw an enormous
amount of darts, I’d cover the entirety of the square’s surface, there would be
a dart in each point of it. Here’s the trick— if I count how many
darts are inside the circle and how much of them are inside the square and then I divide
these quantities, I’ll obtain the same proportion I would obtain if I was dividing the areas. I’m measuring the surfaces using random
numbers! Of course, you need to throw a lot of darts
to make this true— the more darts we throw, the more accuracy we’ll obtain. If we calculate pi using fifty darts, we will
only get the two first figures, while if we throw ten millions, we will get up to the
fourth one. This is one of the disadvantages of Monte
Carlo— although it is great to determine very crazy areas, it needs lots and lots of
random numbers to get far. As before, check the code for more details. And let’s finish with the third and the
best one— the use of series. Normally, the addition of infinite things
leads to an infinitely big result, but, sometimes, surprising things like this happen: the additions
of the inverses of the positives squared, one plus a quarter plus a ninth, et cetera… The thing is that mathematicians realised
that the more of these terms you add, the result tends to a very specific number instead
of growing excessively. Knowing accurately the value of this figure
was one of the challenges of the time, the so-called Basel Problem, solved by one of
the bosses in Science History, mister Euler. His conclusion was that the addition equals
pi squared divided by six— So we can take advantage of this peculiar method in order
to obtain pi. The idea is adding as much terms as we can,
multiply them by six, calculate the root square, and we’ll get what we wanted. Adding the first a hundred terms we obtain
the two first figures, with ten thousand we get up to the fifth one, and we obtain the
eight one with a billion terms. I want to underline that this is not the only
series leading to pi. There are a lots of formulae in the mathematical
world (some even more efficient than this one) that connect with this number, connexions
from lots of corners of Mathematics, not only Geometry. And this is one of the oddest things about
pi— it appears naturally without circles or circumferences around… But we’ll talk about these peculiarities
in another video. And, you know, if you want more science you
just have to subscribe. And thanks for watching!