1. Not finding help here? Sign up for a free 30min 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!

Solving second order unhomogonous equations

  1. Feb 3, 2008 #1
    1. The problem statement, all variables and given/known data
    solve y"+y=xsin(x) , initial conditions y(0)=0, y'(0)=1


    2. Relevant equations



    3. The attempt at a solution
    I know that when right hand side equals something like sin(x), then the particular integral is xc1sin(x)+xc2cos(x). I am unsure what the particular integral should be for above. can anyone help me. I have tried (x^2)c1sin(x)+(x^2)c2cos(x), but have not gotten a solution from it. Thanks
     
  2. jcsd
  3. Feb 3, 2008 #2

    Dick

    User Avatar
    Science Advisor
    Homework Helper

    You need a bigger family of trial functions. Try c1*x^2*sin(x)+c2*x^2*cos(x)+c3*x*sin(x)+c4*x*cos(x).
     
  4. Feb 3, 2008 #3
    instead of looking at that equation you could try to look at an equivalent equation
    [tex]L[y] = y'' + y = xe^{ix}[/tex], where [tex]i = \sqrt{-1}[/tex]. then since [tex] i [/tex] is a particular root of the characteristic equation, y has a solution of the form
    [tex] y = x^{2}A_{0}e^{ix} [/tex] from there it is easily shown that the complex part of the solution of [tex] y[/tex] is the solution of the original equation you proposed.

    You could also try the variation of parameters method but I often avoid it because of messy integration
     
    Last edited: Feb 3, 2008
  5. Feb 3, 2008 #4

    Dick

    User Avatar
    Science Advisor
    Homework Helper

    I really don't know what you are talking about, but neither the real nor the imaginary part of x^2*exp(ix) is a particular solution to y''+y=x*sin(x).
     
  6. Feb 3, 2008 #5
    whoops what i meant was a particular solution of the form:
    [tex] y = x(A_{0} + A_{1}x)e^{xi} [/tex] you have to derive the coefficients by evaluating [tex] L[y][/tex] and matching up the coefficients [tex] A_{0}, A_{1} [/tex] with the right hand side of the equation ( [tex] xe^{ix}[/tex] ) then you use the imaginary portion of this solution, this one was more tedious than I thought and I would recommend using the variation of parameters method.
     
  7. Feb 3, 2008 #6
    thanks. thats really helpful. is there anyway of knowing what the particular integral is for any unhomogenous second order differential equation, or is it just trial and error?
     
  8. Feb 3, 2008 #7
    ive just tried substituting the particular integral
    y(x)= c1(x^2)sin(x)+c2(x^2)cos(x)+xc3sin(x)+xc4cos(x) into y"+y=xsinx. I end up with
    2c1sin(x)+4xc1cos(x)+2c2cos(x)-4xc2sin(x)+2c3cos(x)-2c4sin(x)=xsin(x)

    This doesn't look solvable. Ive checked my differentiating a couple of times and it looks okay. Any suggestions where I may be going wrong?
     
    Last edited: Feb 3, 2008
  9. Feb 3, 2008 #8
    This would be a fine method: http://www.sosmath.com/diffeq/second/variation/variation.html

    essentially find two homogeneous solutions [tex] y_{1}, y_{2} [/tex] then using those you can find a solution to the differentiall equation of the form,

    [tex] \phi(x) = y_{1}u_{1} + y_{2}u_{2}[/tex]
    where
    [tex]u'_{1} = \frac{-sin(x)y_{2}}{W[y_{1}, y_{2}]}[/tex]
    [tex]u'_{2} = \frac{sin(x)y_{1}}{W[y_{1}, y_{2}]} [/tex]
    and
    [tex]W[y_{1}, y_{2}] = y_{1}'y_{2} - y_{1}y_{2}' [/tex]
     
    Last edited: Feb 3, 2008
  10. Feb 3, 2008 #9

    Dick

    User Avatar
    Science Advisor
    Homework Helper

    It is solvable. How about c1=c4=0 and c2=-1/4 and c3=1/4? You just have to try harder.
     
  11. Feb 4, 2008 #10
    oh yeah. i should have spent a bit more time on that. Thanks
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?