TITLE: Find the limit $\lim\limits_{s\to0^+}\sum_{n=1}^\infty\frac{\sin n}{n^s}$
QUESTION [18 upvotes]: This is a math competition problem for college students in Sichuan province, China. As the title, calculate the limit
$$\lim_{s\to0^+}\sum_{n=1}^\infty\frac{\sin n}{n^s}.$$
It is clear that the Dirichlet series $\sum_{n=1}^\infty\frac{\sin n}{n^s}$ is convergent for all complex number $\Re s>0$. Here we only consider the case of real numbers.
Let
$$A(x)=\sum_{n\leq x}\sin n,$$
then we have that
$$A(x)=\frac{\cos\frac{1}{2}-\cos([x]+\frac{1}{2})}{2\sin\frac{1}{2}},$$
here $[x]$ is the floor function. Obviously, $A(x)$ is bounded and $|A(x)|\leq\frac{1}{\sin(1/2)}$. Using Abel's summation formula, we have that
$$\sum_{n=1}^\infty\frac{\sin n}{n^s}=s\int_1^\infty\frac{A(x)}{x^{s+1}}\,dx
=\frac{\cos\frac{1}{2}}{2\sin\frac{1}{2}}-s\int_1^\infty\frac{\cos([x]+\frac{1}{2})}{x^{s+1}}\,dx.$$
The integral $\int_1^\infty\frac{\cos([x]+\frac{1}{2})}{x^{s+1}}\,dx$ or $\int_1^\infty\frac{\cos([x])}{x^{s+1}}\,dx$ is also convergent for $s>-1$ (am I right? use Dirichlet's test)
My question: Is there an easy way to prove
$$\lim_{s\to0^+}\int_1^\infty\frac{\cos([x])}{x^{s+1}}\,dx=
\int_1^\infty\lim_{s\to0^+}\frac{\cos([x])}{x^{s+1}}\,dx=
\int_1^\infty\frac{\cos([x])}{x}\,dx.$$
If the above conclusion is correct, we have that
$$\lim_{s\to0^+}\sum_{n=1}^\infty\frac{\sin n}{n^s}=\frac{\cos\frac{1}{2}}{2\sin\frac{1}{2}}.$$
More generally, consider the Mellin tranform $g(s)=\int_1^\infty\frac{f(x)}{x^{s+1}}\,dx$, here $f(x)$ is continuous except integers and have left and right limit at integers.
If for $s=0$, the integral $\int_1^\infty\frac{f(x)}{x}\,dx$ is convergent, do we have that
$$\lim_{s\to0^+}\int_1^\infty\frac{f(x)}{x^{s+1}}\,dx\stackrel{?}=\int_1^\infty\frac{f(x)}{x}\,dx\,$$(In Jameson's book The prime number theorem, page 124, there is a Ingham-Newman Tauberian thereom, but the conditions of the theorem there are slightly different from here.)
If the condition is strengthened to for all $s\geq-1/2$, $\int_1^\infty\frac{f(x)}{x^{s+1}}\,dx$ is convergent, is the following correct
$$\lim_{s\to0^+}\int_1^\infty\frac{f(x)}{x^{s+1}}\,dx\stackrel{?}=\int_1^\infty\frac{f(x)}{x}\,dx\,$$ If this is correct, is there a simple way to prove it?
(2022/3/24/21:53) If the Dirichlet integral $\int_1^\infty\frac{f(x)}{x^s}dx$ converges at $s_0$, then it converges uniformly in $$|\arg(s-s_0)|\leq\alpha<\frac{\pi}{2}$$
for any fixed $0<\alpha<\frac{\pi}{2}$, and thus
$$\lim_{s\to s_0^+}\int_1^\infty\frac{f(x)}{x^s}dx=\int_1^\infty\frac{f(x)}{x^{s_0}}dx.$$
For the uniform convergence of Dirichlet integral, see Uniform convergence about Dirichlet integral $f(s):=\int_1^\infty\frac{a(x)}{x^s}\,dx =\lim\limits_{T\to\infty}\int_1^T\frac{a(x)}{x^s}\,dx$

REPLY [3 votes]: Let $\operatorname{Li}_{s}(z)$ be the polylogarithm function of order $s$.
For $\Re(s) >0$, we have $$\sum_{n=1}^{\infty} \frac{\sin(n)}{n^{s}} = \Im \operatorname{Li}_{s}(e^{i}). $$
And since $\frac{\partial}{\partial z} \operatorname{Li}_{s+1}(z) =  \frac{\operatorname{Li}_{s}(z)}{z}$, we have$$\operatorname{Li}_{0}(z) = z\frac{\mathrm d }{\mathrm d z}\operatorname{Li}_{1}(z) = - z \frac{\mathrm d}{\mathrm d z} \ln(1-z) = \frac{z}{1-z} . $$
Therefore, $$ \lim_{s \to 0^{+}}\sum_{n=1}^{\infty}\frac{\sin(n)}{n^{s}} =  \Im \lim_{s \to 0^{+}} \operatorname{Li}_{s}(e^{i}) = \Im \, \frac{e^{i}}{1-e^{i}}   = \Im  \, \frac{i e^{i/2}}{2\sin \left(\frac{1}{2} \right)} = \frac{1}{2} \cot \left(\frac{1}{2} \right). $$
Similarly, we have$$\lim_{s \to 0^{+}}\sum_{n=1}^{\infty}\frac{\cos(n)}{n^{s}} = \Re \,  \frac{e^{i}}{1-e^{i}} = - \frac{1}{2}. $$

UPDATE:
To prove that $\lim_{s \to 0^{+}} \operatorname{Li}_{s}(e^{i}) = \operatorname{Li}_{0}(e^{i})$, we need to show that $\operatorname{Li}_{s}(e^{i})$ is continuous at $s=0$.
For $\Re(s) >0$ and all $z \in \mathbb{C}$ except $z$ real and $\ge 1$, the polylogarithm has the Mellin transform representation $$\operatorname{Li}_{s}(z) = \frac{z}{\Gamma(s)} \int_{0}^{\infty} \frac{x^{s-1}}{e^{x} -z} \, \mathrm dx. $$
If we integrate by parts, we get $$\operatorname{Li}_{s}(z) = \frac{z}{\Gamma(s+1)} \int_{0}^{\infty} \frac{x^{s}e^{x}}{\left(e^{x}-z\right)^{2}} \, \mathrm dx. \tag{1} $$
Since the Mellin transform defines an analytic function in the vertical strip where it converges converges absolutely (https://dlmf.nist.gov/1.14.iv), the above representation defines an analytic function in $s$, and thus a continuous function in $s$, in the half-plane $\Re(s) >-1$ for any fixed value of $z$ except $z$ real and $\ge 1$.

We can check to make sure that $(1) $ gives the correct expression for $\operatorname{Li}_{0}(z)$.
$$\operatorname{Li}_{0}(z) = \frac{z}{\Gamma(1)} \int_{0}^{\infty} \frac{e^{x}}{(e^{x}-z)^{2}} = - \frac{z}{e^{x}-z} \Bigg|^{\infty}_{0} =0 + \frac{z}{1-z} = \frac{z}{1-z} $$