# computing a trignometric limit

I am trying to show that $$\lim _{n\rightarrow \infty }\dfrac {1+\cos \dfrac {x} {n}+\cos \dfrac {2x} {n}+\ldots +\cos\dfrac {\left( n-1\right) x} {n}} {n } = \dfrac{\sin x}{x}$$

I have attempted a number of approaches such as trigonometric tricks and the most recent with substitution of $\cos \dfrac {x} {n}=\dfrac {e^{i\frac {x} {n}}+e^{-\frac {ix} {n}}} {2}$
Starting from the left hand side i ended up with an expression such as $$\lim _{n\rightarrow \infty }\frac {\frac {1-e^{ix}} {1-e^{\frac {ix} {n}}}+\frac {1-e^{-ix}} {1-e^{\frac {-ix} {n}}}} {2n}$$ I am unsure how i could possibly rearrange this so upon taking the limit i can convert to RHS.

Any help with this method or even an alternative proof strategy would be much appreciated.

#### Solutions Collecting From Web of "computing a trignometric limit"

For a “pre-integral calculus” method:

You can use the formula

$$\sum_{k=0}^{n-1} \cos k d = \frac{ \sin (nd/2)}{\sin (d/2)} \cos ((n-1)d/2)$$

Set $\displaystyle d = \frac{x}{n}$ and use the limit $\displaystyle \lim_{t\to 0} \frac{\sin t}{t} = 1$ and the formula $\displaystyle 2 \sin (x/2) \cos (x/2) = \sin x$.

For a proof of the formula, see here: How can we sum up $\sin$ and $\cos$ series when the angles are in arithmetic progression?

You can compute the sum or recognize a Riemann sum: for $x\neq 0$
$$\lim_{n\to+\infty}\frac 1n\sum_{k=0}^{n-1}\cos\frac{kx}n=\int_0^1\cos(tx)dt=\left[\frac{\sin(tx)}x\right]_{t=0}^{t=1}=\frac{\sin x}x.$$

Your sum is a Riemann sum approximating the integral
$$\int_0^1\cos(tx)\,\mathrm{d}t=\frac1x\int_0^x\cos(t)\,\mathrm{d}t=\frac{\sin(x)}{x}$$
Alternatively, your sum is the real part of the geometric sum
$$\newcommand{\cis}{\operatorname{cis}} \frac1n\left(1+\cis\left(1\frac{x}{n}\right)+\cis\left(2\frac{x}{n}\right)+\dots+\cis\left((n-1)\frac{x}{n}\right)\right) =\frac{\cis(x)-1}{n\left(\cis\left(\frac{x}{n}\right)-1\right)}\tag{1}$$
where $\cis(x)=e^{ix}=\cos(x)+i\sin(x)$.

Then, note that
\begin{align} \lim_{n\to\infty}n\left(\cis\left(\frac{x}{n}\right)-1\right) &=\lim_{n\to\infty}n\left(\cis\left(\frac{x}{2n}\right)-\cis\left(-\frac{x}{2n}\right)\right)\cis\left(\frac{x}{2n}\right)\\ &=\lim_{n\to\infty}2in\sin\left(\frac{x}{2n}\right)\cis\left(\frac{x}{2n}\right)\\ &=ix\tag{2} \end{align}
Combining $(1)$ and $(2)$ yields
$$\lim_{n\to\infty}\frac1n\left(1+\cis\left(1\frac{x}{n}\right)+\cis\left(2\frac{x}{n}\right)+\dots+\cis\left((n-1)\frac{x}{n}\right)\right)=\frac{\cis(x)-1}{ix}\tag{3}$$
Taking the real parts of $(3)$ yields
$$\lim_{n\to\infty}\frac1n\left(1+\cos\left(1\frac{x}{n}\right)+\cos\left(2\frac{x}{n}\right)+\dots+\cos\left((n-1)\frac{x}{n}\right)\right)=\frac{\sin(x)}{x}\tag{4}$$

Here is slightly long winded solution using trigonometric identities only.
$$\lim _{n\rightarrow \infty }\dfrac {1+\cos \dfrac {x} {n}+\cos \dfrac {2x} {n}+\ldots +\cos\dfrac {\left( n-1\right) x} {n}} {n }$$

using the trignometric identity $$\sum _{n=1}^{N}\cos n\theta =\dfrac {-1} {2}+\dfrac {\sin \left( N+\dfrac {1} {2}\right) \theta } {2\sin \dfrac {\theta } {2}}$$
our equation can be rewritten as
$$\lim _{n\rightarrow \infty }\dfrac {1-\dfrac {1} {2}+\dfrac {\sin \left( n-1+\dfrac {1} {2}\right) \dfrac {x} {n}} {2\sin x / 2n}} {n}$$

$$\lim _{n\rightarrow \infty }\dfrac {1} {2n}\left( \dfrac {\sin\dfrac {x} {2n}+\sin \left( x-\dfrac {x} {2n}\right) } {\sin \dfrac {x} {2n}}\right)$$

$$\lim _{n\rightarrow \infty }\dfrac {1} {2n}\left( \dfrac {2\sin\dfrac {x} {2}\cos \left(\dfrac {\dfrac {x} {n}-x} {2}\right)} {\sin \dfrac {x} {2n}}\right)$$

The following restructure of the denominator was pointed out to me by Aryabhata. ðŸ™‚
$$\lim _{n\rightarrow \infty }\dfrac {\sin \dfrac {x} {2}\cos \dfrac {x} {2}\left( \dfrac {1} {n}-1\right) } {\dfrac {x\sin \dfrac {x} {2n}} {2\dfrac {x} {2n}}}$$

Taking the limit we get
$$\dfrac {\sin \dfrac {x} {2}\cos -\dfrac {x} {2}} {\dfrac {x} {2}}$$
which is the same as
$$\dfrac {\sin \dfrac {x} {2}\cos \dfrac {x} {2}} {\dfrac {x} {2}}$$
which gives RHS using the trigonometric identity once again.
$$\dfrac{\sin x}{x}$$