dsolve/numeric/gear
numerical solution of ordinary differential equations
Calling Sequence
Parameters
Description
Examples
References
dsolve(odesys, numeric, method=gear)
dsolve(odesys, numeric, method=gear[choice], vars, options)
dsolve(numeric, method=gear[choice], procopts, options)
odesys
-
set or list; ordinary differential equation(s) and initial conditions
numeric
literal name; instruct dsolve to find a numerical solution
method=gear
literal equation; numerical method to use
method=gear[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].
The dsolve command with the options numeric and method=gear or method=gear[choice] finds a numerical solution using a Gear single-step extrapolation method.
The choice for the gear method are bstoer and polyextr. The default bstoer choice is a Burlirsch-Stoer rational extrapolation method and the polyextr choice uses polynomial extrapolation.
By setting infolevel[`dsolve/gear`] or infolevel[dsolve] to 2, information about the last mesh point evaluation is provided in the event of an error.
The following options are available for the gear method.
'output'
=
keyword or array
'known'
name or list of names
'maxfun'
integer
'number'
'procedure'
procedure
'start'
'initial'
array
'procvars'
list
'startinit'
boolean
'implicit'
'optimize'
'abserr'
'relerr'
'initstep'
'maxstep'
'minstep'
'maxord'
'maxpts'
'output','known'
The 'output' option specifies the desired output from dsolve, and the known option specifies user-defined known functions. These options are discussed in dsolve[numeric].
Specifies a maximum on the number of evaluations of the right-hand side of the first order ODE system (See dsolve[maxfun]). This option can be disabled by specifying maxfun=0. By default this option is disabled.
'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'
Specify the desired accuracy of the solution, and are discussed in dsolve[Error_Control]. The default values for gear are abserr=1.×10−7 and relerr=1.×10−7.
'minstep', 'maxstep', and 'initstep'
Provide finer control over the step size used in the method, and are also discussed in dsolve[Error_Control]. By default minstep=0.00001, maxstep is disabled, and initstep=0.00001. When setting minstep ensure that the value is adequately small to allow for the first few steps.
A positive integer, specifying the maximum order of extrapolation allowed. It must be less than 11 (values of 6 or less are recommended). The default value is 4.
A positive integer, specifying the maximum number of different single unit step sizes used in the extrapolation process (values less than 10 are recommended). The default is 6.
The computation may return with an error message corresponding to an error condition of the gear procedure.
Results can be plotted using the function odeplot in the plots package.
Digits≔10:
deq1≔diff⁡y⁡x,`$`⁡x,3=y⁡x⁢diff⁡y⁡x,x−x
deq1≔ⅆ3ⅆx3y⁡x=y⁡x⁢ⅆⅆxy⁡x−x
init1≔y⁡1=2.4,D⁡y⁡1=3,D2⁡y⁡1=4
ans1≔dsolve⁡deq1unioninit1,numeric,method=gearpolyextr,initstep=0.015,minstep=Float⁡1,−11,abserr=Float⁡1,−5,relerr=Float⁡1,−5:
ans1⁡1.01
x=1.01,y⁡x=2.43020104070930,ⅆⅆxy⁡x=3.04031295467142,ⅆ2ⅆx2y⁡x=4.06288854913227
dsys2≔x⁢y⁡x−sin⁡y⁡x=diff⁡y⁡x,x,y⁡0=−5.
dsys2≔x⁢y⁡x−sin⁡y⁡x=ⅆⅆxy⁡x,y⁡0=−5.
ans2≔dsolve⁡dsys2,numeric,method=gear,maxord=3:
ans2⁡0.45
x=0.45,y⁡x=−5.90260241046659
ans2⁡0.9
x=0.9,y⁡x=−7.81336992184499
Digits≔25:
deq3≔diff⁡y⁡z,`$`⁡z,3−y⁡z⁢z⁢diff⁡y⁡z,z=5
deq3≔ⅆ3ⅆz3y⁡z−y⁡z⁢z⁢ⅆⅆzy⁡z=5
init3≔y⁡0=1,D2⁡y⁡0=−1,D⁡y⁡0=2
ans3≔dsolve⁡deq3,init3,numeric,method=gearbstoer,maxpts=4:
ans3⁡−1
z=−1.,y⁡z=−2.348282662951510120622879,ⅆⅆzy⁡z=5.767096382629485105229235,ⅆ2ⅆz2y⁡z=−8.239613529231847035339209
ans3⁡0
z=0.,y⁡z=1.,ⅆⅆzy⁡z=2.,ⅆ2ⅆz2y⁡z=−1.
Gear, C.W. Numerical Initial Value Problems in Ordinary Differential Equations. Prentice-Hall, 1971.
See Also
dsolve/Error_Control
dsolve[ck45]
dsolve[classical]
dsolve[dverk78]
dsolve[lsode]
dsolve[maxfun]
dsolve[numeric,IVP]
dsolve[numeric]
dsolve[rkf45]
dsolve[rosenbrock]
dsolve[Stiffness]
dsolve[taylorseries]
plots[odeplot]
Download Help Document