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?

$\endgroup$
  • 1
    $\begingroup$ 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. $\endgroup$ – Blue Nov 27 '10 at 20:21
  • 2
    $\begingroup$ 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. $\endgroup$ – Blue Nov 27 '10 at 20:35
  • $\begingroup$ $\pi$ is the width of the interval of integration. $\endgroup$ – Américo Tavares Nov 27 '10 at 21:12
10
$\begingroup$

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

$\endgroup$
  • 1
    $\begingroup$ @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})$. $\endgroup$ – Américo Tavares Nov 27 '10 at 20:52
  • $\begingroup$ I mean of course $\cos\left(\dfrac{i\pi}{n}\right)$ $\endgroup$ – Américo Tavares Nov 27 '10 at 21:02
  • $\begingroup$ @Americo: Right, fixed now. $\endgroup$ – Robert Smith Nov 27 '10 at 21:21
  • 1
    $\begingroup$ you need to put in another $\lim_{n \rightarrow \infty}$ in the last equation too $\endgroup$ – Zarrax Nov 27 '10 at 21:27
  • $\begingroup$ 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)$. $\endgroup$ – AnonymousCoward Nov 28 '10 at 0:06
2
$\begingroup$

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

$\endgroup$
1
$\begingroup$

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

$\endgroup$
1
$\begingroup$

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.

$\endgroup$
0
$\begingroup$

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

$\endgroup$
  • $\begingroup$ True, but what does this have to do with the question being asked? It seems a completely orthogonal point... $\endgroup$ – Steven Stadnicki Nov 28 '10 at 2:34
  • $\begingroup$ Why use Riemann sums, when you can solve it differently? $\endgroup$ – Raskolnikov Nov 28 '10 at 11:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.