How to approximate pi with power series??

• Dec 8th 2009, 07:16 PM
Some1Godlier
How to approximate pi with power series??
The full question is: Determine the number of terms of the appropriate series needed to be added to approximate PI to five decimal places.

I believe I know the basics about power series, but I have no idea how to even start this. IF someone could help me with just that then I would be grateful.
• Dec 8th 2009, 07:32 PM
RockHard
Perhaps the representation of a trigonmetric function that has a value at pi, like cos x ?
• Dec 8th 2009, 07:44 PM
Some1Godlier
what if I use sinx so that the power representation is ((-1)^k)/(2K+1)! then what??
I need the remainder right?? so what next??
• Dec 8th 2009, 08:33 PM
Jester
Try a power series for $y = \tan^{-1} x$ and evaluate it at $x = 1$.
• Dec 8th 2009, 08:37 PM
Prove It
Quote:

Originally Posted by Danny
Try a power series for $y = \tan^{-1} x$ and evaluate it at $x = 1$.

But $\tan{\pi} = 0$, not $1$...

You'd need to recall that

$\tan{\frac{\pi}{4}} = 1$

$\frac{\pi}{4} = \arctan{1}$

$\pi = 4\arctan{1}$.

So you would need to evaluate the power series for $y = \arctan{x}$ at $x = 1$ and then multiply by $4$.
• Dec 8th 2009, 09:09 PM
Some1Godlier
yes but how do i begin to to do this; from my experience I believe that I must take the derivative until I see a pattern so that I can get a power series representation but then what. I'm pretty sure a remainder is involved but I don't know where or how??
• Dec 8th 2009, 09:11 PM
Prove It
$\arctan{x} = \sum_{n = 0}^{\infty} \frac{(-1)^n}{2n + 1}x^{2n + 1}$ for $|x| \leq 1$.

Since $x = 1$ this power series is valid.
• Dec 8th 2009, 09:24 PM
Some1Godlier
so at this point I multiple by 4 and then I need to use 5/10^6 right??
• Dec 8th 2009, 09:43 PM
Calculus26
A couple of points here

1. To generate the power series for arctan(x) you don't need to take derivatives
for 1/(1-x)
by substitution of -x^2 for x you get the power series

for 1/(1+x^2)

Integrate this result to get series for arctan(x)

2. You now have an alternating series so use |S-Sn| < a(n+1)

to determine n.
• Dec 8th 2009, 09:49 PM
Some1Godlier
I feel like this is all way above my head. I've seen everything thats been previously mentioned here and there but I juist can't put everything together. I have two more of these to do. Is there anyway someone could walk me through this problem so that I can solve the others. (I work best off of examples rather than hints that I can't combine with previous knowledge.)
• Dec 8th 2009, 10:06 PM
Calculus26
See attachment
• Dec 8th 2009, 10:14 PM
RockHard
Well note what was said above earlier, I may or may nor be correct, but I'll try my best to evaluate, above it was stated that $4 arctan(1)=\pi$, C26 mentioned the way to find the error for a alternating series for n iterations, now apply this to your problem, by finding the error of less than 5 decimals places, since you want to find pi within 5 decimals place, you will know by the the number iterations to take to approximate the error less than the tolerance you were given, assuming that your power series does go to some finite approximation of pi.

This is the way I see it, correct me If I am wrong

Ahh darn it, was replying while C26 was posting, sorry.
• Dec 9th 2009, 12:51 AM
chisigma
The series expansion of the 'arctan' function...

$\tan^{-1} x = \sum_{n=0}^{\infty} \frac{(-1)^{n}}{2n+1}\cdot x^{2n+1}$ (1)

... in principle can be used to compute $\frac{\pi}{4}$ by the simple substitution $x=1$ in (1). However five decimals are required and that imposes the extimation of how many terms of (1) must be added to meet this goal. The series...

$\frac{\pi}{4} = \sum_{n=0}^{\infty} \frac{(-1)^{n}}{2n+1}$ (2)

... is of the 'alternate sign' type and that means that the error in modulus is less than the last added term. So in order to obtain five exact decimal terms You have to sum about $n=5\cdot 10^{5}$ terms... not a properly little job!(Doh) ...

If we remember that...

$\tan \frac{\theta}{2} = \frac{\sin \theta}{1+\cos \theta}$ (3)

... we obtain...

$\tau = \tan \frac{\pi}{8} = \frac {\sin \frac{\pi}{4}}{1+\cos \frac{\pi}{4}} = .414213562373...$ (4)

Now setting in (1) $x=\tau$ we obtain...

$\frac{\pi}{8} = \sum_{n=0}^{\infty} \frac{(-1)^{n}}{2n+1}\cdot \tau^{2n+1}$ (5)

... and the required precision can be achieved by summing $n=7$ terms... not bad! (Rofl)...

Kind regards

$\chi$ $\sigma$
• Dec 9th 2009, 05:45 AM
Jester
If you want a really accurate approximation for $\pi$ use

$
\frac{1}{\pi} = \frac{\sqrt{8}}{9801} \sum_{n=0}^{\infty} \frac{(4n)!(1103+26,390n)}{(n!)^4 396^{4n}}
$
.

When $n= 0$, you get 6 digits, when $n = 0\; \text{and}\; n = 1$, you get 14 digits of $\pi$ and every time you increase $n$ you get 8 more digits.

I sure wish I could come up with something like that. Thanks Ramanujuan.