# Calculating $\lim_{n\to\infty}\left(\frac{\sin(2\sqrt 1)}{n\sqrt 1\cos\sqrt 1} +\cdots+\frac{\sin(2\sqrt n)}{n\sqrt n\cos\sqrt n}\right)$

Using the trigonometric identity of $$\sin 2\alpha = 2\sin \alpha \cos \alpha$$, I rewrote the expression to:

$$\lim_{n\to\infty}\left(\frac{\sin(2\sqrt 1)}{n\sqrt 1\cos\sqrt 1} + \cdots+\frac{\sin(2\sqrt n)}{n\sqrt n\cos\sqrt n}\right) = \lim_{n\to\infty}\left(\frac{2\sin(\sqrt 1)}{n\sqrt 1} +\cdots+\frac{2\sin(\sqrt n)}{n\sqrt n}\right)$$

I then tried using the squeeze theorem to get the limit, but I can't get an upper sequence that converges to zero, and the best I could get is a sequence that converges to two:

$$\frac{2\sin(\sqrt 1)}{n\sqrt 1} + \cdots+\frac{2\sin(\sqrt n)}{n\sqrt n} \leq \frac{2}{n\sqrt 1} + \cdots+\frac{2}{n\sqrt n} \leq \frac{2}{n}\cdot n \longrightarrow 2$$

What am I missing?

The inequality $$\sum_{k=1}^{n}{\frac{1}{\sqrt k}} \le 1+\int_{1}^{n}{\frac{1}{\sqrt x}}\,\mathrm{d}x \leq 2\sqrt{n},$$ yields $$\left|\frac{2\sin(\sqrt 1)}{n\sqrt 1} + ...+\frac{2\sin(\sqrt n)}{n\sqrt n}\right| \leq 4\frac{1}{\sqrt n} \to 0.$$
Note that $$\sin(\cdot)$$ can change signs, so absolute value is needed in the estimate.
You are considering $$S_n=\frac 1n \sum_{k=1}^n \frac{\sin(2\sqrt k)}{\sqrt k\cos(\sqrt k)}=\frac 2n \sum_{k=1}^n \frac{\sin(\sqrt k)}{\sqrt k}$$
Using the integral test $$\int \frac{\sin(\sqrt k)}{\sqrt k}\,dk=2\int \sin(t) dt=-2\cos(t)$$ $$\int_1^n \frac{\sin(\sqrt k)}{\sqrt k}\,dk=2 \left(\cos (1)-\cos \left(\sqrt{n}\right)\right)$$
$$\frac 2n \int_1^n \frac{\sin(\sqrt k)}{\sqrt k}\,dk=\frac{4 \left(\cos (1)-\cos \left(\sqrt{n}\right)\right)} n$$ and you can conclude.