# DDE Problems

SciMLBase.DDEProblemType

Defines a delay differential equation (DDE) problem. Documentation Page: https://diffeq.sciml.ai/stable/types/dde_types/

Mathematical Specification of a DDE Problem

To define a DDE Problem, you simply need to give the function $f$, the initial condition $u_0$ at time point $t_0$, and the history function $h$ which together define a DDE:

$$$\frac{du}{dt} = f(u,h,p,t) \qquad (t \geq t_0)$$$$$$u(t_0) = u_0,$$$$$$u(t) = h(t) \qquad (t < t_0).$$$

$f$ should be specified as f(u, h, p, t) (or in-place as f(du, u, h, p, t)), $u_0$ should be an AbstractArray (or number) whose geometry matches the desired geometry of u, and $h$ should be specified as described below. The history function h is accessed for all delayed values. Note that we are not limited to numbers or vectors for $u_0$; one is allowed to provide $u_0$ as arbitrary matrices / higher dimension tensors as well.

Functional Forms of the History Function

The history function h can be called in the following ways:

• h(p, t): out-of-place calculation
• h(out, p, t): in-place calculation
• h(p, t, deriv::Type{Val{i}}): out-of-place calculation of the ith derivative
• h(out, p, t, deriv::Type{Val{i}}): in-place calculation of the ith derivative
• h(args...; idxs): calculation of h(args...) for indices idxs

Note that a dispatch for the supplied history function of matching form is required for whichever function forms are used in the user derivative function f.

Declaring Lags

Lags are declared separately from their use. One can use any lag by simply using the interpolant of h at that point. However, one should use caution in order to achieve the best accuracy. When lags are declared, the solvers can more efficiently be more accurate and thus this is recommended.

Neutral and Retarded Delay Differential Equations

Note that the history function specification can be used to specify general retarded arguments, i.e. h(p,α(u,t)). Neutral delay differential equations can be specified by using the deriv value in the history interpolation. For example, h(p,t-τ, Val{1}) returns the first derivative of the history values at time t-τ.

Note that algebraic equations can be specified by using a singular mass matrix.

Problem Type

Constructors

DDEProblem(f[, u0], h, tspan[, p]; <keyword arguments>)
DDEProblem{isinplace}(f[, u0], h, tspan[, p]; <keyword arguments>)

Parameter isinplace optionally sets whether the function is inplace or not. This is determined automatically, but not inferred.

Parameters are optional, and if not given then a NullParameters() singleton will be used which will throw nice errors if you try to index non-existent parameters. Any extra keyword arguments are passed on to the solvers. For example, if you set a callback in the problem, then that callback will be added in every solve call.

For specifying Jacobians and mass matrices, see the DiffEqFunctions page.

Arguments

• f: The function in the DDE.
• u0: The initial condition. Defaults to the value h(p, first(tspan)) of the history function evaluated at the initial time point.
• h: The history function for the DDE before t0.
• tspan: The timespan for the problem.
• p: The parameters with which function f is called. Defaults to NullParameters.
• constant_lags: A collection of constant lags used by the history function h. Defaults to ().
• dependent_lags A tuple of functions (u, p, t) -> lag for the state-dependent lags used by the history function h. Defaults to ().
• neutral: If the DDE is neutral, i.e., if delays appear in derivative terms.
• order_discontinuity_t0: The order of the discontinuity at the initial time point. Defaults to 0 if an initial condition u0 is provided. Otherwise it is forced to be greater or equal than 1.
• kwargs: The keyword arguments passed onto the solves.

Dynamical Delay Differential Equations

Much like Dynamical ODEs, a Dynamical DDE is a Partitioned DDE of the form:

$$$\frac{dv}{dt} = f_1(u,t,h) \\ \frac{du}{dt} = f_2(v,h) \\$$$

Constructors

DynamicalDDEProblem(f1, f2[, v0, u0], h, tspan[, p]; <keyword arguments>)
DynamicalDDEProblem{isinplace}(f1, f2[, v0, u0], h, tspan[, p]; <keyword arguments>)

Parameter isinplace optionally sets whether the function is inplace or not. This is determined automatically, but not inferred.

Arguments

