Ask Experts Questions for FREE Help !
Ask
    retsoksirhc's Avatar
    retsoksirhc Posts: 912, Reputation: 71
    Senior Member
     
    #1

    Mar 30, 2004, 01:16 PM
    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---
    glenvb's Avatar
    glenvb Posts: 1, Reputation: 1
    New Member
     
    #2

    May 12, 2004, 02:21 PM
    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.
    matte's Avatar
    matte Posts: 1, Reputation: 1
    New Member
     
    #3

    Aug 23, 2007, 06:07 AM
    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.
    ebaines's Avatar
    ebaines Posts: 12,131, Reputation: 1307
    Expert
     
    #4

    Aug 23, 2007, 12:50 PM
    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.
    eodnohj's Avatar
    eodnohj Posts: 1, Reputation: -1
    New Member
     
    #5

    Oct 27, 2011, 05:40 PM
    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.
    ebaines's Avatar
    ebaines Posts: 12,131, Reputation: 1307
    Expert
     
    #6

    Oct 28, 2011, 06:10 AM
    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.

Not your question? Ask your question View similar questions

 

Question Tools Search this Question
Search this Question:

Advanced Search

Add your answer here.


Check out some similar questions!

Calculating pi to n decimal places [ 5 Answers ]

Suppose your goal is to calculate (not look up) a value of pi that is accurate to n decimal places. Suppose n were 10. How would you do it?

Recursive Matlab problem [ 2 Answers ]

Hi, I'm trying to write a matlab program for a recursive sequence. I worked out the sequence right I think but can't get the figures right in the program. Here's the program I have so far: %recursive program for water %dam cycling down to empty Clear Format long A=32; Fprintf(' Week ...

401k in two places [ 1 Answers ]

Hi - I currently have 2 401k's roaming about from previous jobs. I don't have one set up with my current employer. I am in a position where I need to get a hold of that money quick, but I'm not sure what my best options are. Any and all help would be greatly appreciated! Thank you!! :confused:

Accessing FTP through My Network Places [ 2 Answers ]

I'm trying to access a music file I've hidden on my website, but of course I can't remember what I've called it so I thought I'd access the FTP window and look for it that way, but I'm having trouble getting on it by putting in the ftp.address.net bit - it keeps timing out before the login box...

PVC Tight Places HELP! [ 3 Answers ]

I was forced to cut off a closet (toliet) flange and the 90 degree elbow to which it was glued due to damage to get to clean PVC drain pipe in good condition. The problem is where the elbow will turn up and at the point where the new flange and coupling is needed is very tight. The area is between...


View more questions Search