# Integrate the function $\;\int\;x\;sin\;x$

Toolbox:
• Where there are two functions u and v,and if they are of the form $\int u dv,$ then by the method of integration by parts we can solve them as,$\int udv=uv-\int vdu.$
• (ii)$\int\sin xdx=-\cos x+c.$
• $(iii)\int \cos xdx=\sin x+c.$
Given $I=\int x\sin xdx.$

It is very clean that the given problem is of the form $\int udv.$

We can follow the method of substitution to solve this

$\int u dv=uv-\int vdu.$

Let u=x.

On differentiating we get

du=dx.

Let du=dx.

Let $dv=\sin xdx.$

On substituting for u and dv we get

$\int x\sin xdx=[x.(-\cos x)]-\int-\cos xdx.$

On integrating we get

$\;\;\;=-x\cos x+\sin x+c.$

Hence $\int x\sin xdx=-x\cos x+\sin x+c.$