• f: The function in the DDE.
• v0 and u0: The initial condition. Defaults to the values h(p, first(tspan))... of the history function evaluated at the initial time point.
• h: The history function for the DDE before t0. Must return an object with the indices 1 and 2, with the values of v and u respectively.
• tspan: The timespan for the problem.
• p: The parameters with which function f is called. Defaults to NullParameters.
• constant_lags: A collection of constant lags used by the history function h. Defaults to ().
• dependent_lags A tuple of functions (v, u, p, t) -> lag for the state-dependent lags used by the history function h. Defaults to ().
• neutral: If the DDE is neutral, i.e., if delays appear in derivative terms.
• order_discontinuity_t0: The order of the discontinuity at the initial time point. Defaults to 0 if an initial condition u0 is provided. Otherwise it is forced to be greater or equal than 1.
• kwargs: The keyword arguments passed onto the solves.

The for dynamical and second order DDEs, the history function will return an object with the indicies 1 and 2 defined, where h(p, t_prev) is the value of $f_2(v, u, h, p, t_{\mathrm{prev}})$ and h(p, t_prev) is the value of $f_1(v, u, h, p, t_{\mathrm{prev}})$ (this is for consistency with the ordering of the intitial conditions in the constructor). The supplied history function must also return such a 2-index object, which can be accomplished with a tuple (v,u) or vector [v,u].

2nd Order Delay Differential Equations

To define a 2nd Order DDE Problem, you simply need to give the function $f$ and the initial condition $u_0$ which define an DDE:

