1. ## integration

How do you integrate (e^x)*cos x dx?

2. Originally Posted by gwiggy

How do you integrate (e^x)*cos x dx?
a boring and over-used way is to use by parts twice! a much neater way is to use this fact that $\displaystyle \cos x = \frac{e^{ix} + e^{-ix}}{2}$ and you'll get the answer very quickly, which is: $\displaystyle \frac{e^x(\cos x + \sin x)}{2} + C.$

3. Edit: Excuse me for being boring. xp I'll have to remember to use that.

Integration by parts should work fine.

$\displaystyle \int udv = uv - \int vdu$

u = e^x ... du = e^x
dv = cosxdx ... v = sinx

$\displaystyle \int (e^x)cosxdx = (e^x)sinx - \int (e^x)sinxdx$

Doesn't look like it helps, does it? But, if we use integration by parts again for (e^x)sinxdx

$\displaystyle \int (e^x)cosxdx = (e^x)sinx - (-(e^x)cosx - \int -(e^x)cosxdx)$

$\displaystyle \int (e^x)cosxdx = (e^x)sinx + (e^x)cosx - \int (e^x)cosxdx$

Now some simple algebra, add $\displaystyle \int (e^x)cosxdx$ to both sides

$\displaystyle 2\int (e^x)cosxdx = (e^x)sinx + (e^x)cosx$

I trust you can take it from there.