# How do you Integrate cosx/(sinx)^2+sinx?

Mar 6, 2015

The required integral is

$I = \int \left[\cos \frac{x}{\sin x} ^ 2 + \sin x\right] \mathrm{dx}$

This can be evaluated as two separate integrals,

$I = {I}_{1} + {I}_{2}$ , where ${I}_{1} = \int \cos \frac{x}{\sin x} ^ 2 \mathrm{dx}$ and ${I}_{2} = \int \sin x \mathrm{dx}$

The solution of ${I}_{2}$ is trivial,

${I}_{2} = \int \sin x \mathrm{dx} = - \cos x + {C}_{2}$

For ${I}_{1} :$

Let $\sin x = t$

Differentiating with respect to t,

$\cos x \frac{\mathrm{dx}}{\mathrm{dt}} = 1$

$\implies \cos x \mathrm{dx} = \mathrm{dt}$

This transforms ${I}_{1}$ to

${I}_{1} = \int \frac{1}{t} ^ 2 \mathrm{dt}$

which has the simple solution of

${I}_{1} = - \frac{1}{t} + {C}_{1}$

Replacing the value of $t = \sin x$

${I}_{1} = - \frac{1}{\sin} x + {C}_{1}$

Combining both solutions,

$I = {I}_{1} + {I}_{2}$
$\implies I = - \frac{1}{\sin} x + {C}_{1} - \cos x + {C}_{2}$

The constants of integration ${C}_{1}$ and ${C}_{2}$ can be added without affecting the solution.

$I = - \frac{1}{\sin} x - \cos x + C$