Evaluate $\int x \sin ^{3} x d x$
We know that $\sin ^{3} x=\frac{3 \sin x-\sin 3 x}{4}$
$y=\int x\left(\frac{3 \sin x-\sin 3 x}{4}\right) d x$
$y=\frac{3}{4} \int x \sin x d x-\frac{1}{4} \int x \sin 3 x d x$
Use method of integration by parts
$y=\frac{3}{4}\left(x \int \sin x d x-\int \frac{d}{d x} x\left(\int \sin x d x\right) d x\right)$
$-\frac{1}{4}\left(x \int \sin 3 x d x-\int \frac{d}{d x} x\left(\int \sin 3 x d x\right) d x\right) y$
$=\frac{3}{4}\left(-x \cos x+\int \cos x d x\right)-\frac{1}{4}\left(-x \frac{\cos 3 x}{3}+\int \frac{\cos 3 x}{3} d x\right)$
$y=\frac{3}{4}(-x \cos x+\sin x)-\frac{1}{4}\left(-x \frac{\cos 3 x}{3}+\frac{\sin 3 x}{9}\right)+c$
$y=\frac{1}{4}\left(-3 x \cos x+3 \sin x+\frac{x}{3} \cos 3 x-\frac{\sin 3 x}{9}\right)+c$