# $\lim\limits_{m\to\infty}\frac{1}{m}\sum_{n=1}^m\cos\left({\frac{2\pi n x}{b}}\right)$ to a definite integral

How do I define the integral of this Riemann sum? $$\lim\limits_{m\to\infty}\frac{1}{m}\sum_{n=1}^m\cos\left({\frac{2\pi n x}{b}}\right)$$

• It's not clear that this is a Riemann sum. If it's supposed to correspond to an integral of a function $f$ over an interval $[c,d]$, then the point at which you evaluate $f$ when $n=1$ would approach $c$ and the point when $n=m$ would approach $d$. But $2\pi mx/b$ doesn't approach any finite number. Furthermore the set of points at which you evaluate $f$ would get closer together as $m$ increases, and the distance between adjacent members of that set would approach $0$. ${}\qquad{}$ – Michael Hardy Dec 30 '15 at 2:02
• As was said above, check what you typed. The interval of points you plug in should stay fixed; there should simply be more (and closer together) – Nate 8 Dec 30 '15 at 2:32

The term of interest is not a Riemann sum. But I thought it would be instructive to present a way to evaluate the limit.

To that end, let $a_m$ be the sequence defined by

$$a_m=\frac1m \sum_{n=1}^m\cos\left(\frac{2\pi nx}{b}\right) \tag 1$$

We can evaluate the sum in $(1)$ in closed form by writing for $x \ne \ell b$, $\ell$ an integer

\begin{align} \sum_{n=1}^m\cos\left(\frac{2\pi nx}{b}\right) &=\text{Re}\left(\sum_{n=1}^m e^{i2\pi nx/b} \right)\\\\ &=\text{Re}\left(\frac{e^{i2\pi x/b}-e^{i2\pi(m+1)x/b}}{1-e^{i2\pi x/b}} \right)\\\\ &=\cos\left(\frac{\pi(m+1)x}{b}\right)\,\sin\left(\frac{\pi mx}{b}\right)\,\csc\left(\frac{\pi x}{b}\right) \end{align}

Then, note that we have for $x\ne \ell b$, for integer $\ell$

$$\left|\frac1m \sum_{n=1}^m\cos\left(\frac{2\pi nx}{b}\right)\right|\le \left|\frac1m\csc\left(\frac{\pi x}{b}\right)\right|\to 0\,\,\text{as}\,\,m\to \infty$$

If $x= \ell b$, then the limit is trivial to compute and is $1$.

And we are done!

If we replaced b with m, then indeed it would reflect a Riemann sum (though the expression you present does not).

You can tell, because in a Riemann sum, you are adding up the areas of a series of rectangles. To find the area of each rectangle, multiply that rectangle's height by its witdh. To find the total area, add all the rectangle areas up. So $\frac{1}{m}\cos(\frac{2\pi}{m})+\frac{1}{m}\cos(\frac{4\pi}{m}) + ... \frac{1}{m}\cos(\frac{2m\pi}{m})$.

Since the width $\frac{1}{m}$ is the same, simply factor it out. $\frac{1}{m}\left(\cos(\frac{2\pi}{m})+\cos(\frac{4\pi}{m}) + ... \cos(\frac{2m\pi}{m})\right)$. Then replace the sum with sum notation. $$\frac{1}{m} \sum_{n=1}^{m} \cos\left(\frac{2\pi n}{m}\right)$$

To find the function you are integrating, note that the height of the rectangles is usually found by plugging in the x value (n/m in this case) into the function. To find the bounds, find what the largest and smallest values you're plugging in go towards.

(Hint: if it's infinity or negative infinity, that means you didn't split up the pieces correctly. You should simply be sampling from the same interval, just with points that get closer and closer together as m goes to infinity.)