View Full Version : integrating for pi
I was thinking about how to approximate pi accurately and came up with something and all the calculations i did seem to show that its true and im wondering if its used often for calculating pi or if there is something better?
radius of this circle equals 1 and therefore calcualting a quarter area of a circle and multiplying by 4 we should get pi.
\pi=area
4(\int_0^1 \sqrt{1-x^2} dx) \approx \pi
rochfor1
Jun15-09, 09:45 PM
That's true, but you have to think about how you're going to approximate the numerical value of that integral. A commonly used approximation for pi can be derived from the Taylor series for arctangent.
is the taylor series the fastest method for calculating pi?
rochfor1
Jun16-09, 06:09 PM
I don't know what the "fastest" method is. Using Taylor's theorem though you could estimate how quickly the series converges. I just wanted to give a method that you could use that didn't involve approximating an integral.
I imagine a little googling could turn up currently used approximations for pi.
MATLABdude
Jun17-09, 05:51 AM
I'm not a mathematician, however, you may want to take a look at the Wikipedia article for at least a starting point:
http://en.wikipedia.org/wiki/Computing_pi
Or Mathworld at Wolfram:
http://mathworld.wolfram.com/PiFormulas.html
And another consideration is whether you want to create digits in succession or you want to converge toward PI. The latter (which is the method you show) cannot calculate more digits than the floating point variables can hold.
vBulletin® v3.7.6, Copyright ©2000-2009, Jelsoft Enterprises Ltd.