# How do I find the integral intcos(x)/(sin^2(x)+sin(x))dx ?

Aug 10, 2014

$= \ln \left(\sin \frac{x}{\sin \left(x\right) + 1}\right) + c$, where $c$ is a constant

$= \int \cos \frac{x}{{\sin}^{2} \left(x\right) + \sin \left(x\right)} \mathrm{dx}$

$= \int \cos \frac{x}{\sin \left(x\right) \left(\sin \left(x\right) + 1\right)} \mathrm{dx}$

let's $\sin \left(x\right) = t$, then, $\cos \left(x\right) \mathrm{dx} = \mathrm{dt}$

$= \int \frac{1}{t \left(t + 1\right)} \mathrm{dt}$

Using Partial Fractions,

$\frac{1}{t \left(t + 1\right)} = \frac{A}{t} + \frac{B}{t + 1}$ .............$\left(i\right)$

multiplying both sides with $t \left(t + 1\right)$,

$1 = A \left(t + 1\right) + B t$

$1 = A + \left(A + B\right) t$

comparing constant and coefficient on both sides, we get

$A = 1$,

$A + B = 0$, which implies $B = - 1$

plugging the values of $A$ and $B$ in $\left(i\right)$,

$\frac{1}{t \left(t + 1\right)} = \frac{1}{t} - \frac{1}{t + 1}$

integrating both sides with respect to $t$,

$\int \frac{1}{t \left(t + 1\right)} \mathrm{dt} = \int \frac{1}{t} \mathrm{dt} - \int \frac{1}{t + 1} \mathrm{dt}$

$= \ln t - \ln \left(t + 1\right) + c$, where $c$ is a constant

$= \ln \left(\frac{t}{t + 1}\right) + c$, where $c$ is a constant

substituting $t$, yields

$= \ln \left(\sin \frac{x}{\sin \left(x\right) + 1}\right) + c$, where $c$ is a constant