3
$\begingroup$

Wikipedia has a great article on methods for calculating pi with arbitrary precision, using for example Machin's infinite series expansion:

$\frac{\pi}{ 4} = 4$ arccot $5 - $arccot $ 239 $

where

arccot $x = \frac{1}{x} - \frac{1}{3 x^3} + \frac{1}{5 x^5} - \frac{1}{7 x^7} + \dots$

The only problem is that they never mention how to prove how many digits you have accurately computed pi to. How is this done? In general, how do you prove this for any series that converges?

Edit: I used pi with an alternating series as an example, but I'm more interested in general techniques for any convergent series.

  • 0
    In a convergent alternating series with terms decreasing in absolute value, the error is alwa$y$s less that the size of the first omitted term.2012-07-31

1 Answers 1

4

The series that you mention are alternating series. That means that the terms alternate in sign, go down in absolute value, and the absolute values of the terms approach $0$.

For alternating series, the error made by truncating at a particular place has absolute value less than the first omitted term. This criterion is easy to use, and ordinarily one cannot do substantially better. The sign of the first neglected term also tells you the direction of the error. If it is negative, truncation produces an overestimate. If it is positive, then truncation produces an underestimate.

  • 0
    Each of the usual convergence tests corresponds to a method of estimating the error. Thus if |a_n| < b_n and $\sum_n b_n$ converges, the error in $\sum_{n\le N} a_n$ is bounded by \sum_{n > N} b_n.2012-07-31