$$$u'' = f(u',u,h,p,t)$$$

f should be specified as f(du,u,p,t) (or in-place as f(ddu,du,u,p,t)), and u₀ should be an AbstractArray (or number) whose geometry matches the desired geometry of u. Note that we are not limited to numbers or vectors for u₀; one is allowed to provide u₀ as arbitrary matrices / higher dimension tensors as well.

From this form, a dynamical ODE:

$$$v' = f(v,u,h,p,t) \\ u' = v \\$$$

Constructors

SecondOrderDDEProblem(f, [, du0, u0], h, tspan[, p]; <keyword arguments>)
SecondOrderDDEProblem{isinplace}(f, [, du0, u0], h, tspan[, p]; <keyword arguments>)

Parameter isinplace optionally sets whether the function is inplace or not. This is determined automatically, but not inferred.

Arguments

• f: The function in the DDE.
• du0 and u0: The initial condition. Defaults to the values h(p, first(tspan))... of the history function evaluated at the initial time point.
• h: The history function for the DDE before t0. Must return an object with the indices 1 and 2, with the values of v and u respectively.
• tspan: The timespan for the problem.
• p: The parameters with which function f is called. Defaults to NullParameters.
• constant_lags: A collection of constant lags used by the history function h. Defaults to ().
• dependent_lags A tuple of functions (v, u, p, t) -> lag for the state-dependent lags used by the history function h. Defaults to ().
• neutral: If the DDE is neutral, i.e., if delays appear in derivative terms.
• order_discontinuity_t0: The order of the discontinuity at the initial time point. Defaults to 0 if an initial condition u0 is provided. Otherwise it is forced to be greater or equal than 1.
• kwargs: The keyword arguments passed onto the solves.

As above, the history function will return an object with indices 1 and 2, with the values of du and u respectively. The supplied history function must also match this return type, e.g. by returning a 2-element tuple or vector.

Example Problems

Example problems can be found in DiffEqProblemLibrary.jl.

To use a sample problem, such as prob_ode_linear, you can do something like:

#] add DiffEqProblemLibrary
using DiffEqProblemLibrary.ODEProblemLibrary
ODEProblemLibrary.importodeproblems()
prob = ODEProblemLibrary.prob_ode_linear
sol = solve(prob)
SciMLBase.DDEFunctionType

DDEFunction{iip,F,TMM,Ta,Tt,TJ,JVP,VJP,JP,SP,TW,TWt,TPJ,S,O,TCV} <: AbstractDDEFunction{iip}

A representation of a DDE function f, defined by:

$$$M \frac{du}{dt} = f(u,h,p,t)$$$

and all of its related functions, such as the Jacobian of f, its gradient with respect to time, and more. For all cases, u0 is the initial condition, p are the parameters, and t is the independent variable.

Constructor

DDEFunction{iip,recompile}(f;
mass_matrix=I,
analytic=nothing,
jac=nothing,
jvp=nothing,
vjp=nothing,
jac_prototype=nothing,
sparsity=jac_prototype,
paramjac = nothing,
syms = nothing,
indepsym = nothing,
colorvec = nothing)

Note that only the function f itself is required. This function should be given as f!(du,u,h,p,t) or du = f(u,h,p,t). See the section on iip for more details on in-place vs out-of-place handling. The histroy function h acts as an interpolator over time, i.e. h(t) with options matching the solution interface, i.e. h(t; save_idxs = 2).

All of the remaining functions are optional for improving or accelerating the usage of f. These include:

• mass_matrix: the mass matrix M represented in the ODE function. Can be used to determine that the equation is actually a differential-algebraic equation (DAE) if M is singular. Note that in this case special solvers are required, see the DAE solver page for more details: https://diffeq.sciml.ai/stable/solvers/dae_solve/. Must be an AbstractArray or an AbstractSciMLOperator.
• analytic(u0,p,t): used to pass an analytical solution function for the analytical solution of the ODE. Generally only used for testing and development of the solvers.
• tgrad(dT,u,h,p,t) or dT=tgrad(u,p,t): returns $\frac{\partial f(u,p,t)}{\partial t}$
• jac(J,u,h,p,t) or J=jac(u,p,t): returns $\frac{df}{du}$
• jvp(Jv,v,h,u,p,t) or Jv=jvp(v,u,p,t): returns the directional derivative$\frac{df}{du} v$
• vjp(Jv,v,h,u,p,t) or Jv=vjp(v,u,p,t): returns the adjoint derivative$\frac{df}{du}^\ast v$
• jac_prototype: a prototype matrix matching the type that matches the Jacobian. For example, if the Jacobian is tridiagonal, then an appropriately sized Tridiagonal matrix can be used as the prototype and integrators will specialize on this structure where possible. Non-structured sparsity patterns should use a SparseMatrixCSC with a correct sparsity pattern for the Jacobian. The default is nothing, which means a dense Jacobian.
• paramjac(pJ,h,u,p,t): returns the parameter Jacobian $\frac{df}{dp}$.
• syms: the symbol names for the elements of the equation. This should match u0 in size. For example, if u0 = [0.0,1.0] and syms = [:x, :y], this will apply a canonical naming to the values, allowing sol[:x] in the solution and automatically naming values in plots.
• indepsym: the canonical naming for the independent variable. Defaults to nothing, which internally uses t as the representation in any plots.
• colorvec: a color vector according to the SparseDiffTools.jl definition for the sparsity pattern of the jac_prototype. This specializes the Jacobian construction when using finite differences and automatic differentiation to be computed in an accelerated manner based on the sparsity pattern. Defaults to nothing, which means a color vector will be internally computed on demand when required. The cost of this operation is highly dependent on the sparsity pattern.

iip: In-Place vs Out-Of-Place

For more details on this argument, see the ODEFunction documentation.

recompile: Controlling Compilation and Specialization

For more details on this argument, see the ODEFunction documentation.

Fields

The fields of the DDEFunction type directly match the names of the inputs.

## Solution Type

DDEProblem solutions return an ODESolution. For more information, see the ODE problem definition page for the ODESolution docstring.

## Example Problems

Example problems can be found in DiffEqProblemLibrary.jl.

To use a sample problem, such as prob_ode_linear, you can do something like:

#] add DiffEqProblemLibrary
using DiffEqProblemLibrary.ODEProblemLibrary
ODEProblemLibrary.importodeproblems()
prob = ODEProblemLibrary.prob_ode_linear
sol = solve(prob)

### DDEs with 1 constant delay

DiffEqProblemLibrary.DDEProblemLibrary.prob_dde_constant_1delay_ipConstant
prob_dde_constant_1delay_ip

Delay differential equation

$$$u'(t) = -u(t - 1)$$$

for $t \in [0, 1]$ with history function $\phi(t) = 0$ if $t < 0$ and $\phi(0) = 1$.

Solution

The analytical solution for $t \in [0, 10]$ can be obtained by the method of steps and is provided in this implementation.

### DDEs with 2 constant delays

DiffEqProblemLibrary.DDEProblemLibrary.prob_dde_constant_2delays_ipConstant
prob_dde_constant_2delays_ip

Delay differential equation

$$$u'(t) = -u(t - 1/3) - u(t - 1/5)$$$

for $t \in [0, 1]$ with history function $\phi(t) = 0$ if $t < 0$ and $\phi(0) = 1$.

Solution

The analytical solution for $t \in [0, 10]$ can be obtained by the method of steps and is provided in this implementation.

### DDETest Problems

Some details:

# DDEs with time dependent delays
prob_dde_DDETST_A1, prob_dde_DDETST_A2,
# DDEs with vanishing time dependent delays
prob_dde_DDETST_B1, prob_dde_DDETST_B2,
# DDEs with state dependent delays
prob_dde_DDETST_C1, prob_dde_DDETST_C2, prob_dde_DDETST_C3, prob_dde_DDETST_C4,
# DDEs with vanishing state dependent delays
prob_dde_DDETST_D1, prob_dde_DDETST_D2,
# neutral DDEs with time dependent delays
prob_dde_DDETST_E1, prob_dde_DDETST_E2,
# neutral DDEs with vanishing time dependent delays
prob_dde_DDETST_F1, prob_dde_DDETST_F2, prob_dde_DDETST_F3, prob_dde_DDETST_F4, prob_dde_DDETST_F5,
# neutral DDEs with state dependent delays
prob_dde_DDETST_G1, prob_dde_DDETST_G2,
# neutral DDEs with vanishing state dependent delays
prob_dde_DDETST_H1, prob_dde_DDETST_H2, prob_dde_DDETST_H3, prob_dde_DDETST_H4
DiffEqProblemLibrary.DDEProblemLibrary.prob_dde_DDETST_A1Constant
prob_dde_DDETST_A1

Delay differential equation model of blood production, given by

$$$u'(t) = \frac{0.2 u(t - 14)}{1 + u(t - 14)^{10}} - 0.1 u(t)$$$

for $t \in [0, 500]$ and history function $\phi(t) = 0.5$ for $t \leq 0$.

References

Mackey, M. C. and Glass, L. (1977). Oscillation and chaos in physiological control systems, Science (197), pp. 287-289.

DiffEqProblemLibrary.DDEProblemLibrary.prob_dde_DDETST_A2Constant
prob_dde_DDETST_A2

Delay differential equation model of chronic granulocytic leukemia, given by

$$$u_1'(t) = \frac{1.1}{1 + \sqrt{10} u_1(t - 20)^{5/4}} - \frac{10 u_1(t)}{1 + 40 u_2(t)},$$$$$$u_2'(t) = \frac{100 u_1(t)}{1 + 40 u_2(t)} - 2.43 u_2(t),$$$

for $t \in [0, 100]$ and history function

$$$\phi_1(t) = 1.05767027/3,$$$$$$\phi_2(t) = 1.030713491/3,$$$

for $t \leq 0$.

References

Wheldon, T., Kirk, J. and Finlay, H. (1974). Cyclical granulopoiesis in chronic granulocytic leukemia: A simulation study., Blood (43), pp. 379-387.

DiffEqProblemLibrary.DDEProblemLibrary.prob_dde_DDETST_B1Constant
prob_dde_DDETST_B1

Delay differential equation

$$$u'(t) = 1 - u(\exp(1 - 1/t))$$$

for $t \in [0.1, 10]$ with history function $\phi(t) = \log t$ for $t \in (0, 0.1]$.

Solution

The analytical solution for $t \in [0.1, 10]$ is

$$$u(t) = \log t.$$$

References

Neves, K. W. (1975). Automatic integration of functional differential equations: An approach, ACM Trans. Math. Soft. (1), pp. 357-368.

DiffEqProblemLibrary.DDEProblemLibrary.prob_dde_DDETST_B2Constant
prob_dde_DDETST_B2

Delay differential equation

$$$u'(t) = - 1 - u(t) + 2 [u(t / 2) < 0]$$$

for $t \in [0, 2 \log 66]$ with history function $\phi(0) = 1$.

Solution

The analytical solution for $t \in [0, 2 \log 66]$ is

$$$u(t) = \begin{cases} 2 \exp(-t) - 1 & \text{if } t \in [0, 2 \log 2], \\ 1 - 6 \exp(-t) & \text{if } t \in (2 \log 2, 2 \log 6], \\ 66 \exp(-t) - 1 & \text{if } t \in (2 \log 6, 2 \log 66]. \end{cases}$$$

References

Neves, K. W. and Thompson, S. (1992). Solution of systems of functional differential equations with state dependent delays, Technical Report TR-92-009, Computer Science, Radford University.

DiffEqProblemLibrary.DDEProblemLibrary.prob_dde_DDETST_C1Constant
prob_dde_DDETST_C1

Delay differential equation

$$$u'(t) = - 2 u(t - 1 - |u(t)|) (1 - u(t)^2)$$$

for $t \in [0, 30]$ with history function $\phi(t) = 0.5$ for $t \leq 0$.

References

Paul, C. A. H. (1994). A test set of functional differential equations, Technical Report 249, The Department of Mathematics, The University of Manchester, Manchester, England.

DiffEqProblemLibrary.DDEProblemLibrary.prob_dde_DDETST_C2Constant
prob_dde_DDETST_C2

Delay differential equation

$$$u_1'(t) = - 2 u_1(t - u_2(t)),$$$$$$u_₂'(t) = \frac{|u_1(t - u_2(t))| - |u_1(t)|}{1 + |u_1(t - u_2(t))|},$$$

for $t \in [0, 40]$ with history function

$$$\phi_1(t) = 1,$$$$$$\phi_2(t) = 0.5,$$$

for $t \leq 0$.

References

Paul, C. A. H. (1994). A test set of functional differential equations, Technical Report 249, The Department of Mathematics, The University of Manchester, Manchester, England.

DiffEqProblemLibrary.DDEProblemLibrary.prob_dde_DDETST_C3Constant
prob_dde_DDETST_C3

Delay differential equation model of hematopoiesis, given by

$$$u_1'(t) = \hat{s}_0 u_2(t - T_1) - \gamma u_1(t) - Q,$$$$$$u_2'(t) = f(u_1(t)) - k u_2(t),$$$$$$u_3'(t) = 1 - \frac{Q \exp(\gamma u_3(t))}{\hat{s}_0 u_2(t - T_1 - u_3(t))},$$$

for $t \in [0, 300]$ with history function $\phi_1(0) = 3.325$, $\phi_3(0) = 120$, and

$$$\phi_2(t) = \begin{cases} 10 & \text{if } t \in [- T_1, 0],\\ 9.5 & \text{if } t < - T_1, \end{cases}$$$

where $f(y) = a / (1 + K y^r)$, $\hat{s}_0 = 0.0031$, $T_1 = 6$, $\gamma = 0.001$, $Q = 0.0275$, $k = 2.8$, $a = 6570$, $K = 0.0382$, and $r = 6.96$.

References

Mahaffy, J. M., Belair, J. and Mackey, M. C. (1996). Hematopoietic model with moving boundary condition and state dependent delay, Private communication.

DiffEqProblemLibrary.DDEProblemLibrary.prob_dde_DDETST_C4Constant
prob_dde_DDETST_C4

Delay differential equation model of hematopoiesis, given by the same delay differential equation as prob_dde_DDETST_C3

$$$u_1'(t) = \hat{s}_0 u_2(t - T_1) - \gamma u_1(t) - Q,$$$$$$u_2'(t) = f(u_1(t)) - k u_2(t),$$$$$$u_3'(t) = 1 - \frac{Q \exp(\gamma u_3(t))}{\hat{s}_0 u_2(t - T_1 - u_3(t))},$$$

for $t \in [0, 100]$ with history function $\phi_1(0) = 3.5$, $\phi_3(0) = 50$, and $\phi_2(t) = 10$ for $t \leq 0$, where $f(y) = a / (1 + K y^r)$, $\hat{s}_0 = 0.00372$, $T_1 = 3$, $\gamma = 0.1$, $Q = 0.00178$, $k = 6.65$, $a = 15600$, $K = 0.0382$, and $r = 6.96$.

References

Mahaffy, J. M., Belair, J. and Mackey, M. C. (1996). Hematopoietic model with moving boundary condition and state dependent delay, Private communication.

DiffEqProblemLibrary.DDEProblemLibrary.prob_dde_DDETST_D1Constant
prob_dde_DDETST_D1

Delay differential equation

$$$u_1'(t) = u_2(t),$$$$$$u_2'(t) = - u_2(\exp(1 - u_2(t))) u_2(t)^2 \exp(1 - u_2(t)),$$$

for $t \in [0.1, 5]$ with history function

$$$\phi_1(t) = \log t,$$$$$$\phi_2(t) = 1 / t,$$$

for $t \in (0, 0.1]$.

Solution

The analytical solution for $t \in [0.1, 5]$ is

$$$u_1(t) = \log t,$$$$$$u_2(t) = 1 / t.$$$

References

Neves, K. W. (1975). Automatic integration of functional differential equations: An approach, ACM Trans. Math. Soft. (1), pp. 357-368.

DiffEqProblemLibrary.DDEProblemLibrary.prob_dde_DDETST_D2Constant
prob_dde_DDETST_D2

Delay differential equation model of antigen antibody dynamics with fading memory, given by

$$$u_1'(t) = - r_1 u_1(t) u_2(t) + r_2 u_3(t),$$$$$$u_2'(t) = - r_1 u_1(t) u_2(t) + \alpha r_1 u_1(t - u_4(t)) u_2(t - u_4(t)),$$$$$$u_3'(t) = r_1 u_1(t) u_2(t) - r_2 u_3(t),$$$$$$u_4'(t) = 1 + \frac{3 \delta - u_1(t) u_2(t) - u_3(t)}{u_1(t - u_4(t)) u_2(t - u_4(t)) + u_3(t - u_4(t))} \exp(\delta u_4(t)),$$$

for $t \in [0, 40]$ with history function

$$$\phi_1(t) = 5,$$$$$$\phi_2(t) = 0.1,$$$$$$\phi_3(t) = 0,$$$$$$\phi_4(t) = 0,$$$

for $t \leq 0$, where $r_1 = 0.02$, $r_2 = 0.005$, $\alpha = 3$, and $\delta = 0.01$.

References

Gatica, J. and Waltman, P. (1982). A threshold model of antigen antibody dynamics with fading memory, in Lakshmikantham (ed.), Nonlinear phenomena in mathematical science, Academic Press, New York, pp. 425-439.

DiffEqProblemLibrary.DDEProblemLibrary.prob_dde_DDETST_E1Constant
prob_dde_DDETST_E1

Delay differential equation model of a food-limited population, given by

$$$u(t) = r u(t) (1 - u(t - 1) - c u'(t - 1))$$$

for $t \in [0, 40]$ with history function $\phi(t) = 2 + t$ for $t \leq 0$, where $r = \pi / \sqrt{3} + 1/20$ and $c = \sqrt{3} / (2 \pi) - 1 / 25$.

References

Kuang, Y. and Feldstein, A. (1991). Boundedness of solutions of a nonlinear nonautonomous neutral delay equation, J. Math. Anal. Appl. (156), pp. 293-304.

DiffEqProblemLibrary.DDEProblemLibrary.prob_dde_DDETST_E2Constant
prob_dde_DDETST_E2

Delay differential equation model of a logistic Gauss-type predator-prey system, given by

$$$u_1'(t) = u_1(t) (1 - u_1(t - \tau) - \rho u_1'(t - \tau)) - \frac{u_2(t) u_1(t)^2}{u_1(t)^2 + 1},$$$$$$u_2'(t) = u_2(t) \left(\frac{u_1(t)^2}{u_1(t)^2 + 1} - \alpha\right),$$$

for $t \in [0, 2]$ with history function

$$$\phi_1(t) = 0.33 - t / 10,$$$$$$\phi_2(t) = 2.22 + t / 10,$$$

for $t \leq 0$, where $\alpha = 0.1$, $\rho = 2.9$, and $\tau = 0.42$.

References

Kuang, Y. (1991). On neutral delay logistics Gauss-type predator-prey systems, Dyn. Stab. Systems (6), pp. 173-189.

DiffEqProblemLibrary.DDEProblemLibrary.prob_dde_DDETST_F1Constant
prob_dde_DDETST_F1

Delay differential equation

$$$u'(t) = 2 \cos(2t) u(t / 2)^{2 \cos t} + \log(u'(t / 2)) - \log(2 \cos t) - \sin t$$$

