Approximating Pi with Power series

Click For Summary

Discussion Overview

The discussion revolves around methods for approximating Pi using power series, specifically through the arctangent function. Participants explore various series representations, convergence issues, and alternative formulations to achieve accurate approximations.

Discussion Character

  • Exploratory
  • Technical explanation
  • Mathematical reasoning
  • Debate/contested

Main Points Raised

  • One participant inquires about using the power series representation of arctan(x) to approximate Pi to five digits.
  • Another participant notes that 4 arctan(1) equals Pi, suggesting this as a starting point for the approximation.
  • A different participant expresses skepticism about the simplicity of the approach, indicating that there may be more complexity involved.
  • Concerns are raised about the slow convergence of the arctan series when developed around x = 0, with one participant providing numerical results from Mathematica to illustrate this point.
  • Another participant suggests that using multiple arguments in the arctan series could improve convergence speed.
  • Several participants present alternative series for Pi, including combinations of arctan terms, and express surprise at the complexity of these formulations.
  • A participant describes a method to manipulate a slowly converging series for Pi/4 to achieve faster convergence through a specific mapping technique.
  • Details of the mapping and the resulting series expansion are provided, demonstrating how to obtain a more accurate approximation of Pi using fewer terms.

Areas of Agreement / Disagreement

Participants do not reach a consensus on the best method for approximating Pi, with multiple competing views and techniques presented throughout the discussion.

Contextual Notes

Some participants highlight limitations related to the convergence of the series and the dependence on specific mappings, which may affect the accuracy and efficiency of the approximations.

mickellowery
Messages
69
Reaction score
0
How can I go about using a power series representation of arctan(x) to approximate Pi to five digits?
 
Physics news on Phys.org
What is 4 arctan(1)?
 
Yea that's the route I was thinking I should go because 4arctan(1) would be Pi, but it seems like there should be more to it than that.
 
I don't think there is.
The only problem would be, probably, that when you develop arctan(x) around x0 = 0 with x - x0 = 1, the series converges very slowly.

For example, I let Mathematica evaluate the series around x = 0 for the first 10 000 terms, and got 3.14139, still .00020 off.
For the first 50 000 terms, I got 3.14155, correct to 4 decimal places, but that already took 12 seconds to compute.
 
Thanks so much Chip I appreciate the help. I think I've got it, but if not I'll be back. Thanks again.
 
If you're going to use the series for [itex]tan^{-1}[/itex] you need to use more than one argument if you want it to converge in reasonable time. See e.g. the formlae in http://www.super-computing.org/pi_current.html.
 
pi = 48 arc tan(1/49) +128 arc tan(1/57) - 20 arc tan (1/239) + 48 arc tan(1/110443)
pi = 176 arc tan(1/57) + 28 arc tan(1/239) - 48 arc tan(1/682) + 96 arc tan(1/12943)

Right... I don't feel guilty for not coming up with that immediately. How the *** did people ever find that :P
 
You can still use that:

pi =4 arctan(1)

as Compuchip suggested but still obtain a fast converging series. So, we start with the slowly converging series

pi/4 = 1 - 1/3 + 1/5 - 1/7 + 1/9 - 1/11 + ...

and manipulate it as follows. Let's keep the terms up to 1/21 only, to make clear I'm not cheating here. Consider the function:

1 - x/3 + x^2/5 - x^3/7 + x^4/9 - x^5/11 +...+x^10/21

Then for x = 1 this would be a very crude approximation to pi/4. The reason why this approximaton is not so good is because for x = -1 the infinite series diverges. The radius of convergence is 1 and we are thus exactly on the edge of the region where the series converges.

We can do something about that using the following trick. Let's invent a mapping that will send the singularity at x = -1 far away while leaving the point a x = 1 where it is. This mapping, z(x), has to be such that for x to zero z tends to zero, otherwise we won't be able to compute the coefficients of the series in powers of z.

If we choose the mapping:

x = z/(2-z)

Then clearly x = -1 corresponds to the point at infinity in the z-plane. The point x = 1 is now at z = 1, so we can just work out the series in powers of z and insert z = 1. Note that there is now a new singularity at z = 2, so we are well inside the radius of convergence. But this is still not optimal. We can do better by not sending the singularity at x = -1 all the way to infinity. The mapping:

x = 2z/(3-z)

sends the singularity at x = -1 to z = -3 and we also have a singlarity at z = 3. The point x = 1 still corresponds to z = 1. So, we are deeper inside the region where the series converges. If we insert x = 2z/(3-z) in

1 - x/3 + x^2/5 - x^3/7 + x^4/9 - x^5/11 +...+x^10/21

and expand to order z^10, we obtain:


1 - 2 z/9 + 2 z^2/135 - 22 z^3/2835 + 26 z^4/25515 - 422 z^5/841995 +
542 z^6/6567561 - 3838 z^7/98513415 + 5194 z^8/717740595
- 135686 z^9/40911213915 + 63506 z^10/95459499135

For z = 1 this multiplied by 4 is:

3.1415936

You would have needed to sum about a million terms of the original series to obtain such an accurate result. Yet, we obtained this result by manipulating only the first 11 terms of the series. Also you could argue that we used even less terms. We inserted x = 2z/(3-z) and expanded only to order z^10 and then inserted z = 1. This means that in the summation

1 - 1/3 + 1/5 - 1/7 + ... +1/21

we ended up replaced the 1/3 by 1/3 times the 9th order approximation of 2/(3-z) at z = 1 which is 1/3 * (1-3^10). So, we're removing a small part of the second term. From the third term we're removing a bit more, it becomes 1/5 * (1 - 7/3^9), etc. etc. while from the last term we take almost nothing, it get's replaced by 1/21 (2/3)^10.
 

Similar threads

  • · Replies 7 ·
Replies
7
Views
3K
  • · Replies 33 ·
2
Replies
33
Views
4K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K
Replies
1
Views
2K