How do I find the integral int(cos(x)/e^x)dx ?

Sep 21, 2014

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

Let us look at some details.

Let

$I = \int \frac{\cos x}{{e}^{x}} \mathrm{dx}$

by rewritng $\frac{1}{e} ^ x$ as ${e}^{- x}$,

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

by Integration by Parts

Let $u = {e}^{- x}$ and $\mathrm{dv} = \cos x \mathrm{dx}$
$R i g h t a r r o w \mathrm{du} = - {e}^{- x} \mathrm{dx}$ and $v = \sin x$

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

by another Integration by Parts,

Let $u = {e}^{- x}$ and $\mathrm{dv} = \sin x \mathrm{dx}$
$R i g h t a r r o w \mathrm{du} = - {e}^{- x} \mathrm{dx}$ and $v = - \cos x$

$= {e}^{- x} \sin x - {e}^{- x} \cos x - I$

So, we have

$I = {e}^{- x} \left(\sin x - \cos x\right) - I$

by adding $I$,

$2 I = {e}^{- x} \left(\sin x - \cos x\right)$

by dividing by 2,

$I = \frac{{e}^{- x}}{2} \left(\sin x - \cos x\right) + C$