, an alternating series
is an infinite series
of the form
with an ≥ 0 (or an ≤ 0) for all n. A finite sum of this kind is an alternating sum. An alternating series converges if the terms an converge to 0 monotonically. The error E introduced by approximating an alternating series with its partial sum to n terms is given by |E|<|an+1|.
A sufficient condition for the series to converge is that it converges absolutely. But this is often too strong a condition to ask: it is not necessary. For example, the harmonic series
diverges, while the alternating version
converges to the natural logarithm of 2.
A broader test for convergence of an alternating series is Leibniz' test: if the sequence is monotone decreasing and tends to zero, then the series
The partial sum
can be used to approximate the sum of a convergent alternating series.
If is monotone decreasing and tends to zero, then the error
in this approximation is less than . This last observation is the basis of the Leibniz test. Indeed, if the sequence tends to zero and is monotone decreasing (at least from a certain point on), it can be easily shown that the sequence of partial sums is a Cauchy sequence. Assuming