dsolve/numeric/mebdfi
numerical solution of differential-algebraic equations
Calling Sequence
Parameters
Description
Examples
References
dsolve(daesys, numeric, method=mebdfi, vars, options)
daesys
-
set or list; differential-algebraic system of equation and initial conditions
numeric
literal name; instruct dsolve to find a numerical solution
method=mebdfi
literal equation; numerical method to use
vars
(optional) a set or list of dependent variables for daesys
options
(optional) equations of the form keyword = value
The dsolve command with the options numeric and method=mebdfi finds a numerical solution of a DAE system using the Modified Extended Backward Differentiation Equation Implicit method. This is a stiff method, so can handle stiff problems efficiently, but should only be used for DAE of index 2 or lower. It can be used to solve regular ODE problems, but use of regular ODE solvers is recommended for that purpose (see dsolve[numeric,IVP]).
The following options are available for the mebdfi method:
'output'
=
keyword or array
'known'
name or list of names
'startinit'
boolean
'optimize'
'maxfun'
integer
'abserr'
'relerr'
'minstep'
'maxstep'
'initstep'
'maxord'
'output' and 'known'
The 'output' option specifies the output from dsolve, and the known option specifies user-defined known functions. These options are discussed in dsolve[numeric].
'startinit' and 'optimize'
These options control the method and behavior of the computation, the 'startinit' option is the same as for IVP problems, and is discussed in dsolve[numeric,IVP], while the 'optimize' option is discussed in dsolve[numeric].
This option specifies the maximum number of steps taken to obtain the requested solution. For this direct solver, this is the closest parallel to dsolve[maxfun]. By default this option is disabled.
'abserr' and 'relerr'
These options specify the desired accuracy of the solution, and are discussed in dsolve[Error_Control]. The default values for mebdfi are abserr=1.×10−7 and relerr=1.×10−6.
'minstep', 'maxstep', and 'initstep'
These options provide finer control over the step size used in the method, and are also discussed in dsolve[Error_Control]. By default minstep is determined within the computation, maxstep is disabled, and initstep=relerr. When setting minstep ensure that the value is adequately small to allow for the first few steps, which are computed at a lower order.
This option specifies the maximum order of the method used in the course of the computation as an integer between 2 and 8. The default value is 8, but for difficult problems it may be necessary to specify this as 4 or 5. Lower order gives better stability, but is less efficient.
The computation may return with an error message corresponding to an error condition of the mebdfi procedure.
Results can be plotted using the function odeplot in the plots package.
Double pendulum (index-reduced to index-2):
dsys≔x1⁡t−x2⁡t⁢diff⁡x1⁡t−x2⁡t,t+y1⁡t−y2⁡t⁢diff⁡y1⁡t−y2⁡t,t,x1⁡t⁢diff⁡x1⁡t,t+y1⁡t⁢diff⁡y1⁡t,t,diff⁡y1⁡t,t,t+9.8+2⁢λ1⁡t⁢y1⁡t+2⁢λ2⁡t⁢y1⁡t−y2⁡t,diff⁡x1⁡t,t,t+2⁢λ1⁡t⁢x1⁡t+2⁢λ2⁡t⁢x1⁡t−x2⁡t,diff⁡y2⁡t,t,t+9.8−2⁢λ2⁡t⁢y1⁡t−y2⁡t,diff⁡x2⁡t,t,t−2⁢λ2⁡t⁢x1⁡t−x2⁡t
dsys≔x1⁡t−x2⁡t⁢ⅆⅆtx1⁡t−ⅆⅆtx2⁡t+y1⁡t−y2⁡t⁢ⅆⅆty1⁡t−ⅆⅆty2⁡t,x1⁡t⁢ⅆⅆtx1⁡t+y1⁡t⁢ⅆⅆty1⁡t,ⅆ2ⅆt2x2⁡t−2⁢λ2⁡t⁢x1⁡t−x2⁡t,ⅆ2ⅆt2x1⁡t+2⁢λ1⁡t⁢x1⁡t+2⁢λ2⁡t⁢x1⁡t−x2⁡t,ⅆ2ⅆt2y2⁡t+9.8−2⁢λ2⁡t⁢y1⁡t−y2⁡t,ⅆ2ⅆt2y1⁡t+9.8+2⁢λ1⁡t⁢y1⁡t+2⁢λ2⁡t⁢y1⁡t−y2⁡t
ics≔x1⁡0=0,x2⁡0=0,y1⁡0=−1,y2⁡0=−32,D⁡x1⁡0=−3,D⁡x2⁡0=4,D⁡y1⁡0=0,D⁡y2⁡0=0
Default solution:
dsol1≔dsolve⁡dsysunionics,numeric,method=mebdfi
dsol1 ≔ procx_mebdfi...end proc
t1≔time⁡:
dsol1⁡10
t=10.,λ1⁡t=8.05374866836774572,λ2⁡t=−6.40533775902082869,x1⁡t=−0.355531961724009915,ⅆⅆtx1⁡t=−1.25978921249117670,x2⁡t=−0.492864788890956418,ⅆⅆtx2⁡t=−1.05303335398026632,y1⁡t=−0.934664111102251338,ⅆⅆty1⁡t=0.479204587580475905,y2⁡t=−0.453894585514793392,ⅆⅆty2⁡t=0.538264833117563346
time⁡−t1
0.749
Lower order for stability:
dsol2≔dsolve⁡dsysunionics,numeric,method=mebdfi,maxord=4
dsol2 ≔ procx_mebdfi...end proc
t2≔time⁡:
dsol2⁡10
t=10.,λ1⁡t=8.05124380921260041,λ2⁡t=−6.42065568374894546,x1⁡t=−0.357252010506513173,ⅆⅆtx1⁡t=−1.25072569463780869,x2⁡t=−0.492112228851291800,ⅆⅆtx2⁡t=−1.04698380844525074,y1⁡t=−0.934008348789023168,ⅆⅆty1⁡t=0.478394293227407508,y2⁡t=−0.452537634291989843,ⅆⅆty2⁡t=0.535462511444270373
time⁡−t2
1.234
Cash, J.R. "The Integration of stiff IVP in ODE using modified extended BDF." Computers and Mathematics with Applications. Vol. 9. (1983): 645-657.
Cash, J.R., and Considine, S. "An MEBDF code for stiff IVP." ACM Trans Math Software. 1992: 142-158.
See Also
dsolve/DAE_extension
dsolve/Error_Control
dsolve[ck45]
dsolve[maxfun]
dsolve[numeric,DAE]
dsolve[numeric,IVP]
dsolve[numeric]
dsolve[rkf45]
dsolve[rosenbrock]
dsolve[Stiffness]
plots[odeplot]
Download Help Document