Change cosx into tanx. That might help..
2 Answers
\int_{0}^{\frac{\pi}{4}}{\frac{dx}{a^2cos^2x+b^2sin^2x}}=\frac{1}{ab}tan^{-1}\frac{b}{a}......(*)
This can be easily derived by taking out cos2x from denominator, then taking tanx as k and ....
Now differentiate (*) w.r.t a and w.r.t b, then add up the 2 equations to arrive at (I'm avoiding the calculations, pls complete them urself)
\int_{0}^{\frac{\pi}{4}}{\frac{dx}{(a^2cos^2x+b^2sin^2x)^2}}=\left\{\frac{1}{2a}\frac{d}{da}tan^{-1}\frac{b}{a} \right\}+\left\{\frac{1}{2b}\frac{d}{db}tan^{-1}\frac{b}{a} \right\}.......(**)
Now lets come to the qsn at hand, the given integral is actually, 2\int_{0}^{\frac{\pi}{2}}{\frac{dx}{2+cosx}}-3\int_{0}^{\frac{\pi}{2}}{\frac{dx}{(2+cosx)^2}}
1st integral shud not be a problem, now abt the 2nd, \int_{0}^{\frac{\pi}{2}}{\frac{dx}{(2+cosx)^2}}=\int_{0}^{\frac{\pi}{2}}{\frac{dx}{(sin^2\frac{x}{2}+3cos^2\frac{x}{2})^2}}
Take x2=k and apply (**).
Done.