Ways to prove $ \int_0^\pi dx \frac{\sin^2(n x)}{\sin^2 x} = n\pi$

In how many ways can we prove the following theorem?

$$I(n):= \int_0^\pi dx \frac{\sin^2(n x)}{\sin^2 x} = n\pi$$ Here $n$ is a nonnegative integer.

The proof I found is by considering $I(n+1)-I(n)$, which can be reduced to $$ g(n):= \int_0^\pi dx \frac{\sin(2 n x) \cos x}{\sin x}. $$ I then proved that $g(n)=g(n+1)$, whence $g(n) = g(1) = \pi$. This completes the proof. I was wondering if there is a more direct way to prove it. By 'direct' I mean without deriving auxiliary recursions.


This statement is the same as proving $$\int_0^{2\pi} \frac{\sin^2 nx}{\sin^2 x} dx = 2\pi n.$$

Put $z=e^{ix}$ so that $dz = i e^{ix} \; dx = iz \; dx$ and use $$\sin x = \frac{e^{ix}-e^{-ix}}{2}$$ to get $$\int_{|z|=1} \frac{(z^n-1/z^n)^2}{(z-1/z)^2} \frac{1}{iz} dz = \int_{|z|=1} \frac{1}{z^{2n}} \frac{(z^{2n}-1)^2}{(z-1/z)^2} \frac{z}{iz^2} dz \\ = \int_{|z|=1} \frac{1}{z^{2n}} \frac{(z^{2n}-1)^2}{(z^2-1)^2} \frac{z}{i} dz = \frac{1}{i} \int_{|z|=1} \frac{1}{z^{2n-1}} \frac{(z^{2n}-1)^2}{(z^2-1)^2} dz.$$

Note that $z=\pm 1$ is not really a pole here because it is canceled by the numerator of the rational term.

Observe that $$\frac{(z^{2n}-1)^2}{(z^2-1)^2} = n z^{2n-2} + \sum_{q=0}^{n-2} (q+1) \left(z^{2q} + z^{4n-4-2q}\right).$$

To verify this multiply both sides by $(z^2-1)^2$ to get $$n z^{2n-2} (z^2-1)^2 + \sum_{q=0}^{n-2} (q+1) \left(z^{2q} + z^{4n-4-2q}\right) (z^2-1)^2 \\ = n z^{2n+2} - 2 n z^{2n} + n z^{2n-2} \\ + \sum_{q=0}^{n-2} (q+1) \left(z^{2q+4} - 2 z^{2q+2} + z^{2q} + z^{4n-2q} - 2 z^{4n-2-2q} + z^{4n-4-2q}\right).$$

The first part of the sum is $$\sum_{q=0}^{n-2} (q+1) z^{2q} - 2 \sum_{q=1}^{n-1} q z^{2q} + \sum_{q=2}^n (q-1) z^{2q}$$ which telescopes to give $$1 + 2z^2 - 2z^2 - 2(n-1)z^{2n-2} + (n-2)z^{2n-2} + (n-1) z^{2n} \\ = 1 - n z^{2n-2} + (n-1) z^{2n}.$$ By symmetry we get for the second part of the sum the term $$z^{4n} ( 1 -n z^{2-2n} + (n-1) z^{-2n} ) = z^{4n} - n z^{2n+2} + (n-1) z^{2n}.$$

Adding all three contributions we get $$n z^{2n+2} - 2 n z^{2n} + n z^{2n-2} + 1 - n z^{2n-2} + (n-1) z^{2n} + z^{4n} - n z^{2n+2} + (n-1) z^{2n} \\ = z^{4n} - 2 z^{2n} + 1 = (z^{2n}-1)^2,$$ which concludes the proof.

Returning to the integral we obtain the value $$\frac{1}{i} \times 2\pi i \times \mathrm{Res}_{z=0} \frac{1}{z^{2n-1}} \frac{(z^{2n}-1)^2}{(z^2-1)^2}$$ which is $$\frac{1}{i} \times 2\pi i \times [z^{2n-2}] \frac{(z^{2n}-1)^2}{(z^2-1)^2} = 2\pi n,$$ QED.

Addendum. Actually the above admits considerable simplification. Note that $$\left(\frac{z^n-1}{z-1}\right)^2 = \left(1+z+z^2+\cdots+z^{n-1}\right)^2$$ and therefore $$[z^{n-1}]\left(\frac{z^n-1}{z-1}\right)^2 = \sum_{q=0}^{n-1} 1 \times 1 = n.$$ This immediately yields $$[z^{2n-2}]\left(\frac{z^{2n}-1}{z^2-1}\right)^2= n.$$


