# How can I find this integral?

I want to find the integral $$\int{\dfrac{\cos^2 x}{\sin^2 x + 4\sin x \cos x}} \mathrm{d} x.$$ I tried put $t=\tan \frac{x}{2}$, I got $$\int{-\dfrac{1}{4}\dfrac{(t^2-1)^2}{t(t^2 + 1)(2t^2-t-2)} \mathrm{d} t.}$$ But, it's too difficult for me to calculate this integral.

• It looks simpler if you push down the $\cos^2(x)$ in the denominator. You get $1$ over $\tan^2(x)+4\tan(x)$. – Nikolaj-K Dec 9 '13 at 15:09

Diving the numerator & the denominator by $\sec^4x,$ $$I=\int{\dfrac{\cos^2 x}{\sin^2 x + 4\sin x \cos x}} dx=\int\frac{\sec^2xdx}{(\tan^2x+4\tan x)(\tan^2x+1)}$$
Setting $\tan x=u,$
$$I=\int\frac{du}{(u^2+4u)(u^2+1)}$$
$$\frac1{u(u+4)(u^2+1)}=\frac Au+\frac B{u+4}+\frac{Cu+D}{u^2+1}$$