## osanseviero one year ago Get an approximation of pi using a square and triangles inside a circle.

1. osanseviero

|dw:1441838480540:dw|

2. osanseviero

The idea is to first calculate the area of the square and then add triangles.

3. osanseviero

|dw:1441838520139:dw|

4. osanseviero

Asquare = (2r)^2 = 2 My problem is with getting the first level of triangles, and then adding triangles to those triangles

5. phi

what did you pick for r ? how about starting with r= 1?

6. osanseviero

I'm using r for distance from center to square. The radius is 1.

7. osanseviero

So with that I can get a height for a triangle 1-r.

8. phi

ok, but using r for the length of 1/2 the side of the square is confusing (people see "r" and think radius) can I use x instead of r? diameter is 2, and this is the length of the diagonal of the square so its side is 2/sqr(2) = sqr(2) and x= 1/2 of a side = sqr(2)/2

9. osanseviero

10. phi

the height of the triangle will be r- x 1 - \sqr(2)/2

11. osanseviero

Ok, and base would be x*2,right?

12. phi

yes

13. osanseviero

Ok. So that would be ((1 - sqrt(2) / 2)(sqrt(2))/2. That times 4 to get total area

14. phi

yes

15. osanseviero

Ok, I was good until here. I started to get lost when adding a new layer of triangles

16. osanseviero

|dw:1441839343074:dw|

17. osanseviero

So I guess it will pass through the half of the half of the base of the triangle, and then half of the side of the triangle

18. phi

yes, but now it's not clear what the altitude of the new triangle is. the base of the new triangle is the "hypotenuse" of the old triangle, so we can find it using pythagoras

19. osanseviero

Ok, give me a minute, I'll try to get it

20. osanseviero

Ok. The base is pretty simple. The altitude is a little harder. First, I would calculate the distance between the center and the intersection with the square. Then add the intersection with the triangle. For the square, I did: |dw:1441839701196:dw| So a = sqrt((x/2)^2 + x^2)

21. osanseviero

How to find where the line touches the hypotenuse of the second triangle? We know that the height would be the half.|dw:1441839908971:dw|

22. osanseviero

Oh...that would be the previous base/2

23. anonymous

in my mind it looks like this

24. anonymous

|dw:1441840270963:dw|

25. phi

this looks like a painful process

26. osanseviero

It is haha. I think that with this we should get a really close approximation

27. phi

I know archimedes found the area of triangles formed by an n-gon (n sided polygon) on the inside of the circle and the outside and so the area of the circle is between those two areas. But that process seems easier than adding smaller and smaller triangles

28. osanseviero

It is easier, I already did that one hehe

29. osanseviero

Thanks for the help :)

30. osanseviero

Can you just help me get that last height?

31. phi

it will take some time

32. osanseviero

Ok, then don't worry :)

33. phi

|dw:1441843190370:dw| find "y" using pythagoras and the altitude is 1-y