Question:
Evaluate the following integrals:
$\int x \cos x d x$
Solution:
Let $\mathrm{I}=\int \mathrm{x} \cos \mathrm{x} \mathrm{dx}$
We know that, $\int \mathrm{UV}=\mathrm{U} \int \mathrm{V} \mathrm{dv}-\int \frac{\mathrm{d}}{\mathrm{dx}} \mathrm{U} \int \mathrm{V} \mathrm{dv}$
Using integration by parts,
$I=x \int \cos x d x-\int \frac{d}{d x} x \int \cos x d x I=\int x \cos x d x$
We have, $\int \sin x=-\cos x, \int \cos x=\sin x$
$=x \times \sin x-\int \sin x d x$
$=x \sin x+\cos x+c$