The problem is basically the title: prove that $\sum_{n=1}^\infty \frac{\cos(n)}{\sqrt{n}}$ is conditionally convergent.
I proved the convergence of the sum by Dirichlet's test, but i couldn't prove that $\sum_{n=1}^\infty \frac{|\cos(n)|}{\sqrt{n}}=\infty$.
Do you have any hint?
For a very easy proof of divergence, note that since $0 \leqslant |\cos n| \leqslant 1$, we have $$|\cos n| \geqslant \cos^2 n = \frac{1}{2} + \frac{ \cos 2n}{2}.$$
Hence,
$$\sum_{n=1}^m \frac{|\cos n|}{\sqrt{n}} \geqslant \sum_{n=1}^m \frac{1}{2\sqrt{n}} + \sum_{n=1}^m \frac{\cos 2n}{2\sqrt{n}}. $$
The second series on the right-hand side converges by the Dirichlet test, but the first series diverges by comparison with the divergent harmonic series $\frac{1}{2}\sum_{n \geqslant 1} \frac{1}{n} = \infty.$
Therefore, the series $\sum_{n \geqslant 1} \frac{|\cos n|}{\sqrt{n}}$ diverges.