# Does the sequence converge, alternating series fails?

Does $\sum_{n=1}^{\infty} (-1)^n \frac{2}{n} \cos^2(\frac{\pi n}{2})$ converge?

The alternating series test fails, because I am unable to prove that $f'(n) < 0$, I can get to $f'(n) = 0$, but that fails the test.

• What is $f{}{}$? – Wojowu Dec 9 '16 at 21:27
• @Wojowu, $f(n) = \frac{2}{n} \cos^2(\frac{\pi n}{2})$ – Amad27 Dec 9 '16 at 21:28
• $\frac{2}{n}\cos^2{\left(\frac{\pi n}{2}\right)} \to 0$ as $n \to \infty$ – jacer21 Dec 9 '16 at 21:29
• @jacer21, but what about the decreasing condition? – Amad27 Dec 9 '16 at 21:29

notice that $\cos^2(\frac{\pi n}{2})$ is $1$ if $n$ is odd and $0$ otherwise, so letting $n=2m$ and adding only over even terms our sum is equal to:

$\sum\limits_{m=1}^{\infty}(-1)^{2m} \frac{2}{2m}=\sum\limits_{m=1}^\infty \frac{1}{m}$

Let $u_n=(-1)^n\frac{2}{n}\cos^2(\frac{n\pi}{2})$.

we have

$$\sin^2(\frac{n\pi}{2})=\frac{1-(-1)^n}{2}$$ $$\implies \cos^2(\frac{n\pi}{2})=\frac{1+(-1)^n}{2}$$ $$\implies u_n=\frac{(-1)^n+1}{n}$$

$$=\frac{(-1)^n}{n}+\frac{1}{n}$$

which is a sum of a convergent series (alternate) and a divergente one (harmonic), so, our series is divergent.

No, it doesn't... when $n$ is odd. $\cos^2(\frac {n\pi}{2}) = 0$

and when n is even $\cos^2(\frac {n\pi}{2}) = 1$

So we can re-write this as $\sum \frac 1{n}$ which does not converge.