Convergence of the series $\sum\limits_{n=1}^{\infty}\frac{\cos(\alpha\sqrt{n})}{n^q}$ Determine for which real values of $\alpha$ and $q$ the following series converges $\sum\limits_{n=1}^{\infty}\frac{\cos(\alpha\sqrt{n})}{n^q}$?
So far I managed to prove that 1) for $q\leqslant0,\alpha\in\mathbb{R}$ the series diverges; 2) for $q>1,\alpha\in\mathbb{R}$ the series converges absolutely; 3) for $0<q\leqslant 1,\alpha=0$ the series diverges.  
How to approach the problem for the case $0<q\leqslant 1,\alpha\neq0$? 
 A: By the Euler-MacLaurin formula, we have
$$S(k) := \sum_{n = 1}^k \cos (\alpha\sqrt{n}) = \int_1^k \cos (\alpha \sqrt{t})\,dt + O(1).$$
Further,
\begin{align}
\int_1^k \cos (\alpha \sqrt{t})\,dt
&= 2\int_1^{\sqrt{k}} u\cos (\alpha u)\,du\\
&= \frac{2}{\alpha}\bigl[u\sin (\alpha u)\bigr]_1^{\sqrt{k}} - \frac{2}{\alpha}\int_1^{\sqrt{k}} \sin (\alpha u)\,du
\end{align}
shows $\lvert S(k)\rvert \leqslant \frac{4}{\lvert\alpha\rvert}\sqrt{k} + O(1) \leqslant C\sqrt{k}$ for some constant $C \in (0,+\infty)$.
Then a summation by part shows
\begin{align}
\Biggl\lvert\sum_{n = m}^k \frac{\cos (\alpha \sqrt{n})}{n^q}\Biggr\rvert
&= \Biggl\lvert\sum_{n = m}^k \bigl(S(n) - S(n-1)\bigr) n^{-q}\Biggr\rvert\\
&\leqslant \frac{\lvert S(k)\rvert}{k^q} + \frac{\lvert S(m-1)\rvert}{m^q} + \Biggl\lvert \sum_{n = m}^{k-1} S(n) \biggl(\frac{1}{n^q} - \frac{1}{(n+1)^q}\biggr)\Biggr\rvert\\
&\leqslant C\Biggl( k^{\frac{1}{2}-q} + m^{\frac{1}{2}-q} + \sum_{n = m}^{k-1}\frac{q}{n^{q+\frac{1}{2}}}\Biggr)\\
&\leqslant \tilde{C}\cdot m^{\frac{1}{2}-q}
\end{align}
for $q > \frac{1}{2}$.
So as D. Thomine expected, the series converges for $q > \frac{1}{2}$ and $\alpha \in \mathbb{R}\setminus \{0\}$. The argument given in the comment shows (when the details are carried out) that the series is divergent for $q \leqslant \frac{1}{2}$.
