Given series $\sum_{n=1}^{\infty}\frac {\cos(n^2)}n$.
It is easy to prove it does not converge absolutely.
I need to prove that it converges сconditionally.
I thought about using Dirichlet's test because $1/n$ series is monotone and $\lim_{n\rightarrow\infty} 1/n = 0$.
So the thing i need to prove is $\left|\sum_{1}^k \cos(n^2)\right| < M,\ \forall k$.
If there was $\cos(n)$ instead of $n^2$, it would be easy to prove this statement by multiplication and division by $\cos(0.5)$ and then using some trigonometric formula so that $\left|\sum_{1}^k \cos(n^2)\right| = \left|\frac{cos(0.5)-cos(n-0.5)}{\cos(0.5)}\right| < 2$ or something like that. But this approach seems to be impossible for $\cos(n^2)$.
Maybe there is a way to prove it using the fact that $\int \cos(x^2) = \sqrt{2/\pi}$?
Or any simpler way?