Question:
$x \sin 3 x$
Solution:
Let $I=\int x \sin 3 x d x$
Taking x as first function and sin 3x as second function and integrating by parts, we obtain
$I=x \int \sin 3 x d x-\int\left\{\left(\frac{d}{d x} x\right) \int \sin 3 x d x\right\}$
$=x\left(\frac{-\cos 3 x}{3}\right)-\int 1 \cdot\left(\frac{-\cos 3 x}{3}\right) d x$
$=\frac{-x \cos 3 x}{3}+\frac{1}{3} \int \cos 3 x d x$
$=\frac{-x \cos 3 x}{3}+\frac{1}{9} \sin 3 x+C$