# The limit of Riemann sums $\sum_{k=1}^{n}\cos(\frac{k\pi}{2n})\frac{ \pi}{2n}$

Find the limit of Riemann sums $$\lim_{n\rightarrow \infty} \sum_{k=1}^{n}\cos(\frac{k\pi}{2n})\frac{ \pi}{2n}$$ on the interval $$[0,\frac{\pi}{2}]$$

### Progress

All I have managed to do is pull out the constant $$\frac{ \pi}{2n}\lim_{n\rightarrow \infty} \sum_{k=1}^{n}\cos(\frac{k\pi}{2n})$$But otherwise I am completely lost. I have one question on Riemann Sums and I know the basic rules but I still cannot figure this out. The whole Riemann Sum concept still perplexes me so I thought of someone could do this problem step by step to use as guidance when dealing with these sums. Thanks for all the help in advance.

EDIT: I now realize the constant I pulled out isn't really a constant so I am even more dumbfounded. Sorry if there isn't enough work/insight on the problem form my part, but Riemann Sums are really like a different language to me. Thanks again for all the help in advance.

• Thanks, bad mistake on my part. – Kenshin Aug 8 '14 at 1:53
• this limit of partial sums is a definite integral $$\int_0^{\pi/2}\cos x dx=\sin x\Big|_0^{\pi/2}=1.$$ – yoyo Aug 8 '14 at 1:58
• I figured, but my professor said there might be a free-response question such as the one I posted so I think it'd be useful to know the gritty way of solving the problem. Just to get the most points possible. @yoyo – Kenshin Aug 8 '14 at 2:01

## 2 Answers

The right endpoint Riemann sum for $\displaystyle\int_a^b f(x)\,dx$ is given by $\dfrac{b-a}{n}\displaystyle\sum_{k = 1}^{n}f\left(a+\dfrac{b-a}{n}k\right)$.

Now, figure out what $a,b$ and $f(x)$ need to be to make this sum look like the one in the problem.

Once you do that, if $f(x)$ is continuous, then $\displaystyle\lim_{n \to \infty}\dfrac{b-a}{n}\sum_{k = 1}^{n}f\left(a+\dfrac{b-a}{n}k\right) = \int_a^b f(x)\,dx$.

First write down the closed form of the cosine summation (http://mathworld.wolfram.com/Cosine.html (13) to (17)):

$$\frac{\pi}{2n}\sum_{k=0}^n \cos(kx)=\frac{\pi}{2n}\frac{\cos\left(\frac{1}{2}nx\right)\sin\left(\frac{1}{2}(n+1)x\right)}{\sin\left(\frac{1}{2}x\right)}$$

Now plug in $x=\frac{\pi}{2n}$ and remove the $k=0$-term:

$$\frac{\pi}{2n}\sum_{k=1}^N \cos\left(\frac{k\pi}{2n}\right)=\frac{\pi}{2n}\frac{\cos\left(\frac{\pi}{4}\right)\sin\left(\frac{\pi}{4}+\frac{\pi}{4n}\right)}{\sin\left(\frac{\pi}{4n}\right)}-\frac{\pi}{2n}$$

Reformatting:

$$\frac{\pi}{2n}\sum_{k=1}^N \cos\left(\frac{k\pi}{2n}\right)=\frac{\pi}{4n}\cot\left(\frac{\pi}{4n}\right)+\frac{\pi}{2n}$$

Taking the limit $n \to \infty$ gives $1$ as answer, because $$\lim_{n \to 0} x \cot(x)=1$$ (do you believe that?).

You see it's sometimes hard to calculate the summation, and that's why I am happy with calculus.