Methods for Integrating $\int \frac{\cos(x)}{\sin^2(x) +\sin(x)}dx$ So I've found that there's the Weierstrass Substitution that can be used on this problem but I just want to check I can use a normal substitution method to solve the equation:
$$\int \frac{\cos(x)}{\sin^2(x) +\sin (x)}dx$$
Let $u = \sin(x)$
$du = \cos(x)\, dx$
$dx = \frac {1}{\cos(x)\,} du$
Which becomes:
$$\int \frac{\cos(x)}{u^2 + u} \frac{1}{\cos(x)}du$$
$$\int \frac{1}{u^2 + u}du$$
Factor out u from denominator:
$$\int \frac{1}{u(u + 1)}du$$
Integrate as a partial fraction:
$$\int \frac{1}{u} - \frac{1}{(u + 1)}du$$
Which integrates as:
$$\ln|u| - \ln|(u + 1)| + C$$
Subtitute $u = \sin(x)$ back in and simplifies to:
$$\ln \left|\frac{\sin(x)}{\sin(x)+1} \right| + C$$
Is this correct? From the Weierstrass Substitution, one gets:
$$\ln \left|\tan \left(\frac{x}{2}\right)\right|-2\ln \left|\tan \left(\frac{x}{2}\right)+1\right| +C $$

By using Weierstrass Substitution,
let $t = \tan{\frac{x}{2}}, \,dt = \frac{1}{2}\sec^{2}{\frac{x}{2}}\,dx$
$=> 2\cos^{2}{\frac{x}{2}}\,dt = \frac{2}{1+t^{2}}\,dt = dx$
$\because \sin{x} = \frac{2t}{1+t^{2}}, \cos{x} = \frac{1-t^{2}}{1+t^{2}}$
$\therefore \int \frac{\cos{x}}{\sin^{2}{x}+\sin{x}}\,dx = \int \frac{(\frac{1-t^{2}}{1+t^{2}})(\frac{2}{1+t^{2}})}{(\frac{2t}{1+t^{2}})^2+(\frac{2t}{1+t^{2}})}\,dt = \int \frac{2(1-t^{2})}{4t^{2}+2t(1+t^{2})}\,dt = \int \frac{2(1-t)(1+t)}{2t(1+t^{2}+2t)}\,dt = \int \frac{1-t}{t(1+t)}\,dt$
$= \int \frac{1+t-2t}{t(1+t)} = \int \frac{1}{t}\,dt -2 \int \frac{1}{1+t}\,dt = \ln|t| - 2\ln|1+t| + C$
$ = \ln|\tan\frac{x}{2}|-2\ln|1+\tan\frac{x}{2}|+C$
Therefore your statement is correct!
