The sum of a convergent infinite series appears, at first glance, to be easy to calculate. One simply starts adding up the terms in the series, one after the other. This is relatively easy to do, but the problem is that there are an infinite number of terms. This usually means that the best we can hope for is to calculate an approximation of the sum. There is nothing wrong with this, since in principle we should be able to calculate the sum as accurately as we want. For example, if we want the sum to be correct to four decimal places we should be able to achieve this by simply adding up enough terms. The question is how many terms are needed to accomplish this task? Also if that number turns out to be very large, we would like to know if there is anything that can be done to speed up the process. One of the few methods that have been devised to answer these questions involves the integral test.
To illustrate the idea, suppose we are interested in finding whether there is a number S so that
That is, we want to know if the series converges and, if so, what
number the series converges to. (If you are paying attention, you
probably will have recognized that this is a geometric series with sum
1, but we want to start with a simple example.)
Maple can be used to get a partial
answer to this question, by computing and plotting values of ,
the sequence of partial sums. The commands below show how to do
this. The last command shows how to plot the first 20 values of
. Note that it is crucial to use a different variable for
the index in the seq command than the one used to define
Sn, because the seq command has the side-effect of assigning a
value to its index.
> f := x -> 1/2^x;
> Sn := n -> sum(f(i),i=1..n);
> Sn(10);
> plot([seq([k,Sn(k)],k=1..20)],style=point);
The plot we just generated seems to indicate that our example series converges to a value close to 1. However, it is well-known that such numerical calculations can be deceiving, so we would like to have a conclusive test. One such test is the integral test discussed below.