In Calculus we teach that if the $a\_n$ are positive and decreasing with limit equal to zero, then the alternating series $\sum\_n (-1)^na\_n$ converges. One can in general not leave out the assumption that the $a\_n$ (eventually) decrease, as the example $a\_{2n}:=1/n$ and $a\_{2n+1}:=1/2^n$ shows. However, most examples are series where the $a\_n$ are given by some function $a\_n=f(n)$ (for $n\gg 0$). 


So my question is, for which class of functions $\mathcal F$ do we have the property that if $f$ is a positive function in $\mathcal F$ and $\lim\_{x\to \infty}f(x)=0$, then the alternating series $\sum\_n (-1)^nf(n)$ converges. For instance, any o-minimal class will work, since any $f$ with limit zero at infinity must eventually be decreasing. But I think if we add the sine function to this class and close under addition, multiplication and composition, this is still true. In fact, I would almost dare to postulate that the class of elementary functions (i.e., the ones our students work with), have this property, and so we do not need to ``bug'' them with this extra condition.



Alternating series test for non-decreasing terms
$$f(x) = \frac{2(\cos \pi x/2)^2}{x} + \frac{(\sin \pi x/2)^2}{2^{(x-1)/2}}$$ is certainly a function in the class you describe, but $f(2n) = 1/n$ and $f(2n+1)=1/2^n$, which breaks the alternating series test as you've remarked.


