# How do I evaluate the indefinite integral intx*sin(x)*tan(x)dx ?

Oct 24, 2014

This integral can be evaluated using integration by parts .

Firstly, integrating by parts where $u = x \mathmr{and} \mathrm{dv} = \sin \left(x\right) \mathrm{dx}$, we get
$\int x \sin \left(x\right) \mathrm{dx} = - x \cos \left(x\right) + \sin \left(x\right) + c$

In the same way, for $u = x \mathmr{and} \mathrm{dv} = \cos \left(x\right) \mathrm{dx}$, we have

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

Now, using integration by parts again with $u = \tan \left(x\right) \mathmr{and} \mathrm{dv} = x \sin \left(x\right) \mathrm{dx}$ and the first integral we have

$\int x \sin \left(x\right) \tan \left(x\right) \mathrm{dx} =$
$= - x \tan \left(x\right) \cos \left(x\right) + \sin \left(x\right) \tan \left(x\right) + \int x \cos \left(x\right) {\sec}^{2} \left(x\right) \mathrm{dx} - \int \sin \left(x\right) {\sec}^{2} \left(x\right) \mathrm{dx}$
$= - x \sin \left(x\right) + \sin \left(x\right) \tan \left(x\right) + \int x \cos \left(x\right) \mathrm{dx} - \int \sin \frac{x}{\cos} ^ 2 \left(x\right) \mathrm{dx}$
$= - x \sin \left(x\right) + \sin \left(x\right) \tan \left(x\right) + x \sin \left(x\right) - \sin \left(x\right) - \int \sin \frac{x}{\cos} ^ 2 \left(x\right) \mathrm{dx}$
$= \sin \left(x\right) \tan \left(x\right) - \sin \left(x\right) - \int \sin \frac{x}{{\cos}^{2} \left(x\right)} \mathrm{dx}$
Finally, using substitution $u = \cos \left(x\right) , \mathrm{du} = - \sin \left(x\right) \mathrm{dx}$ in the last integral we have

$\int x \sin \left(x\right) \tan \left(x\right) \mathrm{dx} = \sin \left(x\right) \tan \left(x\right) - \sin \left(x\right) + \int \frac{1}{u} ^ 2 \mathrm{du}$
$= \sin \left(x\right) \tan \left(x\right) - \sin \left(x\right) - \frac{1}{3} {\cos}^{3} \left(x\right) + c .$