Here is a cannon to shoot a fly.

Rewrite the integral as \begin{equation} I(n):= \int_0^\pi\frac{1-\cos2nx}{1-\cos2x}\,dx\stackrel{2x\,\mapsto\, x}\Longrightarrow \frac{1}{2}\int_0^{2\pi}\frac{1-\cos nx}{1-\cos x}\,dx\tag{1} \end{equation} From my answer here, we have \begin{equation}\int_0^{2\pi}\frac{\cos mx}{p-q\cos x}\, dx=\frac{2\pi}{\sqrt{p^2-q^2}}\left(\frac{p-\sqrt{p^2-q^2}}{q}\right)^m\qquad\hbox{for}\qquad |q|<p\tag{2} \end{equation} Now, we will treat the integral $(1)$ as though it is separated using $(2)$. We must be careful here because each integrals diverge. We set $m=0$, $m=n$, $p=1$, and take the limit as $q\to1^-$, then \begin{align} I(n)&:= \lim_{q\to1^-}\left[\;\frac{\pi}{\sqrt{1-q^2}}-\frac{\pi}{\sqrt{1-q^2}}\left(\frac{1-\sqrt{1-q^2}}{q}\right)^n\;\right]\tag{3} \end{align} The limit above succumbs to apply L'Hôpital's once, then it follows \begin{equation} I(n):= \int_0^\pi\frac{\sin^2nx}{\sin^2x}\,dx=n\pi \end{equation} which is the announced result.$\qquad\square$


I can post my solution , from my document. It can be found on page 83. If one truly want to shoot this problem with a canon one can use the following generalization $$ \int _{0}^{\pi }\! \left( {\frac {\sin \left( nx \right) }{\sin \left( x \right) }} \right)^{m}{dx}=\pi \sum _{l=0}^{\large\left\lfloor {\frac{m\left(n-1\right)}{2n}} \right\rfloor }\left( -1 \right) ^{l}{m\choose l}{\dfrac{m}{2}\left( n+1\right) -ln-1\choose m-1}\tag{10} $$ Which is proved by Graham Hesketh, see equation 10 here. Set $m=1$ use the properties of the floor function and one is is done. Another way to prove $(n)$ can be found in the same answer


Proof

Lemma: Let $k \in \mathbb{Z}$ then $$\begin{align*} \int_0^{\pi}\frac{\sin 2kx}{\sin x}\mathrm{d}x & = 0 \tag{1} \\ \int_0^{\pi}\frac{\sin (2k-1)x}{\sin x}\mathrm{d}x & = \pi \tag{2} \end{align*}$$

Proof: We first define the following function $\displaystyle I_n = \int_0^\pi \frac{\sin 2k x}{\sin x} \mathrm{d}x$. Note that we now have $I_0 = 0$ and $I_1=\pi$. since $\sin 0 = 0$ and $\sin 2x = 2\cos x \sin x$. We have the following relation for all $n$ $$ I_n-I_{n-2} =\int_0^{\pi}\frac{\sin{nx}-\sin{(n-2)x}}{\sin x}\mathrm{d}x =2\int_0^{\pi}\cos(n-1)x\mathrm{d}x =2\left[\frac{\sin{(n-1)x}}{n-1}\right]_0^{\pi} =0 $$ For $|n|\geq 3$. This means $I_{2k}=I_{2k-2}=\cdots=I_{2}=\pi$ and simmilarly $I_{2k+1} = I_{2k-1}=\cdots I_1=0$. Which is what we wanted to show.

Proposition: Let $k \in \mathbb{Z}$ then $$ \ell_2(k) = \int_0^\pi \left( \frac{\sin kx}{\sin x} \right)^2\mathrm{d}x = \int_0^\pi \frac{1 - \cos kx}{1 - \cos x}\,\mathrm{d}x = |k|\pi \tag{3} $$

Proof 1: Here we will follow in the footsteps of the other answer and use the lemma above. We define $\displaystyle J_n=\int_0^{\pi}\left(\frac{\sin nx}{\sin x}\right)^2\mathrm{d}x$. We can note that $J_n - J_{n-1}$ is constant eg $$ \begin{align*} J_k - J_{k-1} & = -\frac{1}{2}\int_0^{\pi}\frac{\cos{2kx}-\cos{(2n-2)x}}{(\sin x)^2} = -\frac{1}{2}\int_0^{\pi}\frac{-2\sin\left(\frac{4k-2}{2}x\right) \sin\left(\frac{2x}{2}\right)}{(\sin x)^2} \\ & = \int_0^{\pi}\frac{\sin{(2k-1)x}}{\sin x} = I_{2k-1}=\pi. \end{align*} $$ Then we can write $$J_n=J_{n-1}+\pi=J_{n-2}+2\pi=\cdots=J_1+(n-1)\pi=n\pi.$$ This completes the proof.


