Alternating Series

When your calculator works out \ln 2, a sine, or the digits of \pi, it often adds up a series whose terms flip between plus and minus, stopping the moment the next term is too small to matter. This page is about those sign-flipping sums: why they settle down, and how you know exactly when to stop.

Here is a series you already know is doomed. The harmonic series 1 + \tfrac12 + \tfrac13 + \tfrac14 + \cdots piles up positive terms forever and drifts off to infinity — slowly, majestically, but unstoppably. Every test you have met so far would sign its death certificate.

Now do one tiny thing: flip every second sign.

1 - \frac12 + \frac13 - \frac14 + \frac15 - \cdots = \ln 2 \approx 0.6931.

The same numbers, the same sizes, the same lazy 1/n decay — and suddenly the series converges, and to a famous constant no less. Nothing about the sizes of the terms changed; what changed is that each term now partly cancels the one before it. Cancellation is a superpower: a series whose sizes alone would doom it can be rescued by its signs.

Every test so far has demanded positive terms and asked "do the sizes shrink fast enough?" This page's test asks a completely different question: "do the terms take turns pulling in opposite directions?" When they do — and the tugs die away — the running total zig-zags inward and homes in on a limit. That is the Alternating Series Test, also called Leibniz's test after Gottfried Leibniz, who spotted it in the 1670s.

The test

An alternating series strictly alternates sign:

\sum_{n=1}^{\infty} (-1)^{n+1} b_n = b_1 - b_2 + b_3 - b_4 + \cdots, \qquad b_n > 0.

Here the b_n are the sizes — all positive — and the (-1)^{n+1} supplies the sign flips. Leibniz's discovery: if those sizes decrease monotonically to zero, that alone forces convergence. No comparison, no integral, no ratio — just "shrinking tug-of-war".

Let b_n > 0 with b_{n+1} \le b_n for all n and \displaystyle\lim_{n\to\infty} b_n = 0. Then:

Read the hypotheses like a pre-flight checklist — there are exactly three boxes to tick:

1. the signs strictly alternate;   2. the sizes decrease, b_{n+1} \le b_n;   3. the sizes tend to zero, b_n \to 0.

Tick all three and you get convergence plus a free, explicit error bar — a luxury almost no other convergence test offers. Miss any one and the test simply doesn't apply (more on that in the traps below).

The most common exam disaster on this topic: seeing a (-1)^n and instantly declaring convergence. The sign flips are only one of the three hypotheses. Both of the others can fail, and each failure kills the conclusion:

And one subtlety in the other direction: if the test's hypotheses fail only because the decrease isn't monotone, the series might still converge — the test says nothing either way. A failed hypothesis is "no conclusion", not "diverges". The single exception: if b_n \not\to 0, the divergence test guarantees divergence outright.

Watch the partial sums zig-zag in

This is the picture to carry in your head. The bold zig-zag traces the partial sums of \sum (-1)^{n+1}/n^{p}: the first term jumps up to s_1 = 1, the second drags it back down to s_2, the third pushes it up again — but each correction is smaller than the one before, so every swing overshoots the limit by less. The dashed line is the limit s, and the thin converging curves are the \pm b_{n+1} envelope: a shrinking bracket that the partial sums can never escape.

