# Taylor series approximation for pi

1. Oct 24, 2015

### Mhorton91

1. The problem statement, all variables and given/known data
I'll start by saying this is a "Challenge problem" from my professor, not technically homework, I hope I can still seek help.

The problem,
Part 1) Given a list of basic taylor series, find a way to approximate the value of pi.
Part 2) After completing part 1, modify the series for faster convergence.

2. Relevant equations

As mentioned, I have a list of common Taylor series. The one I started with was the series for arctan(x) because it was the only one I have that can get pi as an output

arctan x = x - x3/3 +x5/5 - x7/7 + ..........

3. The attempt at a solution

I feel like my attempt is pretty standard, I successfully completed Part 1 of the challenge by using the series for arctan (1) = pi/4

arctan (1) = 1 - 1/3 + 1/5 - 1/7 +......... = pi/4

So,

pi = 4 - 4/3 + 4/5 - 4/7 + ............

This series does approximate pi, however it is slow, using the first 10 terms gives 3.041839619

My issue is that I can't come up with a method to complete part 2, I can't figure out a way to make it converge more quickly.

I tried using the fact that
arctan x + arctan y = arctan (x+y)/1-xy to break it into a pair, and I've had hit and miss results. For example when I used arctan(1/2) + arctan(1/3) = pi/4 then using 4 terms gave me pi = 3.14085, which gave 2 decimal accuracy quickly... So, instead of continuing with more terms, I thought that decreasing the fractional value would yield faster convergence. I then used the arctan addition formula and set arctan x = arctan 1/10. The formula gave me arctan y to be arctan (9/11).. So I used arctan (1/10) + arctan (9/11) = pi/4... Using this method actually hurt convergence, I actually erased these results because they were not an improvement, but I remember 5 terms not even resembling pi, I think it was 4.something.

If you have any ideas that could push me in the right direction, let me know!!!
Thanks.
Marshall

2. Oct 24, 2015

### SteamKing

Staff Emeritus
This Taylor series for π is spectacularly slow to converge: reportedly, after evaluating 500,000 terms, only 5 decimal digits of π will be returned.

https://en.wikipedia.org/wiki/Pi#Infinite_series

See the Gregory-Leibniz series for more discussion

Your initial intuition to try another series was correct, but an initial disappointment scared you away from trying another series in the chain.

The relation arctan (1/2) + arctan (1/3) = π/4 is not the only one which may be used to approximate pi.

https://en.wikipedia.org/wiki/Machin-like_formula#Derivation

3. Oct 24, 2015

### Mhorton91

Also, just to clarify, I wouldn't describe myself as "scared away" due to my 2nd approximation not being an improvement. I was really just curious if the fractional process was a good direction to be headed, or if I should put my effort into another method. This link appears to have answered that question!

Thank you!
Marshall

4. Oct 24, 2015

### SteamKing

Staff Emeritus
We'll substitute "discouraged" for "scared away".

5. Oct 24, 2015

### Mhorton91

That is fair.