 IVP - Maple Help

dsolve/numeric/IVP

find numerical solution of ODE initial value problems Calling Sequence dsolve(odesys, numeric, vars, options) dsolve(numeric, procopts, options) Parameters

 odesys - set or list; ordinary differential equation(s) and initial conditions numeric - name; instruct dsolve to find a numerical solution vars - (optional) any indeterminate function of one variable, or a set or list of them, representing the unknowns of the ODE problem procopts - (required if odesys is not present) options that specify a procedure-defined system (procedure, initial, start, number, and procvars). For more information, see below. options - (optional) equations of the form keyword = value Description

 • The dsolve command with the numeric or type=numeric option and an initial value problem (IVP) finds a numerical solution for the ODE or ODE system IVP. If the optional equation method=numericmethod is provided (where numericmethod is one of rkf45, ck45, rosenbrock, dverk78, lsode, gear, taylorseries, or classical), dsolve uses that method to obtain the numerical solution.
 • The return value of dsolve and the following high level or common options are discussed in dsolve[numeric] and dsolve[Error_Control].

 'output'     = keyword or array 'range'      = numeric..numeric 'abserr'     = numeric or list 'relerr'     = numeric 'stiff'      = boolean 'known'      = name or list of names

 • The exception is the list input form for abserr which requires the discussion below on conversion to first order to understand fully.
 In most cases it is sufficient to specify a single value for abserr for all solution components. The exception to this is when some dependent variables for derivatives of the system have values on a different scale than other variables of the system. When this occurs, the list input form for abserr can be used to specify a different absolute error tolerance for each dependent variable of the system, or each solution component of the system (the difference between these is that specification of a tolerance for a dependent variable of the system also does so for derivatives of that variable, while for solution components each value is considered independently.
 In order to specify dependent or component abserr, the order of the dependent variables in the output must be known. This can be controlled by specifying the dependent variables of the problem (the vars parameter to dsolve) as a list.
 From this, dependent variable abserr is easy to understand as there is a 1-1 correspondence between the specified variables and the specified abserr.
 The per-component abserr is a little trickier as the basic idea is the same, but depending on the order of each variable more than one abserr value may be required.
 For example, for a problem containing $x\text{'}\text{'},y\text{'}\text{'}\text{'},z'$, if the variables were specified as $\left[x\left(t\right),y\left(t\right),z\left(t\right)\right]$, then for per-component abserr six values would be required, and would correspond to $[x\left(t\right),x'\left(t\right),y\left(t\right),y'\left(t\right),y\text{'}\text{'}\left(t\right),z\left(t\right)]$.
 • Only the rkf45, ck45, and rosenbrock IVP methods support the list form for abserr.
 • The default IVP method is a Runge-Kutta Fehlberg method, which produces a solution accurate to fifth order. Another non-stiff IVP method is a Runge-Kutta method with the Cash-Karp coefficients. The default stiff method is a Rosenbrock method, which produces a solution accurate to fourth order. See dsolve[rkf45], dsolve[ck45], and dsolve[rosenbrock] for more detail on these methods. The other available methods for IVP are dsolve[dverk78], dsolve[lsode], dsolve[taylorseries], dsolve[gear], and dsolve[classical].
 • All IVP methods, with the exception of taylorseries, can work with a complex-valued IVP with a real-valued independent variable.
 • The following options are specific to IVP, and are concerned with specification of the input system in procedure form (procopts):

 'number'    = integer 'procedure' = procedure 'start'     = numeric 'initial'   = array 'procvars'  = list

 and the following options, also specific to IVP (and in some cases DAE), allow control of the solution method and step size, and the use of parameters in the system:

 'startinit'     = boolean 'minstep'       = numeric 'maxstep'       = numeric 'initstep'      = numeric 'events'        = list 'event_pre'     = keyword 'event_maxiter' = integer 'implicit'      = boolean 'parameters'    = list of names 'complex'       = boolean

 • Before discussion of the procedure-based options, the Maple treatment of the numerical handling of ODE system IVPs is described. To begin with, all systems are converted to first order systems by the introduction of new dependent variables. For example, if the single ODE

$3y\text{'}\text{'}\text{'}=2y\text{'}-xy=0$

 were to be numerically solved, the new dependent variables $u=y'$, $v=y\text{'}\text{'}$ would be introduced, and the single third order ODE would become a system of three first order ODEs in three dependent variables. In addition, the derivatives of the first order system are isolated. The result would be

$y\text{'}=u$

$u\text{'}=v$

$v\text{'}=-\frac{xy}{3}+\frac{2u}{3}$

 and the initial conditions would transform in the same way.
 Now that the ODE is converted to a first order system, it is possible to describe the procedure-based options more precisely. In all that follows, any reference to the system or dependent variables refers only to the first order system. Options

 'number'= integer
 The number of dependent variables in the first order system.
 'procedure'= procedure
 Procedure for the evaluation of the derivatives of the dependent variables. It must be of the form $\mathrm{proc}\left(N,x,Y,\mathrm{YP}\right)$, where $N$ is the number of dependent variables, $x$ is the value of the independent variable at which the derivatives are to be evaluated, $Y$ is an array of the dependent variable values at $x$, and $\mathrm{YP}$ is an output array into which the procedure places the computed values of the derivatives.
 For the above example, given that the correspondence of the variables is ${Y}_{1}=y,{Y}_{2}=u$, and ${Y}_{3}=v$, the following procedure correctly evaluates the derivatives of the ODE system.

 solproc := proc(N, x, Y, YP) YP := Y; YP := Y; YP := (2*Y - x*Y)/3; end proc;

 'start'= numeric
 Numeric value that specifies the initial value of the independent variable.
 'initial'= array
 Array that specifies the initial values of the dependent variables of the first order system. These values must be present in this array in the same order as that used by the procedure given in the procedure argument.
 'procvars'= list
 List that specifies the names of the dependent variables corresponding to the indexed values in the solution procedure and the initial value array. For the above example, $\mathrm{procvars}=\left[y\left(x\right),u\left(x\right),v\left(x\right)\right]$ can be used. To instead display solutions in the variables of the original ODE, $\mathrm{procvars}=\left[y\left(x\right),\frac{ⅆ}{ⅆx}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}y\left(x\right),\frac{{ⅆ}^{2}}{ⅆ{x}^{2}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}y\left(x\right)\right]$ can be used.
 When an ODE or ODE system is input directly (a system defined problem - does not use the procedure options), Maple converts the system to first order internally by renaming derivatives as new dependent variables. It obtains the number, procedure, start, initial, and procvars values from the input. In cases where both the system form and the procedure form of the input is present, the system form is ignored and a warning is issued.
 Note: If the ODE system is provided in solved form with respect to the leading derivatives (the highest derivative of each dependent variable of the system), no algebraic manipulation of the system is done in obtaining the procedure form (other than derivative renaming to new dependent variables). This allows better control of the actual computation of the derivatives in the system. If any of the equations in the ODE system are not in solved form, solve is called to obtain the solved form, which means that certain undesirable side effects may occur (for example, consider solve(y-(x+1)^20-1,y) ).
 'implicit'= boolean
 Argument that can only be true for ODE systems that are linear in the leading derivatives, and can only be used with the rkf45, ck45, rosenbrock, dverk78, gear, lsode, and classical methods with system-defined problems. By default, this option is false, but setting this option to true tells dsolve[numeric] to leave the system in unsolved form, and compute the derivative values through a linear solve each time they are needed. This means that a method requiring $n$ function evaluations per step must perform $n$ linear solves per step.
 Though use of this option slows the computation in most cases, it is necessary for ODE systems that have complicated coefficients, for which the isolation of the leading derivatives would result in excessive expression swell, or an ill-conditioned function to compute the derivative values. This behavior occurs frequently in mapping solutions of polynomial systems to solutions of differential systems using homotopy methods.
 'events'= list
 'event_pre'= keyword
 'event_maxiter'= integer
 Arguments that are only available for the rkf45, ck45, and rosenbrock methods, and are used to specify and control the behavior of events. These options are discussed in detail in dsolve[Events].
 'startinit'= boolean
 Boolean that controls the behavior of the numerical integration with respect to consecutive calculations. If startinit=true is specified, each calculation begins at the initial point of the problem. If startinit=false (the default setting), then each calculation begins where the prior calculation ended, provided it does not reverse the direction of the integration. If doing so would reverse the integration direction, the computation is started from the initial point.
 For the methods, rkf45, ck45, and rosenbrock, the solution is only recomputed when the new value of the independent variable is not between the initial point and any other previously requested solution point. This has the effect of never reversing the direction of integration, and making evaluation of the solution for an already computed interval quite inexpensive (the solution values are obtained by interpolation). The storage of the solution can be disabled by using the storage argument. The startinit parameter also tells these methods to recompute the solution whenever a solution value is desired.
 'complex'=boolean
 For all IVP methods, you may specify that the problem is complex with the complex option.  Note that this option is not available for the other numeric methods. For the default stiff and nonstiff IVP methods, it may be necessary to specify when the problem is complex.  The default value is false.
 • The minstep, maxstep, and initstep options are discussed in dsolve[Error_Control].
 • In addition to computation of solution values for the given input problem, the procedure returns (that is, output=procedurelist, listprocedure or operator) provide additional interactive features, including the ability to specify parameters. Information on these features is provided on the dsolve[numeric,interactive] page. Examples

Initial value problem with solution $y\left(x\right)=\mathrm{sin}\left(x\right)$, integrated in both directions:

 > $\mathrm{dsys1}≔\left\{\mathrm{diff}\left(y\left(x\right),x,x\right)+y\left(x\right)=0,y\left(1\right)=\mathrm{sin}\left(1\right),\mathrm{D}\left(y\right)\left(1\right)=\mathrm{cos}\left(1\right)\right\}$
 ${\mathrm{dsys1}}{≔}\left\{\frac{{{ⅆ}}^{{2}}}{{ⅆ}{{x}}^{{2}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right){+}{y}{}\left({x}\right){=}{0}{,}{y}{}\left({1}\right){=}{\mathrm{sin}}{}\left({1}\right){,}{\mathrm{D}}{}\left({y}\right){}\left({1}\right){=}{\mathrm{cos}}{}\left({1}\right)\right\}$ (1)
 > $\mathrm{dsol1}≔\mathrm{dsolve}\left(\mathrm{dsys1},\mathrm{numeric},\mathrm{method}=\mathrm{gear}\right)$
 ${\mathrm{dsol1}}{≔}{\mathbf{proc}}\left({\mathrm{x_gear}}\right)\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{...}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathbf{end proc}}$ (2)
 > $\mathrm{dsol1}\left(0\right)$
 $\left[{x}{=}{0.}{,}{y}{}\left({x}\right){=}{8.05339006126137}{×}{{10}}^{{-12}}{,}\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right){=}{0.999999999997424}\right]$ (3)
 > $\mathrm{dsol1}\left(\mathrm{\pi }\right)$
 $\left[{x}{=}{3.14159265358979}{,}{y}{}\left({x}\right){=}{6.97710003877356}{×}{{10}}^{{-12}}{,}\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right){=}{-0.999999999999881}\right]$ (4)

IVP system:

 > $\mathrm{deq2}≔\left\{\mathrm{diff}\left(x\left(t\right),t\right)=y\left(t\right),\mathrm{diff}\left(y\left(t\right),t\right)=x\left(t\right)+y\left(t\right)\right\}$
 ${\mathrm{deq2}}{≔}\left\{\frac{{ⅆ}}{{ⅆ}{t}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{x}{}\left({t}\right){=}{y}{}\left({t}\right){,}\frac{{ⅆ}}{{ⅆ}{t}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({t}\right){=}{x}{}\left({t}\right){+}{y}{}\left({t}\right)\right\}$ (5)
 > $\mathrm{ic2}≔\left\{x\left(0\right)=2,y\left(0\right)=1\right\}:$
 > $\mathrm{dsol2}≔\mathrm{dsolve}\left(\mathrm{deq2}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathbf{union}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathrm{ic2},\mathrm{numeric},\mathrm{output}=\mathrm{listprocedure},\mathrm{range}=0..1\right)$
 ${\mathrm{dsol2}}{≔}\left[{t}{=}{\mathbf{proc}}\left({t}\right)\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{...}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathbf{end proc}}{,}{x}{}\left({t}\right){=}{\mathbf{proc}}\left({t}\right)\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{...}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathbf{end proc}}{,}{y}{}\left({t}\right){=}{\mathbf{proc}}\left({t}\right)\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{...}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathbf{end proc}}\right]$ (6)
 > $\mathrm{dsol2x}≔\mathrm{subs}\left(\mathrm{dsol2},x\left(t\right)\right):$$\mathrm{dsol2y}≔\mathrm{subs}\left(\mathrm{dsol2},y\left(t\right)\right):$
 > $\left[\mathrm{dsol2x}\left(0\right),\mathrm{dsol2y}\left(0\right)\right]$
 $\left[{2.}{,}{1.}\right]$ (7)
 > $\left[\mathrm{dsol2x}\left(0.4\right),\mathrm{dsol2y}\left(0.4\right)\right]$
 $\left[{2.69118458493332}{,}{2.60811748317261}\right]$ (8)
 > $\left[\mathrm{dsol2x}\left(1.0\right),\mathrm{dsol2y}\left(1.0\right)\right]$
 $\left[{5.58216753140384}{,}{7.82688926499912}\right]$ (9)

Lorenz system using procedure specification:

 > dproc3 := proc(N,t,Y,YP)    YP := sigma * (Y - Y);    YP := r*Y - Y*Y - Y;    YP := Y*Y - b*Y; end proc:
 > $\mathrm{\sigma }≔10:$$r≔28:$$b≔\frac{8}{3}:$
 > $\mathrm{ic3}≔\mathrm{Array}\left(\left[5,5,5\right]\right):$
 > $\mathrm{dvars3}≔\left[x\left(t\right),y\left(t\right),z\left(t\right)\right]:$
 > $\mathrm{dsol3}≔\mathrm{dsolve}\left(\mathrm{numeric},\mathrm{number}=3,\mathrm{procedure}=\mathrm{dproc3},\mathrm{start}=0,\mathrm{initial}=\mathrm{ic3},\mathrm{procvars}=\mathrm{dvars3}\right)$
 ${\mathrm{dsol3}}{≔}{\mathbf{proc}}\left({\mathrm{x_rkf45}}\right)\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{...}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathbf{end proc}}$ (10)
 > $\mathrm{dsol3}\left(1\right)$
 $\left[{t}{=}{1.}{,}{x}{}\left({t}\right){=}{-7.09064281000129}{,}{y}{}\left({t}\right){=}{-4.13869080943593}{,}{z}{}\left({t}\right){=}{29.0616065518357}\right]$ (11)
 > $\mathrm{dsol3}\left(2\right)$
 $\left[{t}{=}{2.}{,}{x}{}\left({t}\right){=}{-9.13349830723850}{,}{y}{}\left({t}\right){=}{-12.6955376022149}{,}{z}{}\left({t}\right){=}{22.4637998042670}\right]$ (12)
 > $\mathrm{dsol3}\left(3\right)$
 $\left[{t}{=}{3.}{,}{x}{}\left({t}\right){=}{-5.00807269946467}{,}{y}{}\left({t}\right){=}{-2.53517706788747}{,}{z}{}\left({t}\right){=}{26.6155378375388}\right]$ (13)

