# Leibniz's alternating series test

the definition of this test is:

if $a_n$ decreases monotonically and goes to 0 in the limit then the alternating series $\sum_{n=1}^{\infty}(-1)^na_n$ converges

my question is: why does the series $a_n$ has to be monotonically descending, isn't it enough for $\lim_{n\to\infty}a_n = 0$ ? can someone give me an example for that?

Counter example:

Check the following alternating series diverges:

$$\sum_{n=1}^\infty(-1)^na_n\;\;,\;\;a_n=\begin{cases}0&,\;\;n\;\;\text{is odd}\\{}\\\frac1n&,\;\;n\;\;\text{is even}\end{cases}$$

• thanks! a great example that can be easily understood! – guynaa Dec 8 '13 at 19:48

Let $$a_n=\frac{1}{\sqrt {n+(-1)^n}}$$ then by taylor series we have $$(-1)^na_n=\frac{(-1)^n}{\sqrt n}\left(1-\frac{(-1)^n}{2\sqrt n}+O\left(\frac{1}{n}\right)\right)$$ The first and the last term give a convergent series by Leibniz theorem and by comparison with the Riemann series respectively and the term $\frac{1}{2n}$ gives a divergent series hence the series $\sum (-1)^n a_n$ is divergent.

Consider $a_n = 1/n$ when $n$ is even, and $a_n=1/n^2$ when $n$ is odd. Then $a_n \to 0$ but $\sum (-1)^n a_n$ diverges.

• why does it diverge? – guynaa Dec 8 '13 at 19:43
• Perhaps you can prove that yourself! – GEdgar Dec 8 '13 at 19:44