# Integrating for pi

1. Jun 15, 2009

### cam875

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$$

2. Jun 15, 2009

### rochfor1

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.

3. Jun 16, 2009

### cam875

is the taylor series the fastest method for calculating pi?

4. Jun 16, 2009

### rochfor1

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.

5. Jun 17, 2009

### MATLABdude

6. Jun 17, 2009

### fleem

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.