TITLE: Are there any counterexamples to the Dirichlet criterion if g(x) is not monotone?
QUESTION [5 upvotes]: We know that the Dirichlet criterion testing the convergence of a series needs one sequence monotonically tends to zero, and the sequence of partial sums of the the other series is bounded.
I wonder if there is a counterexample of it if the first sequence is not monotone?
Much thanks to your help~

REPLY [3 votes]: For $n\ge 2$, let  $a_n=\dfrac{(-1)^n}{\log n}$.  Let $b_n=\dfrac{1}{\log n}$ if $n$ is even, and let $b_n=\dfrac{1}{2^n}$ if $n$ is odd.  Then $\sum_2^\infty a_nb_n$ diverges. This is because the sum of the negative terms converges rapidly, while the sum of the positive terms is unbounded.