# Limit involving Riemann sums

I want to calculate the following limit $$\lim_{n\to\infty} \sin\left(\frac{\pi}{n}\right)\sum_{k=1}^n\frac{1}{2+\cos\left(\frac{k\pi}{n}\right)}$$ and I know I can use Riemann sums to transform the limit to a integral, but don't see how to do this in this particular case.

• Multiply and divide by $\pi/n$ – RRL Jun 4 '17 at 20:35

Hint:$$\lim _{ n\to \infty } \sin \left( \frac { \pi }{ n } \right) \sum _{ k=1 }^{ n } \frac { 1 }{ 2+\cos \left( \frac { k\pi }{ n } \right) } =\lim _{ n\to \infty } \frac { \sin \left( \frac { \pi }{ n } \right) }{ \frac { \pi }{ n } } \frac { \pi }{ n } \sum _{ k=1 }^{ n } \frac { 1 }{ 2+\cos \left( \frac { k\pi }{ n } \right) } =\\ =\pi \lim _{ n\to \infty } \frac { 1 }{ n } \sum _{ k=1 }^{ n } \frac { 1 }{ 2+\cos \left( \frac { k\pi }{ n } \right) } =\pi \int _{ 0 }^{ 1 }{ \frac { dx }{ 2+\cos { \pi x } } }$$
• Shouldn't it be $\pi \int _{ 0 }^{ 1 }{ \frac { dx }{ 2+\cos { \pi x } } }$? – Tomasz Tarka Jun 4 '17 at 20:47