for $t \in [0, 1]$ with history function $\phi(0) = 1$ and $\phi'(0) = 2$.

Solution

The analytical solution for $t \in [0, 1]$ is

$$$u(t) = \exp(\sin(2t)).$$$

References

Jackiewicz, Z. (1981). One step methods for the numerical solution of Volterra functional differential equations of neutral type, Applicable Anal. (12), pp. 1-11.

DiffEqProblemLibrary.DDEProblemLibrary.prob_dde_DDETST_F2Constant
prob_dde_DDETST_F2

Delay differential equation

$$$u'(t) = u'(2t - 0.5)$$$

for $t \in [0.25, 0.499]$ with history function $\phi(t) = \exp(-t^2)$ and $\phi'(t) = -2t \exp(-t^2)$ for $t \leq 0.25$.

Solution

The analytical solution for $t \in [0.25, 0.499]$ is

$$$u(t) = u_i(t) = \exp(-4^i t^2 + B_i t + C_i) / 2^i + K_i$$$

if $t \in [x_i, x_{i + 1}]$, where

$$$x_i = (1 - 2^{-i}) / 2,$$$$$$B_i = 2 (4^{i-1} + B_{i-1}),$$$$$$C_i = - 4^{i-2} - B_{i-1} / 2 + C_{i-1},$$$$$$K_i = - \exp(-4^i x_i^2 + B_i x_i + C_i) / 2^i + u_{i-1}(x_i),$$$

