I would prefer recommendations that don't require the use of proprietary tools (such as Matlab). I know of two ODE solving options for the Python ecosystem:

  1. PyDSTool (Dopri, Radau, other Runge-Kutta methods, and whatever scipy.integrate.ode has access to)
  2. scipy.integrate (scipy.integrate.odeint uses lsoda from the Fortran library odepack -- solver decides whether to use a Adams method or a BDF method depending on the stiffness of the problem; dopri5, and dopri853 are also available, along with some solvers for complex ODE systems)

I like Python because I can now write C-speed code, combined with Python flexibility using Python-to-C compilers provided by packages such as Cython. Plus, everything is pretty open-source!

In my early conversations with the developer of PyDSTool, I know he brought up that Radau might be particularly good for non-linear, stiff ODE problems -- and certainly the pure C implementation included with PyDSTool would be much faster than scipy.integrate's standard ODE solvers. I wasn't really able to understand him well at the time simply due to my lack of mathematical background (I am a math undergrad, recently transferred from engineering). Could you comment on concerns like that -- in particular, what features of my problem do I need to identify in order to figure out which solver is best suited for my system of non-linear ODEs?


1 Answer 1


Consider how stiff the problem is, how strong the nonlinearity is, any model non-smoothness, and the desired accuracy. The standard way to compare methods is with "work-precision" diagrams (a log-log plot of CPU time versus error with a line for each method). Hairer and Wanner's books includes comprehensive comparisons of methods across a range of problems. You can gain some insight by looking at which methods work well for which problems in their book (volume 2 for stiff problems) or find papers that perform such comparisons for a problem similar to yours.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.