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