# How do you evaluate the integral int e^xcosx?

Jan 18, 2017

$\int {e}^{x} \cos x \mathrm{dx} = {e}^{x} \left(\frac{\cos x + \sin x}{2}\right) + C$

#### Explanation:

We can integrate by parts using the differential:

$d \left({e}^{x}\right) = {e}^{x} \mathrm{dx}$

so that:

$\int {e}^{x} \cos x \mathrm{dx} = \int \cos x d \left({e}^{x}\right) = {e}^{x} \cos x - \int {e}^{x} d \left(\cos x\right) = {e}^{x} \cos x + \int {e}^{x} \sin x \mathrm{dx}$

We can solve this last integrate by parts again:

$\int {e}^{x} \sin x \mathrm{dx} = \int \sin x d \left({e}^{x}\right) = {e}^{x} \sin x - \int {e}^{x} d \left(\sin x\right) = {e}^{x} \sin x - \int {e}^{x} \cos x \mathrm{dx}$

so that we have:

$\int {e}^{x} \cos x \mathrm{dx} = {e}^{x} \cos x + {e}^{x} \sin x - \int {e}^{x} \cos x \mathrm{dx}$

Now the same integral is appearing at both members and we can solve for it:

$2 \int {e}^{x} \cos x \mathrm{dx} = {e}^{x} \cos x + {e}^{x} \sin x$

$\int {e}^{x} \cos x \mathrm{dx} = {e}^{x} \left(\frac{\cos x + \sin x}{2}\right) + C$