<s>[INST] 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)
 [/INST] $$
\begin{aligned}
\because I&=\int_0^\pi \frac{x}{\left(a^2 \cos ^2 x+b^2 \sin ^2 x\right)^2} \\& \stackrel{x\mapsto\pi-x}{=} \int_0^\pi \frac{\pi-x}{\left(a^2 \cos ^2 x+b^2 \sin ^2 x\right)^2} d x \\
&=\pi \int_0^\pi \frac{d x}{\left(a^2 \cos ^2 x+b^2 \sin ^2 x\right)^2}-I \\
\therefore I&=\frac{\pi}{2} \int_0^\pi \frac{d x}{\left(a^2 \cos ^2 x+b^2 \sin ^2 x\right)^2} \\
&=\pi \int_0^{\frac{\pi}{2}} \frac{d x}{\left(a^2 \cos ^2 x+b^2 \sin ^2 x\right)^2}
\end{aligned}
$$
By my post, $$
\boxed{I =\pi\left[\frac{\pi\left(a^2+b^2\right)}{4 a^3 b^3}\right]=\frac{\pi^2\left(a^2+b^2\right)}{4 a^3 b^3}}
$$
</s>