# Find $\int e^{-x}\cos x\,dx$ without using complex numbers

$\int e^{-x} \cos{x} dx$ - i know how to solve with Euler complex representation, but can't figure out how to solve with integration by parts or something.

-

Use

$$\int dx \: e^{-x} \cos{x} = -\int d(e^{-x}) \cos{x} = -[e^{-x} \cos{x}] - \int dx \: e^{-x} \sin{x}$$

Apply this once more to the integral on the right and solve for the original integral.

$$\int e^{-x} \sin{x} = -\int d(e^{-x}) \sin{x} = -[e^{-x} \sin{x}] + \int dx \: e^{-x} \cos{x}$$

Therefore

$$\int dx \: e^{-x} \cos{x} = e^{-x} [\sin{x} - \cos{x}] - \int dx \: e^{-x} \cos{x}$$

or

$$2 \int dx \: e^{-x} \cos{x} = e^{-x} [\sin{x} - \cos{x}]$$

-
thanks, now i clearly see it – Yola Feb 19 '13 at 11:52

Hint: integrate by parts twice, differentiating the trig term each time and look hard at the integral you're left with.

-
It also works if you differentiate the exponential term each time. – Gerry Myerson Feb 19 '13 at 11:49
@GerryMyerson Yes, the important thing is that you differentiate the thing of "the same form" each time. – Tom Oldfield Feb 19 '13 at 11:52

Solution:

1. Take the integral as $$\int\frac{\cos x}{e^x}dx$$
2. Use the formula $$\int e^{\alpha x}\cos(\beta x)dx=\frac{e^{\alpha x}(\alpha \cos(\beta x)+\beta \sin(\beta x)}{\alpha^2+\beta ^2}$$
3. Here, $\alpha=-1$ and $\beta=1$. Therefore, your intergral now becomes $$\frac{e^{-1x}(-1\cos(1x)+(1)\sin(1x))}{-1^2 + 1^2}$$
4. Your answer: $$\int e^{-x} \cos{x} dx=\frac{\sin x-\cos x}{2e^x}$$

EDIT: To prove step 2, refer this answer.

It says:

In general, if you want to find

$$\int e^{ax}\cdot \sin{bx}\cdot dx$$

you can argue as follows:

Note that for any $\alpha$ or $\beta$, you have \eqalign{ & \frac{d}{{dx}}\left( {{e^{\alpha x}}\sin \beta x} \right) = \alpha {e^{\alpha x}}\sin \beta x + \beta {e^{\alpha x}}\cos \beta x \cr & \frac{d}{{dx}}\left( {{e^{\alpha x}}\cos \beta x} \right) = \alpha {e^{\alpha x}}\cos \beta x - \beta {e^{\alpha x}}\sin \beta x \cr}

so that any integral of the form $$\int e^{\alpha x}\cdot \sin{\beta x}\cdot dx$$

is a linear combination of the former functions. Let's then find c1 and c2 such that $$\frac{d}{{dx}}\left( {{c_1}{e^{\alpha x}}\sin \beta x + {c_2}{e^{\alpha x}}\cos \beta x} \right) = {e^{\alpha x}}\sin \beta x$$ This means we need \eqalign{ & {c_1}\alpha - {c_2}\beta = 1 \cr & {c_1}\beta + {c_2}\alpha = 0 \cr} This will yield with little work \eqalign{ & {c_1} = \frac{\alpha }{{{\alpha ^2} + {\beta ^2}}} \cr & {c_2} = - \frac{\beta }{{{\alpha ^2} + {\beta ^2}}} \cr} which means that, in general: $$\int {{e^{\alpha x}}} \cdot\sin \beta x\cdot dx = {e^{\alpha x}}\frac{{\alpha \sin \beta x - \beta \cos \beta x}}{{{\alpha ^2} + {\beta ^2}}} + C$$ Analogously, you will get that $$\int {{e^{\alpha x}}} \cdot\cos \beta x\cdot dx = {e^{\alpha x}}\frac{{\alpha \cos \beta x + \beta \sin \beta x}}{{{\alpha ^2} + {\beta ^2}}} + C$$

-
Ok, but you need to show that the formula you used on step 2 is true. – Marra Feb 19 '13 at 12:41
I think this answer here can help you prove that math.stackexchange.com/a/138269/61588 – Ayush Khemka Feb 19 '13 at 12:46
I think you should edit your answer to include that; it would be more complete. – Marra Feb 19 '13 at 12:56
edited it, thanks for the reply! – Ayush Khemka Feb 19 '13 at 13:11
Keep up with the good work! :) – Marra Feb 19 '13 at 13:18

So, you are in a differential equations course? Then: How about solving the differential equation $y' = e^{-x}\cos x$ using the method of undetermined coefficients, explained in that course?

-
i'm not sure how to find particular solution here( – Yola Feb 19 '13 at 15:25
The method of "undetermined coefficients" should come with a little table that shows what form goes with this RHS. The answer that you look up is: $Ae^{-x}\cos x+Be^{-x}\sin x$, then plug in to find the coeficients $A,B$. – GEdgar Feb 19 '13 at 16:32

This is not a differential equation, but an integral. You don't solve integrals, you compute them.

You can call the integral "I" integrate by parts once or twice and get an expression of the kind $I=f(x)+g(x)I$. Then $2I=\frac fg(x)$

-
yes thanks, i just have met it in Diff eq. course. Sorry – Yola Feb 19 '13 at 11:53