# What is int (ln(sinx))*cosxdx?

Nov 8, 2015

$\sin \left(x\right) \ln \left(\sin \left(x\right)\right) - \sin \left(x\right) + C$
or
$\sin \left(x\right) \left(\ln \left(\sin \left(x\right)\right) - 1\right) + C$

#### Explanation:

int(ln(sin(x))*cosxdx

let $s = \sin \left(x\right)$ (normally I would use "u", but we will use it later)
then $\mathrm{ds} = \cos \left(x\right) \mathrm{dx}$

now we have
$\int \ln \left(s\right) \cdot \mathrm{ds}$

To integrate this we use integration by parts
$\int u \mathrm{dv} = u v - \int v \mathrm{du}$

let $u = \ln \left(s\right)$ let $\mathrm{dv} = \mathrm{ds}$
so $\mathrm{du} = \frac{1}{s} \mathrm{ds}$ and $v = s$

the integral can now be rewritten as
$\ln \left(s\right) s - \int s \cdot \frac{1}{s} \mathrm{ds}$
$s \ln \left(s\right) - \int 1 \mathrm{ds}$
$s \ln \left(s\right) - s + C$

Now substitute $\sin \left(x\right)$ for $s$

$\sin \left(x\right) \ln \left(\sin \left(x\right)\right) - \sin \left(x\right) + C$
or
$\sin \left(x\right) \left(\ln \left(\sin \left(x\right)\right) - 1\right) + C$