<s>[INST] Partial Fraction of $\int \frac{ \left( \cos x + \sin 2x \right) \ \mathrm{d}x}{( 2 - \cos^2 x)(\sin x)}$ If 
$$\int\frac{ \left( \cos x + \sin 2x \right) \ \mathrm{d}x}{( 2 - \cos^2 x)(\sin x)} = \int \frac{A \ \mathrm{d}x}{(\sin x)} + B \int\frac{\sin x \ \mathrm{d}x}{ 1 + \sin^2 x} + C \int \frac{\mathrm{d}x}{1 + \sin^2 x}$$
then, which of the following is correct?


*

*$A+B+C=4$

*$A+B+C=2$

*$A+BC=1$

*$A+B+C=5$
My approach is as follows: 
$$\int\frac{\left( \cos x + \sin 2x \right) \ \mathrm{d}x}{(2 - \cos^2 x)(\sin x)}= \int \frac{\left( \cos x + \sin 2x \right) \ \mathrm{d}x}{(1 + \sin^2 x)(\sin x)} =$$
$$= \int \frac{\cos x \ \mathrm{d}x}{( 1 + \sin^2 x)(\sin x)} + \int \frac{\sin 2x \ \mathrm{d}x}{(1 + \sin^2 x )(\sin x)} =$$
$$= \int \frac{ \cos x \ \mathrm{d}x}{(1 + \sin^2 x )(\sin x)} + \int \frac{ 2 \cos x \ \mathrm{d}x}{(1 + \sin^2 x )} =$$
$$= \int\frac{- \sin \cos x \ \mathrm{d}x}{ 1 + \sin^2 x } + \int\frac{\cos x \ \mathrm{d}x}{ \sin x } + \int \frac{2 \cos x \ \mathrm{d}x}{1 + \sin^2 x}$$
After this step I am not able to approach
 [/INST] Write your Integrand in the form
$$\frac {\csc(x)(\cos(x)+2\sin(x)\cos(x))}{2-\cos^2(x)}$$
and then multiply numerator and denominator by
$$\frac{csc(x)(\cos(x)+2\sin(x)\cos(x))}{2-\cos^2(x)}$$
and we get
$$\newcommand{\dx}{\; \mathrm{d}}x\int \frac{\cot(x)(\csc(x)+2)\csc(x)}{\csc^2(x)+1}\dx$$
now Substitute
$$u=\csc(x)$$
then
$$du=-\cot(x)\csc(x)dx$$
and we obtain
-$$\int\frac{u+2}{u^2+1}du$$
Can you finish?
</s>