Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

The command desolve_odeint only accepts the vector field $\mathbf{F}$ for the differential equation $$\dfrac{d \mathbf{F}}{d\mathbf{x}} = \mathbf{F}(\mathbf{x}).$$ You are giving it the whole differential equation.

The command desolve_odeint only accepts the vector field $\mathbf{F}$ for the differential equation $$\dfrac{d $$\frac{d \mathbf{F}}{d\mathbf{x}} = \mathbf{F}(\mathbf{x}).$$ You are giving it the whole differential equation.

The command desolve_odeint only accepts the vector field $\mathbf{F}$ for the differential equation $$\frac{d \mathbf{F}}{d\mathbf{x}} \mathbf{F}}{dt} = \mathbf{F}(\mathbf{x}).$$ You are giving it the whole differential equation.

The command desolve_odeint only accepts the vector field $\mathbf{F}$ for the differential equation $$\frac{d \mathbf{F}}{dt} = \mathbf{F}(\mathbf{x}).$$ You are giving it the whole differential equation.

Here is an example of solving the predator-prey model $$\frac{dx}{dt} = 0.2 x-0.3 x y, \frac{dy}{dt} = -0.1 y+0.3 x y $$

var('t,x,y')
F=[0.2*x-0.3*x*y,-0.1*y+0.3*x*y]
ans=desolve_odeint(F,[1,1],srange(0,100,0.01),[x,y])