We have to evaluate-
$$\int_0^\pi \frac{\sin^2x}{a^2+b^2-2ab\cos x}\mathrm dx$$
I tried applying the property $\displaystyle\int_0^{2a}f(x)\,\mathrm dx=\int_0^a f(x)+f(2a-x)$ and proceeding I got $$\frac{a^2+b^2}{2a^2b^2}\frac{\pi}{2}-\frac{2(a^2+b^2)}{4a^2b^2}\int_0^{\pi/2}\frac{(a^2-b^2)^2\sec^2x}{(a^2-b^2)^2\sec^2x+4a^2b^2\tan^2x}\mathrm dx$$
Things are getting messed up after this.
Is there a better way out?