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!

Solving DE by undetermined Coefficients

  1. Mar 4, 2014 #1
    1. The problem statement, all variables and given/known data
    y'' + y = xsinx where y(0) = 0 and y'(0) = 1


    2. Relevant equations

    yc = C1sinx + C2cosx


    3. The attempt at a solution
    So my attempt includes the yc which undoubtedly is correct. I now try to solve yp

    yp = Axsinx + Bxcosx
    y''p = A(2cosx - xsinx) + B(-2sinx - xcosx)

    Substituting: y''p + yp = xsinx, clearly doesn't equal xsinx. There are no comparable values to xsinx to even try and solve for A or B.

    Attempting using a different algorithm: yp = (A + Ax)sinx + (B + Bx)cosx
    Notice overlap from yp to yc, therefore multiply by x: yp = (Ax +Ax^2)sinx + (Bx + Bx^2)cosx
    y''p = A(2cosx + 2sinx -xsinx +4xcosx -x^2sinx) + B(-2sinx + 2cosx - 4xsinx - x^2cosx)

    and y''p + yp = A(2cosx + 2sinx + 4xcosx + xsinx) + B(-2sinx + 2cosx - 4xsinx + xcosx)

    Arrgggh this is really troubling me. I honestly have no idea what I'm doing wrong or how to proceed with the Initial Value Problem afterwards.
    1. The problem statement, all variables and given/known data



    2. Relevant equations



    3. The attempt at a solution
     
  2. jcsd
  3. Mar 4, 2014 #2

    SammyS

    User Avatar
    Staff Emeritus
    Science Advisor
    Homework Helper
    Gold Member

    Try some general linear function times sin(x) & cos(x).

    ##\displaystyle y_p=(Ax+B)\sin(x)+(Cx+D)\cos(x) ##
     
  4. Mar 4, 2014 #3
    OH my, rookie mistake LOL. but still, i only get that y''p + yp = 2Acosx - 2Csinx. My logic is telling me to try out yp = (Ax^2 + Bx + C)sinx + (Dx^2 + Ex + F)cosx, based upon my classroom notes. I try this and get
    y''p + yp = 2Asinx + 2Dcosx + 2(2Ax+B)cosx -2(2Dx + E)sinx = xsinx

    now i understand that 2(2Ax+B)cosx -2(2Dx + E)sinx = xsinx and so 2(2Ax+B)cosx = 0 and -2(2Dx + E)sinx = xsinx
    as well as: 2Asinx + 2Dcosx = 0, but this seems like an unsolvable puzzle to me. I also believe i may be overthinking things A LOT so um yeah. What's going on here?
     
    Last edited: Mar 4, 2014
  5. Mar 5, 2014 #4
    Sorry but i edited my post and am not sure if you can see that from outside the thread so.... bump
     
  6. Mar 5, 2014 #5

    vela

    User Avatar
    Staff Emeritus
    Science Advisor
    Homework Helper
    Education Advisor

    Your initial guess at the particular solution would normally be ##y_p = (Ax+B)\sin x + (Cx+D)\cos x##; however, because this isn't linearly independent from the homogeneous solution, you need to multiply it by the lowest power of ##x## to make it independent.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted