dsolve/numeric/dverk78
numerical solution of ordinary differential equations
Calling Sequence
Parameters
Description
Examples
References
Credits
dsolve(odesys, numeric, method=dverk78, vars, options)
dsolve(numeric, method=dverk78, procopts, options)
odesys
-
set or list; ordinary differential equation(s) and initial conditions
numeric
literal name; instruct dsolve to find a numerical solution
method=dverk78
literal equation; numerical method 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 options numeric and method=dverk78 finds a numerical solution using a seventh-eighth order continuous Runge-Kutta method.
The following options are available for the basic use form of the dverk78 method:
'output' =
keyword or array
'known' =
name or list of names
'number' =
integer
'procedure' =
procedure
'start' =
'initial' =
array
'procvars' =
list
'startinit' =
boolean
'implicit' =
'optimize' =
'abserr' =
'relerr' =
'errorest' =
symbol
'initstep' =
'minstep' =
'maxstep' =
'maxfun' =
'output'
Specifies the desired output from dsolve, and the known option specifies user-defined known functions. For more information, see 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', 'relerr', 'initstep', 'minstep', and 'maxstep'
Specify the desired accuracy of the solution, and allow for more detailed control of the step size. For more information, see dsolve[Error_Control]. The default values are abserr=1.×10−8, relerr=1.×10−8, minstep=0, maxstep=2.0, and initstep=maxstep⁢relerr16.
The dverk78 method is capable of working in arbitrary precision based on the setting of Digits, and can be used to obtain high accuracy solutions for ODE systems. As a note of caution, however, it is often necessary to work with a greater number of Digits than would be expected for the requested error tolerance, to prevent round-off error from giving an inaccurate error estimate. When the error tolerance is too strict for the current setting of Digits, it is detected by the algorithm, and an error is issued. Asymptotically dverk78 requires Digits set so that tol=O⁡Float⁡1,−Digits98.
Note: As for all other numeric dsolve methods, any setting of Digits that is less than or equal to hardware precision works in hardware precision, so for Digits<evalhf⁡Digits, the algorithm works in trunc⁡evalhf⁡Digits Digits (see evalhf).
'errorest'
Allows control over the method used to obtain error estimates, and can have the values interpolant or pair. The interpolant option is the default, and tells dverk78 to estimate the error using the interpolant of the method. The pair option tells dverk to estimate the error using the difference between the computed solution and a lower order estimate of the solution (hence 'pair'). Typically, the interpolant option gives a better error estimate than the pair option, but requires more work to compute. This may also be a better option for expensive systems, as dverk78 with the interpolant option performs 20 function evaluations per step, while the pair option only requires 13.
'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 option is relevant for the procedure-style output only. By default, this value is set to zero (disabled).
Results can be plotted using the function odeplot in the plots package.
Default output at several points
dsol1≔dsolve⁡y⁡0=1,D⁡y⁡x=y⁡x,numeric,method=dverk78,abserr=1.×10−8,relerr=1.×10−8
dsol1 ≔ procx_dverk78...end proc
dsol1⁡0
x=0.,y⁡x=1.
dsol1⁡0.4
x=0.400000000000000,y⁡x=1.49182469764117
dsol1⁡1.2
x=1.20000000000000,y⁡x=3.32011692267802
dsol1⁡1.5
x=1.50000000000000,y⁡x=4.48168906989179
array output
dsys2≔diff⁡x⁡t,t=−y⁡t,diff⁡y⁡t,t=x⁡t
dsys2≔ⅆⅆtx⁡t=−y⁡t,ⅆⅆty⁡t=x⁡t
init2≔x⁡0=1,y⁡0=0
dsol2≔dsolve⁡dsys2unioninit2,numeric,method=dverk78,output=Array⁡0,0.7,1.1,1.5,2.2,2.5
dsol2≔tx⁡ty⁡t0.1.0.0.70.7648421872847910.6442176872371351.10.4535961215337580.8912073599322991.50.07073720179088110.9974949865466862.2−0.5885011161042540.8084964039944372.5−0.8011436142677190.598472144707831
dsol21,11=dsol22,16,1,dsol21,12=dsol22,16,2
t=2.5,x⁡t=−0.801143614267719
listprocedure output
dsys3≔diff⁡x⁡t,`$`⁡t,3=x⁡t+y⁡t,diff⁡y⁡t,t=−x⁡t+y⁡t
dsys3≔ⅆ3ⅆt3x⁡t=x⁡t+y⁡t,ⅆⅆty⁡t=−x⁡t+y⁡t
init3≔x⁡0=1,y⁡0=1.3,D⁡x⁡0=−1,D2⁡x⁡0=0.5
dsol3≔dsolve⁡dsys3unioninit3,numeric,method=dverk78,output=listprocedure,maxstep=0.01:
dsol3x≔subs⁡dsol3,x⁡t:dsol3y≔subs⁡dsol3,y⁡t:
dsol3x⁡0,dsol3y⁡0
1.,1.3
dsol3x⁡1,dsol3y⁡1
0.623059643663728,2.30932410466714
dsol3x⁡1.5,dsol3y⁡1.5
1.36464098811480,3.23223976483577
Comparison of use of 'interpolant' and 'pair'
dsol4a≔dsolve⁡diff⁡y⁡x,x,x=−y⁡x,y⁡0=0,D⁡y⁡0=1,numeric,method=dverk78,tolerance=1.×10−9,errorest=interpolant
dsol4a ≔ procx_dverk78...end proc
tt≔time⁡:
dsol4a⁡1000
x=1000.,y⁡x=0.826879438181235,ⅆⅆxy⁡x=0.562379146833518
time⁡−tt
0.220
dsol4b≔dsolve⁡diff⁡y⁡x,x,x=−y⁡x,y⁡0=0,D⁡y⁡0=1,numeric,method=dverk78,tolerance=1.×10−9,errorest=pair
dsol4b ≔ procx_dverk78...end proc
dsol4b⁡1000
x=1000.,y⁡x=0.826879446231662,ⅆⅆxy⁡x=0.562379141799196
0.118
Enright, W.H. "The Relative Efficiency of Alternative Defect Control Schemes for High Order Continuous Runge-Kutta Formulas." Technical Report 252/91, Dept. of Computer Science, University of Toronto, June, 1991.
Verner, J.H. "Explicit Runge-Kutta Methods with Estimates of the Local Truncation Error." SIAM Journal of Numerical Analysis, Aug. 1978.
Much appreciation and thanks go to Dr. Jim Verner who provided us with the coefficients for the dverk78 method, and the related interpolant. Without these coefficients the method would be restricted to hardware precision.
See Also
dsolve/Error_Control
dsolve[ck45]
dsolve[classical]
dsolve[gear]
dsolve[lsode]
dsolve[maxfun]
dsolve[numeric,IVP]
dsolve[numeric]
dsolve[piecewise]
dsolve[rkf45]
dsolve[rosenbrock]
dsolve[Stiffness]
dsolve[taylorseries]
plots[odeplot]
Download Help Document