Question:
Evaluate the following integrals:
Solution:
Let $I=\int x \sin x \cos x d x=\frac{1}{2} \int x \times 2 \sin x \cos x d x$
We know that, $\sin 2 x=2 \sin x \cos x$
$=\frac{1}{2} \int x \sin 2 x$
Using integration by parts,
$=\frac{1}{2}\left(x \int \sin 2 x d x-\int \frac{d}{d x} x \int \sin 2 x d x\right)$
We have,
$\int \sin n x=\frac{-\cos n x}{n}$ and $\int \cos n x=\frac{\sin n x}{n}$
$=\frac{1}{2}\left(\frac{x}{2}-\cos 2 x+\int \frac{\cos 2 x d x}{2}\right)$
$=\frac{1}{2}\left(-\frac{x}{2} \cos 2 x+\frac{1}{2} \frac{\sin 2 x}{2}\right)+c$
$=-\frac{x}{4} \cos 2 x+\frac{1}{8} \sin 2 x+c$