dsolve/numeric/lsode/advanced - Maple Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Mathematics : Differential Equations : dsolve : numeric : Methods : dsolve/lsode/advanced

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 sub-method, 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

 

 

1

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

2

take one step only and return

3

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

4

normal computation of output values of yt 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)

5

means take one step without passing tcrit and return

  

The default value is 1.

• 

The ctrl parameter c is a vector of floating-point numbers and integers with length at least 21+neqns (where neqns is the number of equations in the system to be considered). The  first 11 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:

• 

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

• 

c2=atol 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 ei of estimated local errors in y according to an inequality of the form rms-norm of eiewti1, where ewti=rtolyi+atol  and rms-norm is the root-mean-square norm.  Use rtol=0 for absolute error checking, and atol=0 for relative error checking.  The default for atol is Float(1,-7).

• 

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

• 

c4=μ where mu is the upper half-bandwidth required for banded Jacobian methods excluding the main diagonal.

• 

c5&equals;ml 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 iml<=j<=i+mu.  ml and mu must satisfy 0ml, μneqns1.

• 

c6&equals;h0 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.

• 

c7&equals;hmax where hmax is the maximum absolute step size allowed. The default value is infinite.

• 

c8&equals;hmin 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 itask&equals;4 or 5).

• 

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

• 

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

• 

c11&equals;mxhnil where mxhnil is the maximum number of error conditions of t&plus;h&equals;t of a step. The default value is 10.

  

Outputs:

• 

c12&equals;istate where istate can have the following values on output:

Value

Meaning

 

 

1

nothing was done as tout was equal to t on input

2

the integration was performed successfully

1

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

2

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

3

illegal input was detected  before taking any steps

4

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

5

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

6

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

• 

c13&equals;hu where hu is the step size in t last used.

• 

c14&equals;hcur where hcur is the step size that was to be attempted on the next step.

• 

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

• 

c16&equals;tolsf where tolsf is a tolerance scale factor greater than 1.0, computed when a request for too much accuracy was detected (istate&equals;3 or 2).  If rtol and atol are scaled up by a factor of tolsf for another call, then the solver is deemed likely to succeed.

• 

c17&equals;nst where nst is the number of steps taken for the problem so far.

• 

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

• 

c19&equals;nje where nje is the number of Jacobian evaluations for the problem so far.

• 

c20&equals;nqu where nqu is the method order last used (successfully).

• 

c21&equals;nqcur where nqcur is the order that was to be attempted on the next step.

• 

c22..21&plus;neqns&equals;acor1..neqns 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

Carray0&dollar;26&colon;

C30.75&colon;

C41&colon;

C51&colon;

C102500&colon;

deq1&DifferentialD;5&DifferentialD;t5vt&DifferentialD;2&DifferentialD;t2vt&equals;vtt

deq1:=&DifferentialD;5&DifferentialD;t5vt&DifferentialD;2&DifferentialD;t2vt&equals;vtt

(1)

init1v0&equals;0.25&comma;Dv0&equals;0.75&comma;D2v0&equals;1&comma;D3v0&equals;0&comma;D4v0&equals;0.25

init1:=v0&equals;0.25&comma;Dv0&equals;0.75&comma;D2v0&equals;1&comma;D3v0&equals;0&comma;D4v0&equals;0.25

(2)

ans1dsolvedeq1&comma;init1&comma;numeric&comma;method&equals;lsodebackband&comma;ctrl&equals;C&colon;

ans10.65

t&equals;0.65&comma;vt&equals;0.948081855882857&comma;&DifferentialD;&DifferentialD;tvt&equals;1.39770380574707&comma;&DifferentialD;2&DifferentialD;t2vt&equals;1.00339524678793&comma;&DifferentialD;3&DifferentialD;t3vt&equals;0.0968760633151896&comma;&DifferentialD;4&DifferentialD;t4vt&equals;0.553051343710615

(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

Was this information helpful?



Please add your Comment (Optional)
E-mail Address (Optional)
What is ? This question helps us to combat spam