<s>[INST] Integral $\int \frac{dx}{\sin^2 (x) + \sin(2x)}$ We have to do the following integration 
$$\int \frac{dx}{\sin^2 (x) + \sin(2x)}$$
I tried as
In the numerator, $1 =  \sin^2(x)+\sin(2x)+\cos^2(x)-\sin(2x)$
But now how to proceed?
 [/INST] First use the fact that $\sin(2x) = 2\sin(x)\cos(x)$ to obtain
$$\int \frac{1}{\sin^2(x) + 2\cos(x)\sin(x)}dx$$
Divide numerator and denominator by $\sin^2(x)$:
$$\int \frac{\frac{1}{\sin^2(x)}}{1 + 2\frac{\cos(x)}{\sin(x)}} = \int \frac{\csc^2(x)}{1 + 2\cot(x)}dx$$
Then you can use the substitution $u = 2\cot(x)+1$; $du = -2\csc(x)dx$:
$$-\frac{1}{2}\int\frac{1}{u}du = -\frac{\ln(u)}{2}+c$$
And substitute $u$ for $2\cot(x)+1$ again.
</s>