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!

Python, RungeKutta and first-order differential equation system.

  1. Dec 13, 2008 #1


    2. Relevant equations

    The equation is, given to me by lurflurf,:
    mv' + f(v ) + s(u) = F(t), t > 0, u(0) = U0, v (0) = V0
    where v=u'
    For the record the equation was:
    mu'' + f(u' ) + s(u) = F(t), t > 0, u(0) = U0, u' (0) = V0 .


    3. The attempt at a solution

    Code (Text):
     def rhs(u, t):
        return [u[1],
                (1./m)*(external(t) - friction(u[1]) - spring(u[0]))]
    This is the solution, but I don't get how yuu go from the equation to rhs.
    Can someone help me?
     
  2. jcsd
  3. Dec 13, 2008 #2
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?



Similar Discussions: Python, RungeKutta and first-order differential equation system.
Loading...