and $B_0 = C_0 = K_0 = 0$.

References

Neves, K. W. and Thompson, S. (1992). Solution of systems of functional differential equations with state dependent delays, Technical Report TR-92-009, Computer Science, Radford University.

DiffEqProblemLibrary.DDEProblemLibrary.prob_dde_DDETST_F3Constant
prob_dde_DDETST_F3

Delay differential equation

$$$u'(t) = \exp(-u(t)) + L_3 \left[\sin(u'(\alpha(t))) - \sin\left(\frac{1}{3 + \alpha(t)}\right)\right]$$$

for $t \in [0, 10]$ with history function $\phi(0) = \log 3$ and $\phi'(0) = 1 / 3$, where $\alpha(t) = 0.5 t (1 - \cos(2 \pi t))$ and $L_3 = 0.2$.

Solution

The analytical solution for $t \in [0, 10]$ is

$$$u(t) = \log(t + 3).$$$
DiffEqProblemLibrary.DDEProblemLibrary.prob_dde_DDETST_G1Constant
prob_dde_DDETST_G1

Delay differential equation

$$$u'(t) = - u'(t - u(t)^2 / 4)$$$

for $t \in [0, 1]$ with history function $\phi(t) = 1 - t$ for $t \leq 0$ and $\phi'(t) = -1$ for $t < 0$.

