Delay Differential Equations - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Mathematics : Differential Equations : dsolve : numeric : Delay Differential Equations

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.

  

Delays can also be used for IVPs with parameters, though parameters cannot be used in the delay itself.

Examples

Basic use of a delay

dsysdiffyt&comma;t=yt1&comma;y0=2

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

(1)

dsndsolvedsys&comma;numeric

dsnprocx_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.

dsysdiffyt&comma;t=yt12expt12&comma;y0=2

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

(3)

dsndsolvedsys&comma;numeric&comma;delaymax=1.07

dsnprocx_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):

dsysdiffyt&comma;t&comma;t+diffyt1&comma;t+yt=0&comma;y0=0&comma;zt=diffyt1&comma;t&comma;Dy0=1&colon;

dsndsolvedsys&comma;numeric&colon;

plotsodeplotdsn&comma;t&comma;yt&comma;color=red&comma;t&comma;zt&comma;color=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):

dsysdiffyt&comma;t&comma;t+D1yt1&comma;1+yt=0&comma;y0=0&comma;zt=D1yt1&comma;1&comma;Dy0=1&colon;

dsndsolvedsys&comma;numeric&colon;

plotsodeplotdsn&comma;t&comma;yt&comma;color=red&comma;t&comma;zt&comma;color=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.

dsysdiffyt&comma;t&comma;t+3ytyt2π2=0&comma;y0=0&comma;Dy0=1&colon;

dsn1dsolvedsys&comma;numeric&colon;

plotsodeplotdsn1&comma;10..4π

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

plotsodeplotdsn2&comma;10..4π

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.

Delay with parameters

dsysdiffyt&comma;t&comma;t+ayt110&comma;y0=0&comma;Dy0=1&colon;

dsndsolvedsys&comma;numeric&comma;parameters=a&colon;

dsnparameters=a=1

a=1.

(5)

plotsodeplotdsn&comma;0..4π

dsnparameters=a=2

a=2.

(6)

plotsodeplotdsn&comma;0..4π

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]