# Evaluate $\lim\limits_{n\to\infty}{\dfrac{1}{n}\sum_{k=1}^n\sin{\left(\dfrac{n}{k}\right)}}$.

Numerical experimentation suggests that the following limit converges.

$$L=\lim_{n\to\infty}{\dfrac{1}{n}\sum_{k=1}^n\sin{\left(\dfrac{n}{k}\right)}}$$

According to both Desmos and Wolfram, for $$n=10^5, 10^6, 10^7$$, the values of $$L$$ are $$0.504116, 0.504069, 0.504068$$, respectively.

Does this limit converge, and if so, is there a closed form?

By looking at the graph of $$y=\sin{\left(\frac{n}{x}\right)}$$ from $$x=1$$ to $$x=n$$, I can see why the limit should converge, but I don't know how to prove this rigorously. I doubt there is a closed form.

(In case you're wondering where this question comes from, I just made it up after thinking about another question.)

• Riemann sum for $\int_0^1 \sin (1/x) \, dx$ :wolframalpha.com/…
– RRL
Jul 29, 2022 at 15:56
• A lot simpler than I thought.
– Dan
Jul 29, 2022 at 16:02
• Hmm, and yes, $\int_0^1 \sin(1/x) dx = \int_1^\infty \frac{\sin t}{t^2} dt$ and according to Wolfram Alpha, the latter integral is $\sin(1) - Ci(1) \approx 0.504067$. Jul 29, 2022 at 16:02
• With Ci being the cosine integral function.
– Dan
Jul 29, 2022 at 16:04

For $$g$$ a bounded continuous function on $$(0,1]$$ (so integrable) let $$g_n(x) = \sum_{k=1}^{n}\mathbf 1_{\left[\frac {k-1}n, \frac{k}{n} \right]}(x) g\left(\frac{k}{n}\right)$$,

\begin{align} \left|g_n(x) - g(x)\right| &= \left|g\left(\frac{\left\lfloor nx\right\rfloor}{n}\right) - g(x)\right| \underset{n\to \infty}\to 0. \end{align}

Since $$g_n$$ are bounded by the $$\sup\limits_{x\in (0,1]} \left|g(x)\right|$$ then,

$$\int_0^1 g_n(x)\mathrm d x \underset{n\to \infty}\to \int_0^1 g(x)\mathrm d x$$

But $$\displaystyle\int_{0}^1 g_n(x)\mathrm d x = \frac 1n\sum_{k=1}^n g\left(\frac kn\right)$$.

Applying the previous result on $$g(x) =\sin \left(\frac 1x\right)$$, we have the sum converges to the integral $$\displaystyle\int_0^1 \sin \left(\frac1x\right)\mathrm dx$$. \begin{align} \int_{0}^1 \sin\left(\frac1x\right)\mathrm d x =_{t:=\frac1x} \int_{1}^\infty \frac{\sin(t)}{t^2}\mathrm d t = \left[-\frac{1}{t}\sin (t)\right]_0^{\infty}-\int_1^\infty \frac{\cos t}{t}\mathrm d = 1 - \int_{1}^{\infty} \frac{\cos t}{t}\mathrm d t. \end{align}

• I can't count how many times I've not realized that a series is a Riemann sum. Bars, darnit.
– Dan
Jul 29, 2022 at 16:16
• How do you know the Riemann sum converges to the integral for a case like this where it's an improper integral? Jul 29, 2022 at 16:25
• It should not be called a Riemann sum. In the 19th century Riemann extended the classical integral to a wider class of functions with what is correctly called Riemann integration. Jul 29, 2022 at 16:33
• I would say the Riemann sum argument is at least a good heuristic, so you could keep it as an initial motivator, before you start going into more sensitive analysis. Jul 29, 2022 at 16:40
• OK, now I see -- the $n$th value of the sequence in question is the integral of a simple function $f_n$, where $f_n(x) \to \sin(1/x)$ pointwise on $(0, 1]$ as $n \to \infty$ and each $|f_n(x)| \le 1$. Therefore, by the Dominated Convergence theorem, the sequence converges to the Lebesgue integral of $\int_0^1 \sin(1/x)dx$. Jul 29, 2022 at 17:51

I think I got the solution which agrees with your approximations. We use the integral:

$$\int_{1}^{x}\sin\dfrac{x}{t}dt$$=$$-x\displaystyle\int\limits_{x}^{1}\dfrac{\sin u}{u^{2}}du$$=$$x\displaystyle\int_{1}^{x}\dfrac{\sin u}{u^{2}}du$$=

$$x(Ci(x)-Ci(1)-\dfrac{\sin x}{x}+\sin(1))$$.

Multiplied by $$\dfrac{1}{x}$$ we get $$\displaystyle \lim_{x \to+\infty}(Ci(x)-Ci(1)-\dfrac{\sin x}{x}+ \sin(1))$$.

It is known that $$Ci(x)\to 0$$ as $$x\to+\infty$$ and also $$\dfrac{\sin x}{x}\to 0$$.

So we are left with $$-Ci(1)+\sin(1)$$ which is approximately $$0.50406732$$ as you have calculated!