Ask Me Help Desk

Ask Me Help Desk (https://www.askmehelpdesk.com/forum.php)
-   Mathematics (https://www.askmehelpdesk.com/forumdisplay.php?f=199)
-   -   Pi by recursive decimal places (https://www.askmehelpdesk.com/showthread.php?t=2859)

  • Mar 30, 2004, 01:16 PM
    retsoksirhc
    Pi by recursive decimal places
    I would like to know if there is a way to calculate pi by using the current last decimal place to calculate the next decimal place. I already made a formula for pi that I posted on another board, but someone suggested I copy here.

    ---Begin quote---
    This doesn't really fit anywhere so I'm just putting it in general. Warning: not for the faint of math skillZ

    I didn't want to do my work in Calculus today so decided to do something I've always wanted to: find an answer to Pi. There are probably many other and better formulas to calculate it, but it's not like I have a degree or something, and I came up with one by using simple algebra and trigonometry.

    First my theory on how to calculate pi:

    First take a regular geometric shape (a regular polygon). If you keep increasing the number of sides, it starts to look more and more like a circle (a regular polygon has all sides the same length). If you get enough sides on the polygon, eventually it becoms a circle, which would be infinity. Since we cannot reach the number infinaty, the closest we can do it get bigger and bigger. We can approch infinity.

    Now consider the formula for the circumference of a circle (or perimeter):
    C=2(pi)r

    If we leave the radius as 1, the r of the equation becomes negligible.

    Now back to the polygon. If we draw lines to the center of the polygon from each corner, we see what would be the radius of the circle if the shape had infinate sides. Make this lenth one and the r from the equation for circumference disappears.

    The problem I worked most at was how to find the perimeter of the polygon. I decided to use triangles

    Using one side of the polygon and 2 lines drawn to the center, we get an isocolies triangle. The angles of the two outermost angles are determined by the sum of all the angles (180(n-2)) divided by the number of angles (n), and cut in half (they are bisected by the lines to the center). We subtract twice this value from 180 to get the angle measure of the innermost angle.

    To get the length of the side from this we use the law of sines, used to find the side length or measure of any angle of side, given another angle and oppisite side, and one of the measures.

    Recall that both other sides are 1, and both other angles are 180(n-2)/(2n)

    From this we can get:
    1/sin(180(n-2)/2n)=X/sin(180-2(180-2n)/2n)

    Get X by itself and we now know what the length of one side is.

    Multiply this by the numbe rof side to get the total perimiter of the polygon.

    Looking back to the equation for circumference, C=2(pi)r:

    perimeter=2(pi)(1)

    Divide each side by 2 and we get a formula for the number pi. We still need to get close to an infinate number of sides, so we take this equation and find the limit as n approaches infinity:

    limit as n->infinity of n(sin(180-(2(180(n-2)/2n))))/2(sin((180(n-2))/2n))=(pi)

    We just found an equation for pi using basic trigonometry and geometry!
    ---End Quote---
  • May 12, 2004, 02:21 PM
    glenvb
    Pi by recursive decimal places
    Nice! Your basic idea is roughly similar to that of Archimedes, one of the first to calculate pi. He took the calculation to a 96-sided polygon, I believe. In the 15th century the Persian astronomer Jamshid al-Kashi computed pi to about 16 decimal places by taking this method out to a polygon of over 805 million sides. Yikes.
  • Aug 23, 2007, 06:07 AM
    matte
    2nrcos180((n-2)/(2n)) would be a more proper sollution actually for the distance around the polygon. Divide by 2 to get the value of pi.
  • Aug 23, 2007, 12:50 PM
    ebaines
    This is a fine technique, although there's a crucial step missing in how to calculate the cosine or sine of the angles (assuming that like Archimedes you don't have a calculator). One could use an infinite series, for example:

    sin(x) = x - x^3/3! + x^5/5! - x^7/7! +...

    but this is cumbersome, and requires a knowledge of calculus that I doubt the ancients had. So I wonder if they didn't use another technique, such as this: given the knowledge that cos(pi/4) = sqrt(2)/2, and the relationship cos(x) = sqrt[(cos(2x)-1)/2], you can play around using basic trig identities and you find that you get a neat recursive formula:



    etc.

    The length of the side of an n-sided polygon is 2* sin(pi/(n)), so if we choose polygons where each has twice the number of sides as its predecessor, the accuracy in determining pi is limited only by one's accuracy in calculating square roots. The formula for estimating the length of half the perimeter (that is, pi) is:



    We choose the value for N to be 1, 2, 4, 8, 16, etc. and what we find is that the approximation for pi converges pretty quickly to a reasonable level of accuracy:



    etc.
  • Oct 27, 2011, 05:40 PM
    eodnohj
    your answers are wrong for one crutial fact that is the sine function in pure math is in radians and thus nsin(180/n) becomes nsin(Pi/n). As n->oo sin nsinPi/n aproaches n*Pi/n (by small angle theorem) so you get the trivial solution of Pi=Pi. However if you want a mathematically correcct expression for pi then you can employ the use of a taylor series fot arctangent and evaluate at 1, knowing that tan(pi/4)=1. This becomes the infinte series of sum(4*(-1)^(I+1)*factorial(2*i-2)/factorial(2*i-1), I = 1.. infinity), which is an expression of pi, mathematically correct, however it does not converge that well. Your answer allthouge logically correct is mathematically insound because degrees are not pure numbers.
  • Oct 28, 2011, 06:10 AM
    ebaines
    Quote:

    Originally Posted by eodnohj View Post
    your answers are wrong for one crutial fact that is the sine function in pure math is in radians and thus nsin(180/n) becomes nsin(Pi/n). .... Your answer allthouge logically correct is mathematically insound due to the fact that degrees are not pure numbers.

    There is nothing wrong with using degrees as the measure of an angle. Degrees and radians are both dimensionless numbers, so I don't understand your point. When someone writes "sin(180/n)" it's pretty clear they're talking about degrees, not radians, so there should be no confusion.

  • All times are GMT -7. The time now is 01:31 AM.