# Integration by parts not working for a particualr integral

1. Dec 6, 2012

### DocZaius

Integration by parts not working for a particular integral

When I attempt to use the method of integration by parts on the below integral, I don't get anywhere since I only arrive at the statement a = -b +b -a where a is the integral and b is the boundary term.

$\int e^{-x}\text{Cos}[k x]dx=-e^{-x}(-\text{Cos}[k x])-\left(-e^{-x}(-\text{Cos}[k x])-\int e^{-x}\text{Cos}[k x]dx\right)$

Do you know of another method I could use to evaluate this integral?

Thanks

Last edited: Dec 6, 2012
2. Dec 6, 2012

### DonAntonio

Re: Integration by parts not working

$$u=e^{-x}\Longrightarrow\,u'=-e^{-x}\;\;\;\;,\;\;\;v'=\cos kx\Longrightarrow v=\frac{1}{k}\sin kx\Longrightarrow$$

$$\int e^{-x}\cos kx\,dx=\frac{1}{k}e^{-x}\sin kx+\frac{1}{k}\int e^{-x}\sin kx\,dx$$

Once again by parts:

$$u=e^{-x}\Longrightarrow u'=-e^{-x}\;\;\;,\;\;v'=\sin kx\Longrightarrow v=-\frac{1}{k}\cos kx$$

so

$$\int e^{-x}\cos kx\,dx=\frac{1}{k}e^{-x}\sin kx-\frac{1}{k^2}e^{-x}\cos kx-\frac{1}{k^2}\int e^{-x}\cos kx\,dx\Longrightarrow$$

$$\left(1+\frac{1}{k^2}\right)\int e^{-x}\cos kx\,dx =\frac{e^{-x}}{k^2}\left(k\sin kx-\cos kx\right)$$

...and etc.

DonAntonio

3. Dec 6, 2012

### dextercioby

A nifty trick would be to write $\cos k x = \mathfrak{Re}\left(e^{ikx}\right)$.

4. Dec 6, 2012

### pasmith

Re: Integration by parts not working

I have to question the value for the OP of having his problem solved completely. It would have been better just to point out that if he integrates $e^{-x}\cos(kx)$ by parts he should get
$$\int e^{-x}\cos kx\,\mathrm{d}x=\frac{1}{k}e^{-x}\sin kx+\frac{1}{k}\int e^{-x}\sin kx\,\mathrm{d}x$$
and let him try to integrate $e^{-x}\sin(kx)$ himself, since he clearly needs the practice.

5. Dec 6, 2012

### DocZaius

Re: Integration by parts not working

Yeah, I picked the wrong parts of my integral as my u and dv. Definitely redoing it all myself so don't worry, I'm getting that practice :)

6. Dec 6, 2012

### DonAntonio

Re: Integration by parts not working

The OP specifically stated that he tried integrating by parts and, obviously, he got that wrong. Showing the way

to him, even if it is a huge portion of the complete solution, is imo more helping than merely saying to do something

DonAntonio

7. Dec 6, 2012

### Staff: Mentor

Re: Integration by parts not working

I disagree. IMO you learn better by trying a few things that fail and then something that succeeds, than you do when someone shows you.

What's more, this is the philosophy of this forum, as exemplified in its rules, which you agreed to abide by when you joined.