Find the limit $\lim\limits_{s\to0^+}\sum_{n=1}^\infty\frac{\sin n}{n^s}$ 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$
 A: Your claim is correct and the tool is integration by parts. The function $f(x)=\cos(\lfloor x \rfloor + k)$ admits a primitive $F(x)$ which is uniformly bounded, and after IP, the new integral involves integrating $F(x)/(x^{s+2})$.
It behaves nicely and you may take limits.
IP also provides some natural conditions for your second question. For example, it suffices
that $f$ has a primitive $F$  such that $F(x)|< C(1+|x|^\alpha)$ with $\alpha<1$.
Incidentally, doing repeated IP also implies that $s\mapsto \sum_{n\geq 1} \frac{\sin(n)}{n^s}$ extends to an entire function in the complex plane.
For you last question in the generality stated I don't know.
A: For $\Re(s) >1$
$$F(s)=\Gamma(s)\sum_{n\ge 1} \sin(n)n^{-s}=\sum_{n\ge 1}\int_0^\infty x^{s-1} \sin(n)e^{-nx}dx=\int_0^\infty x^{s-1} \Im(\frac{1}{e^{x-i}-1})dx $$
Next, note that
$$F(s)- \Im(\frac{1}{e^{-i}-1})\Gamma(s)=\int_0^\infty x^{s-1} (\Im(\frac{1}{e^{x-i}-1})-\Im(\frac{1}{e^{-i}-1}) e^{-x})dx$$ converges and is continuous for $\Re(s) >-1$.
Whence $$\lim_{s\to 0}\sum_{n\ge 1} \sin(n)n^{-s}=\Im(\frac{1}{e^{-i}-1})=\frac{\cos(1/2)}{2\sin(1/2)}$$
A: I put Rugh's answer in detail here.
Let $f$ be an integrable function on $[a,b]$, $g$ a differentiable function on $[a,b]$ and let
$$F(x)=\int_a^xf(t)\,dt,$$
then we have the integration by parts formula (see:Integration by Parts without Differentiation, Vicente Munoz,Mathematics Magazine , Vol. 85, No. 3 (June 2012), pp. 211-213):
$$\int_a^bf(x)g(x)\,dx=g(x)\cdot F(x)\Big|_a^b-\int_a^bF(x)\,dg(x).$$
Here, all we need is that $f$ is integrable, not continuous.
Now, let
$$F(x)=\int_1^x\cos([t]+a)\,dt,$$
Obviously, $|F(x)|\leq C$. or more generally, let
$$F(x)=\int_1^x f(t)\,dt\quad\text{and assume that}\quad
|F(x)|\leq C(1+|x|^\alpha),\quad \alpha<1.$$
Now
$$\int_1^\infty\frac{f(x)}{x^{s+1}}\,dx=
\frac{F(x)}{x^{s+1}}\Big|_1^\infty+(s+1)\int_1^\infty\frac{F(x)}{x^{s+2}}\,dx=(s+1)\int_1^\infty\frac{F(x)}{x^{s+2}}\,dx.$$
It is clear that
$$\int_1^\infty\left|\frac{F(x)}{x^{s+2}}\right|\,dx\leq\int_1^\infty\frac{C(1+|x|^\alpha)}{x^{2}}\,dx<+\infty.$$
Hence
$$\lim_{s\to0^+}\int_1^\infty\frac{f(x)}{x^{s+1}}\,dx=\lim_{s\to0^+}(s+1)\int_1^\infty\frac{F(x)}{x^{s+2}}\,dx=\int_1^\infty\frac{F(x)}{x^{2}}\,dx.$$
Since
$$\int_1^\infty\frac{f(x)}{x}\,dx=\int_1^\infty\frac{dF}{x}=\int_1^\infty\frac{F(x)}{x^2}\,dx,$$
we have that
$$\lim_{s\to0^+}\int_1^\infty\frac{f(x)}{x^{s+1}}\,dx=\int_1^\infty\frac{f(x)}{x}\,dx.$$
A: 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} $$
