# How do I integrate $\int_0^{\pi/2}\frac{\cos^2x}{a\cos^2x + b\sin^2x}\,dx$?

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

$$=\displaystyle\ \int_0^{\pi/2}\frac{\sec^2 x}{\sec^2 x}\cdot \frac{\cos^2x}{a\cos^2x + b\sin^2x}dx$$

$$=\displaystyle\ \int_0^{\pi/2}\frac{1}{a + b\tan^2x}dx$$

Now what should I do?

• I'm sure this has been asked before. You'll need to edit your post to include your working so we can see where you are having issues and so we don't use techniques you haven't learnt yet. Anyway, dividing through by $\cos^{2}(x)$ then using a substitution might work. – mattos Nov 29 '16 at 5:38
• You can assume $a$ and $b$ have the same sign, since otherwise the integral doesn't converge. Evaluate the definite integral in Deepak Suwalka's answer using residue calculus. If that doesn't make sense, see @Mattos's comment. – Tad Nov 29 '16 at 12:37

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

• This answer makes assumptions about $a$ and $b$... – Jack Tiger Lam Nov 29 '16 at 5:51
• How do you substitute $x=\infty$ into $\tan x$? – Tad Nov 29 '16 at 12:31
• Is ti possible to do it if I put $e^{\cos^2x}$? I mean $$\int_0^{\pi/2}\frac{\cos^2x}{a\cos^2x + b\sin^2x}e^{c\cos^2x}\,dx$$ – Dinesh Shankar Jun 23 '18 at 17:03

put $\displaystyle I = \int^{\frac{\pi}{2}}\frac{\cos^2 x}{a\cos^2 x+b\sin^2 x}dx$ and $\displaystyle J = \int^{\frac{\pi}{2}}_{0}\frac{\sin^2 x}{a\cos^2 x+b\sin^2 x}dx$

$\displaystyle aI+bJ = \frac{\pi}{2}$