Evaluate $ \int_{0}^{\pi/2} \frac{\sin(nx)}{\sin(x)}\,dx $ For every $odd$ $n \geq  1$ the answer should be $\pi/2$
For every $even$ $n \geq  2$ the possible answers are :
$A )$ $ 1-\frac{1}{3}+\frac{1}{5}-\frac{1}{7}+\cdots + (-1)^{n/2+1}\frac{1}{n-1} $
$B )$ $ 3(1-\frac{1}{3}+\frac{1}{5}-\frac{1}{7}+\cdots + (-1)^{n/2+1}\frac{1}{n-1} )$
$C )$ $ 2(1-\frac{1}{3}+\frac{1}{5}-\frac{1}{7}+\cdots + (-1)^{n/2+1}\frac{1}{n-1} )$
$D )$ $ \frac{1}{2}(1-\frac{1}{3}+\frac{1}{5}-\frac{1}{7}+\cdots + (-1)^{n+1}\frac{1}{n-1} )$
$E )$ $ 1-\frac{1}{3}-\frac{1}{5}-\frac{1}{7}-\cdots - \frac{1}{n-1} $
Does the recurrence $ (n-1)(I_{n}-I_{n-2})=2sin(n-1)x $ help?
 A: For $n$ even, say $2m$, we can write
$$\begin{align}
\int_0^{\pi/2}\frac{\sin(2mx)}{\sin(x)}\,dx&=\text{Im}\int_0^{\pi/2}\frac{e^{i2mx}}{\sin(x)}\,dx\\\\
&=2\text{Re}\int_0^{\pi/2}\frac{e^{i2mx}}{e^{ix}-e^{-ix}}\,dx\tag1
\end{align}$$
Then, letting $z=e^{ix}$ and using long division reveals that 
$$\begin{align}
\text{Re}\left(\frac{e^{i2mx}}{e^{ix}-e^{-ix}}\right)&=\text{Re}\left(\frac{z^{2m+1}}{z^2-1}\right)\\\\
&=\text{Re}\left(\sum_{k=1}^{m}z^{2k-1}+\frac{1}{z-1/z}\right)\\\\
&=\sum_{k=1}^{m} \cos((2k-1)x)\tag 2
\end{align}$$
Then, substituting $(2)$ into $(1)$ we find that 
$$\int_0^{\pi/2}\frac{\sin(2mx)}{\sin(x)}\,dx=2\sum_{k=1}^{m} \frac{(-1)^{k-1}}{2k-1}$$

If $n=2m+1$, then we see that 
$$\begin{align}
\int_0^{\pi/2}\frac{\sin((2m+1)x)}{\sin(x)}\,dx&=\text{Im}\int_0^{\pi/2}\frac{e^{i(2m+1)x}}{\sin(x)}\,dx\\\\
&=2\text{Re}\int_0^{\pi/2}\frac{e^{i(2m+1)x}}{e^{ix}-e^{-ix}}\,dx\tag1
\end{align}$$
Then, letting $z=e^{ix}$ and using long division reveals that 
$$\begin{align}
\text{Re}\left(\frac{e^{i(2m+1)x}}{e^{ix}-e^{-ix}}\right)&=\text{Re}\left(\frac{z^{2m+2}}{z^2-1}\right)\\\\
&=\text{Re}\left(\sum_{k=0}^{m}z^{2k}+\frac{1/z}{z-1/z}\right)\\\\
&=\frac12+\sum_{k=1}^{m} \cos(2kx)\tag 2
\end{align}$$
Then, substituting $(2)$ into $(1)$ we find that 
$$\int_0^{\pi/2}\frac{\sin(2mx)}{\sin(x)}\,dx=\frac{\pi}{2}$$
A: first we note that $I_0=0$ and $I_1 = \frac{\pi}2$.
now, using the trig identity
$$
\sin A - \sin B = 2\sin \frac{A-B}2 \cos \frac{A+B}2
$$
we obtain 
$$
I_{n+2} = I_n + \frac2{n+1} \sin \frac{(n+1)\pi}2
$$
if $N$ is odd, therefore, we have $I_N =I_{N-2}=\dots = I_1 = \frac{\pi}2$.
for even values of $N$, say $N=2M$, we have
$$
I_{2M}= I_0+2\bigg(\frac11\sin \frac{\pi}2 + \frac13\sin \frac{3\pi}2+\dots +\frac1{2M-1}\sin \frac{(2M-1)\pi}2 \bigg) = 2\sum_{k=1}^{M} \frac{(-1)^{k-1}}{2k-1}
$$
