Help with integration involving e^kx, sin(nx) and cos(nx)

macca878787

New member
Joined
May 17, 2009
Messages
5
Hello,

I was wondering if anybody could help me with the following integration problem

e^kx(sin(nx)+cos(nx))

i know how to do it if it is just e^x(sinx+cosx) but i can't get this to work this time.
Any help is very much appreciated,

Thanks, Macca
 
It is the same principle of using integration by parts. What specifically is causing the trouble?
 
Is that k a typo?. Should that be an n?. Just checking.
 
Hello, I don't think it's a typo, unless i copied the question down wrong, but i don't think so.

Well, to work out the integral of e^x(cosx+sinx) i start with

Int(e^x cosx)dx = e^x sinx - Int(e^x sinx )dx + const (integration by parts)

then by re-arranging you get Int( e^x(cosx+sinx)) = e^x sinx + const.

But, when k is infront of the x in the e^x and there is a n in the sin and cos i can't get the same method to work. When i try to re-arrange it it doesn't work out?

Cheers, Macca
 
Break it up and try \(\displaystyle \int e^{kx}cos(nx)dx\)

Remember, n and k are constants so you can treat them as such.

Using parts, let \(\displaystyle u=cos(nx), \;\ dv=e^{kx}dx, \;\ v=\frac{1}{k}e^{kx}, \;\ du=-nsin(nx)dx\)

Put it all together. You will have to do parts again. Then, you should have the original integral on the right side as well. Add it to both sides.

This is a common oversight when doing parts involving e and trig functions. They go in a circle and you end up back where you started.

Don't fret. You can do what I mentioned by just adding it to both sides and then dividing by the constant.
 
\(\displaystyle e^{kx}(sin(nx)+cos(nx))dx\)

\(\displaystyle u=sin(nx)+cos(nx) \Rightarrow du= n(cos(nx)-sin(nx))dx\)
\(\displaystyle dv = e^{kx}dx \Rightarrow v = \frac{1}{k}e^{kx}\).

We have:

\(\displaystyle \int e^{kx}(sin(nx)+cos(nx))dx = (sin(nx)+cos(nx))\frac{1}{k}e^{kx} - \frac{n}{k}\int e^{kx}(cos(nx)-sin(nx))dx\) *

Do it again:

\(\displaystyle \int e^{kx}(cos(nx)-sin(nx))dx\)

\(\displaystyle u = sin(nx)-cos(nx) \Rightarrow du = n(sin(nx)+cos(nx))dx\)
\(\displaystyle dv = e^{kx} \Rightarrow \frac{1}{k}e^{kx}\)

So we get

\(\displaystyle \int e^{kx}(cos(nx)-sin(nx))dx = (sin(nx)-cos(nx))\frac{1}{k}e^{kx} - \frac{n}{k}\int e^{kx}(sin(nx)+cos(nx))dx\)

Plugging into our original (*): \
\(\displaystyle \int e^{kx}(sin(nx)+cos(nx))dx =\)
\(\displaystyle (sin(nx)+cos(nx))\frac{1}{k}e^{kx} - \frac{n}{k}[(sin(nx)-cos(nx))\frac{1}{k}e^{kx} - \frac{n}{k}\int e^{kx}(sin(nx)+cos(nx))dx]\)

Distribute all the factors now and bring the final integral over to the LHS to get a multiple of the original integral, the divide by the coefficient of the integral.

(I saw that you had already posted a reply galactus, but since I was almost finished with the post ad we took two different roots I decided to post it.)
 
Thanks for the reply,

I tried what you recommended and that seemed to work out for me, thankfully. Thanks again for your help,

Cheers, Grant,
 
Thanks Daon,

after comparing the answer i got from the previous method to your answer i'm pretty sure i now have the correct answer, thanks again everyone for all your help,

Cheers Macca.
 
macca878787 said:
Thanks Daon,

after comparing the answer i got from the previous method to your answer i'm pretty sure i now have the correct answer, thanks again everyone for all your help,

Cheers Macca.

If you're comfortable with complex numbers, you could write

\(\displaystyle \sin nx + \cos nx = \left(\frac{1}{2}+\frac{1}{2i}\right)e^{inx}+\left(\frac{1}{2}-\frac{1}{2i}\right)e^{inx}\)

Then \(\displaystyle e^(k\pm in)x\) is easy to integrate.... but only if you're comfortable with complex numbers.
 
\(\displaystyle Practicing \ my \ Latex. \ the \ correct \ answer \ is:\)

\(\displaystyle \int e^{kx}[sin(nx)+cos(nx)]dx = \frac{e^{kx}}{k^{2}+n^{2}}[(k+n)sin(nx)+(k-n)cos(nx)]+C\)
 
\(\displaystyle \mbox{DrMike, using Euler's Formula, one gets}\)

\(\displaystyle e^{[i(nx)]}\, =\, \cos (nx)\, +\,i\sin (nx),\)

\(\displaystyle \mbox{ not } \cos(nx)\, +\,sin(nx).\)
 
Glenn, if you want to make your font look nicer, wrap the text in [text]

Just a suggestion if you want to practice LaTex.
 
Top