Prove that, $\int_0^{\pi/2}\frac{\sin (2n+1)x}{\sin x}~dx=\frac{\pi}{2}$ Prove that, $$\int_0^{\pi/2}\dfrac{\sin (2n+1)x}{\sin x}~dx=\dfrac{\pi}{2}$$  For every integer $n\ge 0$
I tried using induction without any help. Possibly my method of application was not right. Please help me!
 A: First, note that for any positive integer $n$, $$ \int_{x=0}^{\pi/2} \cos 2nx \, dx = \left[ \frac{\sin 2nx}{2n} \right]_{x=0}^{\pi/2} = 0.$$  Now let $$ \begin{align*} f_n(x) &= \frac{\sin(2n+1)x}{\sin x} = \frac{\sin(2n-1)x \cos 2x + \cos(2n-1)x \sin 2x}{\sin x} \\ &= f_{n-1}(x) (1 - 2 \sin^2 x) + 2 \cos(2n-1)x \cos x \\ &= f_{n-1}(x) + 2(\cos(2n-1)x \cos x - \sin(2n-1)x \sin x) \\ &= f_{n-1}(x) + 2 \cos 2nx. \end{align*}$$  Therefore, $$I_n =  \int_{x=0}^{\pi/2} f_n(x) \, dx = \int_{x=0}^{\pi/2} f_{n-1}(x) \, dx + 2 \int_{x=0}^{\pi/2} \cos 2nx \, dx = I_{n-1}. $$  Since $I_0 = \frac{\pi}{2}$ trivially, the result immediately follows.
A: Firstly, note that $$\sin (z+2)x - \sin zx = 2\sin x \cos (z+1) x \iff \frac{\sin (z+2)x - \sin zx}{\sin x} = 2\cos (z+1)x$$
Set $z=2n-1$ and integrate to get:
$$\int_0^{\frac{\pi}{2}} \frac{\sin (2n+1)x}{\sin x} dx - \int_0^{\frac{\pi}{2}} \frac{\sin (2n-1)x}{\sin x}dx = \int_0^{\frac{\pi}{2}} 2\cos (2n)x\ dx = \frac{2}{2n} \sin \left[(2n)\cdot \frac{\pi}{2}\right] = 0$$
Therefore we get the recurrence relation:
$$\int_0^{\frac{\pi}{2}} \frac{\sin (2n+1)x}{\sin x} dx = \int_0^{\frac{\pi}{2}} \frac{\sin (2n-1)x}{\sin x}dx =\cdots = \int_0^{\frac{\pi}{2}} \frac{\sin x}{\sin x}dx = \frac{\pi}{2}$$
A: It's a well known fact that
$$\sum_{k=-n}^n e^{ikx} = 1 + 2 \sum_{k=1}^n \cos(kx) = \frac{\sin(n+1/2)x}{\sin (x/2)},$$
where the expression on the right is the Dirichlet kernel. This is the important sum in Fourier series. Replace $x$ with $2x$ and integrate from $0$ to $\pi/2$:
$$\int_0^{\pi/2}\frac{\sin(n+1/2)2x}{\sin x} = \int_0^{\pi/2}\left( 1 + 2 \sum_{k=1}^n \cos(2kx) \right)dx=\frac{\pi}{2} + 2 \sum_{k=1}^n \int_0^{\pi/2} \cos(2kx)dx=\frac{\pi}{2}$$
since $\int_0^{\pi/2} \cos(2kx)dx = \frac{1}{2k}\sin(k\pi) = 0$ for $k\geq 1$.

For a proof of the expression for the Dirichlet kernel, see wikipedia. The benefit of this method is that the integral is more quickly seen than in the other answers.
