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: Trying to get a start on a second order, non-homogeneous, linear DE

  1. May 25, 2012 #1
    ]1. The problem statement, all variables and given/known data

    Trying to get a good start on a second order, non-homogeneous, linear differential equation with constant coefficients. The differential equation is y”-4y’+4y=(1+x+x2+x3)e2x y(0)=1; y’(0)=0

    The constraints with this problem is that I cannot use Laplace transform to solve the problem. So, I am looking at all the ways I can solve this mess of a problem. I only know of two ways to ways to approach a second order, non-homogenous problem and that is by “undetermined coefficients” and “variation of parameters.”

    2. Relevant equations
    I only know of two ways to ways to approach a second order, non-homogenous problem and that is by “undetermined coefficients” and “variation of parameters.”

    3. The attempt at a solution
    Out of all the reading I have done, I only two methods on how to approach this problem, I am still running into a hard time getting it started. I am not even sure if using variation of parameters is the correct and most efficient method? But when I break it down using variation of parameters, I get: y”-4y’+4y → λ2-4λ+4=0 → λ=2 so yh(x)=Ce2x. Even if this is right, I don’t know what to do with the right side of the equation. When I look at the “undetermined coefficients” method I think I can divide both sides by e2x but then it gets kind of nasty from there. Am I even on the right track with either of these methods and if not can someone head me in the right directio? Remember: I cannot solve this equation by using the Laplace transform, it is part of the constraints to the problem.
  2. jcsd
  3. May 26, 2012 #2


    User Avatar
    Homework Helper

    There are two identical roots, so the solution of the homogeneous equation is Yh=C1e2x+C2xe2x.

    Try to find the particular solution in the form Yp=P(x)e2x, where P is a polynomial.

  4. May 26, 2012 #3


    User Avatar
    Science Advisor

    Normally, with "[itex](1+ x+ x^2+ x^3)e^{2x}[/itex]" on the right side, you would try "[itex](A+ Bx+ Cx^2+ Dx^3)e^{2x}[/itex]". However, here, because 2 is a double root of the characteristic equation so that [itex]e^{2x}[/itex] and [itex]xe^{2x}[/itex] are already solutions to the associated homogeneous equation, you should shift all exponents up 2 and so try [itex](Ax^2+ Bx^3+ Cx^4+ Dx^5)e^{2x}[/itex].

    I am a bit surprised at your reference to "Laplace transform". It is a much more complicated method than this and is usually taught long after this more basic method.
  5. May 26, 2012 #4
    Ok, thank you very much for that, it gave me a very helpful start. I have reworked the math and was able to understand the problem with what was given. I am currently at the point of solving y=yh+yp(x) and am confused as to what to do with the restraints of y(0)=1;y’(0)=0. I am putting yp back into the original equation of y”-4y’+4y=(x2+x3+x4+x5)e2x so that I can solve for A,B,C&D. This is kind of a mess because of y” and so many variables of (Ax2+Bx3+Cx4+Dx5)e2x it is getting rather messy but I will make due. I am just looking down the road for when I finally solve for y=yh+yp(x). I just don’t know where the restraints come into play. Do I use them for when Im solving y or do I use them for solving yp?
  6. May 26, 2012 #5
    my mistake wrong forum
  7. May 26, 2012 #6


    User Avatar
    Homework Helper

    The general solution contains two arbitrary constants. Fit those to the restrains.

  8. May 26, 2012 #7
    I solved for the general solution of y=yh+yp I found that y=C1e2x+C2xe2x+[itex]1/12[/itex]x4e2x+[itex]1/20[/itex]x5e2x. This does not look right but I have looked at my work and cant find a mistake with what I did. Does this appear to be correct or am I running down the wrong road?
  9. May 26, 2012 #8
    Your yh is correct, and those two terms you have for yp are correct but you still need two more terms for the particular solution.
  10. May 26, 2012 #9


    User Avatar
    Homework Helper

    This problem has got an easy way to find the particular solution. Assume it in form Yp=P(x)e2x. Then Yp' = (P'+2P)e2x, Yp" = (P"+4P'+4P)e2x. Substituting into the differential equation, and simplifying, you get P"=1+x+x2+x3. Integrate twice to get P(x).

  11. May 26, 2012 #10
    Ok, then I must have made a mistake somewhere. I double checked my work for the particular solution and found that what I have for the particular solution is correct. I got you reply about missing two other terms. When I solved for the particular solution I found A=0, B=0, C=1/12 and D=1/20. I presume the other function you are looking for are A and B. To be quite honest I’ve never worked a problem like this but would I put A & B into the particular function even if they are 0? Which would make the particular function:(0)x2e2x+(0)x3e2x+[itex]1/12[/itex]x4e2x+[itex]1/20[/itex]x5e2x. I was thinking on the lines that if A=0 then (0)x2e2x would simple equal 0.
  12. May 26, 2012 #11


    User Avatar
    Homework Helper

    A and B are not zero. You made some mistake. Try to use the method I suggested in #9 with P(x)=Ax2+Bx3+Cx4+Dx5.

    Last edited: May 27, 2012
  13. May 27, 2012 #12
    Your suggestion makes a lot more sense than what I was reading from other material. I want to make sure that I am tracking with what you are saying because when I solve for P” im not getting what you got. Im getting P”=20x3+12x2+6x+2 and P’=5x4+4x3+3x2+2x. All I have done is take the derivative of (Ax2+Bx3+Cx4+Dx55)e2x. Then I take these and put them back into the original equation of y”-4y’+4y=(x2+x3+x4+x5)e2x and from there solve for A, B, C, D. Am I on the right track or am I still not following.
  14. May 27, 2012 #13


    User Avatar
    Homework Helper

    I do not follow you. P(x) is a polynomial. Yp is a particular solution, in the form Yp=Pe2x. Yp'=(P'+2P)e2x,Yp" = (P"+4P'+4P)e2x. Substituting into the DE:
    [(P"+4P'+4P)-4(P'+2P)+4P]e2x=(1+x+x2+x3)e2x. Simplify the left-hand side and divide both sides with the exponential function.

    You can get P(x) by direct integration, or comparing the coefficients. The coefficient of xn must be the same on both sides.
    Do not forget the coefficients A, B, C, D from the derivatives of P.

  15. May 27, 2012 #14
    What I don’t understand is how are you getting P”=1+x+x2+x3. When I take the derivative of P=Ax2+Bx3+Cx4+Dx5 twice, I get P”= 2A+6Bx+12Cx2+20Dx3(different from your what you found P" to be). If I intergrate your P" twice like you said to find P(x) I get P(x)=Ax2/2+Bx3/6+Cx4/12+Dx5/20. (which makes me presume that A=1/2, B=1/6, C=1/12 & D=1/20). Also, when I intergrate the P" you showed once, I get P’=Ax+Bx2/2+Cx3/3+Dx4/4. Basically,for some reason I cannot replicate how you went from P(x) which I thought was P(x)=P=Ax2+Bx3+Cx4+Dx5 (right side of the original equation) and found P”=1+x+x2+x3?

    I realize that I am asking questions that you may think are elementary, but I truly want to understand the problem and what I’m doing wrong. I really appreciate your patience and time to respond with help on this question. Thank you very much
  16. May 27, 2012 #15


    User Avatar
    Homework Helper

    I see you are confused by the two methods.

    First forget about the actual form of P(x). We try to find a particular solution of the original equation


    in the form


    We take the first and second derivatives of Yp and substitute them for y' and y" into the original equation, and Yp for y. The left side becomes [(P"+4P'+4P)-4(P'+2P)+4P]e2x =[P"+4P'+4P-4P'+-8P+4P]e2x=P"e2x.

    The right hand side of the original equation is (1+x+x2+x3)e2x

    The left-hand side must be equal to the right-hand side:


    Which involves that P"=1+x+x2+x3. Integrating once:

    P'=x+x2/2+x3/3+x4/4. (You do not need to include any integration constant.)
    Integrating once more:


    That was the first method.
    The usual method is that with undetermined coefficients. We try a particular solution of form Yp=[Ax2+Bx3+Cx4+Dx5]e2x.
    We determine the first and second derivatives and substitute them and Yp into the original equation. But the complicated polynomial can be written as P(x) and the derivatives can be expressed in terms of P' and P" and P... After substitution and simplification, we find that the left-hand side of the equation is simply P"e2x.

    Now we write P in the original form: P=Ax2+Bx3+Cx4+Dx5.

    As you have derived,





    must be the same as the right-hand side of the original equation.

    So 2A+6Bx+12Cx2+20Dx3=1+x+x2+x^3

    Comparing the coefficients, A=1/2, B=1/6, C=1/12, D=1/20.

    Last edited: May 27, 2012
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook