Math 136
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
converges. Then
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,
, is
simply the difference between the exact sum and the partial sum we use in an
approximation,
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 [
), where k is an integer, such
that
= f ( x
). Then, by a geometric argument similar to that behind the Integral
Test, we have that
Hence we have the following result:
If
converges by the Integral Test
and
then
Example 1 .
Estimate the error that results when
is approximated by
.
This is a p -series
with p = 2 and so it does converge. Furthermore, with
, the
hypotheses of the Integral Test are satisfied. Therefore we know that the error is trapped
between
We now employ the use of Maple. The error in the estimate lies between
> evalf(int(1/x^2,x=21..infinity));
and
> evalf(int(1/x^2,x=20..infinity));
The value of the partial sum is given by the command
> s_20:=evalf(sum(1/n^2,n=1..20));
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);
When we compare
with
the exact value, we find that the difference is
> evalf(Pi^2/6-sum(1/n^2,n=1..20));
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);
> solve(1/n<.0001);
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));
The error in this estimate is
> evalf(Pi^2/6-sum(1/n^2,n=1..10000));
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
Adding
to the terms in this relation
gives us the new relation
(since
). 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
, we
had the estimate
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));
and the upper bound
> ub:=evalf(sum(1/n^2,n=1..20)+int(1/x^2,x=20..infinity));
By averaging these two values, we obtain the estimate
> (lb+ub)/2;
Notice that this estimate is much closer to the
actual value than the partial sum
. The error in this estimate can
be no greater than
> abs((lb-ub)/2);
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:
4. Clearly
,
. Use
this fact to estimate the sum