# Homework Help: Finding general solution to a second order forced diff eq

1. Oct 1, 2011

### ollyfinn

I am trying to solve the following problem and am a bit lost so any advice would be welcomed.

x'' = 2x' + x = 3cos2t + sin2t

My understanding is that I need to find the general solution for the unforced equation and a particular solution of the above equation. When these are added together then I will get my final solution.

Using the charateristic equation:

m^2 + 2m + 1 = 0

And then the quadratic equation will give me:

m = -1

This gives a general solution of:

x(t) = Ae^m0t + Bte^m0t

so

Ae^-1t + Bte^-1t + particular solution = final answer

Is a particular solution

x(t) = p cos βt + q sin βt....???

Not really sure where to go from here.

2. Oct 1, 2011

### ollyfinn

I have been looking at this problem again and have come to a solution of:

x(t) = Ae^-1t + Bte^-1t + 3/4t sin 2t - 1/4t cos 2t

If anybody thinks this is correct then let me know. Thanks.

3. Oct 1, 2011

### ehild

Is the first '=' a minus?

ehild

4. Oct 1, 2011

### ollyfinn

Hi ehild,

My typing mistake, it should read:

x'' + 2x' + x = 3cost2t + sin2t

5. Oct 1, 2011

### ehild

Your method is correct, but there must be some mistake in the derivation of the particular solution, the coefficients are wrong. Check your calculation or show it in detail.

ehild

6. Oct 2, 2011

### ollyfinn

ehild

This was the method used to get the solution I came to:

Find the general solution of

x'' + 2x' + x = 3cos2t + sin2t

Corresponding unforced

x'' + 2x' + x = 0

Using the characteristic equation

m^2 + 2m + 1 = 0

m = -1

So the corresponding equation will be

xc(t) = Ae^m0T + Bte^m0t

Xc(t) = Ae^-1t + Bte^-1t

For the particular solution

xp(t) = p cos β(t) + q sin β(t)

For 3cos2t

x(t) = p/(2β) t sin βt

x(t) = 3/4 t sin 2t

For sin 2t

x(t) = -q/(2β) t cos βt

x(t) = -1/4 t cos 2t

So particular solution is

3/4 t sin 2t - 1/4 t cos 2t

Gen sol = corr sol + part sol

Gen sol = Ae^-1t + Bte^-1t + 3/4 t sin 2t - 1/4 t cos 2t

7. Oct 2, 2011

### SteamKing

Staff Emeritus
In the solution to your characteristic equation, the signs of all the terms are positive, so m cannot equal -1.

8. Oct 2, 2011

### ehild

??? The characteristic equation is m2+2m+1=0, that is, (m+1)2=0, m=-1.

ehild

9. Oct 2, 2011

### ollyfinn

ehild,

Can you see where I may have gone wrong in my method then?

Cheers

10. Oct 2, 2011

### HallsofIvy

No, coefficents of all terms positive means there cannot be any positive roots. Certainly $(-1)^2+ 2(-1)+ 1= 0$.

The fact that -1 is a double root means that the general solution to the associated homogeneous equation is $Ce^{-t}+ Dte^{-t}$.

Now, look for a particular solution of the form x= Acos(2t)+ B sin(2t). (NOT "$\beta t$"- the coefficient of t in both trig functions is "2", use that.)

(If, for example, the right side had been "2cos(2t)+ sin(3t)", you would have needed to try "x(t)= Acos(2t)+ Bsin(2t)+ Ccos(3t)+ Dsin(3t)".

Then x'= -2Asin(2t)+ 2Bcos(2t), and x''= -4Acos(2t)- 4Bsin(2t)

x''+ 2x'+ x= -4Acos(2t)- 4Bsin(2t)- 4Asin(2t)+ 4Bcos(2t)+ Acos(2t)+ Bsin(2t)
= (-4A+ 4B+ A)cos(2t)+ (-4B- 4A+ B)sin(2t)= 3kcos(2t)+ sin(2t)
so -4A+4B+ A= 3, -4B- 4A+ B= 1.

11. Oct 2, 2011

### ehild

I can not imagine what you did and why.

Try the particular solution in the form

xp=pcos(2t)+qsin(2t).

You need to determine x' and x'', substitute back into the original equation, collecting terms with cos(2t) and sin(2t) and equal them with the corresponding terms in the right-hand side.

And you can always check your solution by plugging back.

I just have noticed that HallsofIvy have done most of the work for you.

ehild

Last edited: Oct 2, 2011
12. Oct 2, 2011

### ollyfinn

Thanks for your help.

Am I correct in thinking that values for A and B should be solved using simultaneous equations? Then they will form part of particular solution part of the final answer?

Sorry if I am just not getting it. I think I may be well out of my depth at this level of study and I just cant get my head around the lessons I am reading through in my textbook. I really appreciate the assistance.

13. Oct 2, 2011

### ehild

The particular solution must be solution of the original equation. Yours is not. Plug back x=3/4 t sin 2t - 1/4 t cos 2t and you will see.

A and B are constants, which are determined by the initial conditions.

There are two methods to find a particular solution of the inhomogeneous equation if you know the solution of the homogeneous one. One is the Method of Undetermined Coefficients, see http://www.google.com/url?sa=t&sour...sfjgAQ&usg=AFQjCNFr4f3yx1-J3B3PGXB7Ib-eTke0vQ, for example.
The other method is Variation of Parameters. http://en.wikipedia.org/wiki/Variation_of_parameters. In this case you consider A and B as functions of the independent variable, and find a particular solution in the form Xp=A(t)Xh1+B(t)Xh2.

ehild