Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Finding general solution to a second order forced diff eq

  1. Oct 1, 2011 #1
    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


    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. jcsd
  3. Oct 1, 2011 #2
    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.
  4. Oct 1, 2011 #3


    User Avatar
    Homework Helper

    Is the first '=' a minus?

  5. Oct 1, 2011 #4
    Hi ehild,

    My typing mistake, it should read:

    x'' + 2x' + x = 3cost2t + sin2t
  6. Oct 1, 2011 #5


    User Avatar
    Homework Helper

    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.

  7. Oct 2, 2011 #6

    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
  8. Oct 2, 2011 #7


    User Avatar
    Staff Emeritus
    Science Advisor
    Homework Helper

    In the solution to your characteristic equation, the signs of all the terms are positive, so m cannot equal -1.
  9. Oct 2, 2011 #8


    User Avatar
    Homework Helper

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

  10. Oct 2, 2011 #9

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

  11. Oct 2, 2011 #10


    User Avatar
    Science Advisor

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

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

    Now, look for a particular solution of the form x= Acos(2t)+ B sin(2t). (NOT "[itex]\beta t[/itex]"- 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.
  12. Oct 2, 2011 #11


    User Avatar
    Homework Helper

    I can not imagine what you did and why.

    Try the particular solution in the form


    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.

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

    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.
  14. Oct 2, 2011 #13


    User Avatar
    Homework Helper

    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.

Share this great discussion with others via Reddit, Google+, Twitter, or Facebook