TITLE: A rigorous proof for a Riemann-like sum
QUESTION [6 upvotes]: I am asked to find the limit of the following sum:
$$
\lim_{n\rightarrow\infty}\sum_{k=1}^{n}\sin{\left(\frac{k}{n}\right)}\sin{\left(\frac{k}{n^2}\right)}
$$
My attempt:
For $n\rightarrow\infty$ and for $1\leq k\leq n$:
$$
\sin{\frac{k}{n^2}}\approx \frac{k}{n^2}
$$
So
$$
\sin{\left(\frac{k}{n}\right)}\sin{\left(\frac{k}{n^2}\right)}\approx \frac{k}{n^2}\sin{\left(\frac{k}{n}\right)}=\frac{1}{n}\frac{k}{n}\sin{\left(\frac{k}{n}\right)}
$$
Thus, we get a reimann sum, so the limit would be equal to:
$$
\lim_{n\rightarrow \infty}\sum_{k=1}^{n}\frac{1}{n}\frac{k}{n}\sin{\left(\frac{k}{n}\right)}=\int_{0}^{1}x\sin{x}dx=\sin{1}-\cos{1}
$$
Now the question is, how can I prove this rigorously because the way "I did it" is obviously incorrect, if someone can guide me through a rigorous proof, it would be perfect.
Thanks in advance.

REPLY [5 votes]: This is similar to Jack D'Aurizio's answer, but I think it might be clearer to use big-O notation. Here we can use that $\sin(x)=x+O\!\left(x^3\right)$:
$$
\begin{align}
\lim_{n\to\infty}\sum_{k=1}^n\sin\left(\frac{k}{n}\right)\sin\left(\frac{k}{n^2}\right)
&=\lim_{n\to\infty}\sum_{k=1}^n\sin\left(\frac{k}{n}\right)\left(\frac{k}{n^2}+O\left(\frac{k^3}{n^6}\right)\right)\\
&=\lim_{n\to\infty}\sum_{k=1}^n\sin\left(\frac{k}{n}\right)\frac{k}{n}\frac1n+\lim_{n\to\infty}O\left(\frac1{n^2}\sum_{k=1}^n\sin\left(\frac{k}{n}\right)\frac{k^3}{n^3}\frac1n\right)\\
&=\int_0^1\sin(x)\,x\,\mathrm{d}x+\lim_{n\to\infty}O\!\left(\frac1{n^2}\right)\int_0^1\sin(x)\,x^3\,\mathrm{d}x\\[3pt]
&=\int_0^1\sin(x)\,x\,\mathrm{d}x\\[3pt]
&=-\cos(1)+\int_0^1\cos(x)\,\mathrm{d}x\\[9pt]
&=\sin(1)-\cos(1)
\end{align}
$$