The following is a problem (of the form $\left({ⅇ}^{x}y'\right)'+\mathrm{sin}\left(x\right)y\left(x\right)=0$ ) where the natural naming of the variables is not the desired one. Choose the first dependent variable as $y\left(x\right)$, and the second as $v\left(x\right)={ⅇ}^{x}y'\left(x\right)$, and use the procedure specification of the problem.

 > dproc4 := proc(N,x,Y,YP)    YP := exp(-x)*Y;    YP := -sin(x)*Y; end proc;
 ${\mathrm{dproc4}}{≔}{\mathbf{proc}}\left({N}{,}{x}{,}{Y}{,}{\mathrm{YP}}\right)\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathrm{YP}}{[}{1}{]}{≔}{\mathrm{exp}}{}\left({−}{x}\right){*}{Y}{[}{2}{]}{;}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathrm{YP}}{[}{2}{]}{≔}{−}{\mathrm{sin}}{}\left({x}\right){*}{Y}{[}{1}{]}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathbf{end proc}}$ (14)
 > $\mathrm{ic4}≔\mathrm{Array}\left(\left[1,0\right]\right):$
 > $\mathrm{dvars4}≔\left[y\left(x\right),\mathrm{exp}\left(x\right)\mathrm{diff}\left(y\left(x\right),x\right)\right]:$
 > $\mathrm{dsol4}≔\mathrm{dsolve}\left(\mathrm{numeric},\mathrm{number}=2,\mathrm{procedure}=\mathrm{dproc4},\mathrm{start}=0,\mathrm{initial}=\mathrm{ic4},\mathrm{procvars}=\mathrm{dvars4}\right)$
 ${\mathrm{dsol4}}{≔}{\mathbf{proc}}\left({\mathrm{x_rkf45}}\right)\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{...}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathbf{end proc}}$ (15)
 > $\mathrm{dsol4}\left(0\right)$
 $\left[{x}{=}{0.}{,}{y}{}\left({x}\right){=}{1.}{,}{{ⅇ}}^{{x}}{}\left(\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right)\right){=}{0.}\right]$ (16)
 > $\mathrm{dsol4}\left(1\right)$
 $\left[{x}{=}{1.}{,}{y}{}\left({x}\right){=}{0.924554126889498}{,}{{ⅇ}}^{{x}}{}\left(\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right)\right){=}{-0.444194433465032}\right]$ (17)
 > $\mathrm{dsol4}\left(2\right)$
 $\left[{x}{=}{2.}{,}{y}{}\left({x}\right){=}{0.741972301895190}{,}{{ⅇ}}^{{x}}{}\left(\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right)\right){=}{-1.24013689804566}\right]$ (18)

