1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Homework Help: Solving second order non homogeneous differential equation

  1. Apr 22, 2012 #1
    1. The problem statement, all variables and given/known data

    The problem is to solve:

    [itex]y''-2y'+5y = e^{x}(cos^{2}(x)+x^{2})[/itex]

    2. Relevant equations

    3. The attempt at a solution

    I (think I) have solved the associated homogeneous equation:

    [itex]y''-2y'+5y = 0[/itex]

    giving the solution as:

    [itex]y_{h} = e^{x}(C_{1}cos(2x)+C_{2}sin(2x))[/itex]
    (This could of course be rearranged using the trig identities.... would that help?)

    And now I don't know how to go about finding a particular solution, could somebody please point me in the right direction as to which method I could use?
    Thanks a lot!
  2. jcsd
  3. Apr 22, 2012 #2


    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    I would suggest the method of finding a particular solution with the method of Undetermined Coefficients, more formally known as the method of annihilators. Have you studied that?
  4. Apr 22, 2012 #3
    Yes I have studied this method (a little) however I am struggling to choose the right form for the particular solution:

    Should [itex]y_{p} = Asin(2x)+Bcos(2x)+e^{x}(C+Dx+Ex^{2})[/itex] work?
  5. Apr 22, 2012 #4


    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    That ##\cos^2x## on the right side of your DE is ##\frac{1+\cos(2x)} 2## so you basically have a term ##e^x(\frac{1+\cos(2x)} 2)## in the NH term. So there's no reason to expect ##\sin(2x)## and ##\cos(2x)## to work. You would want to multiply them by ##e^x##. But that is in the complementary solution. So how do you fix that?
  6. Apr 22, 2012 #5
    would simply multiplying by [itex]x[/itex] solve this?
    [itex]y_{p} = e^{x}(Axsin(2x)+Bxcos(2x)+C+Dx+Ex^{2})[/itex]
  7. Apr 22, 2012 #6


    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    Well, that's the standard fix for that situation. I think that is a good trial for the particular solution. Only way to be sure you haven't overlooked something is to go ahead and try it
  8. Apr 22, 2012 #7


    User Avatar
    Gold Member

    How about the method of inverted operator techniques? (which i personally find easier). Although some people use the Wronskian method, i think.

    The D operator is simply [itex]\frac{d}{dx}[/itex].
    Expressing first, the L.H.S. in terms of D: [itex]L(D)=D^2-2D+5[/itex], where L(D) is a function of D.
    So, [tex]y_p=\frac{1}{L(D)}(e^xcos^{2}(x)+e^xx^{2})
    Here, [itex]y_p=y_1+y_2[/itex],
    Now, you have to use the Shift theorem to evaluate both [itex]y_1[/itex] and [itex]y_2[/itex].
    The Shift theorem simply shifts D to (D+a) and simultaneously separates [itex]e^x[/itex] from [itex](cos^2x+x^2)[/itex].

    To find [itex]y_1[/itex]:
    Applying the Shift theorem:
    \\=e^x\frac{1}{(D^2+5)}(\frac{1}{2}+\frac{1}{2} \cos 2x)
    \\=e^x\frac{1}{(D^2+5)}(\frac{1}{2})+e^x\frac{1}{(D^2+5)}(\frac{1}{2} \cos 2x)
    \\=e^x(\frac{1}{10})+e^x(\frac{1}{2} \cos 2x)
    \\=e^x(\frac{1}{10}+\frac{1}{2} \cos 2x)
    Now, find [itex]y_2[/itex]. Applying the Shift theorem again, you'll get:
    Therefore, [tex]y_p=e^x(\frac{1}{10}+\frac{1}{2} \cos 2x)+e^x(\frac{1}{5}x^2-\frac{2}{25})
    \\=\frac{1}{50}e^x+\frac{1}{5}e^xx^2+ \frac {1}{2} e^x \cos 2x[/tex]
    The final answer (the general solution) is: [itex]y_c+y_p[/itex] where [itex]y_c[/itex] is the complementary function that you've already obtained in your first post.
    Last edited: Apr 22, 2012
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook