# How do you integrate sin( ln x )?

Jul 21, 2016

$I = \frac{x}{2} \left(\sin \left(\ln x\right) - \cos \left(\ln x\right)\right) + C$

#### Explanation:

$I = \int \setminus \sin \left(\ln x\right) \setminus \mathrm{dx}$

this is in the IBP section meaning you don't really have much choice how to take this, so ...

$I = \int \setminus \frac{d}{\mathrm{dx}} \left(x\right) \cdot \sin \left(\ln x\right) \setminus \mathrm{dx}$

which by IBP

$= x \sin \left(\ln x\right) - \int \setminus x \cdot \frac{d}{\mathrm{dx}} \left(\sin \left(\ln x\right)\right) \setminus \mathrm{dx}$

$= x \sin \left(\ln x\right) - \int \setminus x \cos \left(\ln x\right) \cdot \frac{1}{x} \setminus \mathrm{dx}$

$= x \sin \left(\ln x\right) - \int \setminus \cos \left(\ln x\right) \setminus \mathrm{dx}$

and now another round of IBP

$= x \sin \left(\ln x\right) - \int \setminus \frac{d}{\mathrm{dx}} \left(x\right) \cdot \cos \left(\ln x\right) \setminus \mathrm{dx}$

$= x \sin \left(\ln x\right) - x \cos \left(\ln x\right) + \int \setminus x \frac{d}{\mathrm{dx}} \left(\cos \left(\ln x\right)\right) \setminus \mathrm{dx}$

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

$= x \sin \left(\ln x\right) - x \cos \left(\ln x\right) - \int \setminus \sin \left(\ln x\right) \setminus \mathrm{dx}$

$= x \sin \left(\ln x\right) - x \cos \left(\ln x\right) - I$

$2 I = x \sin \left(\ln x\right) - x \cos \left(\ln x\right) + C$ making sure to add in the integration constant

$\implies I = \frac{x}{2} \left(\sin \left(\ln x\right) - \cos \left(\ln x\right)\right) + C$

Jul 21, 2016

$\int \sin \left({\log}_{e} x\right) = \frac{x}{2} \left(\sin \left({\log}_{e} x\right) - \cos \left({\log}_{e} x\right)\right)$

#### Explanation:

${e}^{i \phi} = \cos \phi + i \sin \phi$ (Moivre's identity)

so

${e}^{i {\log}_{e} x} = \cos \left({\log}_{e} x\right) + i \sin \left({\log}_{e} x\right)$

but

${e}^{i {\log}_{e} x} = {\left({e}^{{\log}_{e} x}\right)}^{i} = {x}^{i}$

and

$\int {x}^{i} \mathrm{dx} = \frac{1}{2} \left(1 - i\right) {x}^{1 + i} = \frac{x}{2} \left(1 - i\right) {x}^{i}$

Substituting for ${x}^{i}$ and taking the imaginary component we get

$\int \sin \left({\log}_{e} x\right) = \frac{x}{2} \left(\sin \left({\log}_{e} x\right) - \cos \left({\log}_{e} x\right)\right)$