[SciPy-user] integrating a system of differential equations

Warren Weckesser warren.weckesser@gmail....
Wed May 27 11:34:50 CDT 2009


There are also examples at scipy.org:

    http://www.scipy.org/LoktaVolterraTutorial
    http://www.scipy.org/Cookbook/CoupledSpringMassSystem


On Wed, May 27, 2009 at 11:13 AM, ms <devicerandom@gmail.com> wrote:

> Fabrice Silva ha scritto:
> > Le mercredi 27 mai 2009 à 16:30 +0100, ms a écrit :
> > You need to write your system of differential equations as a system of
> > first-order differential equations.
> > if X=[X_1, ..., X_N] is the vector of unknown signals, the function you
> > have to supply is the function that computes the time derivatives of
> > these signals.
> >
> >         def func_ode(X,t):
> >                 dX = np.zeros_like(X)
> >                 for n in xrange(len(X)):
> >                         dX[n]=...
> >                 return dX
> >
> > then you call the odeint routine giving an initial condition X0 and a
> > time range TimeVec:
> >         import scipy.integrate as integrate
> >         X = integrate.odeint(func_ode, X0, TimeVec)
> >
> >> - As for the Jacobian, I'm lost.
> > You do not have to provide the jacobian. The Ode Solver recommends but
> > does not require it.
>
> Ok, looks easier than I thought (sorry, but I'm multitasking a lot of
> things and I cannot concentrate as much as I should).
>
> thanks,
> m.
> _______________________________________________
> SciPy-user mailing list
> SciPy-user@scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-user
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/scipy-user/attachments/20090527/7437de3f/attachment.html 


More information about the SciPy-user mailing list