<s>[INST] Trigonometric function integration: $\int_0^{\pi/2}\frac{dx}{(a^2\cos^2x+b^2 \sin^2x)^2}$ How to integrate $$\int_0^{\pi/2}\dfrac{dx}{(a^2\cos^2x+b^2 \sin^2x)^2}$$
What's  the approach to it?
Being a high school student , I don't know things like counter integration.(Atleast not taught in India in high school education ).I just know simple elementary results of definite and indefinite integration. Substitutions and all those works good. :)
 [/INST] Consider
$$
I(c)=\int_{0}^{\frac{\pi}{2}} \ln \left(a^{2} \cos ^{2} x+b^{2} \sin ^{2} x+c\right) d x, \textrm{ where } c\geq 0.
$$
Using my post, we have
$$
I(c)=\pi \ln \left(\frac{\sqrt{a^{2}+c}+\sqrt{b^{2}+c}}{2}\right)
$$
Differentiating $I(c)$ w.r.t. $c$ yields
$$
I^{\prime}(c)=\frac{\pi}{2 \sqrt{\left(a^{2}+c\right)\left(b^{2}+c\right)}}
$$
Once more gives
$$
I^{\prime \prime}(c)=-\frac{\pi}{4\left[\left(a^{2}+c\right)\left(b^{2}+c\right)\right]^{\frac{3}{2}}\left(2 c+a^{2}+b^{2}\right)}
$$
Hence
$$
\boxed{\int_{0}^{\frac{\pi}{2}} \frac{d x}{\left(a^{2} \cos ^{2} x+b^{2} \sin ^{2} x+c\right)^{2}}= \frac{\pi\left(2 c+a^{2}+b^{2}\right)}{4\left[\left(a^{2}+c\right)\left(b^{2}+c\right)\right]^{\frac{1}{2}}}}
$$
Putting $c=0$ yields the result
$$\boxed{\int_{0}^{\frac{\pi}{2}} \frac{d x}{\left(a^{2} \cos ^{2} x+b^{2} \sin ^{2} x+c\right)^{2}}= \frac{\pi\left(a^{2}+b^{2}\right)}{4 a^{3} b^{3}} }$$
Furthermore, in general,
$$
\boxed{\int_{0}^{\frac{\pi}{2}} \frac{d x}{\left(a^{2} \cos ^{2} x+b^{2} \sin ^{2} x+c\right)^{n}}=\frac{(-1)^{n} \pi}{2(n-1) !} \frac{d^{n-1}}{d c^{n-1}}\left[\left(a^{2}+c\right)\left(b^{2}+c\right) \right] ^{-\frac{1}{2}}}
$$
</s>