Convergence and limit of $\sum_{j=1}^n\sin\left(\frac{j-1}n\right)\left\{\cos\left(\frac jn\right)-\cos\left(\frac{j-1}n\right)\right\}$ The title says it all - I'm trying to find a way of proving the convergence and evaluating the limit of $a_n=\sum_{j=1}^n\sin\left(\frac{j-1}n\right)\left\{\cos\left(\frac jn\right)-\cos\left(\frac{j-1}n\right)\right\}$. This exercise is from the field of integration theory, so probably Riemann sums are to be used on this one but I can't find any way that makes sense. I'd appreciate any hints.

From trigonometric identities:
$$
\sum_{j=1}^{n}\sin\left(\frac{j-1}{n}\right)\left[\cos\left(\frac{j}{n}\right)-\cos\left(\frac{j-1}{n}\right)\right]
=-2\sin\frac{1}{2n}\sum_{j=1}^{n}\sin\left(\frac{j-1}{n}\right)\sin\left(\frac{2j-1}{2n}\right).
$$
Now, we also can rewrite
$$
\sin\frac{2j-1}{2n} = \sin\left(\frac{j-1}{n}+\frac{1}{2n}\right)
= \sin \frac{j-1}{n} \cdot \cos \frac{1}{2n} + \cos \frac{j-1}{n} \cdot \sin \frac{1}{2n}
$$
so that
$$\begin{align}
\sum_{j=1}^{n}\sin\left(\frac{j-1}{n}\right)\left[\cos\left(\frac{j}{n}\right)-\cos\left(\frac{j-1}{n}\right)\right]
&=-2\sin\frac{1}{2n}\cos\frac{1}{2n}\sum_{j=1}^{n}\sin\left(\frac{j-1}{n}\right)^2 \\
&+-2\sin\left(\frac{1}{2n}\right)^2\sum_{j=1}^{n}\sin\left(\frac{j-1}{n}\right)\cos\left(\frac{j-1}{n}\right).
\end{align}$$


*

*We can ignore the second term, as its limit is $0$: indeed, each term of the sum is at most $1$, so the sum is in $[-n,n]$; but from $\lim_{x\to 0}\frac{\sin x}{x}= 1$ we have that $\sin\left(\frac{1}{2n}\right)^2 \sim_{n\to \infty} \frac{1}{4n^2}$.

*for the first term, we have $\lim_{n\to\infty} \cos\frac{1}{2n} = 1$ and $\lim_{n\to\infty} \frac{\sin\left(\frac{1}{2n}\right)}{\frac{1}{2n}} = 1$, so the limit is the same as the limit of
$$
-2\frac{1}{2n}\sum_{j=1}^{n}\sin\left(\frac{j-1}{n}\right)^2=-\frac{1}{n}\sum_{j=1}^{n}\sin\left(\frac{j-1}{n}\right)^2
$$
which is a Riemann sum: the limit is
$$
\lim_{n\to\infty }-\frac{1}{n}\sum_{j=1}^{n}\sin\left(\frac{j-1}{n}\right)^2
= -\int_0^1 \sin^2 t dt = \frac{\sin 2 - 2}{4}.
$$
(Which can be easily obtained e.g. by integration by parts.)
