Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

I want to take partial sums of a convergent series. But how will I know how accurate the approximation will be? I am looking for practical ways of achieving this even if not very rigorous!

Suppose the terms of the series are given by $a_n$, its partial sums by $s_n$ and a desired accuracy of $\epsilon$ is required. Keeping questions of stability aside for now how can I achieve this?

I have seen termination criteria such as;

  • keep summing (i.e. constructing partial sums) until $a_n<s_{n}\epsilon$.
  • keep summing (i.e. constructing partial sums) until $\frac{s_n-s_{n-1}}{s_{n-1}}<\epsilon$.

But what is the justification behind these termination criterion??

Can Cauchy's criteria for convergence be used in some way?

I'm asking because I have a taylor series for some function, but trying to put a bound on the higher order derivatives is next to futile so Cauchy's and Lagrange's form of the remainder are not an option. Even though the function is strictly monotone (hence I know the maximum occurs at the endpoints), but cauchy's estimate requires one to know the maximum modulus on a closed disk. And I have no idea how to do this since I dont know the function in closed form. Hence a bound for the remainder through cauchy's estimate seems out the window also.

The series is found through a solution of a nonlinear ODE. Hence the coefficients are given recursively, so I don't know how I could apply the geometric series or integral tests to find an answer.

Surely people have faced similar problems so I was wondering what one would do in practice.

share|improve this question
add comment

1 Answer

up vote 3 down vote accepted

The practical criteria are easy to justify. Remember that in inexact arithmetic, for a number $\eta$ smaller than the machine epsilon $\varepsilon$, $1+\eta=1$. It thus does not make sense to keep on adding terms that get tinier and tinier if the results aren't changing anymore.

Usually, one has a choice of considering relative error or absolute error. For relative error, the termination criterion looks something like "$\text{until }|a_n| < \varepsilon \cdot |S_{n-1}|$" (put another way, "$\text{until }|S_n - S_{n-1}| < \varepsilon \cdot |S_{n-1}|$"), while for absolute error, the termination criterion is something like "$\text{until }|a_n| < \varepsilon$". Here $S_n$ is the $n$-th partial sum and $a_n$ is the $n$-th term of the series.

Relative error is often favored since it takes into account the relative size of the partial sum and the term about to be added, but absolute error is fine and takes less effort to consider as long as both the partial sums and the terms are "reasonably sized" (e.g. the partial sums being some not-too-large number).

Considering relative error, you can see that if you attempt to add $a_n$ and further terms to $S_{n-1}$ when the relative error criterion is already satisfied, then you are wasting effort, since $S_{n-1}+a_n \approx S_{n-1}$ from that point, and at best you are just fiddling with the least significant figures of your result.

These termination criteria are widely used, but are not perfect: one would of course not use the relative error criterion if the partial sum is quite near zero. Both termination criteria also do not account for the possibility that the $n$-th term of the series you're summing is zero (even if the further terms are nonzero); that is a possibility you might sometimes have to watch out for.

share|improve this answer
3  
It also does not account for the possibility that $\sum_{m \geq n} a_m$ is much greater than $a_n$, i.e. the possibility that the series decreases very slowly. Be aware of all of these issues; in any such case you're going to have to do more work to obtain a good error bound. –  Craig Oct 10 '11 at 1:59
    
A good point, Craig. –  J. M. Oct 10 '11 at 2:01
    
Any references you recommend where I can read up more? –  aukie Oct 10 '11 at 19:19
    
Hmm, let's see... Numerical Recipes should have something to start with on this. Of course, you will want to pursue the stuff it points to in the bibliography as well. –  J. M. Oct 10 '11 at 21:53
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.