Terms needed to approximate with given error?

6.1k Views Asked by At

How many terms of this series would one need to add to get an approximation of $\pi$ with error less than $10^{-4}$?

$$ 4 - \frac{4}{3} + \frac{4}{5} - \frac{4}{7} + \cdots $$

So far, I wrote the series as $$\sum\limits_{n=0}^\infty (-1)^n \frac{4}{2n+1}$$

and will use $|S-S_n|< a_n + 1$ , but am not sure how to go about doing so from here.

2

There are 2 best solutions below

6
On BEST ANSWER

Let $\displaystyle S_n = 4\sum_{k=0}^n \frac{(-1)^k}{2k+1}$.

Then

$$ |S_{10001}-S_{10000}| = |a_{10001}| = \left|\frac{-4}{20003}\right| < 0.0002.\tag 1 $$ We know that $S_{10000}>\pi>S_{10001}$ but $\pi$ is somewhat closer to the latter term than to the former, and $S_{10002}>\pi>S_{10001}$ and $\pi$ is somewhat closer to the former term than to the latter. Make this an exercise: $|S_n-\pi|$ decreases as $n$ grows; that justifies my former two statements.

Thus $\pi$ is half-way between $S_{10001}$ and some number that is between $S_{10000}$ and $S_{10002}$. So $|\pi-S_{10002}|$ is less than half the difference between $S_{10000}$ and $S_{10001}$, and that difference is given in $(1)$.

The error is about half the size of the next term.

1
On

The alternating series theorem says that the error is less than the absolute value of the first neglected term, so you just need to find the first term less than $10^{-4}$. You don't know that this term is the first one for which the error is less than $10^{-4}$, but you know it works.