<s>[INST] Integral calculus sine functions: $\frac{1}{2\pi }\int_{-\pi }^{\pi }\frac{\sin\left((n+1/2)\,x\right)}{\sin\left(x/2\right)}\,dx = 1$ For an integer, $n$, how do I show the following?
$$
\frac{1}{2\pi }\int_{-\pi }^{\pi }\frac{\sin\left((n+1/2)\,x\right)}{\sin\left(x/2\right)}\,dx = 1.
$$
Can I use induction?
 [/INST] To use induction, first establish a base case.  If $n=0$, then we see trivially that 
$$\frac{1}{2\pi}\int_{-\pi}^\pi \frac{\sin\left((n+1/2)x\right)}{\sin(x/2)}\,dx=\frac{1}{2\pi}\int_{-\pi}^\pi \frac{\sin\left(x/2\right)}{\sin(x/2)}\,dx=1$$
Next, we assume that for some integer $N\ge 1$ we have
$$\frac{1}{2\pi}\int_{-\pi}^\pi \frac{\sin\left((N+1/2)x\right)}{\sin(x/2)}\,dx=1$$
We now examine the integral for $n=N+1$.  Proceeding, we have
$$\begin{align}
\frac{1}{2\pi}\int_{-\pi}^\pi \frac{\sin\left((N+1+1/2)x\right)}{\sin(x/2)}\,dx&=\frac{1}{2\pi}\int_{-\pi}^\pi \frac{\sin\left((N+1/2)x\right)+2\cos((N+1)x)\sin(x/2)}{\sin(x/2)}\,dx\\\\
&=\color{blue}{\frac{1}{2\pi}\int_{-\pi}^\pi \frac{\sin\left((N+1/2)x\right)}{\sin(x/2)}\,dx}+\color{red}{\frac1\pi \int_{-\pi}^\pi \cos((N+1)x)\,dx}\\\\
&=\color{blue}{1}+\color{red}{0}\\\\
&=1
\end{align}$$
as was to be shown!
</s>