dsolve/numeric/delay - Maple Programming Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Mathematics : Differential Equations : dsolve : numeric : dsolve/numeric/delay

dsolve/numeric/delay

find numerical solution of delay differential initial value problems

 

Calling Sequence

Parameters

Description

Examples

Compatibility

Calling Sequence

dsolve(delaysys, numeric, vars, options)

Parameters

delaysys

-

set or list; ordinary differential or differential-algebraic equation(s) with delays

numeric

-

name; instruct dsolve to find a numerical solution

vars

-

(optional) dependent variable or a set or list of dependent variables for delaysys

options

-

(optional) equations of the form keyword = value

Description

• 

The dsolve command with the numeric or type=numeric option and a real-valued delay differential initial value problem finds a numerical solution for the delay IVP. If the optional equation method=numericmethod is provided (where numericmethod is one of rkf45, ck45, or rosenbrock), dsolve uses that method to obtain the numerical solution.

  

The dsolve command is able to detect the presence of delays automatically, but it requires additional information for the case of variable delays (see delaymax later).

• 

In addition to the options described in dsolve[numeric] and dsolve[Error_Control], delay differential systems also have the following options

'delaymax'

=

positive

'delaypts'

=

positive integer

  

'delaymax'= positive

  

This option is required for problems with a variable delay, and is required to specify the maximum delay time for all delays in the system.

  

 

  

'delaypts'= positive integer

  

This option specifies the maximum point storage to allocate when storing delay data, and must be at least 6, and at that setting will only be able to retain an accurate solution history for the last integration step taken. By default, this value is conservatively set to 10000. Note that if a small value is used, the computation will use less memory, but the results may be inaccurate. A warning is produced if this value is specified below 100.

• 

The delay computation implemented for the numeric solvers utilizes the natural interpolant built into the solvers, storing solution values back to delaymax as the computation proceeds. On initialization, the dependent variable values are assumed to be constants set to the initial values for all times t<t0, and once the delay time for a delay term exceeds tt0, the interpolant comes into play. Derivatives of the dependent variable values are assumed to be zero for all times t<t0.

  

In some cases, such as delays for derivatives, use of the initial value or zero is not desirable, and in these cases a constant value for t<t0 can be specified as the second argument to the delay function. For example, yt1 specifies that for t<1 the initial value of y is used, while yt1&comma;0 specifies that for t<1 the value 0 be used. Similarly, Dyt1 specifies that for t<1 the value 0 be used, while D1yt1&comma;1 specifies that for t<1 the value 1 be used.

  

In the event that a requested delay is so small as to be past the end of the last computed step, extrapolation using the interpolant of the last available step is used.

  

In the event that insufficient storage is allocated for a problem (in other words, if delaypts was set too small), the storage downgrades. Initially, it reduces to storing only integration step endpoints using a linear interpolant. Then if further downgrading is required, the storing reduces to every second endpoint, and consequently to every fourth, every eighth and so on. Note that solution accuracy is significantly degraded when downgrading is in use, so it is best to make delaypts sufficiently large so that downgrading is unnecessary.

• 

Note that delays can be used with DAE IVPs as well as with events, though events do not support setting of a past value on the trigger of an event. Also, note that the interpolant is only C1 continuous, so any DAE problems where a second derivative of a delay is required will fail to run, as the discontinuities will affect the error control.

Examples

Basic use of a delay

dsys&DifferentialD;&DifferentialD;tyt&equals;yt1&comma;y0&equals;2

dsys&DifferentialD;&DifferentialD;tyt=yt1&comma;y0=2

(1)

dsndsolvedsys&comma;numeric

dsn:=procx_rkf45_dae...end proc

(2)

plotsodeplotdsn&comma;0..10

Variable delay: note that this example shows the subtlety of setting delaymax. Although the delay at t&equals;0 is 12&plus;&ExponentialE;12&equals;2.148721271, it is only needed to store a delay of 1.07, since the value at the initial point is in use until that time and the delay is monotonically decreasing.

dsys&DifferentialD;&DifferentialD;tyt&equals;yt12&ExponentialE;t12&comma;y0&equals;2

dsys&DifferentialD;&DifferentialD;tyt=yt12&ExponentialE;t+12&comma;y0=2

(3)

dsndsolvedsys&comma;numeric&comma;delaymax&equals;1.07

dsn:=procx_rkf45_dae...end proc

(4)

plotsodeplotdsn&comma;0..10

Initial value specification through delay: this example shows the use of a second argument to the delay function to provide a nonzero derivative value for t<0.

Use of the default (delay value for D(y)(t-1) is 0):

dsys&DifferentialD;2&DifferentialD;t2yt&plus;&DifferentialD;&DifferentialD;tyt1&plus;yt&equals;0&comma;zt&equals;&DifferentialD;&DifferentialD;tyt1&comma;y0&equals;0&comma;Dy0&equals;1&colon;

dsndsolvedsys&comma;numeric&colon;

plotsodeplotdsn&comma;t&comma;yt&comma;color&equals;red&comma;t&comma;zt&comma;color&equals;blue&comma;0..2

So we see a jump in the derivalue value at t=1. We can instead specify that the delay value for D(y)(t-1) is 1 by using D[1](y)(t-1,1):

dsys&DifferentialD;2&DifferentialD;t2yt&plus;D1yt1&comma;1&plus;yt&equals;0&comma;zt&equals;D1yt1&comma;1&comma;y0&equals;0&comma;Dy0&equals;1&colon;

dsndsolvedsys&comma;numeric&colon;

plotsodeplotdsn&comma;t&comma;yt&comma;color&equals;red&comma;t&comma;zt&comma;color&equals;blue&comma;0..2

As an example of what effect one will see by too small a value of delaypts we compare a correct solution with one obtained by setting the value too small.

dsys&DifferentialD;2&DifferentialD;t2yt&plus;3ytyt2Pi2&equals;0&comma;y0&equals;0&comma;Dy0&equals;1&colon;

dsn1dsolvedsys&comma;numeric&colon;

plotsodeplotdsn1&comma;10..4Pi

dsn2dsolvedsys&comma;numeric&comma;delaypts&equals;20&colon;

Warning, Using a small value for 'delaypts' may result in an inaccurate solution unless your delay is extremely small, or the numerical ODE is trivial. Please see ?dsolve,numeric,delay for more information.

plotsodeplotdsn2&comma;10..4Pi

One can see that the concavity of the curve in the second plot is different than the first. This effect is more pronounced for systems that have stiffness, or high rates of change.

Compatibility

• 

The delaysys parameter was introduced in Maple 2015.

• 

The delaymax and delaypts options were introduced in Maple 2015.

• 

For more information on Maple 2015 changes, see Updates in Maple 2015.

Applications

Numeric Delay Differential Equation Examples

See Also

dsolve/Error_Control

dsolve[ck45]

dsolve[Events]

dsolve[numeric,interactive]

dsolve[numeric,IVP]

dsolve[numeric]

dsolve[rkf45]

dsolve[rosenbrock]

plots[odeplot]