Solution

The analytical solution for $t \in [0, 1]$ is

$$$u(t) = t + 1.$$$

References

El'sgol'ts, L. E. and Norkin, S. B. (1973). Introduction to the Theory and Application of Differential Equations with Deviating Arguments, Academic Press, New York, p. 44.

DiffEqProblemLibrary.DDEProblemLibrary.prob_dde_DDETST_G2Constant
prob_dde_DDETST_G2

Delay differential equation

$$$u'(t) = - u'(u(t) - 2)$$$

for $t \in [0, 1]$ with history function $\phi(t) = 1 - t$ for $t \leq 0$ and $\phi'(t) = -1$ for $t < 0$.

Solution

The analytical solution for $t \in [0, 1]$ is

$$$u(t) = t + 1.$$$

El'sgol'ts, L. E. and Norkin, S. B. (1973). Introduction to the Theory and Application of Differential Equations with Deviating Arguments, Academic Press, New York, pp. 44-45.

DiffEqProblemLibrary.DDEProblemLibrary.prob_dde_DDETST_H1Constant
prob_dde_DDETST_H1

Delay differential equation

$$$u'(t) = - \frac{4 t u(t)^2}{4 + \log(\cos(2t))^2} + \tan(2t) + 0.5 \arctan\left(u'\left(\frac{t u(t)^2}{1 + u(t)^2}\right)\right)$$$

