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. 

For a solution that doesn't involve complex analysis: Try the substitution $t = \frac{a}{b} \tan u$. Then $du = \frac{ab}{a^2 + b^2 t^2} \,dt$ and
your integral becomes
$$\frac{1}{a^3 b^3} \int_0^{\pi/2} (b^2 \cos^2 u + a^2 \sin^2 u) \,du$$
which is more doable.
