Saturday, 18 April 2009

Circle, never ever underestimate it again

If you have learnt about circles, you will know that the Greek letter π is quite important. But π is an irrational number (a number that can never be expressed as a fraction). So, what we use is just the approximation in our daily lives, ie, 3.142 or 22/7. But as you can see, if you really want the very precise value of π those approximations will not be suitable for you. Last night, I was wondering, how to get the precise value of π?

Now, I discovered one weird looking formula last night, which may not give you the precise value of π when you demanded it, but at least you'll know how to get the precise value of π. And some more, this formula requires a very large number.

And so, here it comes, some wonderful maths. If you hate maths, just skip this whole post.

Before I begin, I shall introduce to you one cool formula.

A = ns² tan θ / 4

where
A = Area of any regular polygon (a polygon with equal sides and equal internal angles)

n = number of sides
s = length of a side
θ = 90(n-2)/n

That formula will give you the area of any regular polygon, given the number of sides and the length of a side. Remember, it only works for regular polygons.

Right, remember the area formula for a circle? That's right,

A = πr²

Let's get the area of a unit circle (A circle with a radius of 1):

A = π x 1 x 1
A = π

So, from there, the area of a circle with radius of 1 is equal to π
This is crucial to find out the weird formula for π later.

==============================================
Next, we go on to the very important part of this post:

Now, area of circles, are usually just approximations, because we use the approximation of π to calculate the area. So, they are not equal to the real area of the circle. Here's a better way to understand it:

Given a number 3.5, and you rounded that number up to 4, 4 is just and approximation of 3.5, but 4≠3.5

Imagine a situation where we require the precise value. Yea, so we need something.

Let's begin with a circle, with a radius of 1 (unit circle)


We'll start by approximating the area of circle, then we'll work our way to the precise value of the area of the circle.

Let's place a cyclic polygon into the circle. A cyclic polygon is basically a polygon which, the vertices touch the circumference of the circle.

Here's a regular cyclic triangle:


To find its area, we need the length of its side.

Here, I introduce to you another formula:

s=2r cos θ

where
s=length of a side
r=radius of circle
θ=90(n-2)/n

This calculates the length of a side of a REGULAR cyclic polygon, given the radius of the circle, and the number of sides.

In this case, the length of a side of the cyclic triangle is

s=2(1) cos 30
s=1.732

So, area of the cyclic triangle is:
A=ns² tan θ / 4
A=3(1.732)² tan 30 / 4
A=1.299

Ok, keep that in mind, for now.

Next, let's use another cyclic quad, maybe this time, we'll use and octagon.



Using the same technique, you'll find that the area of a regular cyclic octagon in a unit circle is:

A=2.828

Okay, it's easy to observe that as the number of sides (n) gets bigger, the value obtained for the area of the cyclic polygon will get closer and closer to the area of the circle. If we assume that π=3.142, the area of cyclic triangle has a bigger difference from π (Area of a unit circle) compared to the area of the cyclic octagon.

So, from there, we can conclude that the higher the number of sides of the cyclic polygon, the closer it gets to the area of the circle.

If we keep going on and on, with bigger number of sides, you'll know that there's a limit.

n, A:
3, 1.299038106
10, 2.938926261
100, 3.139525976
1000, 3.141571983
10000, 3.141592447
100000, 3.141592652
1000000, 3.141592654
10000000, 3.141592653

As you can see, the value of A gets closer and closer towards π, but never really reach it, as the number of sides increases. Therefore, it's safe to say that there's a limit here. And we can write it out like so:



And so, we have the formula for finding the value of π. The precision of the value you get from there depends on how large your value of n is. It's best to use n=1000000. But the bigger it is the better. But to work, θ&ne90. So, when you count for θ, don't round 89.9999999999 to 90, because that can yield weird results in the end.

Now, I don't recommend you using this in your daily lives though. It's just not practical. And some more, I don't really that I'm the first to discover this weird formula. Others may also have discovered it also, long before I did, so yea.

0 comments: