numerical solution of ordinary differential equations
dsolve(odesys, numeric, method=lsode)
dsolve(odesys, numeric, method=lsode[choice], vars, options)
dsolve(numeric, method=lsode[choice], procopts, options)
set or list; ordinary differential equation(s) and initial conditions
literal name; instruct dsolve to find a numerical solution
literal equation; numerical method to use
equation; numerical method and submethod to use
(optional) dependent variable or a set or list of dependent variables for odesys
(optional) equations of the form keyword = value
options used to specify the ODE system using a procedure (procedure, initial, start, number, and procvars). For more information, see dsolve[numeric,IVP].
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.
Specifies an implicit Adams method of evaluation
Specifies a method based on backward differentiation formulas
Uses functional iteration (no Jacobian matrix is involved)
Uses chord iteration with an internally generated (difference quotient) full Jacobian
Uses chord iteration with an internally generated diagonal Jacobian approximation
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:
keyword or array
name or list of names
Note: See also information about the advanced use form of the lsode method in dsolve[lsode,advanced].
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.
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.
Digits ≔ 10:
deqn1 ≔ ⅆ3ⅆx3⁢y⁡x=y⁡x⁢ⅆⅆx⁢y⁡x−x
init1 ≔ D2⁡y⁡1=4,D⁡y⁡1=3,y⁡1=2.4
ans1 ≔ dsolve⁡deqn1∪init1,numeric,method=lsodeadamsfull
ans2 ≔ dsolve⁡x⁢y⁡x−sin⁡y⁡x=ⅆⅆx⁢y⁡x,y⁡0=−5.,numeric,method=lsode
Digits ≔ 20:
deqn3 ≔ ⅆ3ⅆx3⁢y⁡x−y⁡x⁢x⁢ⅆⅆx⁢y⁡x=5
init3 ≔ y⁡0=1,D2⁡y⁡0=−1,D⁡y⁡0=2
ans3 ≔ dsolve⁡deqn3,init3,numeric,method=lsodebackdiag,output=Array⁡0.5,0.75,1
Hindmarsh, Alan C.; Stepleman, R. S.; et al. eds. Odepack, a Systemized Collection of ODE Solvers. Amsterdam: North-Holland, 1983.
Download Help Document
What kind of issue would you like to report? (Optional)