Convergence of $\sum_{k=1}^{\infty}\frac{\cos(\theta k)}{\sqrt{k}}$ Say if the following series
$$ \sum_{k=1}^{\infty} \frac{\cos(\theta k)}{\sqrt{k}} $$
for $θ \in \mathbb{R}$ is convergent. Is it absolutely convergent?
I don't know how to approach this problem. Any hint will be very appreciated.
Thanks!
 A: For $\theta = \pi$ the series 
$$
\sum_{k=1}^{\infty} \frac{\cos(\theta k)}{\sqrt{k}}
= \sum_{k=1}^{\infty} \frac{(-1)^k}{\sqrt{k}}
$$
is convergent (alternating series test), but not absolutely convergent.
A: If $\theta$ is an even multiple of $\pi$, the series diverges by the integral test. If $\theta$ is $1$ or an odd multiple of $\pi$, the series converges by the alternating series test. Otherwise, 
$\left|\sum^{n-1}_{k=1}\cos k\theta\right|=\left|\frac{\sin\frac{n}{2}\theta}{\sin\frac{1}{2} \theta}\cos \left((n-1)\frac{1}{2}\theta\right)-1\right|\le \left|\left(\sin\frac{\theta}{2}\right)^{-1}+1\right|$
so the series converges by Dirichlet's criterion. But the series does not converge absolutely: 
set $f(x)=|\cos \theta x|+|\cos \theta (x+1)|.$ Then, $f$ is non-negative continuous on $[0,\pi]$. In fact is it not zero there because if so, then each of $|\cos \theta x|$ and $|\cos \theta (x+1)|$ would have to be zero, so $\theta x$ and $\theta(x+1)$ would have to be a multiple of $\pi/2$, so $\theta$ would be a multiple of $\pi/2$, but we have excluded that case. Therefore, by compactness, there is a real number $c$ such that $f>c>0$ on $[0,\pi]$, hence everywhere.
We have then 
$\sum^{2n}_{k=1}\frac{|\cos \theta k|}{\sqrt k}\ge \sum^{2n}_{k=1}\frac{|\cos \theta k|}{k}= \sum^{n}_{k=1}\frac{|\cos \theta (2k-1)|}{2k-1}+\frac{|\cos \theta (2k)|}{2k}=\sum^{n}_{k=1}\frac{|\cos \theta (2k-1)|+|\cos \theta (2k|}{2k}\ge \sum^{n}_{k=1}\frac{c}{k},$
which diverges. 