for $t \in [0, 0.225 \pi]$ with history function $\phi(0) = 0$ and $\phi'(0) = 0$.

Solution

The analytical solution for $t \in [0, 0.225 \pi]$ is

$$$u(t) = - \log(\cos(2t)) / 2.$$$

References

Castleton, R. N. and Grimm, L. J. (1973). A first order method for differential equations of neutral type, Math. Comput. (27), pp. 571-577.

DiffEqProblemLibrary.DDEProblemLibrary.prob_dde_DDETST_H2Constant
prob_dde_DDETST_H2

Delay differential equation

$$$u'(t) = \cos(t) (1 + u(t u(t)^2)) + L_3 u(t) u'(t u(t)^2) + (1 - L_3) \sin(t) \cos(t \sin(t)^2) - \sin(t + t \sin(t)^2)$$$

for $t \in [0, \pi]$ with history function $\phi(0) = 0$ and $\phi'(0) = 1$, where $L_3 = 0.1$.

Solution

The analytical solution for $t \in [0, \pi]$ is

$$$u(t) = \sin(t).$$$

References

Hayashi, H. (1996). Numerical solution of retarded and neutral delay differential equations using continuous Runge-Kutta methods, PhD thesis, Department of Computer Science, University of Toronto, Toronto, Canada.

### Radar5 Test Problems