A complex-valued initial value problem:

 > $\mathrm{dsys1}≔\left\{\mathrm{diff}\left(y\left(x\right),x\right)+Iy\left(x\right)=0,y\left(0\right)=1+2I\right\}$
 ${\mathrm{dsys1}}{≔}\left\{\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right){+}{I}{}{y}{}\left({x}\right){=}{0}{,}{y}{}\left({0}\right){=}{1}{+}{2}{}{I}\right\}$ (19)
 > $\mathrm{dsol5}≔\mathrm{dsolve}\left(\mathrm{dsys1},\mathrm{numeric},\mathrm{method}=\mathrm{gear}\right)$
 ${\mathrm{dsol5}}{≔}{\mathbf{proc}}\left({\mathrm{x_gear}}\right)\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{...}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathbf{end proc}}$ (20)
 > $\mathrm{dsol5}\left(\frac{\mathrm{\pi }}{2}\right)$
 $\left[{x}{=}{1.57079632679490}{,}{y}{}\left({x}\right){=}{2.00000000000367}{-}{I}\right]$ (21)
 > $\mathrm{dsol5}\left(\mathrm{\pi }\right)$
 $\left[{x}{=}{3.14159265358979}{,}{y}{}\left({x}\right){=}{-1.00000000001409}{-}{2.00000000003328}{}{I}\right]$ (22)
 > $\mathrm{dsol5}\left(2\mathrm{\pi }\right)$
 $\left[{x}{=}{6.28318530717958}{,}{y}{}\left({x}\right){=}{1.00000000000419}{+}{2.00000000002333}{}{I}\right]$ (23)

