Proving $\int_0^{\pi } f(x) \, \mathrm{d}x = n\pi$

I've been asked to show $$\displaystyle \int_{0}^{\pi} \dfrac{2(1+\cos x) - \cos((n-1)x) - \cos((n+1)x) - 2\cos nx}{1-\cos 2x} \ dx = n\pi$$

The integrand simplifies nicely to $$\frac{\cos nx - 1}{\cos x - 1}$$ but I'm not sure how to proceed from here, I've tried using a $x \mapsto \pi - x$ sub, but that doesn't work either. Real methods, please.

• Off the top of my head, I would look for some sort of symmetry. That, or use contour integration over $\Bbb C$. – Omnomnomnom Feb 1 '16 at 21:23
• @Omnomnomnom I'm still in high school, the intended approach has nothing to do with contour integration. I'll edit that in, thanks. I was hoping it would have symmetry in $x=\pi$, but apparently not. – Zain Patel Feb 1 '16 at 21:24
• Perhaps there's symmetry about the line $x = \pi/2$? Or perhaps that's what you meant. – Omnomnomnom Feb 1 '16 at 21:25
• Would symmetry in $x=\pi/2$ help given the limits? – Zain Patel Feb 1 '16 at 21:28
• For example: if shifting the graph $\pi/2$ to the left makes the function odd, then that would help. – Omnomnomnom Feb 1 '16 at 21:30

HINT: Observe that $$\int_0^{\pi}\frac{\cos nx−1}{\cos x−1}\mathrm{d}x=\int_0^{\pi}\frac{\sin^2(nx/2)}{\sin^2(x/2)}\mathrm{d}x$$ and then you can follow here.