Computing $ \int_{0}^{2\pi} \frac{\sin(nx)^2}{\sin(x)^2} \mathrm dx $

We have $$\frac{\sin(nx)}{\sin(x)} = \frac{e^{inx} - e^{-inx}}{e^{ix} - e^{-ix}} = e^{-i(n-1)x} \frac{\left(e^{2ix}\right)^n-1}{e^{2ix} - 1} = e^{-i(n-1)x} \sum_{k=0}^{n-1} e^{2ikx} $$

This shows that the Fourier series $$\sum_{k=-\infty}^\infty a_k e^{ikx}=\frac{\sin(nx)}{\sin(x)} = e^{-i(n-1)x} \sum_{k=0}^{n-1} e^{2ikx}$$ has exactly $n$ coefficients which are $=1$ and all others vanish. Therefore by Parseval's identity, we get

$$\frac 1{2\pi}\int_0^{2\pi} \frac{\sin^2(nx)}{\sin^2(x)}\, dx = \sum_{k=-\infty}^\infty |a_k|^2 = n$$

i.e. $$\int_0^{2\pi} \frac{\sin^2(nx)}{\sin^2(x)} \, dx = 2n\pi$$


Hint: For integers $k$ we have the identities $$\frac{\sin(2kx)}{\sin(x)} =2\left(\cos(x)+\cos(3x)+\cdots+\cos((2k-1)x)\right)$$ and $$\frac{\sin((2k+1)x)}{\sin(x)} =1+2\left(\cos(2x)+\cos(4x)+\cdots+\cos(2kx)\right).$$ Both of these can be proven by induction, but intuitively follow from the knowing about the Dirichlet Kernel.

Hint 2: Square the above identities. Since the integral is over the entire circle, only the diagonal coefficients contribute. For the case $\frac{\sin(2kx)}{\sin(x)}$, all the off diagonal terms are zero, i.e. $\int_{0}^{2\pi} \cos(x)\cos(3x)dx=0$, so our integral is then $$\int_{0}^{2\pi} \left(\cos^2(x)+\cos^2(3x)+\cdots+\cos^2((2k-1)x)\right)dx$$ which can easily be evaluated.

Hint 3: Since $\cos^2(x)=\frac{\cos(2x)+1}{2}$, we get that $$\int_0^{2\pi} \frac{\sin(kx)}{\sin(x)}dx=2\pi k.$$

Edit: Previously, I make an arithmetic mistake in the last step, missing a constant factor.


One has $${2\sin^2(nx)\over 2\sin^2(x)}={1-\cos(2n x)\over 1-\cos(2x)}\ .$$ Therefore $$I_n=\int_0^{2\pi}{1-\cos(2n x)\over 1-\cos(2x)}\ dx=\int_0^{2\pi}{1-\cos(n t)\over 1-\cos(t)}\ dt\qquad(x:={t\over2})\ .$$ Now $$\cos\bigl((n+1)t\bigr)+\cos\bigl((n-1)t\bigr)=2\cos t\, \cos(nt)\ ,$$ which implies $$1-\cos\bigl((n+1)t\bigr)=2(1-\cos t)\cos(nt)+ 2\bigl(1-\cos(nt)\bigr)-\bigl(1-\cos((n-1)t\bigr)\ .$$ As $\int_0^{2\pi}\cos(nt)\ dt=0$ it follows that we obtain the recursion $$I_{n+1}=2I_n- I_{n-1}\qquad(n\geq1)\ .$$Therefore one has $$I_{n+1}-I_n=I_n-I_{n-1}=I_1-I_0=2\pi\qquad(n\geq1)\ ,$$ and this implies $$I_n\ =\ 2n\pi\qquad(n\geq0)\ .$$