Question

$$=\frac{1}{2}\int_{-\pi}^{\pi}(1-\cos\ 2n\ x)dx$$