Interactive examples:

 > $\mathrm{dsys}≔\left\{\mathrm{diff}\left(y\left(x\right),x\right)={y\left(x\right)}^{2},y\left(0\right)=1\right\}$
 ${\mathrm{dsys}}{≔}\left\{\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right){=}{{y}{}\left({x}\right)}^{{2}}{,}{y}{}\left({0}\right){=}{1}\right\}$ (24)
 > $\mathrm{dsoli}≔\mathrm{dsolve}\left(\mathrm{dsys},\mathrm{numeric}\right)$
 ${\mathrm{dsoli}}{≔}{\mathbf{proc}}\left({\mathrm{x_rkf45}}\right)\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{...}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathbf{end proc}}$ (25)

Perform a computation.

 > $\mathrm{dsoli}\left(0.5\right)$
 $\left[{x}{=}{0.5}{,}{y}{}\left({x}\right){=}{2.00000045906252}\right]$ (26)

Query the initial value, last computed value, and method.

 > $\mathrm{dsoli}\left('\mathrm{initial}'\right)$
 $\left[{x}{=}{0.}{,}{y}{}\left({x}\right){=}{1.}\right]$ (27)
 > $\mathrm{dsoli}\left('\mathrm{last}'\right)$
 $\left[{x}{=}{0.500000000000000}{,}{y}{}\left({x}\right){=}{2.00000045906252}\right]$ (28)
 > $\mathrm{dsoli}\left('\mathrm{method}'\right)$
 ${"rkf45"}$ (29)

