Linear Neutral Delay Differential Equations solver

This function solves the first-order, homogeneous, linear Neutral Delay Differential Equation (NDDE) with constant coefficients and delay
19 Downloads
Updated 14 Nov 2022

View License

About the function
sol=nddesolver(dydt,delay,preshape,interval,N,s) integrates a linear, homogeneous, delay differential equations of neutral type with constant coefficients and constant delay given by
where
  • t is the independent variable representing time,
  • is the solution with delay h, and
  • is the derivative of the solution with delay h.
  • is the history/preshape function
This function can be solved explicitly using a generalized Lambert W function called the Lambert W function [1]. This solution is given by
,
where
  • λ(i) is a complex value dependent on the value of the Lambert W function, and
  • is a real valued coefficient of dependent on the preshape/history function.
Examples
Included in the files are two examples comparing the solutions of a first-order linear, homogeneous NDDE obtained using nddesolver, with its analytical solution.
Input Arguments
  • dydt is the vector containing the coefficients of (1). (dydt = [])
  • delay is the constant delay h in (1). The value of h must be positive.
  • preshape is the history function $\phi(t)$ on
  • interval is the interval of integration . The first element, , is the initial value of t. The second element, , is the final value of t. The value of must be less than
  • N is the number of complex roots of the Lambert W function with positive imaginary part. (See the function rlambertw below for .)
  • s is the step size of the values of t
Output Arguments
sol, returned as a structure containing the following fields:
  • sol.x is the mesh on
  • sol.y is the approximation to at the mesh points
  • sol.c is a vector containing the coefficients from (2)
  • sol.l is a vector containing all computed using the function lambda
  • sol.histx is the mesh on
  • sol.histy is the preshape function evaluated at sol.histx
  • sol.psi is a matrix with elements
  • sol.cond is the condition number of sol.psi
Other functions
Also included in the files are the following functions:
  • RA_solver finds the values of r and a for the Lambert W function
  • lambda computes a vector of $\lambda(i)s$, where each satisfies the equation
(See [1] for derivation of the formula.)
  • rlambertw computes a vector of the values of the Lambert W function for some r and a(denoted) where each satisfies
.
(See [2] for reference.)
Reference:
[1] Jamilla, C., Mendoza, R., & Mező, I. (2020). Solutions of neutral delay differential equations using a generalized Lambert W function. Applied Mathematics and Computation, 382, 125334.https://doi.org/10.1016/j.amc.2020.125334
[2] Mező, I., & Baricz, Á. (2017). On the generalization of the Lambert 𝑊 function. Transactions of the American Mathematical Society, 369(11), 7917-7934. https://doi.org/10.1090/tran/6911

Cite As

Cristeta Jamilla (2026). Linear Neutral Delay Differential Equations solver (https://uk.mathworks.com/matlabcentral/fileexchange/120458-linear-neutral-delay-differential-equations-solver), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2022b
Compatible with any release
Platform Compatibility
Windows macOS Linux
Version Published Release Notes
1.0.0