An *infinite series* is an expression like this:

S = 1 + 1/2 + 1/4 + 1/8 + ...The dots mean that infinitely many terms follow. We obviously can't add up an infinite number of terms, but we can add up the first n terms, like this:

S_{1}= 1

S_{2}= 1 + 1/2 = 3/2

S_{3}= 1 + 1/2 + 1/4 = 7/4

S_{4}= 1 + 1/2 + 1/4 + 1/8 = 15/8

It is clear what the pattern is: the n-th partial sum is

SWhen n gets larger and larger, S_{n}= 2 - 1/2^{n}

lim( STo take a physical analogy, consider a student who is one yard from the wall of the classroom. He takes a large step to cut the distance to the wall in half. Then he takes another step to cut the distance in half again. He repeates this again and again, getting closer to the wall each time. He never reaches the wall, yet that is his limit postion. We could write_{n}) = S

lim( PositionIn our case lim( S_{n}) = Wall

S = 1 + 1/4 + 1/9 + 1/16 + ... + 1/nWe can compute some partial sums in an effort to see what the limit might be:^{2}+ ....

SThis time it is not clear what is happening. The partial sums are increasing, since we get one from another by adding a positive number. But do they approach a limit? Is there a number to which they get closer and closer as we add more terms? If there is a limit what is it? Can we compute it to some modest accuracy, say one or two decimal places?_{0}= 1

S_{1}= 1 + 1/4 = 1.25

S_{2}= 1 + 1/4 + 1/9 = 1.36111...

S_{3}= 1 + 1/4 + 1/9 + 1/16 = 1.4236111....

`sum`

:
function sum(n) { var s = 0; for(i=1; i <= n; i++) { s += 1.0/(i*i); } return s; }We can read the definition of

`sum`

as follows. First,
create a variable s and set it to zero. This is a "container" in
which we will accumulate the partial sums. Then repeatedly add
1/iThe heart of the definition is the "repeatedly .... as i ranges
from 1 to n" part. Here the "..." is an action or sequence
of actions to be performed. This contruction is called a *loop*,
or, in more detail, a *for* loop.

It is important to understand clearly that there is a problem. To this end consider the so-called harmonic series,

H = 1 + 1/2 + 1/3 + 1/4 + ....Does it converge? See the next section for more on this question. However, before going on, see what you can find by yourself.

S = 1 + 1/4 + 1/9 + 1/16 + ... + 1/nconverges. Since its terms are postive, the partial sums form an increasing sequence:^{2}+ ....

SAn increasing sequence behaves in one of two ways. Either there is a number M which is bigger than all the terms of the sequence, or else there is no such number. In the first case we say that the sequence is_{1}< S_{2}< S_{3}< ...

In the second case the sequence is unbounded: no matter what M we choose, we can find an n such that STheorem.A increasing sequence which is bounded above by a number M converges to a limit L. This limit is less than or equal to M.

lim( SThe main point of all this is that we can guarantee that a series of positive terms converges if its partial sums are bounded above. Can we do this with the sum S above? If, for example, we can show that_{n}) = infinity

Sfor all n, then we know (by virtue of the theorem) that the sequence { S_{n}< 2

One of the key's to answerin this question is to be found in the figure below. The figure composed of yellow boxes is a model for the partial sum of a series. Each box has unit width. The height of the n-th box is the magnitude of the n-th term. Thus the area of the n-th box has the same magnitude as the n-th term. Consequently the area of the yellow figure is the magnitude of the n-th partial sum. Now consider the green figure, which we imagine extending infinitely off to the right. ... to be continued.