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: Second Order Differential Equations

  1. Apr 10, 2012 #1
    1. The problem statement, all variables and given/known data
    Solve the ODE with the boundary conditions given

    Q''+Q = Sin(2x) where Q(0) = 1 and Q'(0) = 2
    So i know i need to solve the general and particular solutions, however, I am a little confused. Any help or advice would be great, Thanks in advance.

    2. Relevant equations
    Y = Yg +Yp


    3. The attempt at a solution
    Assume RHS = 0 for general solution
    Q'' + Q = 0

    Let Q = e^kx
    Q' = k e^kx
    Q'' = k^2 e^kx
    therefore
    k^2e^kx + e^kx = 0
    e^kx(k^2) = 0
    k=0???????
    Yg = A e ^kx +Bx e^kx???

    Particular Solution
    Yp = A Sin 2x + B Cos 2x
    Yp' = 2A Cos 2x - 2B Sin 2x
    Yp"= -4A Sin 2x - 4B Cos (2x)


    -4A Sin 2x - 4B Cos (2x) + A Sin 2x + B Cos 2x = Sin(2x)
    -3A Sin 2x = Sin 2x
    a = -1/3
    1. The problem statement, all variables and given/known data



    2. Relevant equations



    3. The attempt at a solution
     
  2. jcsd
  3. Apr 11, 2012 #2
    You've got a mistake. You made the claim that
    $$
    k^2e^{kx}+e^{kx}=0\\
    \Rightarrow k^2e^{kx}=0
    $$
    That's not true, is it? What's ##k## really?
     
  4. Apr 11, 2012 #3

    HallsofIvy

    User Avatar
    Science Advisor

    No, factoring out e^{kx} gives e^{kx}(k^2+ 1)= 0.

     
  5. Apr 11, 2012 #4
    I see. Thanks.
     
  6. Apr 11, 2012 #5
    e^kt(k^2+1) = 0
    k = i ---> sqrt(-1)

    So then the general assumption would be.

    Yg = e^-kt(ASin2x + iBsin2x) ?
     
  7. Apr 11, 2012 #6
    Or just
    Yg = A Sin2x + i BCos 2x
    ?
    Sorry about lack of real looking equations I am on my iPhone
     
  8. Apr 11, 2012 #7
    $$
    k=\pm i
    $$
    So the general form of the solution is
    $$
    Q_g(x)=c_1 e^{ix}+c_2 e^{-ix}
    $$
    Or equivalently,
    $$
    Q_g(x)=A\sin(x)+B\cos(x)
    $$
    Now take a guess at the particular solution. Let's guess that ##Q_p(x)=D\sin(2x)##. Plug this into the differential equation and solve for D. It will give you the particular solution.
     
  9. Apr 12, 2012 #8
    Excellent.
    So from there:

    Yp = C Sin(2x)
    Yp' = 2C Cos(2x)
    Yp" = -4C Sin(2x)

    -4C Sin(2x) + C Sin(2x) = Sin(2x)
    -3C = 1
    C = -1/3

    Yp = -1/3 Sin (2x)
    So then the solution starts as

    Y = Yg + Yp
    Y = A Sin (x) + B Cos(x) -1/3 Sin(2x)

    Sub in initial Conditions Q(0) = 1 or x=0
    Y = A Sin (x) + B Cos(x) -1/3 Sin(2x)
    1 = 0 + B - 0
    B = 1

    Sub in next conditions
    Q'(0) = 2
    Y = A Sin (x) + B Cos(x) -1/3 Sin(2x)
    Y' = A Cos(x) - B Sin(x) - 2/3 Cos (2x)
    Y'(0) = A - 2/3 = 2
    A = 8/3

    So the final solution for the equation would be

    Y = 8/3 Sin(x) + Cos(x) - 1/3 Sin(2x) ?

    :D
     
  10. Apr 12, 2012 #9
    Looks good to me.
     
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook