lsode advanced - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


dsolve/numeric/lsode/advanced

numerical solution of ordinary differential equations

 

Calling Sequence

Parameters

Description

Examples

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 .

• 

The ctrl parameter c is a vector of floating-point numbers and integers with length at least  (where  is the number of equations in the system to be considered). The  first  values are optional inputs, and the remaining positions are reserved for optional output values. The correspondence of meanings and individual vector elements is as follows:

  

Inputs:

• 

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

• 

 where atol is an absolute error tolerance parameter.  The values of atol and rtol determine the error control performed by the solver. The solver will control a vector  of estimated local errors in y according to an inequality of the form rms-norm of , where   and rms-norm is the root-mean-square norm.  Use  for absolute error checking, and  for relative error checking.  The default for atol 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 half-bandwidth required for banded Jacobian methods excluding the main diagonal.

• 

 where ml is the lower half-bandwidth required for banded Jacobian methods excluding the main diagonal.  The band is defined by the matrix locations: for row i and column j with .  ml and mu must satisfy , .

• 

 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 hmin is the minimum absolute step size allowed. The default value is zero (Note: This lower bound is not enforced on the final step before reaching tcrit on  or ).

• 

 where maxord is the maximum order to be allowed. The default value is  for Adams methods and  for backward differentiation. If maxord exceeds these defaults, it will be reduced to the appropriate value.

• 

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

• 

 where mxhnil is the maximum number of error conditions of  of a step. The default value is .

  

Outputs:

• 

 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 tolsf is a tolerance scale factor greater than , computed when a request for too much accuracy was detected ( or ).  If  and atol are scaled up by a factor of tolsf for another call, then the solver is deemed likely to succeed.

• 

 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]

 


Download Help Document