# Integration by parts twice

1. Dec 7, 2012

### alex282

∫ e^at. sinωt dt

This is the second part of an electrical circuit DE problem from our notes (first part not required to solve the above integral) however in-between this integral and the answer our professor only told us that we would get to the answer by using integration by parts twice. I am curious to understand this missed step and have tried integration by parts twice but can't seem to get the same answer as our professor gave us which should work out as:

e^at (asinωt - ωcosωt) / (ω^2 + a^2)

I would really appreciate it if someone could help me here.. I basically tried integrating by parts twice and taking the original negative integral from the second integration by parts to the LHS and then using that to half the RHS and ended up with e^at(sintωt - cosωt)/2, which is different to our lecturers result.

Thanks to anyone for their time!

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

### micromass

Staff Emeritus
Could you show us step-by-step what you did??

3. Dec 7, 2012

### alex282

∫ e^at. sinωt dt

u = e^at, u' = ae^at

v' = sinωt, v = -cosωt

∫ uv' = uv - ∫ u'v

-e^at cosωt - ∫ - ae^at cosωt

-e^at cosωt + ∫ ae^at cosωt

now the second integration by parts,

a = ae^at; a' = a^2 e^at;
b' = cosωt; b = sinωt;

ab - ∫ a'b

ae^at sinωt - ∫ a^2 e^at sinωt

divide everything by a^2

e^at sinωt/a - ∫ e^at sinωt

let original integral = y now - ∫ e^at sinωt = -y

take that to RHS, 2y = e^at sinωt/a

y = e^atsinωt/2a

There is my solution, I can't find where I went wrong so please feel free to point out where I screwed up or if anyone can find the solution and post it I should be able to work it out from there

Last edited: Dec 7, 2012
4. Dec 7, 2012

### alex282

Forgot to quote

5. Dec 7, 2012

### micromass

Staff Emeritus
It seems to me that you're forgetting a factor $\omega$ here.
If $v=-\cos\omega t$, then $v^\prime= \omega \sin\omega t$, no??

6. Dec 7, 2012

### alex282

Ahh I get it now. Thanks for pointing that out I should be okay from here (hopefully)

7. Dec 7, 2012

### ross1219

∫eat sinωt dt

u=sinωt du=ωcosωt dt
v=∫eat dt = 1/a eat

∫eat sinωt dt = 1/a eat sinωt - ∫1/a eat ωcosωt dt

∫eat sinωt dt = 1/a eat sinωt - ω/a ∫eat cosωt dt

u=cosωt du= -ωsinωt dt
v=∫eat dt = 1/a eat

∫eat sinωt dt = 1/a eat sinωt - ω/a[ 1/a eat cosωt - ∫-ω/a eat sinωt dt ]

∫eat sinωt dt = 1/a eat sinωt - ω/a[ 1/a eat cosωt + ω/a∫eat sinωt dt ]

∫eat sinωt dt = 1/a eat sinωt - ω/a2 eat cosωt - ω2/a2 ∫eat sinωt dt

∫eat sinωt dt + ω2/a2 ∫eat sinωt dt = 1/a eat sinωt - ω/a2 eat cosωt

a2∫eat sinωt dt + ω2∫eat sinωt dt = aeat sinωt - ωeat cosωt

2 + a2)∫eat sinωt dt = eat(asinωt - ωcosωt)

=> ∫eat sinωt dt = eat(asinωt - ωcosωt) / (ω2 + a2) + C

Ross :)

8. Dec 7, 2012

### Dick

Yes, that's just great!

9. Dec 9, 2012

### alex282

Thanks for your solution, I couldn't manage to see where the omega squared came from until I read yours

10. Dec 9, 2012

### ross1219

Great! Glad to help. That was fun. :)