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 a 2nd order differential equation

  1. Oct 10, 2011 #1
    1. The problem statement, all variables and given/known data

    This is a portion of a slightly larger problem involving:
    [tex]

    K*\frac{d^2x}{dt^2} = -K2*\frac{dz}{dt}
    [/tex]

    [tex]
    K*\frac{dz^2}{dt^2} = K2*\frac{dx}{dt}
    [/tex]

    I would like to check my work and I don't believe I am moving toward the solution, knowing it has sin and cos in the final solution:

    2. Relevant equations



    3. The attempt at a solution

    I'm just wanting some help on the math portion of the following -

    Picking up midstream in a problem - I have started with a substitution
    [tex]
    u= \frac {dx}{dt}
    [/tex]


    [tex]
    K1 \frac {du^{2}}{dt^2} + {-K2}u = 0
    [/tex]

    [tex]

    u = e^{mt}
    u’ = me^{mt}
    u’’ = m^2e^{mt}
    [/tex]

    [tex]

    K2*m^{2}e^{mt} + -K1* e^{mt} = 0
    [/tex]

    Factor out [tex] e^{mt} [/tex]


    [tex]
    m^2 = \frac {K1}{K2}
    [/tex]

    [tex]
    m =sqrt{ \frac {K1}{K2}}

    [/tex]

    I am 1 integration away from getting X.

    I know the solution is of the form X = Acos(at) + Bsin(at) - I was expecting complex roots.

    If the above is correct then my problem is further upstream
    1. The problem statement, all variables and given/known data



    2. Relevant equations



    3. The attempt at a solution
     
  2. jcsd
  3. Oct 10, 2011 #2
    HOLD UP -

    found a sign error - don't see how to delete this thread
     
  4. Oct 10, 2011 #3

    Hootenanny

    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    I'm afraid that isn't correct. Notice that the two ODEs form a couple system (i.e. both equations involve derivatives of both x and z).

    However, you have the right idea with regards to substitution. You could try substituting one of the equations into the other.
     
  5. Oct 10, 2011 #4
    Thanks!!


    I'm going in that direction now. - it's looking better.
     
  6. Oct 10, 2011 #5
    ok - I have been playing with the equation:
    [tex]
    K1 \frac {du^{2}}{dt^2} + {K2}u = 0
    [/tex]


    Starting here -

    [tex]

    u = e^{mt}
    u’ = me^{mt}
    u’’ = m^2e^{mt}
    [/tex]
    [tex]
    K1*u’’+ K2*u = 0
    [/tex]


    [tex]

    K2*m^{2}e^{mt} + K1* e^{mt} = 0
    [/tex]

    Factor out [tex] e^{mt} [/tex]


    [tex]
    m^2 = -\frac {K1}{K2}
    [/tex]

    [tex]
    m =\sqrt{ -\frac {K1}{K2}}

    [/tex]

    [tex]
    m1 = +i \sqrt{ \frac {K1}{K2}}
    m2 = -i \sqrt{ \frac {K1}{K2}}

    [/tex]

    [tex]
    u = e^{{i}{const}}+ e^{-{i}{const}}

    [/tex]
    [tex]
    u = cos(const* t) + isin(const* t) + cos(const* t) – isin(const* t)

    [/tex]

    The sin terms cancel and I have 2 cos terms.


    I know the solution is of the form X = Acos(const* t) + Bsin(const* t) .

    Can I get some guidance?

    Thanks
    Sparky_
     
  7. Oct 11, 2011 #6

    Hootenanny

    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    How have you got from here:
    to here:
    The two are not consistent.
     
  8. Oct 11, 2011 #7
    Hey Hootenanny,

    Thanks for the help and advice,

    In the top equation - I took the derivative of both sides.

    I then had a second order derivative of z with respect to t.

    (again in the 2nd equation) I then solved for the same derivative d^2z / dt^2 and substituted into the top equation.

    I'm not playing careful with the constants - just grouping them as K's - ignore the mistakes with the constants.

    Then I said u = dx/dt, du/dt = d^2x / dt^2 and so on - that gets me a 2nd order.

    I am thinking once I have x, I can then get z.

    (sorry for no TeX - in this post.)

    Am I off somewhere?

    Then next question - even if my setup is wrong - I think my solution to (k1)d^2u/dt^2 + K2u = 0 has a mistake somewhere.

    Thanks
    Sparky_
     
  9. Oct 11, 2011 #8

    Hootenanny

    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    That is a very bad idea. Even if you collect constants together, you should define them and rename them as something other than your original constants. If you don't, then you end up thinking that things cancel when they don't really because they are multiplied by different constants.

    Assuming you can keep track of your constants, you mistake is on the penultimate line. Your solution is missing two multiplicative constants:

    [tex] u(t) = c_1 \exp(i\lambda t) + c_2\exp(-i\lambda t)[/tex]
     
    Last edited: Oct 11, 2011
  10. Oct 11, 2011 #9
    Thanks!!

    Well - I have learned a lesson.

    As you can tell I was more worried about the steps and the involved math steps.

    I assmumed I could just sprinkle the constants back in at the end - I would say it's a rookie mistake - but I am many years past a rookie - more a coming out of retirement mistake.

    (this is related to something I'm just playing with - just started doodling and wondering if I still could ... and now I wnat to complete it.)

    Thanks again
    -Sparky_
     
  11. Oct 16, 2011 #10
    Ok – playing with this problem a little more

    Backing up – here is the “real problem” – it’s a physics problem I know the solution and the solution is shown in about one line – I’m for fun wanting to work it out

    I’m uncertain on how to resolve the constants – I do have the liberty to set the initial conditions

    The problem:
    [tex]
    m\frac {d^2x}{dt^2} = -qB \frac{dz}{dt}
    [/tex]
    [tex]
    m\frac {d^2z}{dt^2} = qB \frac{dx}{dt}
    [/tex]

    Take time derivative of both sides (of eq. 1):
    [tex]
    \frac {d}{dt} m\frac {d^2x}{dt^2} =\frac {d}{dt} -qB \frac{dz}{dt}
    [/tex]


    [tex]
    m\frac {d^3x}{dt^3} = -qB \frac{d^2z}{dt^2}
    [/tex]

    From equation 2:
    [tex]
    \frac {d^2z}{dt^2} = \frac {qB}{m} \frac{dx}{dt}

    [/tex]

    Some algebra and apply Euler’s equation:
    [tex]

    m\frac {d^3x}{dt^3} = \frac {(-qB)(qB)}{m} \frac{dx}{dt}
    [/tex]
    [tex]
    \frac {d^3x}{dt^3} = (\frac {(qB)}{m})^2 \frac{dx}{dt}
    [/tex]
    [tex]
    u= \frac {dx}{dt}
    [/tex]
    [tex]
    pick: u = e^{at}
    [/tex]
    [tex]
    u’ = ae^{at}
    [/tex]
    [tex]
    u’’ = a^2e^{at}
    [/tex]
    [tex]
    a^2e^{at} + (\frac {(qB)}{m})^2 e^{at} = 0
    [/tex]
    [tex]
    a^2 + (\frac {(qB)}{m})^2 = 0
    [/tex]
    [tex]
    a = + - (\frac {(qB)}{m})
    [/tex]
    [tex]
    u = e^{i\frac{qB}{m}t} + e^{-i\frac{qB}{m}t}
    [/tex]
    [tex]
    u = C1cos(\frac{qB}{m}) + iC2sin(\frac{qB}{m}) + C3cos(\frac{qB}{m}) – iC4sin(\frac{qB}{m})
    [/tex]
    Use a substitution to reduce the order of the equation:
    [tex]

    u= \frac {dx}{dt}
    [/tex]
    [tex]
    dx = u dt
    [/tex]
    [tex]
    x = \frac{mC1}{qB}sin(\frac{qBt}{m}) - \frac{imC2}{qB}cos(\frac{qBt}{m}) + \frac{mC3}{qB}sin(\frac{qBt}{m}) + \frac{imC4}{qB}cos(\frac{qBt}{m})
    [/tex]
    [tex]
    x = (\frac{mC1}{qB} + \frac{mC3}{qB}))sin(\frac{qB}{m}t) – (\frac{imC2}{qB} + \frac{imC4}{qB})cos(\frac{qB}{m}t)

    [/tex]

    Now – I’m not sure on the steps below:
    Is it correct to do the following:

    [tex]
    \int{ \frac{d^2x}{dt^2}} = \int{ \frac{-qB}{m}\frac{dz}{dt}}
    [/tex]
    [tex]
    \frac{dx}{dt} = \frac{-qBz}{m}
    [/tex]

    [tex]

    z = -\frac{m}{qB}\frac{dx}{dt}
    [/tex]

    [tex]
    z = K1 \frac{qB}{m}cos() + K2\frac{qB}{m}sin()

    [/tex]


    I have the freedom (I think to say x = z = 0 at t=0.

    There is some complication with the cos term at t=0 and gave x=z=0 – correct?

    Am I on the right path?

    Thanks
    -Sparky_
     
    Last edited: Oct 16, 2011
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Solving a 2nd order differential equation
Loading...