Evaluate the following integral:
$\int \frac{\cos x}{(1-\sin x)^{3}(2+\sin x)} d x$
Let
$\sin x=t$
$\cos x d x=d t$
$I=\int \frac{\cos x}{(1-\sin x)^{3}(2+\sin x)} d x$
$=\int \frac{d t}{(1-t)^{3}(2+t)}$
$\frac{1}{(1-t)^{3}(2+t)}=\frac{A}{1-t}+\frac{B}{(1-t)^{2}}+\frac{C}{(1-t)^{3}}+\frac{D}{2+t}$
$1=A(1-t)^{2}(2+t)+B(1-t)(2+t)+C(2+t)+D(1-t)^{3}$
Put $\mathrm{t}=1$
$1=3 C$
$C=\frac{1}{3}$
Put $t=-2$
$1=27 \mathrm{D}$
$D=\frac{1}{27}$
$A=-\frac{1}{27} B=\frac{1}{9}$
$\int \frac{d t}{(1-t)^{3}(2+t)}$
$\quad=-\frac{1}{27} \int \frac{1}{1-t} d t+\frac{1}{9} \int \frac{d t}{(1-t)^{2}}+\frac{1}{3} \int \frac{d t}{(1-t)^{3}}+\frac{1}{27} \int \frac{d t}{2+t}$
$=-\frac{1}{27} \log |1-t|+\frac{1}{9(1-t)}+\frac{1}{6(1-t)^{2}}+\frac{1}{27} \log |2+t|+C$
Put $t=\sin x$
$=-\frac{1}{27} \log |1-\sin x|+\frac{1}{9(1-\sin x)}+\frac{1}{6(1-\sin x)^{2}}+\frac{1}{27} \log |2+\sin x|$
$+C$