Evaluate $$ \int_0^\pi\frac{\sin\Big(n+\frac{1}{2}\Big)x}{\sin \frac{x}{2}}dx $$
$$ \int_0^\pi\frac{\sin\Big(n+\frac{1}{2}\Big)x}{\sin \frac{x}{2}}dx=\int_0^\pi\frac{\sin\Big(nx+\frac{x}{2}\Big)}{\sin \frac{x}{2}}dx=\int_0^\pi\frac{\sin nx.\cos\frac{x}{2}+\cos nx.\sin\frac{x}{2}}{\sin\frac{x}{2}}dx\\ =\int_0^\pi\sin nx.\cot\frac{x}{2}.dx+\int_0^\pi\cos nx.dx\\ $$
I don't think it is leading anywhere, anyone could possibly help with how to approach this definite integral ?
Note: The solution given in my reference is $\pi$