lsode - 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

numerical solution of ordinary differential equations

 

Calling Sequence

Parameters

Description

Examples

References

Calling Sequence

dsolve(odesys, numeric, method=lsode)

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

dsolve(numeric, method=lsode[choice], procopts, 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]

-

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

procopts

-

options used to specify the ODE system using a procedure (procedure, initial, start, number, and procvars). For more information, see dsolve[numeric,IVP].

Description

• 

The dsolve command with the numeric option and method=lsode or method=lsode[choice] finds a numerical solution using the Livermore Stiff ODE solver. The default choice is adamsfunc, which is defined below.

• 

The lsode method can be used to numerically solve stiff ODE initial value problems. For more information, see dsolve[Stiffness].

• 

The choice for the submethod of the lsode method is one of adamsfunc, adamsfull, adamsdiag, adamsband, backfunc, backfull, backdiag, and backband.

  

Prefixes:

  

adams*

  

Specifies an implicit Adams method of evaluation

  

back*

  

Specifies a method based on backward differentiation formulas

  

Suffixes:

  

*func

  

Uses functional iteration (no Jacobian matrix is involved)

  

*full

  

Uses chord iteration with an internally generated (difference quotient) full Jacobian

  

*diag

  

Uses chord iteration with an internally generated diagonal Jacobian approximation

  

*band

  

Uses chord iteration with an internally generated banded Jacobian

• 

If choice is either adamsband or backband, the user must also supply the optional equation ctrl=array with mu and ml set (to specify the bandwidth of the Jacobian matrix). For more details, see dsolve[lsode,advanced].

• 

By setting infolevel[`dsolve/lsode`] or infolevel[dsolve] to 2, information on the last mesh point evaluation is provided in the event of an error.

• 

The following options are available for the basic use form of the lsode method:

'output'

=

keyword or array

'known'

=

name or list of names

'number'

=

integer

'procedure'

=

procedure

'start'

=

numeric

'initial'

=

array

'procvars'

=

list

'startinit'

=

boolean

'implicit'

=

boolean

'optimize'

=

boolean

'abserr'

=

numeric

'relerr'

=

numeric

'initstep'

=

numeric

'minstep'

=

numeric

'maxstep'

=

numeric

'maxfun'

=

integer

  

Note: See also information about the advanced use form of the lsode method in dsolve[lsode,advanced].

  

 

  

'output'

  

Specifies the desired output from dsolve, and the known option specifies user-defined known functions, and these options are discussed in dsolve[numeric].

  

 

  

'number', 'procedure', 'start', 'initial', and 'procvars'

  

These options are used to specify the IVP using procedures. For more information, see dsolve[numeric,IVP].

  

 

  

'startinit','implicit', and 'optimize'

  

These options control the method and behavior of the computation. For more information on the first two, see dsolve[numeric,IVP], for the last, see dsolve[numeric].

  

 

  

'abserr' and 'relerr'

  

Control the error introduced in any individual step. The error is computed as a weighted root-mean square norm (rms-norm) of the errors of the individual solution components, and is required to be below 1 for a successful step. The default values are abserr=1.×10−7 and relerr=1.×10−7. For more details about the error control method, and the rms-norm used, see dsolve[Error_Control].

  

 

  

'initstep', 'minstep', and 'maxstep'

  

Enable more detailed control of the step size. These options are also discussed in dsolve[Error_Control]. By default, minstep=0, maxstep=, and initstep is determined by the solver.

  

 

  

'maxfun'

  

An integer that specifies the maximum on the number of evaluations of the ODE or ODE system in one call to the returned procedure. This limits the amount of work done on any individual call (See dsolve[maxfun]). This is relevant for the procedure-style output only. By default this value is set to zero (disabled).

  

 

• 

Much finer control over the behavior of the lsode method is possible through use of the ctrl and itask options, including the capability of running partial calculations, specification of the band width of the Jacobian to be used, control over the approximation order used in the method, and so on. These options are somewhat complex, and discussed in detail in dsolve[lsode,advanced].

• 

The computation may return with an error message corresponding to an error condition of the lsode procedure.

• 

Results can be plotted using the function odeplot in the plots package.

Examples

Digits10:

deqn1diffyx,`$`x,3=yxdiffyx,xx

deqn1ⅆ3ⅆx3yx=yxⅆⅆxyxx

(1)

init1y1=2.4,Dy1=3,D2y1=4

init1y1=2.4,Dy1=3,D2y1=4

(2)

ans1dsolvedeqn1unioninit1,numeric,method=lsodeadamsfull

ans1procx_lsode...end proc

(3)

ans11.5

x=1.5,yx=4.59316878380163,ⅆⅆxyx=6.33685490613476,ⅆ2ⅆx2yx=11.0436021501495

(4)

ans2dsolvexyxsinyx=diffyx,x,y0=5.,numeric,method=lsode

ans2procx_lsode...end proc

(5)

ans20.45

x=0.45,yx=−5.90260258275327

(6)

ans20.2

x=0.2,yx=−5.28590204334243

(7)

Digits20:

deqn3diffyx,`$`x,3yxxdiffyx,x=5

deqn3ⅆ3ⅆx3yxyxxⅆⅆxyx=5

(8)

init3y0=1,D2y0=1,Dy0=2

init3y0=1,D2y0=−1,Dy0=2

(9)

ans3dsolvedeqn3,init3,numeric,method=lsodebackdiag,output=Array0.5,0.75,1

ans3xyxⅆⅆxyxⅆ2ⅆx2yx0.51.98615057909005246532.18542301529996787721.91459726902182109130.752.61271364750676360772.91682009915634836934.08195223025532317261.3.50181543464666285454.34715289512684796717.7494282873588280907

(10)

References

  

Hindmarsh, Alan C.; Stepleman, R. S.; et al. eds. Odepack, a Systemized Collection of ODE Solvers. Amsterdam: North-Holland, 1983.

See Also

dsolve/Error_Control

dsolve[ck45]

dsolve[classical]

dsolve[dverk78]

dsolve[gear]

dsolve[lsode,advanced]

dsolve[maxfun]

dsolve[numeric,IVP]

dsolve[numeric]

dsolve[rkf45]

dsolve[rosenbrock]

dsolve[Stiffness]

dsolve[taylorseries]

plots[odeplot]