Compute up to a singularity.

 > $\mathrm{dsoli}\left(1\right)$

Query closest point to singularity that the method obtained.

 > $\mathrm{dsoli}\left('\mathrm{last}'\right)$
 $\left[{x}{=}{0.999999994312848}{,}{y}{}\left({x}\right){=}{1.00607191562369}{×}{{10}}^{{12}}\right]$ (30)

Change initial condition, and recompute.

 > $\mathrm{dsoli}\left('\mathrm{initial}'=\left[1,\frac{1}{2}\right]\right)$
 $\left[{x}{=}{1.}{,}{y}{}\left({x}\right){=}{0.500000000000000}\right]$ (31)
 > $\mathrm{dsoli}\left(3\right)$
 > $\mathrm{dsoli}\left('\mathrm{last}'\right)$
 $\left[{x}{=}{2.99999998871727}{,}{y}{}\left({x}\right){=}{3.25728571163544}{×}{{10}}^{{11}}\right]$ (32)

Now listprocedure output:

 > $\mathrm{dsoli2}≔\mathrm{dsolve}\left(\mathrm{dsys},\mathrm{numeric},\mathrm{output}=\mathrm{listprocedure}\right)$
 ${\mathrm{dsoli2}}{≔}\left[{x}{=}{\mathbf{proc}}\left({x}\right)\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{...}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathbf{end proc}}{,}{y}{}\left({x}\right){=}{\mathbf{proc}}\left({x}\right)\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{...}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathbf{end proc}}\right]$ (33)
 > $\mathrm{dsx}≔\mathrm{rhs}\left(\mathrm{dsoli2}\left[1\right]\right)$
 ${\mathrm{dsx}}{≔}{\mathbf{proc}}\left({x}\right)\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{...}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathbf{end proc}}$ (34)
 > $\mathrm{dsy}≔\mathrm{rhs}\left(\mathrm{dsoli2}\left[2\right]\right)$
 ${\mathrm{dsy}}{≔}{\mathbf{proc}}\left({x}\right)\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{...}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathbf{end proc}}$ (35)

Compute and query.

 > $\mathrm{dsy}\left(0.5\right)$
 ${2.00000045906252}$ (36)
 > $\mathrm{dsx}\left('\mathrm{last}'\right)$
 ${0.500000000000000}$ (37)

Change the initial x point only, and compute $y\left(1.5\right)$.

 > $\mathrm{dsx}\left('\mathrm{initial}'=1\right)$
 ${1.}$ (38)
 > $\mathrm{dsy}\left(1.5\right)$
 ${2.00000045906252}$ (39)

Change both.

 > $\mathrm{dsy}\left('\mathrm{initial}'=\left[1,\frac{1}{2}\right]\right)$
 ${0.500000000000000}$ (40)
 > $\mathrm{dsy}\left(3.0\right)$
 > $\left[\mathrm{dsx}\left('\mathrm{last}'\right),\mathrm{dsy}\left('\mathrm{last}'\right)\right]$
 $\left[{2.99999998871727}{,}{3.25728571163544}{×}{{10}}^{{11}}\right]$ (41)