dsolve/numeric/lsode/advanced  numerical solution of ordinary differential equations

Calling Sequence


dsolve(odesys, numeric, method=lsode, options)
dsolve(odesys, numeric, method=lsode[choice], vars, options)
dsolve(numeric, method=lsode[choice], vars, options)


Parameters


odesys



set or list; ordinary differential equation(s) and initial conditions

numeric



literal name; instruct dsolve to find a numerical solution

method=lsode



literal equation; numerical method to use

method=lsode[choice]



literal equation; numerical method and submethod to use

vars



(optional) dependent variable or a set or list of dependent variables for odesys

options



(optional) equations of the form keyword = value





Description


•

This page describes the advanced use form of the lsode method for the numerical solution of ODE initial value problems. The general usage of this method, including the choice of the submethod, is described in dsolve[lsode].

•

The advanced use optional equations for method=lsode are as follows:

'itask'

=

integer

'ctrl'

=

array



•

The itask parameter is an integer index specifying the type of task to be performed. It can have the following values:

Value

Meaning




normal computation of output values of (by overshooting the endpoint and interpolating)


take one step only and return


stop at the first internal mesh point at or beyond the endpoint and return


normal computation of output values of at the endpoint without overshooting tcrit (tcrit is the critical time value that integration should not pass; it can be equal to or beyond the endpoint, but must not be behind the endpoint in the direction of integration)


means take one step without passing tcrit and return




The default value is .

•

where rtol is a relative error tolerance parameter. The default value is Float(1,7).

•

where tcrit is the critical independent variable value which must not be passed (only used for itask = 4 or 5). Its default value is .

•

where mu is the upper halfbandwidth required for banded Jacobian methods excluding the main diagonal.

•

where h0 is the step size to attempt on the first step. If h0 is not specified, the default value is determined by the solver.

•

where hmax is the maximum absolute step size allowed. The default value is infinite.

•

where mxstep is the maximum number of (internally defined) steps allowed during one call to the solver. The default value is .

•

where istate can have the following values on output:

Value

Meaning




nothing was done as tout was equal to t on input


the integration was performed successfully


an excessive amount of work (more than mxstep steps) was done during the call before completing the requested task


too much accuracy was requested for the precision of the machine being used


illegal input was detected before taking any steps


there was repeated error test failures on one attempted step (the problem may have a singularity)


there were repeated convergence test failures on one attempted step (this may be caused by an inaccurate Jacobian matrix if being used)


indicates became zero for some i during the integration (i.e., pure absolute error control was requested on a variable that has now vanished)



•

where hu is the step size in t last used.

•

where hcur is the step size that was to be attempted on the next step.

•

where tcur is the current value of the independent variable which the solver has actually reached (i.e., the current internal mesh point in ). At output tcur will always be at least as far as the argument, t, but may be farther (if interpolation was done).

•

where nst is the number of steps taken for the problem so far.

•

where nfe is the number of function (differential system) evaluations for the problem so far.

•

where nje is the number of Jacobian evaluations for the problem so far.

•

where nqu is the method order last used (successfully).

•

where nqcur is the order that was to be attempted on the next step.

•

where acor is an array of size neqns used for the accumulated corrections on each step scaled on output to represent the estimated local error in y on the last step. It is defined only on a successful return from lsode.



Examples


>


>


>


>


>


>


 (1) 
>


 (2) 
>


>


 (3) 


See Also


dsolve/Error_Control, dsolve[ck45], dsolve[classical], dsolve[dverk78], dsolve[gear], dsolve[lsode], dsolve[maxfun], dsolve[numeric,IVP], dsolve[numeric], dsolve[rkf45], dsolve[rosenbrock], dsolve[Stiffness], dsolve[taylorseries], plots[odeplot]