Notice two things as you watch. First, the odd-numbered sums all sit above the dashed line and stair-step down towards it, while the even-numbered sums sit below and climb up — the limit is forever pinched between the last two partial sums, like a ball bouncing inside a closing vice. Second, drag the decay slider: at p = 1 the bracket closes lazily (that's the alternating harmonic series, sauntering towards \ln 2); at p = 3 it snaps shut in a handful of terms. The speed of convergence is exactly the speed at which b_{n+1} dies.

Why the partial sums nest toward a limit

The zig-zag picture practically is the proof — we just have to say it carefully. Assume b_1 \ge b_2 \ge b_3 \ge \cdots \ge 0 with b_n \to 0, and write s_n for the partial sum. The whole argument is watching the even and odd partial sums close in on each other like a vice.

Step 1 — the even partial sums increase. Group the new pair of terms added going from s_{2n} to s_{2n+2}:

s_{2n+2} - s_{2n} = b_{2n+1} - b_{2n+2} \;\ge\; 0,

which is non-negative because b_{2n+1} \ge b_{2n+2}. So s_2 \le s_4 \le s_6 \le \cdots — the even sums climb.

Step 2 — the odd partial sums decrease. Likewise, going from s_{2n-1} to s_{2n+1}:

s_{2n+1} - s_{2n-1} = -\,b_{2n} + b_{2n+1} = -(b_{2n} - b_{2n+1}) \;\le\; 0,

so s_1 \ge s_3 \ge s_5 \ge \cdots — the odd sums fall.

Step 3 — every even sum lies below every odd sum. The two run toward each other because a single term separates consecutive partial sums:

s_{2n+1} - s_{2n} = b_{2n+1} \;\ge\; 0 \quad\Longrightarrow\quad s_{2n} \le s_{2n+1}.

So the rising even sums are all bounded above (by s_1) and the falling odd sums are all bounded below (by s_2) — two nested, monotone, bounded sequences. Each converges; call the limits L_{\text{even}} and L_{\text{odd}}.

Step 4 — the two limits coincide. Their gap is a single term, which vanishes:

L_{\text{odd}} - L_{\text{even}} = \lim_{n\to\infty} (s_{2n+1} - s_{2n}) = \lim_{n\to\infty} b_{2n+1} = 0.

So L_{\text{even}} = L_{\text{odd}} = s; the even and odd partial sums squeeze onto one common limit, and the series converges:

\sum_{n=1}^{\infty} (-1)^{n+1} b_n = s, \qquad s_2 \le s_4 \le \cdots \le s \le \cdots \le s_3 \le s_1.

Step 5 — read off the error bound. Because the limit s is always boxed between consecutive partial sums s_n and s_{n+1}, and those two differ by exactly b_{n+1}, the distance from any partial sum to the true value is at most one term:

|s - s_n| \;\le\; |s_{n+1} - s_n| = b_{n+1}.

Notice where each hypothesis earned its keep: monotone decrease made the even sums climb and the odd sums fall (Steps 1–2), and terms tending to zero welded the two limits together (Step 4). Delete either and the proof — and the theorem — collapses, exactly as the counterexamples in the trap box showed.

Worked examples

Example 1 — the alternating harmonic series passes

Take \sum_{n=1}^{\infty} (-1)^{n+1}/n and run the checklist on b_n = 1/n:

All three boxes tick, so the series converges — even though its all-positive cousin, the harmonic series, diverges. The value happens to be a celebrity:

\sum_{n=1}^{\infty} \frac{(-1)^{n+1}}{n} = 1 - \frac12 + \frac13 - \frac14 + \cdots = \ln 2.

(The test itself never tells you what the sum is — the \ln 2 comes from the Taylor series of \ln(1+x) at x = 1. The test's job is only the "converges" verdict, plus the error bar.)

Example 2 — the error bound, used for real

Suppose you want \ln 2 correct to two decimal places — an error below 0.005. The error bound says the error after n terms is at most the next term, b_{n+1} = \tfrac{1}{n+1}, so demand

\frac{1}{n+1} \le 0.005 \quad\Longleftrightarrow\quad n + 1 \ge 200 \quad\Longleftrightarrow\quad n \ge 199.

Two hundred terms. For two decimal places! Check it against reality: s_{10} \approx 0.6456 — off by about 0.048, comfortably inside the promised b_{11} = 1/11 \approx 0.091, but a dreadful approximation. The pattern continues brutally: each extra decimal digit costs roughly ten times as many terms, so six decimals costs about two million terms. The alternating harmonic series converges — but at the speed of continental drift, because its bracket only shrinks like 1/n.

Compare \sum (-1)^{n+1}/n^3: for two-decimal accuracy you need \tfrac{1}{(n+1)^3} \le 0.005, i.e. n + 1 \ge \sqrt[3]{200} \approx 5.85 — just n = 5 terms. Same test, same bracket, wildly different closing speed. You saw exactly this on the slider above.

Example 3 — a series the test rejects

Does \sum_{n=1}^{\infty} (-1)^{n+1} \dfrac{n}{2n+1} converge? It alternates, and the sizes b_n = \dfrac{n}{2n+1} even decrease… towards \tfrac12, not 0. Hypothesis 3 fails, so Leibniz's test is silent — but the divergence test is not: terms of size near \tfrac12 forever mean the partial sums bounce between two values about \tfrac12 apart and never settle. Divergent. Moral: check b_n \to 0 first — it is the quickest box to tick and the deadliest to skip.

Most convergence tests tell you only that a series converges; the alternating test hands you a free, fully explicit error bar. Because s always lives in the interval [s_n, s_{n+1}] (or [s_{n+1}, s_n]), the moment you stop after term n your worst-case error is exactly the size of the next term:

|s - s_n| \le b_{n+1}.

Want \ln 2 to three decimals? You need b_{n+1} = \tfrac{1}{n+1} < 5 \times 10^{-4}, i.e. about n = 2000 terms — no remainder integral, no tail estimate, just "look at the next term". And the sign of that term even tells you which side of s you are on: stop after an "up" step and you're above the limit, after a "down" step and you're below. It is the most practical error bound in elementary analysis, and it's the one calculators and computers actually use when they sum an alternating Taylor series for you.

The crown jewel of alternating series is Leibniz's own:

\frac{\pi}{4} = 1 - \frac13 + \frac15 - \frac17 + \frac19 - \cdots

The odd numbers, alternating in sign, conspiring to produce \pi. When Leibniz found it he was so delighted he had it engraved on a medallion. And the test applies perfectly: b_k = \tfrac{1}{2k-1} is positive, decreasing, and tends to zero — convergence guaranteed, error at most \tfrac{1}{2n+1}.

But run the numbers before you reach for it. To pin down \pi itself (four times the sum) to just two decimal places you need the error \tfrac{4}{2n+1} < 0.005 — about 400 terms. Ten correct digits would take roughly forty billion terms. Astronomers of the era, who needed \pi to many digits, politely used other formulas. Leibniz's series is a monument, not a tool — proof that "converges" and "converges usefully" are very different compliments.

The alternating harmonic series converges — but it converges fragilely. Its positive terms alone (1 + \tfrac13 + \tfrac15 + \cdots) sum to +\infty, and its negative terms alone to -\infty. The finite total \ln 2 exists only because the additions and subtractions arrive in exactly the right order, endlessly cancelling. Convergence like this — where the series converges but the series of absolute values does not — is called conditional convergence.

Bernhard Riemann noticed the terrifying consequence: with an infinite reservoir of positive terms and an infinite reservoir of negative ones, you can steer the sum. Want the rearranged series to add up to 42? Deal out positive terms until you pass 42, then negative ones until you dip below it, then positive again… Because the terms shrink to zero, the overshoots shrink too, and the rearranged series converges to exactly 42. The same numbers, merely reshuffled, can be made to sum to any real number — or to diverge. Addition of infinitely many things is not, in general, commutative.

The antidote is absolute convergence — the next idea in the story: if \sum |a_n| converges, every rearrangement converges to the same sum, and infinite addition behaves itself again.

See it explained