Question:
Evaluate the following integrals:
$\int e^{x}(\cos x-\sin x) d x$
Solution:
Let $\mathrm{I}=\int \mathrm{e}^{\mathrm{x}}(\cos \mathrm{x}-\sin \mathrm{x}) \mathrm{dx}$
Using integration by parts,
$=\int e^{x} \cos x d x-\int e^{x} \sin x d x$
We know that, $\frac{\mathrm{d}}{\mathrm{dx}} \cos \mathrm{x}=-\sin \mathrm{x}$
$=\cos x \int e^{x}-\int \frac{d}{d x} \cos x \int e^{x}-\int e^{x} \sin x d x$
$=e^{x} \cos x+\int e^{x} \sin x d x-\int e^{x} \sin x d x$
$=e^{x} \cos x+c$