Evaluating $\sum_{n=1}^{\infty} \int_{1}^{\infty} \frac {\cos(2 \pi n t)}{t^z} dt$ I need help evaluating any of:
$$\sum_{n=1}^{\infty} \int_{1}^{\infty} \frac {\cos(2 \pi n t)}{t^z} dt$$
$$\sum_{n=1}^{\infty} \int_{1}^{\infty} \frac {\cos(2 \pi (2n - 1) t)}{t^z} dt$$
Where $z \in \Bbb{C}$

Also I would like to ask if this is true:
$$\sum_{n=1}^{\infty} \int_{1}^{\infty} \frac {\cos(2 \pi n t)}{t^z} dt = \int_{1}^{\infty} \frac {\sum_{n=1}^{\infty} \cos(2 \pi n t)}{t^z} dt$$
If yes then how to in clever way calculate:
$$\sum_{n=1}^{\infty} \cos(2 \pi n t)$$
 A: I will solve the first sum only, since the second one may be tackled in a similar way. Assume that $\operatorname{Re}(z) > 0$. Then
\begin{align*}
\sum_{n=1}^{N} \int_{1}^{\infty} \frac{\cos(2\pi n t)}{t^z} \, \mathrm{d}t
&= \int_{1}^{\infty} \left( \sum_{n=1}^{N} \cos(2\pi n t) \right) \frac{\mathrm{d}t}{t^z} \\
&= z \int_{1}^{\infty} \left( \sum_{n=1}^{N} \frac{\sin(2\pi n t)}{2\pi n} \right) \frac{\mathrm{d}t}{t^{z+1}}
\end{align*}
Now, from the knowledge on Fourier series, we know that
$$ S_N(t) := \sum_{n=1}^{N} \frac{\sin(2\pi n t)}{2\pi n} $$
is bounded uniformly in $N$ and $t$ and that
$$ \lim_{N\to\infty} S_N(t) = \frac{1}{4} - \frac{t - \lfloor t \rfloor}{2} $$
for each $ t \in \mathbb{R}\setminus\mathbb{Z}$. So by the dominated convergence theorem,
\begin{align*}
\sum_{n=1}^{\infty} \int_{1}^{\infty} \frac{\cos(2\pi n t)}{t^z} \, \mathrm{d}t
&= z \int_{1}^{\infty} \left( \frac{1}{4} - \frac{t - \lfloor t \rfloor}{2} \right) \frac{\mathrm{d}t}{t^{z+1}}.
\end{align*}
The last integral can be computed by decomposing it over the subintervals of the form $[k, k+1]$ for $k = 1,2, \dots$, and the result is
$$ \frac{\zeta(z)}{2} - \frac{1}{4}\left(\frac{z+1}{z-1}\right). $$
This function is analytic on all of $\operatorname{Re}(z) > 0$.
A: In a very general manner, the sum and integration operations can be switch iff they both converge in both cases.
For the evaluation of the integral I would do the following:
$$
\sum_{n=1}^\infty \int_0^\infty \frac{\cos(2\pi nt)}{t^z}dt=\sum_{n=1}^\infty \int_0^\infty \frac{\frac{e^{i2\pi nt}-e^{-i2\pi nt}}{2}}{t^z}dt\\
\frac{1}{2}\sum_{n=1}^\infty \int_0^\infty \frac{e^{i2\pi nt}-e^{-i2\pi nt}}{t^z}dt
$$
Now try interchanging the sum and integral, I think this would be a good way to approach the problem
