TITLE: Proof that $\sum\limits_{i=1}^n \cos \sqrt{i}$ is unbounded.
QUESTION [6 upvotes]: Please advice how to prove that $\sum\limits_{i=1}^n \cos \sqrt{i}$ is unbounded. By this I mean there exists no positive real $B$ such that for any natural $n$ $$-B <\sum\limits_{i=1}^n \cos \sqrt{i} < B$$
UPD: it looks like the sum is not bounded (it follows from Euler–Maclaurin formula), so it seems it is just necessary to fill out details.

REPLY [8 votes]: Note that
$$
(-1)^n\cos(x)\ge\frac12\quad\text{on}\quad\left[n\pi-\frac\pi3,n\pi+\frac\pi3\right]
$$
Furthermore,
$$
\left(n\pi+\frac\pi3\right)^2-\left(n\pi-\frac\pi3\right)^2=\frac{4\pi^2n}{3}
$$
Thus, if we let $a_n=\left\lceil\left(n\pi-\frac\pi3\right)^2\right\rceil$ and $b_n=\left\lfloor\left(n\pi+\frac\pi3\right)^2\right\rfloor$, then
$$
(-1)^n\sum_{k=a_n}^{b_n}\cos(\sqrt{k})\ge\frac{2\pi^2n}{3}-\frac12
$$
When a sequence changes by $\frac{2\pi^2n}{3}-\frac12$, up or down, either before or after, its absolute value must have been at least $\frac{\pi^2n}{3}-\frac14$.