Math 1360 Calculus II - Lab 2- Numerically Estimating Series

Part I. Estimating the Error in a Partial Sum Approximation.

We have seen how the Integral Test can be used to determine the convergence or divergence of series satisfying certain requirements. But quite often simply knowing the convergence or divergence of a series is not enough. If a series does converge, we would also like to know its sum. In general, finding the exact sum of a series is very difficult, if not impossible. However, it is easy to approximate the sum. Any partial sum is an approximation. The problem then becomes: how can we guarantee the accuracy of our estimate. It is in this context that the ideas of the Integral Test can be used to our benefit.
Suppose the series
[Maple Math] converges. Then

[Maple OLE 2.0 Object]

Whenever we use a partial sum to approximate the sum of a convergent series, the error in our approximation is due to the terms of the series that are not included in the partial sum. The error, or remainder, [Maple Math] , is simply the difference between the exact sum and the partial sum we use in an approximation,

[Maple OLE 2.0 Object]

The improper integral provides us with the means to bound this remainder.

Suppose that a series satisfies the hypotheses of the integral test. Namely, that there is a positive, continuous, decreasing function f ( x ) on the interval [ [Maple Math] ), where k is an integer, such that [Maple Math] = f ( x ). Then, by a geometric argument similar to that behind the Integral Test, we have that

[Maple OLE 2.0 Object]

Hence we have the following result:

If [Maple Math] converges by the Integral Test and [Maple Math] then

[Maple OLE 2.0 Object]

Example 1 .

Estimate the error that results when [Maple Math] is approximated by [Maple Math] .

This is a p -series with p = 2 and so it does converge. Furthermore, with [Maple Math] , the hypotheses of the Integral Test are satisfied. Therefore we know that the error is trapped between

[Maple OLE 2.0 Object]

We now employ the use of Maple. The error in the estimate lies between

> evalf(int(1/x^2,x=21..infinity));

[Maple Math]

and

> evalf(int(1/x^2,x=20..infinity));

[Maple Math]

The value of the partial sum is given by the command

> s_20:=evalf(sum(1/n^2,n=1..20));

[Maple Math]

Actually, the exact sum of the series is known,   (Note that in these command lines and the ones that follow, I am making use of the difference between a capitalized and a lower case command in Maple.  Several of the Maple commands are set up so that if you enter it as a lower case command, like "sum" below, it will evaluate the line.  Alternatively, if you enter the capitalized command, like "Sum" below, it will return the symbolic form of the line.  I am doing this so that the returns will be both in both symbolic and evaluated form.)

> Sum(1/n^2,n=1..infinity)=sum(1/n^2,n=1..infinity);

[Maple Math]

When we compare [Maple Math] with the exact value, we find that the difference is

> evalf(Pi^2/6-sum(1/n^2,n=1..20));

[Maple Math]

Now suppose we wished to determine the number of terms such that the partial sum had an error of less than .0001. Since

> Int(1/x^2,x=n..infinity)=int(1/x^2,x=n..infinity);

[Maple Math]

[Maple OLE 2.0 Object]

> solve(1/n<.0001);

[Maple Math]

Therefore we must include the first 10,000 terms of the series to get the prescribed accuracy. In this case the partial sum is

> s_10000:=evalf(sum(1/n^2,n=1..10000));

[Maple Math]

The error in this estimate is

> evalf(Pi^2/6-sum(1/n^2,n=1..10000));

[Maple Math]

Part II. Estimating the Sum of a Series.

In the previous section we looked at a method for bounding the error in a partial sum approximation. In this section we improve our results so that we may estimate the sum of a series directly. We start with the fact that

[Maple OLE 2.0 Object]

Adding [Maple Math] to the terms in this relation gives us the new relation

[Maple OLE 2.0 Object]

(since [Maple Math] ). We now have a means of bounding the sum. These bounds will yield a more accurate approximation to the actual sum than the partial sum will. Let's consider our previous example. Using the sum [Maple Math] , we had the estimate

[Maple OLE 2.0 Object]

Now let's use the new relation. We obtain a lower bound for the sum

> lb:=evalf(sum(1/n^2,n=1..20)+int(1/x^2,x=21..infinity));

[Maple Math]

and the upper bound

> ub:=evalf(sum(1/n^2,n=1..20)+int(1/x^2,x=20..infinity));

[Maple Math]

By averaging these two values, we obtain the estimate

> (lb+ub)/2;

[Maple Math]

Notice that this estimate is much closer to the actual value than the partial sum [Maple Math] . The error in this estimate can be no greater than

> abs((lb-ub)/2);

[Maple Math]

even though we used the same number of terms in each case. ( "abs" is the absolute value function in Maple) Although this method gives much better estimates for approximating the sum of a series, we cannot use it to directly meet a presicrbed error criteria.

Exercises:

[Maple OLE 2.0 Object]

[Maple OLE 2.0 Object]

[Maple OLE 2.0 Object]

4. Clearly [Maple Math] , [Maple Math] . Use this fact to estimate the sum

[Maple OLE 2.0 Object]