Evaluating $\int_{0}^{\pi/2}\frac{x\sin x\cos x\;dx}{(a^{2}\cos^{2}x+b^{2}\sin^{2}x)^{2}}$
The case $a^2=b^2$ being simple, let's just consider, by symmetry, the case $a>b>0$.
Observe that $$ \partial _x \left(\frac{1}{a^2 \cos^2x+b^2 \sin^2 x}\right)=2(a^2-b^2)\frac{\cos x\sin x}{(a^2 \cos^2x+b^2 \sin^2 x)^2} $$ then, integrating by parts, you may write $$ \begin{align} I(a,b)&=\int_0^{\pi/2}\frac{x\cos x\sin x}{(a^2 \cos^2x+b^2 \sin^2 x)^2} dx\\\\ &=\frac{x}{2(a^2-b^2)}\left.\frac{1}{a^2 \cos^2x+b^2 \sin^2 x}\right|_{0}^{\pi/2}-\frac{1}{2(a^2-b^2)}\int_0^{\pi/2}\frac{dx}{a^2 \cos^2x+b^2 \sin^2 x}\\\\ &= \frac{\pi}{4(a^2-b^2)b^2}-\frac{1}{2(a^2-b^2)}\int_0^{\pi/2}\frac{1}{\left(a^2 +b^2 \large{\frac{\sin^2 x}{\cos^2x}}\right)}\frac{1}{\cos^2 x}dx\\\\ &= \frac{\pi}{4(a^2-b^2)b^2}-\frac{1}{2(a^2-b^2)}\int_0^{\pi/2}\frac{1}{\left(a^2 +b^2 \tan ^2x\right)}(\tan x)'dx\\\\ &= \frac{\pi}{4(a^2-b^2)b^2}-\frac{1}{2(a^2-b^2)}\frac{1}{ab}\left.\arctan \left(\frac ba \tan x \right)\right|_{0}^{\pi/2}\\\\ &= \frac{\pi}{4(a^2-b^2)b^2}-\frac{\pi}{4(a^2-b^2)}\frac{1}{ab}\\\\ &= \frac{\pi}{4(a+b)ab^2}. \end{align} $$
Integrating by parts,
$$\int\frac{x\sin x\cos x}{(a^2\cos^2x+b^2\sin^2x)^2}dx$$
$$=x\int\frac{\sin x\cos x}{(a^2\cos^2x+b^2\sin^2x)^2}dx-\int\left[\frac{dx}{dx}\int\frac{\sin x\cos x}{(a^2\cos^2x+b^2\sin^2x)^2}dx\right]dx$$
Now $a^2\cos^2x+b^2\sin^2x=u\implies2(b^2-a^2)\sin x\cos x\ dx=du$
For $\displaystyle\int\frac{dx}{a^2\cos^2x+b^2\sin^2x}=\int\frac{\sec^2x\ dx}{a^2+b^2\tan^2x},$
set $b\tan x=a\tan y$
let $x=\dfrac{t}{2}$, we have $$I=\dfrac{1}{2}\int_{0}^{\pi}\dfrac{\dfrac{t}{2}\sin{\dfrac{t}{2}}\cos{\dfrac{t}{2}}}{\left(a^2\sin^2{\dfrac{t}{2}}+b^2\cos^2{\dfrac{t}{2}}\right)^2}dt=\dfrac{1}{2}\int_{0}^{\pi}\dfrac{t\sin{t}}{[(a^2+b^2)+(a^2-b^2)\cos{t}]^2}dt$$ So \begin{align*}I&=-\dfrac{1}{2(a^2-b^2)}\int_{0}^{\pi}t\;d\left(\dfrac{1}{(a^2+b^2)+(a^2-b^2)\cos{t}}\right)\\ &=-\dfrac{1}{2(a^2-b^2)}\dfrac{1}{(a^2+b^2)+(a^2-b^2)\cos{t}}\Bigg|_{0}^{\pi}+\int_{0}^{\pi}\dfrac{1}{(a^2+b^2)+(a^2-b^2)\cos{t}}dt\\ &=-\dfrac{\pi}{4b^2(a^2-b^2)}+\int_{0}^{\pi}\dfrac{1}{(a^2+b^2)+(a^2-b^2)\cos{t}}dt \end{align*}