Find \(\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*} \]