Integrate $\int_0^{\pi/2}\frac{\cos^2x}{a\cos^2x + b\sin^2x}\,dx$ I don't know how to deal with this integral
$$I=\displaystyle\int_0^{\pi/2}\frac{\cos^2x}{a\cos^2x + b\sin^2x}\,dx$$
I reached the step
$$I
=\displaystyle\ \int_0^{\pi/2}\frac{1}{a + b\tan^2x}dx$$
Now what should I do? Please help.

Now substitute
$\displaystyle\ u=\tan x \implies x= tan^{-1} u \implies dx=\frac{1}{1+u^2} du$
$\displaystyle\ =\int_0^{\infty}\frac{1}{(1+u^2)(a + bu^2)}du$
Partial Fractions
$\displaystyle\ =\int_0^{\infty}\frac{1}{(1+u^2)(a + bu^2)}du= \frac{1}{a-b} \left(\int_{0}^{\infty} \frac{du}{1+u^{2}} - b \int_{0}^{\infty} \frac{du}{a+bu^{2}} \right)$
Evaluating
$\displaystyle\ =\frac{1}{a-b} \left(\int_{0}^{\infty} \frac{du}{1+u^{2}} - b \int_{0}^{\infty} \frac{du}{a+bu^{2}} \right)$
$\displaystyle\ =\frac{1}{a-b} \left([\tan x]_0^{\infty} - b \left(\frac{\tan^{-1}\left[\frac{\sqrt{b}x}{\sqrt{a}}\right)}{\sqrt{ab}} \right]_0^{\infty}\right)$
Put the Values