DiffEqProblemLibrary.DDEProblemLibrary.prob_dde_RADAR5_oregonatorConstant
prob_dde_RADAR5_oregonator

Delay differential equation model from chemical kinetics, given by

$$$u_1'(t) = - k_1 A u_2(t) - k_2 u_1(t) u_2(t - \tau) + k_3 B u_1(t) - 2 k_4 u_1(t)^2,$$$$$$u_2'(t) = - k_1 A u_2(t) - k_2 u_1(t) u_2(t - \tau) + f k_3 B u_1(t),$$$

for $t \in [0, 100.5]$ with history function

$$$\phi_1(t) = 1e-10,$$$$$$\phi_2(t) = 1e-5,$$$

for $t \leq 0$, where $k_1 = 1.34$, $k_2 = 1.6e9$, $k_3 = 8000$, $k_4 = 4e7$, $k_5 = 1$, $f = 1$, $A = 0.06$, $B = 0.06$, and $\tau = 0.15$.

References

Epstein, I. and Luo, Y. (1991). Differential delay equations in chemical kinetics. Nonlinear models, Journal of Chemical Physics (95), pp. 244-254.

DiffEqProblemLibrary.DDEProblemLibrary.prob_dde_RADAR5_robertsonConstant
prob_dde_RADAR5_robertson

Delay differential equation model of a chemical reaction with steady state solution, given by

$$$u_1'(t) = - a u_1(t) + b u_2(t - \tau) u_3(t),$$$$$$u_2'(t) = a u_1(t) - b u_2(t - \tau) u_3(t) - c u_2(t)^2,$$$$$$u_3'(t) = c u_2(t)^2,$$$

for $t \in [0, 10e10]$ with history function $\phi_1(0) = 1$, $\phi_2(t) = 0$ for $t \in [-\tau, 0]$, and $\phi_3(0) = 0$, where $a = 0.04$, $b = 10_000$, $c = 3e7$, and $\tau = 0.01$.

References

Guglielmi, N. and Hairer, E. (2001). Implementing Radau IIA methods for stiff delay differential equations, Computing (67), pp. 1-12.

DiffEqProblemLibrary.DDEProblemLibrary.prob_dde_RADAR5_waltmanConstant
prob_dde_RADAR5_waltman

Delay differential equation model of antibody production, given by

$$$u_1'(t) = - r u_1(t) u_2(t) - s u_1(t) u_4(t),$$$$$$u_2'(t) = - r u_1(t) u_2(t) + \alpha r u_1(u_5(t)) u_2(u_5(t)) [t \geq t_0],$$$$$$u_3'(t) = r u_1(t) u_2(t),$$$$$$u_4'(t) = - s u_1(t) u_4(t) - \gamma u_4(t) + \beta r u_1(u_6(t)) u_2(u_6(t)) [t > t_1],$$$$$$u_5'(t) = [t \geq t_0] \frac{u_1(t) u_2(t) + u_3(t)}{u_1(u_5(t)) u_2(u_5(t)) + u_3(u_5(t))},$$$$$$u_6'(t) = [t \geq t_1] \frac{1e-12 + u_2(t) + u_3(t)}{1e-12 + u_2(u_6(t)) + u_3(u_6(t))},$$$

for $t \in [0, 300]$ with history function

$$$\phi_1(t) = \phi_0,$$$$$$\phi_2(t) = 1e-15,$$$$$$\phi_3(t) = 0,$$$$$$\phi_4(t) = 0,$$$$$$\phi_5(t) = 0,$$$$$$\phi_6(t) = 0,$$$

for $t \leq 0$, where $\alpha = 1.8$, $\beta = 20$, $\gamma = 0.002$, $r = 5e4$, $s = 1e5$, $t_0 = 32$, $t_1 = 119$, and $\phi_0 = 0.75e-4$.

References

Waltman, P. (1978). A threshold model of antigen-stimulated antibody production, Theoretical Immunology (8), pp. 437-453.

### QS Example

DiffEqProblemLibrary.DDEProblemLibrary.prob_dde_qsConstant
prob_dde_qs

Delay differential equation model of Quorum Sensing (QS) of Pseudomonas putida IsoF in continuous cultures.

References

Buddrus-Schiemann et al. (2014). Analysis of N-Acylhomoserine Lactone Dynamics in Continuous Cultures of Pseudomonas Putida IsoF By Use of ELISA and UHPLC/qTOF-MS-derived Measurements and Mathematical Models, Analytical and Bioanalytical Chemistry.