# Is $\lim\limits_{n \to \infty}\frac{1}{n}\left( \cos{\frac{\pi}{n}} + \cos{\frac{2\pi}{n}} + \ldots + \cos{\frac{n\pi}{n}} \right)$ a Riemann amount?

This is possibly straightforward, yet I'm addressing a technique trouble :

$\lim_{n \to \infty}\frac{1}{n}\left( \cos{\frac{\pi}{n}} + \cos{\frac{2\pi}{n}} + \ldots +\cos{\frac{n\pi}{n}} \right)$

I identify this as the Riemann amount from 0 to $\pi$ on $\cos{x}$, i.e. I assume its the indispensable

$\int_0^\pi{ \cos{x}dx }$

which is 0, yet guide I'm making use of claims it should be

$ \frac{1}{\pi}\int_0^\pi{ \cos{x}dx }$

Still 0 anyhow, yet where did the $\frac{1}{\pi}$ ahead originated from?

The amount is additionally the actual component of

$$\frac{1}{n}\left(e^{i\frac{\pi}{n}}+e^{i\frac{2\pi}{n}}+\ldots+e^{i\frac{n\pi}{n}}\right) \; .$$

The Riemann sum is offered by $$S=\sum_{i=1}^{n}f(y_{i})(x_{i}-x_{i-1})$$ where $x_{i-1}\leq y_{i}\leq x_{i}$. If you pick $f(y_{i})=\cos(y_{i})$, $y_{i}=\frac{i \pi}{n}$ and also $x_{i}=\frac{i \pi}{n}$ you get

$$\int_{0}^{\pi} \cos(x)dx=\lim_{n\rightarrow{\infty}}\sum_{i=1}^{n}\cos\left(\frac{i \pi}{n}\right)(x_{i}-x_{i-1})$$ which is simply the amount you have with an added variable $\pi$. Consequently

$$\frac{1}{\pi}\int_{0}^{\pi} \cos(x)dx=\lim_{n\to\infty}\frac{1}{n}\left( \cos{\frac{\pi}{n}} + \cos{\frac{2\pi}{n}} + \ldots \cos{\frac{n\pi}{n}} \right)$$

Assume that $x_{k-1}\leq c_{k}\leq x_{k}$, $x_{0}=0,x_{n}=\pi $, which the period of integration is separated right into $n$ below - periods of equivalent size. Under these conditions $x_{k}-x_{k-1}=\dfrac{\pi }{n}$ and also

$$\begin{eqnarray*}\lim_{n\rightarrow \infty }\frac{1}{n}\sum_{k=1}^{n}\cos \frac{k\pi }{n}&=&\lim_{n\rightarrow \infty }\sum_{k=1}^{n}\cos \left( c_{k}\right) \frac{% x_{k}-x_{k-1}}{\pi }\\ &=&\lim_{n\rightarrow \infty }\sum_{k=1}^{n}\left(\frac{1}{\pi }\cos \left( c_{k}\right)\right) (x_{k}-x_{k-1})\\ &=&\int_{0}^{\pi }\frac{1}{\pi }\cos x\ dx\end{eqnarray*}$$

The amount $\displaystyle\sum _ k = 1 ^ n \left (\dfrac 1 \pi \cos \left (c _ k \right) \right) (x _ k - x _ k - 1 ) $ is a Riemann Sum of the function $f (x) = \dfrac 1 \pi \cos x$ in the interval $ [0, \pi ] $, but *not* of the function $\cos x$.

The key to this last assertion is the straightforward reality that $$\cos(\pi - x) = -\cos(x).$$ Said proportion can be observed straight from the definition of the cosine function using the device circle.

Related questions