# Help with ODE using an integrating factor

1. Feb 11, 2012

### hurcw

Hi all,

I am doing some Laplace Transforms as part of my HND, i have got an answer for this question
q' +2q = 5sint q(0)=0, t(0)=0

But i need to prove it by means of using an integrating factor method.
e^-2t +2sint-cost does this look right?
I also have worked out my Integrating factor to be e^2x but not sure where to go from there.

2. Feb 11, 2012

### Jorriss

Do you recognize it's a first order linear diff. eq?

3. Feb 11, 2012

### alan2

Your answer is correct. Your integrating factor is correct. Now remember what an integrating factor is. It is a function which, when multiplied by the original equation, makes the equation separable. Review this theory, it is very straightforward. Multiply your equation by the integrating factor. The left side becomes the derivative of q times the integrating factor and thus integrates trivially. The right side becomes the integral of the exponential times the non-homogeneous term sint. This can be done by parts twice (or looking in a table). The result, after applying your condition, is the same as your transform result.

4. Feb 11, 2012

### hurcw

alan2 thanks for the reply. are you saying my answer to the initial Laplace transform is correct?
Would you be abe to show me what you mean by using another example, i would like to try and work through my question myself and then get the answer possiby verified.

5. Feb 14, 2012

### hurcw

Any more help would be appreciated guys. Thanks

6. Feb 14, 2012

### alan2

Sorry, haven't been here in a couple of days. I assume you don't have an ode book on your shelf. I don't know how to use the advanced equation editor so here goes.
If the equation were separable it would be trivially solvable. So we seek an integrating factor which makes it solvable. Call the factor a. We multiply the equation by a and find a(dq/dt)+2aq=5asint. Now we require that the left side be of the form d(aq)/dt where a=a(t). Then the equation is separable, d(aq)=5asintdt, and we can integrate both sides. But, by the chain rule, d(aq)/dt=adq/dt+qda/dt. If this is to be equal to adq/dt+2aq (from above) then da/dt=2a. This equation for a is itself separable and a=e^2t as you found above. So now we have d(aq)=5asintdt where a is the known function of t which we found. Integrate both sides (the left side is trivially aq) and you find that q=(1/a) times the integral of 5asint. This integral is done by parts twice. Apply the boundary conditions and you have the result that you found above.

7. Feb 14, 2012

### hurcw

Thanks for the reply, can you explain what you mean by the integrate by parts twice?
I am failing to see how i will end up with the same as i did for my Laplace transform as i dont have a sin & a cos function.

8. Feb 15, 2012

### alan2

9. Feb 15, 2012

### hurcw

I have tried to use this example as a guide and just get lost in it all.
am i right in thinking this?:-
∫udv=uv-∫vdu
u=5sin(t)
dv= e(2t)
so:- du=-5cos(t)
v=e(-2t)
Therefore ∫udv=uv-∫vdu
=5e(-2t)sin(t)-∫e(-2t)-5cos(t)
Then i get stuck plus the 2 on the LHS is throwing me.