Alternating Series

If a series has only positive terms, the partial sums get larger and larger. If they get large too rapidly, the series will diverge.

However, if some of the terms are negative, the negative terms may cancel with the positive terms and prevent the partial sums from "blowing up".


Example. The harmonic series

$$\sum_{k=1}^{\infty} \dfrac{1}{k} = 1 + \dfrac{1}{2} + \dfrac{1}{3} +\dfrac{1}{4} + \cdots$$

diverges.

However, the alternating harmonic series

$$\sum_{k=1}^{\infty} (-1)^{k+1} \dfrac{1}{k} = 1 - \dfrac{1}{2} + \dfrac{1}{3} - \dfrac{1}{4} + \cdots,$$

converges.

I computed the $1000^{\rm th}$ , $10000^{\rm
   th}$ , and $100000^{\rm th}$ partial sums of the harmonic series and the alternating harmonic series. Here's what I got:

$$\vbox{\offinterlineskip \halign{& \vrule # & \strut \hfil \quad # \quad \hfil \cr \noalign{\hrule} height2pt & \omit & & \omit & & \omit & & \omit & \cr & & & $s_{1000}$ & & $s_{10000}$ & & $s_{100000}$ & \cr height2pt & \omit & & \omit & & \omit & & \omit & \cr \noalign{\hrule} height2pt & \omit & & \omit & & \omit & & \omit & \cr & harmonic & & 7.48547 & & 9.78761 & & 12.09015 & \cr height2pt & \omit & & \omit & & \omit & & \omit & \cr \noalign{\hrule} height2pt & \omit & & \omit & & \omit & & \omit & \cr & alternating harmonic & & 0.69265 & & 0.69310 & & 0.69314 & \cr height2pt & \omit & & \omit & & \omit & & \omit & \cr \noalign{\hrule} }} $$

Of course, this is just numerical evidence, not a proof. However, you can see that while the partial sums of the harmonic series are getting steadily larger, the partial sums for the alternating harmonic series seem to be converging.

The pictures below show the first 20 and the first 100 partial sums of the alternating harmonic series.

$$\hbox{\epsfysize=1.75in \epsffile{altser1.eps}} \hskip0.5in \hbox{\epsfysize=1.75in \epsffile{altser2.eps}}$$

Notice how the partial sums appear to converge by oscillation to a value around 0.69.


A series alternates if the signs of the terms alternate. The Alternating Series Test provides a way of testing an alternating series for convergence. Suppose $\displaystyle
   \sum_{k=1}^{\infty} (-1)^{k+1} a_k$ is an alternating series (so the $a_k$ 's are positive). Suppose in addition that:

  1. The $a_k$ 's decrease.
  2. $\displaystyle \lim_{k \to \infty} a_k
   = 0$ .

Then the series $\displaystyle
   \sum_{k=1}^{\infty} (-1)^{k+1} a_k$ converges.

It is usually easy to see by inspection that a series alternates. To check that the $a_k$ 's decrease, look at the corresponding function $f(k) = a_k$ . Compute the derivative $f'(k)$ , and use the fact that a function decreases if its derivative is negative.

$\displaystyle \lim_{k \to\infty} a_k$ is the same limit that appears in the Zero Limit Test. By itself, the condition that $\displaystyle \lim_{k \to\infty} a_k = 0$ is not enough to make a series converge. (If the limit isn't 0, the Zero Limit Test says the series diverges.) The Alternating Series Rule augments the computation of this limit with other conditions, and all together these conditions are enough to ensure convergence.

Warning! A common mistake is to try to apply the conditions of the Alternating Series Rule, and then, upon discovering that some condition doesn't hold, conclude that the series diverges. The rule only says that if the conditions are true, then the series converges; it does not say what happens if the conditions are not true.

On the other hand, if $\displaystyle
   \lim_{k \to\infty} a_k \ne 0$ , you can conclude that the series diverges, by the Zero Limit Test.


Example. Consider the alternating harmonic series $\displaystyle
   \sum_{k=1}^{\infty} (-1)^{k+1} \dfrac{1}{k}$ .

The $(-1)^{k+1}$ ensures that the terms alternate.

Let $f(x) = \dfrac{1}{x}$ . Then $f'(x)
   = -\dfrac{1}{x^2}$ , which is always negative. Since f is always decreasing, the terms of the series decrease in magnitude.

I could also see this by graphing $f(x)
   = \dfrac{1}{x}$ .

Note that in considering whether the terms decrease, I ignore the $(-1)^{n+1}$ part --- the $\pm 1$ .

Finally,

$$\lim_{n\to \infty} \dfrac{1}{n} = 0.$$

The conditions of the Alternating Series Test hold. Therefore, the series converges.


Example. Does $\displaystyle \sum_{k=2}^{\infty} (-1)^k \dfrac{1}{k -
   \sqrt{k}}$ converge or diverge?

The series alternates, and

$$\lim_{k \to\infty} \dfrac{1}{k - \sqrt{k}} = \lim_{k \to\infty} \dfrac{1}{\sqrt{k}(\sqrt{k} - 1)} = 0.$$

Set $f(k) = \dfrac{1}{k - \sqrt{k}}$ . Then

$$f'(k) = -\dfrac{1 - \frac{1}{2} k^{-1/2}}{(k - \sqrt{k})^2},$$

so $f'(k) < 0$ for $k \ge 2$ . It follows that the terms of the series decrease in absolute value. By the Alternating Series Test, the series converges.


Example. Does $\displaystyle \sum_{n=0}^{\infty} \dfrac{\cos \pi n}{\sqrt{n +
   1}}$ converge or diverge?

This is an alternating series, though it's disguised by the absence of the usual $(-1)^n$ . But note that

$$\cos 0 = 1, \quad \cos \pi = -1, \quad \cos 2\pi = 1, \quad \cos 3\pi = -1, \ldots.$$

In fact, $\cos \pi n = (-1)^n$ , so the series can be rewritten as $\displaystyle \sum_{n=0}^{\infty}
   \dfrac{(-1)^n}{\sqrt{n + 1}}$ .

The series alternates. If $f(x) =
   \dfrac{1}{\sqrt{x + 1}}$ , then

$$f'(x) = -\dfrac{1}{2(x + 1)^{3/2}},$$

which is always negative. Hence, the terms decrease in magnitude.

Finally,

$$\lim_{n\to \infty} \dfrac{1}{\sqrt{n + 1}} = 0.$$

The conditions of the Alternating Series Test are satisfied. Hence, the series converges.


When a series converges, you can approximate the sum to an arbitrary degree of accuracy by adding up sufficiently many terms. How many terms do you need to add up in order to approximate the sum to within a given tolerance? When the series is an alternating series, there's an easy way to find out.

$$\hbox{\epsfysize=2in \epsffile{altser3.eps}}$$

As the picture shows, the partial sums of an alternating series converge by oscillation to the actual sum. Alternate partial sums are greater than the sum, less than the sum, greater than the sum, and so on.

If $s_n$ is the n-th partial sum (the sum of the terms through the n-th), the error is smaller than the next "jump". The size of the jump from $s_n$ to $s_{n+1}$ is $a_{n+1}$ .


Example. Approximate $\displaystyle \sum_{k=2}^{\infty} (-1)^k \dfrac{1}{k -
   \sqrt{k}}$ .

I showed in the last example that this alternating series converges. Here's the sum of the first 10 terms.

$$\dfrac{1}{2 - \sqrt{2}} - \dfrac{1}{3 - \sqrt{3}} + \cdots - \dfrac{1}{11 - \sqrt{11}} \approx 1.15141.$$

The next term in the series is $(-1)^{12} \dfrac{1}{12 - \sqrt{12}}$ . Ignoring the sign, this is approximately 0.11715. The estimate 1.15141 is in error by no more than 0.11715, around $10\%$ .

In fact, more is true. The last term $\dfrac{1}{11 - \sqrt{11}}$ was subtracted, so the estimate is too small.

The next partial sum

$$\dfrac{1}{2 - \sqrt{2}} - \dfrac{1}{3 - \sqrt{3}} + \cdots - \dfrac{1}{11 - \sqrt{11}} + \dfrac{1}{12 - \sqrt{12}} \approx 1.26856$$

is too large.

The actual sum is between 1.15141 and 1.26856.


Example. (a) Estimate the error if the first 100 terms of the sum $\displaystyle
   \sum_{n=1}^\infty \dfrac{(-1)^{n+1}}{n^2}$ are used to approximate the sum.

The error in using the $100^{\rm th}$ partial sum is less than the absolute value of the $101^{\rm st}$ term. Hence, the error is less than

$$\dfrac{1}{101^2} \approx 0.0010.\quad\halmos$$

(b) How many terms would be required to estimate the sum to within 0.001?

I want the first n such that $\dfrac{1}{(n + 1)^2} \le 0.001$ . This inequality can be rewritten as

$$(n + 1)^2 \ge \dfrac{1}{0.001}, \quad\hbox{or}\quad (n + 1)^2 \ge 1000.$$

This gives $n \ge \sqrt{1000} - 1
   \approx 30.62278$ . I should take $n = 31$ to be sure that the error is less than 0.001.


Contact information

Bruce Ikenaga's Home Page

Copyright 2005 by Bruce Ikenaga