Proof 2: Here is another way to solve this problem. I got the idea from chat, but the tecnique is much older. We want to prove that $(I_{n+1} + I_{n-2}) / 2 = I_n$. Eg that $I_n$ is the average of the next and previous term

Some calculations show that

\begin{align*} \frac{I_{n+1}+I_{n-1}}{2} & = \frac{1}{2}\int_0^\pi \frac{1 - \cos(n+1)x }{1 - \cos x} + \frac{1-\cos(n-1)x}{1-\cos x} \,\mathrm{d}x \\ & = \frac{1}{2}\int_0^\pi \frac{2 -\bigl[ \cos(n+1)x + \cos(n-1)x\bigr]}{1-\cos x} \,\mathrm{d}x \\ & = \int_0^\pi \frac{1 - \cos nx \cos x}{1-\cos x} \,\mathrm{d}x \\ & = \int_0^\pi \frac{(1-\cos nx) + (1-\cos x) \cos nx}{1-\cos x} \,\mathrm{d}x \\ & = \int_0^\pi \frac{1 - \cos nx}{1-\cos x} \,\mathrm{d}x = I_n \end{align*} Several things was used here. Like $\cos (n+1)x + \cos(n-1)x = 2 \cos nx \cos x$ and $ \int_0^\pi \cos n x\,\mathrm{d}x = 0 \ \forall \ n \in\mathbb{Z} \backslash \{0\}$. Now we have shown that $$ I_n = \frac{I_{n+1}+I_{n-1}}{2} \ \Rightarrow \ 2I_n = I_{n+1}+I_{n-1} \ \Rightarrow \ I_n - I_{n-1} = I_{n+1} - I_n $$ Which is just an arithmetric sequence because the difference between two terms is constant (same as the previous answer). Hence $I_n = I_0 + (n-0)d = nd$, where $d$ is the difference between two terms. We have $d = I_1 - I_0 = \pi - 0 = \pi$. This completes the second proof. $\qquad\square$


Recall that the Féjer kernel $F_n(t)$ is defined to be the mean of the Dirichlet kernel $$D_n(t)=\sum_{|k|\leqslant n}e^{ikt}$$

It is known $F_n(2t)=\dfrac 1 n\dfrac{\sin^2 nt}{\sin^2 t}$. This is a simple use of the geometric series. It is also known that for any $2\pi$-periodic function $f:S^1\to\Bbb R$, the means of the Fourier partial sums of $f$ are given by $$F_n\star f(s)=\frac{1}{2\pi}\int_0^{2\pi} F_n(t)f(s-t)dt$$

This is verified by using the definition of the $n$-th Fourier coefficient.

If we let $f$ be the function constantly equal to $1$, we get the partial sums all equal to $1$, so $$1=\frac{1}{2\pi}\int_0^{2\pi}F_n(t)dt$$

This is essentially your result.


Here I prove $\displaystyle\int_0^{2\pi}\frac{\sin^2(2n+1)x}{\sin^2x}dx=2\pi(2n+1).$

Since $\displaystyle\sum_{j=1}^n \cos 2jx = -\frac{1}{2}+\frac{\sin(2n+1)x}{2\sin(x)}$, we have that $\displaystyle1+\sum_{j=1}^n \cos 2jx = \frac{\sin(2n+1)x}{\sin(x)}$.

Now take both sides to the power of $2$ and integrate term-by-term. $$\begin{align}I&=\int_0^{2\pi}\left(1+2\sum_{j=1}^n \cos 2jx\right)^2dx\\&=2\pi+4\sum_{j=1}^n \int_0^{2\pi}\cos^2 2jx\,dx+4\sum\sum_{j\neq k} \int_0^{2\pi}\cos 2jx\cos 2kx\,dx+4\sum_{j=1}^n \int_0^{2\pi}\cos 2jx\,dx\end{align}$$ Therefore $\displaystyle\int_0^{2\pi}\frac{\sin^2(2n+1)x}{\sin^2x}dx=2\pi(2n+1).$