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: Non-homogenous differential equation

  1. Jun 27, 2010 #1
    Hi,

    My memory ran away, i completely forgot how to do this =/

    I need to solve
    [tex]y'' + 4y = tsint,~~y(0) = 0,~y'(0) = 1[/tex]

    with the general solution [tex]C_1sin(2t) + C_2cos(2t)[/tex]

    [tex]y = Atsin(t) +Btcos(t)[/tex]

    [tex]y' = Asin(t) + Atcos(t) +Bcos(t) -Btcos(t)[/tex]

    [tex]y'' = Acos(t) + Acos(t) -Atsin(t) - Bsin(t) -Bsin(t) -Btsin(t)[/tex]

    substitute back into the first equation:

    [tex]2Acos(t) - 2Bsin(t) + 3Atsin(t) + 3Btcos(t)[/tex]

    So if i let A be [tex]1/3[/tex] i get [tex]2/3cos(t) + tsin(t)[/tex]

    How did you determine the [tex]C_1[/tex] and [tex]C_2[/tex] constants ?
     
  2. jcsd
  3. Jun 27, 2010 #2

    Mark44

    Staff: Mentor

    Your particular solution needs two more terms:
    yp = Asin(t) + Bcos(t) + Ctsin(t) + Dtcos(t)
    From the initial conditions.
     
  4. Jun 27, 2010 #3
    ARGH!

    I struggled with this all day trying to figure out what i did wrong..
     
  5. Jun 27, 2010 #4
    Right

    [tex]y = ASin(t) + BCos(t) +CtSin(t) + DtCos(t)[/tex]

    [tex]y' = ACos(t) - BSin(t) + CSin(t) + CtCos(t) + DCos(t) -DtSin(t)[/tex]

    [tex] y'' = -ASin(t) -BCos(t) + CCos(t) +CCos(t) -CtSin(t) - DSin(t) - DSin(t) -DtCos(t)[/tex]


    [tex] = -ASin(t) - BCos(t) +2CCos(t) -2DSin(t) -CtSin(t) -DtCos(t)[/tex]


    Adding 4y gives me:

    [tex] 3ASin(t) + 3BCos(t) - 2DSin(t) + 2CCos(t) + 3CtSin(t) + 3DtCos(t) [/tex]

    So [tex]C = 1/3[/tex]
    and [tex] B = -2/9[/tex]

    But this does not satisfy y(0) = 0
     
  6. Jun 27, 2010 #5

    Mark44

    Staff: Mentor

    This is your particular solution. The general solution is the solution to the homogeneous problem (you miscalled it the general solution) plus the particular solution. Use the general solution and the initial conditions to find C1 and C2.
     
  7. Jun 27, 2010 #6
    James889:

    If you have problem finding the particular solution using Undetermined Coefficients method,
    you can always try using the inginiuos Variation of Parameters by Lagrange ;)

    y1(x), y2(x) : are two linearly independent homogeneous solutions.
    g(x) : the particular expression, in your case = x*sin(x).

    u'1(x)*y1(x) + u'2(x)*y2(x) = 0
    u'1'(x)*y'1(x) + u'2(x)*y'2(x) = g(x)

    solve the system of equations and find u1(x) and u2(x) by integration.
    the particular part of the answer will be:

    Y(x) = u1(x)*y1(x) + u2(x)*y2(x).

    the complete answer for the ODE (A,B are constants):

    y(x) = [A*y1(x)] + [B*y1(x)] + [u1(x)*y1(x) + u2(x)*y2(x)].

    *Lagrange was a genius !
     
  8. Jun 29, 2010 #7

    Hm,
    So if i put
    [tex] y =\frac{t}{3}sin~t - \frac{2}{9}cos~t + C_1sin(2t) + C_2cos(2t)[/tex]


    for the condition y(0) = 0 [tex]C_2 = \frac{2}{9}[/tex]

    then i have
    [tex] y' = \frac{t}{3}cos~t + \frac{2}{9}sin~t + 2C_1cos(2t) -2C_2sin(2t)[/tex]

    and for
    [tex]y'(0) = 1[/tex]

    [tex]\frac{1}{3} + 2C_1 = 1, \rightarrow C_1 = \frac{2}{6}[/tex]

    Is this correct?
     
  9. Jun 29, 2010 #8

    Mark44

    Staff: Mentor

    Check it for yourself. You have y = (1/3) tsin(t) - (2/9) cos(t) + (1/3) sin(2t) + (2/9) cos(2t).

    This is the solution if
    1) it satisfies the initial conditions y(0) = 0 and y'(0) = 1, and
    2) it satisfies the diff. equation y'' + 4y = tsin(t).
     
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook