Definite integration evaluation of $\int_{0}^{\pi}\frac{x}{(a^2\cos^2x+b^2\sin^2x)^2}dx$ OK, so the question says evaluate the integral
$$\int_{0}^{\pi}\frac{x}{(a^2\cos^2x+b^2\sin^2x)^2}dx$$
What I do is use the property that $\int_a^bf(x)dx=\int_a^bf(b+a-x)dx$ and this gives me ($I$ is the value of the integral)
$$\frac{2I}{\pi}=\int_{0}^{\pi}\frac{1}{(a^2\cos^2x+b^2\sin^2x)^2}dx$$
What should I do ahead to get the value I need? Any tips? (Thanks in advance)

I prefer to the following method:
\begin{align*}
I
:= \int_{0}^{\pi} \frac{x}{(a^2 \cos^2 x + b^2 \sin^2 x )^2} \, dx
&= \frac{\pi}{2} \int_{0}^{\pi} \frac{dx}{(a^2 \cos^2 x + b^2 \sin^2 x )^2} \\
&= \pi \int_{0}^{\frac{\pi}{2}} \frac{dx}{(a^2 \cos^2 x + b^2 \sin^2 x )^2} \\
&= \pi \int_{0}^{\frac{\pi}{2}} \frac{1 + \tan^2 x}{(a^2 + b^2 \tan^2 x )^2} \, \sec^2 x \, dx.
\end{align*}
Now we make the substitution $b \tan x \mapsto a \tan x$. Then
\begin{align*}
I
&= \frac{\pi}{(ab)^3} \int_{0}^{\frac{\pi}{2}} \frac{b^2 + a^2\tan^2 x}{(1 + \tan^2 x )^2} \, \sec^2 x \, dx \\
&= \frac{\pi}{(ab)^3} \int_{0}^{\frac{\pi}{2}} ( b^2 \cos^2 x + a^2\sin^2 x ) \, dx \\
&= \frac{\pi}{(ab)^3} \cdot \frac{\pi}{4} \left( a^2 + b^2 \right)
 = \frac{\pi^2(a^2 + b^2)}{4(ab)^3}.
\end{align*}
