I'm trying to understand whether the following series converges absolutely, conditionally or diverges.
$$ \sum_{n=1}^{\infty}\left(-1\right)^{n+1}\left(1-\cos\left(\frac{1}{\sqrt{n}}\right)\right) $$
I think that it converges conditionally. But it's getting complicated for me to show that it does not converge absolutely. I've already tried the limit comparison test with $b_n = \frac{1}{\sqrt{n}}$ but the limit results in $0$. I've also tried the integral test, as the conditions for the test hold, but the integral became very complicated.
Is there an easier way?
Note that
$$1-\cos\left(\frac{1}{\sqrt{n}}\right)= \frac1{2n}+O\left(\frac1{n\sqrt n}\right)$$
then the given series doesn’t converge absolutely by limit comparison test with $\sum \frac1{n}$ and then
$$ \sum _{n=1}^{\infty }\left(-1\right)^{n+1}\left(1-\cos\left(\frac{1}{\sqrt{n}}\right)\right)=\sum _{n=1}^{\infty }\left(-1\right)^{n+1} \frac1{2n}+\sum _{n=1}^{\infty }\left(-1\right)^{n+1} O\left(\frac1{n\sqrt n}\right) $$
which converges since
$\sum _{n=1}^{\infty }\left(-1\right)^{n+1} \frac{1}{2n}$ converges by alternating series test
$\sum _{n=1}^{\infty }\left(-1\right)^{n+1} O\left(\frac1{n\sqrt n}\right)$ converges absolutely by limit comparison test with $\sum \frac1{n\sqrt n}$