Integrating by Parts

Find \(\int x\) sin \(x~dx\).

Solution We use the integration by parts formula with \[ u=x \qquad\hbox{and}\qquad dv=\sin x\,dx\qquad {\color{#0066A7}{\int}} {\color{#0066A7}{udv=}} {\color{#0066A7}{\int x\sin x\,dx}} \]

Then \[ du = dx \quad and \quad v = \int \sin x~dx = -cos x \]

and \[ \begin{eqnarray*} \int x\sin x\,dx \underset{\underset{\color{#0066A7}{\hbox{\(\int udv= uv - \int vdu\)}}}{\color{#0066A7}{\uparrow}}} {=} -x\cos x+\int \cos x\,dx=-x\cos x+\sin x+C \\[-9pt] \end{eqnarray*} \]