Find the value of the integral - $$\int \cfrac{\cos^3 x + \cos^5 x}{\sin^2 x + \sin^4 x}dx $$
EDIT : This is what I've tried
$$\int\cfrac{\cos x (\cos^2 x + \cos^4 x)}{\sin^2 x + \sin^4 x} dx \\ \int \cfrac{((1-t^2) + (1-t^2)^2)}{t^2 + t^4} dt \\ \text{Where t = sin x } \\ \int \cfrac{t^4 - 3t^2 + 2}{t^2 + t^4} \\ \int \cfrac{t^2 + t^4 - 4t^2 + 2}{t^2 + t^4} \\ \int \left(1 - \cfrac{(4t^2 - 2)}{t^2 + t^4}\right) dt$$ After solving this, I got - $\sin x + 2\csc x - 2\tan^{-1} (\sin x) $ . While the answer is, $\sin x + 2\csc x - 6\tan^{-1}(\sin x) $
$$\frac{\cos^3 x + \cos^5 x}{\sin^2 x + \sin^4 x} = \frac{\cos^3 x(1 + \cos^2 x)}{\sin^2 x(1+ \sin^2 x)}=\cos x\dfrac{(1-\sin^2x)(2-\sin^2x)}{\sin^2 x(1+ \sin^2 x)}$$
Setting $\sin x=u$ we get
$$\int\dfrac{(1-u^2)(2-u^2)}{u^2(1+u^2)}du$$
Using Partial Fraction Decomposition, $\dfrac{(1-u^2)(2-u^2)}{u^2(1+u^2)}=\dfrac Au+\dfrac B{u^2}+\dfrac{C+Du}{1+u^2}+E$ where $A,B,C,D,E$ are arbitrary constants