Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

share|cite|improve this question
up vote 4 down vote accepted


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


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


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

share|cite|improve this answer
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.

share|cite|improve this answer
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


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

share|cite|improve this answer
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 – 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?

share|cite|improve this answer
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)$

share|cite|improve this answer
yes thanks, i just have met it in Diff eq. course. Sorry – Yola Feb 19 '13 at 11:53

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.