13.07.2015 Views

CALCULATING PI - Mathemechanix.org

CALCULATING PI - Mathemechanix.org

CALCULATING PI - Mathemechanix.org

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>CALCULATING</strong> <strong>PI</strong> Page 51What is pi? It is the circumference of a half-circle of radius 1. Thecircumference of the complete circle of radius r is 2*pi*r. Pi also specifies the areaof a circle of radius r as pi*r 2 . References to pi often use the Greek letter. We willspell this as pi because it is easier and quicker to type.The number pi also defines a basic measure of angle. If 2*pi is defined as thetotal angle in 360 degrees, we find the angle defined by pi as 360/(2*pi) “radians”.If pi=3.14259, the basic angle becomes 360/6.28318=57.95827 degrees.The task is to derive the value of pi. Thiswill be done to an accuracy of about onepart in 31 million. The derivation involvesalgebra. Few books on geometry show thederivation. Modern methods for computingpi by mathematicians are not similar to whatis presented here and are not based ongraphical interpretations. Look up “pi” on aninternet search engine to get calculations tomillions or billions of decimal places.The value of pi is 3.1415926536… to asmany decimal places as desired. It has beencalculated by mathematicians usingspecialized procedures to which we commonmortals are not privy. But there is anunderstandable way that the number can befound to a few decimal places without goingbeyond high school algebra and geometry.The present derivation is based onfundamental laws of plane geometry. Hereare the ones we will need.1. The Pythagorean Theorem. For a righttriangle, the square of the hypotenuse equalsthe sum of the squares of its two legs.2. The internal angles of any triangle addto 180 degrees.3. Similar triangles have equal internalangles and corresponding sides that areproportional.4. A perpendicular bisector to a line givestwo segments of equal lengths.5. Bisecting an angle yields two identicalangles.Start by drawing a half circle with thecenter marked with “O”. With a drawingcompass set to the radius, draw an arc fromone end of the base of the circle to the circleand do the same thing from the other end.Draw straight lines from the two ends of thehalf circle as shown. Each line segment hasthe same line length, r, the radius of thecircle. The result gives two equilateraltriangles. Connect the tops of the twotriangles to give a third inverted equilateraltriangle. Every angle must be 60 degrees.For r=1, each line segment is exactly 1.0units long. Label points as shown.All straight lines connecting points on thehalf circle are r units long (or 1.0 unit longfor r=1). The first value we get for pi issimple the sum of these: pi0=3.0 (or 6.0 forthe full circle)._________________ C11B1 1 1 1 Dq____________________q____________1 1 E AFigure 1The area of each triangle is the basetimes one half the height. Add areas of all 6triangles (full circle) to get total circle area.Note that a considerable area has beenignored, namely that between the outer baseof each triangle and the circle itself. Let us“adjust” this by letting the height be largerthan the actual value, namely, the same asthe length of a side. Then 6 adjustedtriangles have a total area of 6*(1/2) = 3 if r= 1. This gives the first estimate for the areaof a half circle of radius 1 as 3, or 6 for a fullcircle (2*pi*r 2 for the full circle)..The next step finds a more accurate valuefor pi. This will be done by bisecting eachtriangle into two triangles to give a 6 sided


figure in a half circle (or 12 for a full circle).The bases of the 12 triangles (no longerequilateral) will be closer to the adjacentcircle arc than are those for the firstestimate. The derivation need consider onlyone of the 6 triangles of equal size.Start by bisecting the line AC with lineOB which is found by bisecting the angleAOC to give two small angles q. Draw thebase of the resulting isosceles triangle asline AB. It is the length of this that we wantto compute. Once the length of AB has beendetermined, the second estimate for pi willbe 6 times AB for the half circle.After finding AB, repeat the process bybisecting AB with a new element that givesa third estimate for pi upon multiplying it by12 for the half circle. And so on. We want aformula that can be used repeatedly.Consider triangles ODA and OBE. Theseare both right triangles that share the smallangle q and have the same hypotenuselength. They are the same except fororientation. ThusBE = AD = AC/2 where AC/2=0.5 forthe first step in the process.Next find the length of OE using thePythagorean Theorem asOE 2 =OB 2 –BE 2 =1–BE 2 =1–(AC/2) 2Find EA asEA = 1 – OE = 1 – (1 – (AC/2) 2 ) 1/2EA 2 =1–2*(1–(AC/2) 2 ) 1/2 +1–(AC/2) 2Next, observe thatAB 2 =EA 2 +BE 2 =EA 2 +(AC/2) 2which results in the general formulaAB = (2*(1–(1–(AC/2) 2 ) 1/2 ) 1/2We can now use the value of AB for a newcalculation for segment length.We have started with AC/2 to find AB.We can then use this value as a new form ofAC. This is a cyclic process where wecalculate AC/2 and then rename this variableto get the next value of pi. Why not showrepetitiveness from the outset? Let AC=Sand find a new value for S asS = (2*(1 – (1 – (S/2) 2 ) 1/2 ) 1/2Let us work out the first few values for pias the computed value for S times thenumber of segments. We have the first valuefor S as 1 which becomes pi0 uponmultiplying it by 3. The next value hasS/2=0.5 in the basic equation. Find the newvalue of S as 0.517638. For six segments,the result is pi1=3.1058286. The next valuestarts with S/2=0.517638/2. The resultingcalculation for S gives S=0.2610523 foreach of 12 segments. Multiply by 12 to getpi2=3.1326286. Continue in this manner.Using a standard simple calculator, the errorremains small up to pi5 with a value ofS=0.0327257. Multiply by 96 segments toget pi5=3.141675.Accuracy is about one part in 30,000using a standard 8 digit calculator and tendsto become inaccurate for pi6 and beyond.Use a 10 digit pocket calculator for moreaccuracy. Or use a computer with “TrueBasic” as shown. You should be able toidentify steps with the calculator. Accuracyat pi11 is one part out of thirty million!.PROGRAM IN TRUE BASIC:LET P=3LET S=1PRINT 0,3,PFOR N=1 TO 15LET S=(2*(1-(1-(S/2)^2)^0.5)^0.5LET Q=3*2^NLET P=Q*SPRINT N;Q,PNEXT NENDN Q P____0 3 31 6 3.10582852 12 3.13262863 24 3.13935024 48 3.1410325 96 3.14145256 192 3.14155767 384 3.14158398 768 3.14159059 1538 3.141592110 3072 3.141592511 6144 3.1415926Stop at N=11. No change thereafter dueto the limited number of decimal places.Page 52

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!