Compute $\int^{\pi/2}_0 \frac{dx}{(a^2\cos^2 x + b^2 \sin ^2 x)^2}$ I have tried solving this for about an hour and will probably resort to head banging in some time:
$$\int ^{\frac{\pi}{2}}_{0} \dfrac{dx}{(a^2\cos^2 x + b^2 \sin ^2 x)^2}$$
I first divided by $\cos^4 x$ and then subsequently put $\tan x = t$, to get:
$$\int ^{\infty}_{0} \dfrac{1+t^2}{(a^2 + b^2 t^2)^2}dt$$
This has become unmanageable. Neither splitting the numerator, nor Partial fraction (taking t^2 = z and applying partial fraction) seems to work. 

$$
\begin{align}
\int_0^\infty\frac{1+t^2}{(a^2+b^2t^2)^2}\,\mathrm{d}t
&=\frac1{a^3b}\int_0^\infty\frac{1+\frac{a^2}{b^2}t^2}{(1+t^2)^2}\,\mathrm{d}t\tag{1}\\
&=\frac1{2a^3b}\int_0^\infty\frac{t^{-1/2}+\frac{a^2}{b^2}t^{1/2}}{(1+t)^2}\,\mathrm{d}t\tag{2}\\
&=\frac1{2a^3b}\frac{\Gamma\left(\frac12\right)\Gamma\left(\frac32\right)}{\Gamma(2)}+\frac1{2ab^3}\frac{\Gamma\left(\frac32\right)\Gamma\left(\frac12\right)}{\Gamma(2)}\tag{3}\\[3pt]
&=\frac\pi4\frac{a^2+b^2}{a^3b^3}\tag{4}
\end{align}
$$
Explanation:
$(1)$: substitute $t\mapsto\frac abt$
$(2)$: substitute $t\mapsto t^{1/2}$
$(3)$: use the Beta Function integral
$(4)$: simplify
