Compute the following limit or prove that it doesn't exist:
$$ \lim _{n \rightarrow \infty}\left[\frac{1}{n} \sum_{k=1}^{n} \sin \left(\frac{\pi k}{2 n}\right)\right] $$
Solution
Note that the function $f(x)=\sin \left(\frac{\pi x}{2}\right)$ is continuous and thus integrable on $[0,1],$ and as it is increasing, then the limits is equal to the upper sum, converges to the value of the integral $$\lim _{n \rightarrow \infty}\left[\frac{1}{n} \sum_{k=1}^{n} \sin \left(\frac{\pi k}{2 n}\right)\right]$$
$$ =\lim _{n \rightarrow \infty} \sum_{k=1}^{n}\left[\sin \left(\frac{\pi k}{2 n}\right) \cdot \frac{1}{n}\right]$$
$$ =\int_{0}^{1} \sin \left(\frac{\pi x}{2}\right) d x$$
$$ =\frac{2}{\pi} \int_{0}^{\pi} \sin t d t$$
$$=\frac{2}{\pi}.$$
Can someone explain why it is equal to the upper sum?
You have done it right and it is a standard way. Otherwise you may do it as: $$\sum_{k=1}^n \sin(ak)=\csc(a/2) \sin(an/2) \sin((1+n)a/2)\text{, where } a=\pi/(2n)$$
Then $$L=\lim_{n \to \infty} \frac{1}{n}\sum_{k=1}^n \sin(\pi k/(2n))$$
So $$L=\lim_{n \to \infty} \frac{1}{n}~{\csc(\pi/(4n))}~ \sin(\pi/4) ~\sin(\pi/4+\pi/(4n))$$
$$ =\sin^2(\pi/4) \lim_{t\to 0}~ \frac{t}{\sin(t\pi/4)}$$
$$=\frac{1}{2}\frac{4}{\pi}=\frac{2}{\pi}.$$