Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the difference between scipy.integrate.odeint and scipy.integrate.ode?

Tags:

python

scipy

ode

I have read the docs for these here, but it just states that odeint is "an integrator with a simpler interface based on lsoda from ODEPACK"

What is the actual difference? Under what circumstances is using one more appropriate than the other?

like image 399
Dipole Avatar asked Apr 03 '14 23:04

Dipole


People also ask

What is the difference between Odeint and solve_ivp?

The primary advantage is that solve_ivp offers several methods for solving differential equations whereas odeint is restricted to one. We get started by setting up our system of differential equations and some parameters of the simulation.

What does SciPy Odeint do?

Computes the derivative of y at t. If the signature is callable(t, y, ...) , then the argument tfirst must be set True . Initial condition on y (can be a vector). A sequence of time points for which to solve for y.

What is Odeint?

The odeint (ordinary differential equation integration) library is a collection of advanced numerical algorithms to solve initial-value problems of ordinary differential equations. It is written in C++ using modern programming techniques to provide high generality at optimal performance.


1 Answers

If you can solve your problem with odeint, I would recommend that. It is simply a function that integrates an ode using lsoda.

If you want a lot more options, ode is a class with many methods and solvers:

  • scipy.integrate.ode
    • scipy.integrate.ode.integrate
    • scipy.integrate.ode.set_f_params
    • scipy.integrate.ode.set_initial_value
    • scipy.integrate.ode.set_integrator
    • scipy.integrate.ode.set_jac_params
    • scipy.integrate.ode.set_solout
    • scipy.integrate.ode.successful
like image 178
askewchan Avatar answered Nov 29 '22 02:11

askewchan