Sign up ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

What is the value of $$\displaystyle{\lim_{n\to \infty}\frac{1}{n}\sum_{r=0}^{n-1}\cos\frac{r\pi}{2n}}$$

The answer is given as $1$ but I am almost 100% sure it will not be $1$. What will be the correct answer and how to find it.

share|cite|improve this question
"I am almost 100% sure it will not be 1": what makes you say that ? By the way, this is a definite integral in disguise. – Yves Daoust Jun 25 '14 at 9:24
is it $x \to \infty$ or $n \to \infty$?? – tattwamasi amrutam Jun 25 '14 at 9:24
@YvesDaoust : As n terms have been added and each term is less than or equal to 1 so sum is less than n – Arghya Chakraborty Jun 25 '14 at 9:25
@Arghya: quite right. Do you see the integral ? – Yves Daoust Jun 25 '14 at 9:27
@ArghyaChakraborty Have you learned integration yet? If so, try to see a Riemann sum in that sum. And if you do, you will find the limit is $\frac{2}{\pi}$. – Daniel Fischer Jun 25 '14 at 9:29

4 Answers 4

up vote 2 down vote accepted

Hint : This is equivalent to the integral $\int_{0}^1 \cos {\dfrac{\pi x}{2}}dx $

In general, $$\int_{0}^1f(x)dx=\lim_{n\rightarrow \infty}\sum_{r=0}^{n-1}\dfrac{1}{n}f(\dfrac{r}{n})$$


$$\int_{a}^bf(x)dx=\lim_{n\rightarrow \infty}\sum_{r=0}^{n-1}\dfrac{b-a}{n}f(a+r\dfrac{b-a}{n})$$

share|cite|improve this answer
@DanielFischer .. Thanks .. I have edited accordingly. Actually I was in a hurry to answer the question :D – Debashish Jun 25 '14 at 9:35
@Arghya Chakraborty .. Refer any Higher secondary book on Integration for more details. Or if you have some doubts you may ask. – Debashish Jun 25 '14 at 9:43
Thanks, That is exactly what I needed. – Arghya Chakraborty Jun 25 '14 at 9:43

Without integrals, using complex numbers.

Let $2\theta=\frac{\pi}{2n}$ and sum the geometric progression:

$$\sum_{r=0}^{n-1}e^{2ir\theta}=\frac{e^{2in\theta}-1}{e^{2i\theta}-1}=\frac{i-1}{e^{2i\theta}-1}=\frac{(i-1)e^{-i\theta}}{e^{i\theta}-e^{-i\theta}}=\frac{(i-1)(cos\theta-i\sin\theta)}{2i\sin\theta}.$$ Taking the real part, $$\sum_{r=0}^{n-1}\cos\frac{\pi r}{2n}=\frac{\cos\theta+\sin\theta}{2\sin\theta}=\frac12\cot\theta+\frac12.$$

In the limit when $\theta\rightarrow 0$, we can replace $\cot\theta$ by $\frac1{\theta}$ and ignore the term $\frac12$: $$\frac1n\sum_{r=0}^{n-1}\cos\frac{\pi r}{2n}\rightarrow\frac{1}{2n\theta}=\frac2{\pi}.$$

share|cite|improve this answer

By the Riemann sum we have

$$\lim_{n\to\infty}\frac1n\sum_{r=0}^{n-1}\cos\left(\frac{r\pi}{2n}\right)=\int_0^1\cos\left(\frac{\pi x}{2}\right)dx=\frac2\pi\sin\left(\frac{\pi x}{2}\right)\Bigg|_0^1=\frac2\pi$$

share|cite|improve this answer

this is nothing but $$\int_0^1dx \cos \frac{\pi x}{2}=\frac{2}{\pi}$$. This method is known as "limit of sum", where $\frac{r}{n} $ is replaced by $x$, $$\frac{1}{n}$$ is replaced by $dx$ and $$\sum_{n_0}^{n_1}$$ by $$\int_a^b$$. The limits are evaluated as: $$a=\lim_{n \to \infty}\frac{n_0}{n}$$ and $$b=\lim_{n \to \infty} \frac{n_1}{n}$$

share|cite|improve this answer
How did you convert it to integration ? – Arghya Chakraborty Jun 25 '14 at 9:30

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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