dsolve/numeric/dverk78 - Maple Programming Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Mathematics : Factorization and Solving Equations : Numerical Solutions : dsolve/dverk78

dsolve/numeric/dverk78

numerical solution of ordinary differential equations

 

Calling Sequence

Parameters

Description

Examples

References

Credits

Calling Sequence

dsolve(odesys, numeric, method=dverk78, vars, options)

dsolve(numeric, method=dverk78, 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=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].

Description

• 

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'       =

numeric

'initial'     =

array

'procvars'    =

list

'startinit'   =

boolean

'implicit'    =

boolean

'optimize'    =

boolean

'abserr'      =

numeric

'relerr'      =

numeric

'errorest'    =

symbol

'initstep'    =

numeric

'minstep'     =

numeric

'maxstep'     =

numeric

'maxfun'      =

integer

  

 

  

'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=maxsteprelerr1/6.

  

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=OFloat1,Digits9/8.

  

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<evalhfDigits, the algorithm works in truncevalhfDigits 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.

Examples

Default output at several points

dsol1dsolveDyx&equals;yx&comma;y0&equals;1&comma;numeric&comma;method&equals;dverk78&comma;abserr&equals;1.10-8&comma;relerr&equals;1.10-8

dsol1:=procx_dverk78...end proc

(1)

dsol10

x&equals;0.&comma;yx&equals;1.

(2)

dsol10.4

x&equals;0.400000000000000&comma;yx&equals;1.49182469764117

(3)

dsol11.2

x&equals;1.20000000000000&comma;yx&equals;3.32011692267802

(4)

dsol11.5

x&equals;1.50000000000000&comma;yx&equals;4.48168906989179

(5)

array output

dsys2&DifferentialD;&DifferentialD;txt&equals;yt&comma;&DifferentialD;&DifferentialD;tyt&equals;xt

dsys2:=&DifferentialD;&DifferentialD;txt&equals;yt&comma;&DifferentialD;&DifferentialD;tyt&equals;xt

(6)

init2x0&equals;1&comma;y0&equals;0

init2:=x0&equals;1&comma;y0&equals;0

(7)

dsol2dsolvedsys2&cup;init2&comma;numeric&comma;method&equals;dverk78&comma;output&equals;Array0&comma;0.7&comma;1.1&comma;1.5&comma;2.2&comma;2.5

dsol2:=txtyt0.1.0.0.70.7648421872847910.6442176872371351.10.4535961215337580.8912073599322991.50.07073720179088110.9974949865466862.20.5885011161042540.8084964039944372.50.8011436142677190.598472144707831

(8)

dsol21&comma;11&equals;dsol22&comma;16&comma;1&comma;dsol21&comma;12&equals;dsol22&comma;16&comma;2

t&equals;2.5&comma;xt&equals;0.801143614267719

(9)

listprocedure output

dsys3&DifferentialD;3&DifferentialD;t3xt&equals;xt&plus;yt&comma;&DifferentialD;&DifferentialD;tyt&equals;xt&plus;yt

dsys3:=&DifferentialD;3&DifferentialD;t3xt&equals;xt&plus;yt&comma;&DifferentialD;&DifferentialD;tyt&equals;xt&plus;yt

(10)

init3x0&equals;1&comma;Dx0&equals;1&comma;D2x0&equals;0.5&comma;y0&equals;1.3

init3:=x0&equals;1&comma;y0&equals;1.3&comma;Dx0&equals;1&comma;D2x0&equals;0.5

(11)

dsol3dsolvedsys3&cup;init3&comma;numeric&comma;method&equals;dverk78&comma;output&equals;listprocedure&comma;maxstep&equals;0.01&colon;

dsol3xsubsdsol3&comma;xt&colon;dsol3ysubsdsol3&comma;yt&colon;

dsol3x0&comma;dsol3y0

1.&comma;1.3

(12)

dsol3x1&comma;dsol3y1

0.623059643663728&comma;2.30932410466714

(13)

dsol3x1.5&comma;dsol3y1.5

1.36464098811480&comma;3.23223976483577

(14)

Comparison of use of 'interpolant' and 'pair'

dsol4adsolve&DifferentialD;2&DifferentialD;x2yx&equals;yx&comma;y0&equals;0&comma;Dy0&equals;1&comma;numeric&comma;method&equals;dverk78&comma;tolerance&equals;1.10-9&comma;errorest&equals;interpolant

dsol4a:=procx_dverk78...end proc

(15)

tttime&colon;

dsol4a1000

x&equals;1000.&comma;yx&equals;0.826879438181236&comma;&DifferentialD;&DifferentialD;xyx&equals;0.562379146833527

(16)

timett

0.216

(17)

dsol4bdsolve&DifferentialD;2&DifferentialD;x2yx&equals;yx&comma;y0&equals;0&comma;Dy0&equals;1&comma;numeric&comma;method&equals;dverk78&comma;tolerance&equals;1.10-9&comma;errorest&equals;pair

dsol4b:=procx_dverk78...end proc

(18)

tttime&colon;

dsol4b1000

x&equals;1000.&comma;yx&equals;0.826879446231662&comma;&DifferentialD;&DifferentialD;xyx&equals;0.562379141799196

(19)

timett

0.167

(20)

References

  

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.

Credits

  

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

Was this information helpful?



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