Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

This question already has an answer here:

I know that integration by parts leads to an infinite loops of sin and cos so what do I do?

I can't do $u$ substitution because I can't get rid of all the variables.

$$\int e^{-x} \cos x \,\mathrm{d}x$$

share|improve this question

marked as duplicate by amWhy, Maisam Hedyelloo, Andrey Rekalo, Micah, Amzoti Jul 12 '13 at 20:58

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

    
Some MathJax advice: Named math operators should appear upright, and the common ones have their own code for this purpose (e.g. \sin, \log - see entry 11 in our MathJax guide). –  Zev Chonoles Jul 12 '13 at 20:29

5 Answers 5

up vote 2 down vote accepted

That's the entire point - you want to go through a loop once and use the "feedback" to get the answer.

Integrate by parts as follows:

$$\begin{align}\int dx \, e^{-x} \, \cos{x} &= -e^{-x} \cos{x} - \int dx \, e^{-x} \, \sin{x} \\ &=-e^{-x} \cos{x} + e^{-x} \sin{x} - \int dx \, e^{-x} \, \cos{x} \end{align}$$

Now do you see that you could go on forever...or you can just combine the like terms in the equation. (That is the feedback aspect.) When you do this, you find that

$$\int dx \, e^{-x} \, \cos{x} = \frac12 \left ( \sin{x} - \cos{x} \right ) + C$$

where $C$ is a constant of integration.

share|improve this answer

hint:$$\large{\int e^{-x} \cos x dx=\int e^{-x}\left(\frac{e^{ix}+e^{-ix}}{2} \right)}dx$$

share|improve this answer
1  
Note, though, that someone taking first-year calculus in a U.S. school is has probably never seen the exponential forms of sine and cosine and may well never have worked with complex numbers. –  Brian M. Scott Jul 12 '13 at 20:34
    
@Brian M. Scott: i don't have enough information about education system of u.s school maybe its better integrate by part –  Maisam Hedyelloo Jul 12 '13 at 20:40
    
@BrianM.Scott What better reason to investigate ... I don't know the US, but when I first engaged with this (penultimate year of high school UK some years ago) it excited me. The approach is worth knowing, if it opens such insight. –  Mark Bennet Jul 12 '13 at 20:42
    
I wasn’t criticizing the answer; I assumed that you probably didn’t know. My comment was to let you know and to reassure a typical U.S. student who might be reading this that it was all right to find this approach unfamiliar. –  Brian M. Scott Jul 12 '13 at 20:44
    
Yeah I definitely have no idea why that equality is true. –  Paul the Pirate Jul 12 '13 at 20:49

Integrate by parts twice, splitting the integral the same way both times, and solve for the integral.

Let $u=e^{-x}$ and $dv=\cos xdx$, so that $du=-e^{-x}dx$ and $v=\sin x$. Then

$$\int e^{-x}\cos xdx=e^{-x}\sin x+\int e^{-x}\sin x dx\;.$$

Now let $u=e^{-x}$ again, so that $dv=\sin x dx$; $du=-e^{-x}dx$, $v=-\cos x dx$, and

$$\int e^{-x}\cos xdx=e^{-x}\sin x-e^{-x}\cos x-\int e^{-x}\cos x dx\;.$$

Solve this equation for $\int e^{-x}\cos x dx$; don’t forget the constant of integration.

This is a standard trick that comes up quite often.

share|improve this answer
    
Ahh I forgot about this trick. –  Paul the Pirate Jul 12 '13 at 20:32

If you can manage to guess or remember that $e^{-x}\cos x$ has an indefinite integral of the form $e^{-x}(A\cos x+B\sin x)$ where $A$ and $B$ are constants, then by differentiating and solving a system of linear equations you can figure out that $A=-\frac1 2,\;B=\frac1 2$. This is called the Method of Undetermined Coefficients.

share|improve this answer

Since $\cos x=\mathrm{Re} (e^{ix})$ then $$\int e^{-x}\cos x dx=\mathrm{Re}\int e^{(i-1)x}dx=\mathrm{Re}\frac{e^{(i-1)x}}{i-1}+C$$

the rest is a simple calculation I leave it for you.

share|improve this answer

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