10
$\begingroup$

This is probably simple, but I'm solving a practice problem:

$\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 recognize this as the Riemann sum from 0 to $\pi$ on $\cos{x}$, i.e. I think its the integral

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

which is 0, but the book I'm using says it should be

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

Still 0 anyway, but where did the $\frac{1}{\pi}$ in front come from?

  • 1
    If the "$1/n$" represents the $\triangle x$, then notice that the "$k/n$"s in the sum are being multiplied by $\pi$. Thus, this isn't the Riemann sum of $\cos x$ from $0$ to $\pi$, but of $\cos(\pi x)$ from $0$ to $1$. Alternatively, if you multiply the $1/n$ by $\pi$, then your $\triangle x$ will incorporate the $\pi$, and you'll have the Riemann sum for $\cos x$; but you'll have to divide the result by $\pi$ to make up for multiplying by $\pi$ earlier.2010-11-27
  • 2
    Since "the book" points you to the integral, I'm guessing this is an exercise in recognizing Riemann sums. However, there is also a more-direct approach to the limit: set aside $\cos(n\pi/n)$, and pair each remaining $\cos(k\pi/n)$ with $\cos((n-k)\pi/n)$; these pairs cancel, leaving only the set-aside term (with value $-1$) in the sum. The limit of $-1/n$ as $n\to\infty$ is zero.2010-11-27
  • 0
    $\pi$ is the width of the interval of integration.2010-11-27

5 Answers 5

10

The Riemann sum is given 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 choose $f(y_{i})=\cos(y_{i})$, $y_{i}=\frac{i \pi}{n}$ and $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 just the sum you have with an extra factor $\pi$. Therefore

$$\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)$$

  • 1
    @Robert Smith, You have forgotten to write $\lim_{n\rightarrow \infty }$ before the sum $\displaystyle\sum_{i=1}^{n}\left(\dfrac{i\pi}{n}\right) (x_i-x_{i-1})$.2010-11-27
  • 0
    I mean of course $\cos\left(\dfrac{i\pi}{n}\right)$2010-11-27
  • 0
    @Americo: Right, fixed now.2010-11-27
  • 1
    you need to put in another $\lim_{n \rightarrow \infty}$ in the last equation too2010-11-27
  • 0
    Conversely you can put $f(y_i) = cos(\pi y_i)$ and you will get the same result because the $\pi$ comes out on the bottom when you integrate $cos(\pi x)$.2010-11-28
  • 0
    @Zaricuse: Sorry, I was in a hurry.2010-11-28
  • 0
    @Arturo: Thanks for the edition.2010-11-28
2

Assume that $x_{k-1}\leq c_{k}\leq x_{k}$, $x_{0}=0,x_{n}=\pi $, and that the interval of integration is divided into $n$ sub-intervals of equal width. Under these circumstances $x_{k}-x_{k-1}=\dfrac{\pi }{n}$ and

$$\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 sum $\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$.

1

$$\sum_{k=0}^n \cos\left(\frac{k\pi}{n}\right) = 0$$

So the expression equals to $-1/n$, and the limit is trivially equal to zero.

1

The key to this last assertion is the simple fact that $$\cos(\pi - x) = -\cos(x).$$ Said symmetry can be observed directly from the definition of the cosine function via the unit circle.

0

The sum is also the real part of

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

  • 0
    True, but what does this have to do with the question being asked? It seems a completely orthogonal point...2010-11-28
  • 0
    Why use Riemann sums, when you can solve it differently?2010-11-28