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 $\cos x = \frac{e^{ix} + e^{-ix}}{2}$ and you'll get the answer very quickly, which is: $\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.

$\int udv = uv - \int vdu$

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

$\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

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

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

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

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

I trust you can take it from there.