Showing that $ \int_0^\pi \frac{\sin{(kx)}}{\sin(x)} d x = \pi $ for odd integer $k$

If we let $$I_n=\int \frac{\sin{((2n+1)x)}}{\sin{(x)}} dx$$ One can quite easily show that $$I_n=I_{n-1}+\frac{\sin{(2nx)}}{n}$$ Solving this recurrence relation gives $$I_n=\sum_{k=1}^n \frac{\sin{(2kx)}}{k}+x+c$$ So, for the integral in question, $$\int_0^\pi \frac{\sin{((2n+1)x)}}{\sin{(x)}}dx=[\sum_{k=1}^n \frac{\sin{(2kx)}}{k}+x]_0^\pi = \pi$$ As $\sin{(2k\pi)}=0$ for all $k\in\mathbb{Z}$.


Let $k=2n+1$ then $$I=\int_0^{\pi} \frac {\sin ((2n+1)x)}{\sin x} dx=\int_0^{\pi} \frac {\sin \left(\left(n+\frac 12\right)2x\right)}{\sin x} dx$$

Now substituting $x=\frac t2$ we get $$I=\frac 12\int_0^{2\pi} \frac {\sin \left(\left(n+\frac 12\right)t\right)}{\sin \left(\frac t2\right)} dt= \frac 12\int_0^{2\pi} D_n(t) dt$$

Where $D_n(t)$ represents the Dirichlet Kernel. And using its property that $$D_n(t)=1+2\sum_{k=0}^n \cos(kt)$$

We get $$I=\frac 12\int_0^{2\pi} \left(1+2\sum_{k=0}^n \cos(kt)\right)dt=\pi+ \sum_{k=0}^n \int_0^{2\pi} \cos (kt) dt $$

From where you notice that the last integral is $0$ for all integer $k$ from $0$ to $n$

Q.E.D


Use the addition formulas for $\sin$ and $\cos$ to show that $$\frac{\sin ((k+2)x)}{\sin(x)} = \frac{\sin (k x)}{\sin(x)} + 2\cos ((k+1)x)$$ From this formula the result you are after follows directly by using induction and the fact that $\int_0^\pi \cos(nx){\rm d}x = 0$ for all integers $n>0$. It also follows that the integral is $0$ for even $k$ although this can be shown more easily by using the fact that the integrand is odd about $x = \pi/2$.