Open Access
This article is

- freely available
- re-usable

*Mathematics*
**2019**,
*7*(11),
1038;
https://doi.org/10.3390/math7111038

Article

Exact and Nonstandard Finite Difference Schemes for Coupled Linear Delay Differential Systems

^{1}

Department of Applied Mathematics, University of Alicante, Apdo. 99, 03080 Alicante, Spain

^{2}

Multidisciplinary Institute for Environmental Studies (IMEM), University of Alicante, Apdo. 99, 03080 Alicante, Spain

^{*}

Author to whom correspondence should be addressed.

Received: 5 September 2019 / Accepted: 27 October 2019 / Published: 3 November 2019

## Abstract

**:**

In recent works, exact and nonstandard finite difference schemes for scalar first order linear delay differential equations have been proposed. The aim of the present work is to extend these previous results to systems of coupled delay differential equations ${X}^{\prime}(t)=AX(t)+BX(t-\tau ),$ where X is a vector, and A and B are commuting real matrices, in general not simultaneously diagonalizable. Based on a constructive expression for the exact solution of the vector equation, an exact scheme is obtained, and different nonstandard numerical schemes of increasing order are proposed. Dynamic consistency properties of the new nonstandard schemes are illustrated with numerical examples, and proved for a class of methods.

Keywords:

delay systems; nonstandard numerical methods; dynamic consistency## 1. Introduction

Due to the presence of time lags in the dynamics of most real systems, delay differential equations (DDE) have become basic instruments in the mathematical modelling of a wide range of problems in science and engineering, such as in population biology, physiology, epidemiology, economics, and control problems (see, e.g., [1,2,3,4,5], and references therein), and special methods have been developed to compute numerical solutions for DDE [6]. In the case of differential problems without delay, exact schemes have been defined for different particular problems, and the use of nonstandard finite difference (NSFD) numerical schemes has gained increasing interest in the last years [7,8,9]. The NSFD numerical schemes can be competitive in terms of accuracy while providing dynamically consistent solutions, i.e., they can provide numerical discrete solutions that inherit the structural properties defining the dynamical behaviour of the original continuous equation [10]. The possibility of defining NSFD schemes that reproduce the qualitative behaviour of the continuous solutions has made them specially attractive for population and epidemiology models (e.g., [11,12,13,14,15]), and they have also been proposed for some problems with delay [16,17,18,19,20,21]. However, for DDE models the construction of exact schemes, and consequently of NSFD methods derived from them, has not been much developed.

In [22], a NSFD method was proposed for the scalar first order linear delay problem
where $\alpha ,\beta \in \mathbb{R}$, $\tau >0$, and $f:[-\tau ,0]\to \mathbb{R}$ is a continuous function. The method of [22] was exact in the initial time interval $0\le t\le \tau $, and then switched to a NSFD method of second order at most. More recently [23], an exact scheme for problem (1)–(2) was constructed, valid in the whole domain of definition, and a family of increasing order NSFD schemes was defined. The NSFD methods presented in [22,23] were shown to be consistent with different dynamical properties of the continuous problem (1)–(2).

$$\begin{array}{ccc}\hfill {x}^{\prime}(t)& =& \alpha x(t)+\beta x(t-\tau ),\phantom{\rule{2.em}{0ex}}t>0,\hfill \end{array}$$

$$\begin{array}{ccc}\hfill \phantom{\rule{2.em}{0ex}}x(t)& =& f(t),\phantom{\rule{2.em}{0ex}}\phantom{\rule{2.em}{0ex}}\phantom{\rule{2.em}{0ex}}-\tau \le t\le 0,\hfill \end{array}$$

In the present work, we consider the coupled linear delay system
satisfying the initial condition
where $X(t)$ and $F(t)$ are d-dimensional real vector functions, and A and B are $d\times d$ commuting real matrices, in general not simultaneously diagonalizable.

$${X}^{\prime}(t)=AX(t)+BX(t-\tau ),\phantom{\rule{2.em}{0ex}}t>0,$$

$$X(t)=F(t),\phantom{\rule{2.em}{0ex}}-\tau \le t\le 0,$$

The usefulness of nonstandard schemes for scalar linear delay problems and their possible advantages over alternative numerical methods have been discussed in [22,23]. Particularly, the family of schemes proposed in [23] allows the computation of numerical solutions for scalar linear delay problems with the required degree of accuracy and with comparatively low computational complexity. Moreover, the numerical approximations obtained with these nonstandard schemes reproduce dynamical properties of the exact continuous solutions, such as asymptotic stability, positivity, and oscillation behaviour.

The aim, and main contribution, of the present work is to make available, for a wide class of coupled linear delay differential systems, NSFD methods that possess analogous advantages to those in the scalar setting, exhibiting similar properties in terms of accuracy and dynamic consistency. It is to be remarked that for a class of the new NSFD schemes proposed in this work, the ${\mathcal{F}}_{M}$ schemes as defined in Theorem 3, it is rigorously proved that they preserve delay dependent stability. This is a property that usual alternative methods, such as natural Runge-Kutta methods, do not possess, and that is challenging to prove for numerical methods for linear delay systems [6] (p. 356).

There are two main difficulties when dealing with problem (3)–(4), compared with the corresponding scalar problem (1)–(2). Firstly, the obtention of an exact constructive solution that would allow deriving an exact scheme. Secondly, once the new NSFD schemes are defined, the process of proving dynamical properties, which is much more complex than in the scalar case. To overcome these difficulties, the key point is to assume commutativity of the coupled coefficient matrices, a property also considered in other problems involving delay systems [24]. With this assumption, a compact expression for the exact solution of problem (3)–(4), analogous to the scalar case, can be obtained. Also, for commuting matrices, a common Schur basis exists and both matrix coefficients in (3), A and B, can be simultaneously reduced to triangular form, which facilitates analyzing the dynamical properties of the new proposed NSFD schemes.

This paper is structured as follows. In the next section, based on a constructive expression for the exact solution of the initial value vector problem (3)–(4), an exact scheme that is valid in the whole domain of definition is obtained. In Section 3, a family of new nonstandard schemes of increasing order of accuracy are proposed. Next, in Section 4, dynamic consistency properties of the new nonstandard schemes are illustrated with numerical examples and proved for a class of methods. In the final section, the results are summarized and discussed.

## 2. Exact Numerical Scheme

In our next theorem we present an explicit expression for the solution of problem (3)–(4), derived by using the method of steps [25] (pp. 45–47) and an integral convolution [26] (p. 67), in a similar way as was done in [27] for the scalar problem (1)–(2).

**Theorem**

**1.**

The exact solution of (3)–(4) is given by $X(t)=F(t)$, for $-\tau \le t\le 0$, and, for $(m-1)\tau <t\le m\tau $ and $m\ge 1$,
where the second summation is assumed to be empty for $m=1$.

$$\begin{array}{c}X(t)=\sum _{k=0}^{m-1}\frac{{B}^{k}{(t-k\tau )}^{k}}{k!}{\mathrm{e}}^{A(t-k\tau )}F(0)+\sum _{k=0}^{m-2}\frac{{B}^{k+1}}{k!}{\int}_{-\tau}^{0}{(t-(k+1)\tau -s)}^{k}{\mathrm{e}}^{A(t-(k+1)\tau -s)}F(s)ds\hfill \\ \hfill +\frac{{B}^{m}}{(m-1)!}{\int}_{-\tau}^{t-m\tau}{(t-m\tau -s)}^{m-1}{\mathrm{e}}^{A(t-m\tau -s)}F(s)ds,\end{array}$$

**Proof.**

For $m=1$, one has $X(t)={\mathrm{e}}^{At}F(0)+B{\int}_{-\tau}^{t-\tau}{\mathrm{e}}^{A(t-\tau -s)}F(s)ds$, so that $X(0)=F(0)$ and ${X}^{\prime}(t)=AX(t)+BF(t-\tau )=AX(t)+BX(t-\tau ).$ For $m>1$, it is also immediate to check that ${X}^{\prime}(t)=AX(t)+BX(t-\tau ),$ and that the expressions given by (5) for two consecutive intervals agree at the connecting points $t=m\tau $. Thus, $X(t)$ is continuous for $t>-\tau $, with continuous derivative for $t>0$, and satisfies (3)–(4). □

From the exact solution given in Theorem 1, an exact numerical difference scheme can be obtained, in a similar way as done in [23] for the scalar case, as shown in the next theorem.

**Theorem**

**2.**

Let $h>0$ such that $Nh=\tau $, for some integer $N\ge 1$. Writing ${t}_{n}\equiv nh$ and ${X}_{n}\equiv X({t}_{n})$, for $n\ge -N$, the numerical solution given by ${X}_{n}=F({t}_{n})$, for $-N\le n\le 0$, and, for $(m-1)\tau \le nh<m\tau $ and $m\ge 1$ by
defines an exact numerical scheme for problem (3)–(4).

$${X}_{n+1}={\mathrm{e}}^{Ah}\sum _{k=0}^{m-1}\frac{{B}^{k}{h}^{k}}{k!}{X}_{n-kN}+\frac{{B}^{m}}{(m-1)!}{\int}_{{t}_{n}-m\tau}^{{t}_{n}-m\tau +h}{({t}_{n}-m\tau +h-s)}^{m-1}{\mathrm{e}}^{A({t}_{n}-m\tau +h-s)}F(s)ds,$$

**Proof.**

Write $X(t)={E}_{1}(t)+{E}_{2}(t)+{E}_{3}(t)$, corresponding to the three terms in expression (5). Then, expanding the binomial terms and rearranging and renaming indices, one has

$$\begin{array}{lll}{E}_{1}({t}_{n+1})\hfill & =& {E}_{1}({t}_{n}+h)={\displaystyle \sum _{k=0}^{m-1}}\frac{{B}^{k}{({t}_{n}-k\tau +h)}^{k}}{k!}{\mathrm{e}}^{A({t}_{n}-k\tau +h)}F(0)\hfill \\ & =& {\mathrm{e}}^{Ah}{\displaystyle \sum _{k=0}^{m-1}}{\displaystyle \sum _{r=0}^{k}}\frac{{B}^{r}{h}^{r}}{r!}\frac{{B}^{k-r}{({t}_{n}-r\tau -(k-r)\tau )}^{k-r}}{(k-r)!}{\mathrm{e}}^{A({t}_{n}-r\tau -(k-r)\tau )}F(0)\hfill \\ & =& {\mathrm{e}}^{Ah}{\displaystyle \sum _{k=0}^{m-1}}\frac{{B}^{k}{h}^{k}}{k!}{\displaystyle \sum _{r=0}^{m-1-k}}\frac{{B}^{r}{({t}_{n}-k\tau -r\tau )}^{r}}{r!}{\mathrm{e}}^{A({t}_{n}-k\tau -r\tau )}F(0)={\mathrm{e}}^{Ah}{\displaystyle \sum _{k=0}^{m-1}}\frac{{B}^{k}{h}^{k}}{k!}{E}_{1}({t}_{n}-kN).\hfill \end{array}$$

In a similar way, one gets
since ${E}_{2}({t}_{n}-(m-1)N)=0$ for $(m-1)\tau \le {t}_{n}<m\tau $. Also,
so that expression (6) is recovered. □

$${E}_{2}({t}_{n+1})={\mathrm{e}}^{Ah}\sum _{k=0}^{m-2}\frac{{B}^{k}{h}^{k}}{k!}{E}_{2}({t}_{n}-kN)={\mathrm{e}}^{Ah}\sum _{k=0}^{m-1}\frac{{B}^{k}{h}^{k}}{k!}{E}_{2}({t}_{n}-kN),$$

$${E}_{3}({t}_{n+1})={\mathrm{e}}^{Ah}\sum _{k=0}^{m-1}\frac{{B}^{k}{h}^{k}}{k!}{E}_{3}({t}_{n}-kN)+\frac{{B}^{m}}{(m-1)!}{\int}_{{t}_{n}-m\tau}^{{t}_{n}-m\tau +h}{({t}_{n}-m\tau +h-s)}^{m-1}{\mathrm{e}}^{A({t}_{n}-m\tau +h-s)}F(s)ds,$$

**Remark**

**1.**

The expressions given in Theorems 1 and 2 are also valid when $A=0$, i.e., for the particular case of the pure delay problem

$${X}^{\prime}(t)=BX(t-\tau ),\phantom{\rule{0.166667em}{0ex}}t>0,\phantom{\rule{2.em}{0ex}}X(t)=F(t),\phantom{\rule{0.166667em}{0ex}}-\tau \le t\le 0.$$

If A and B are diagonal, or in the case where they are simultaneously diagonalizable after the usual change of variables, problem (3)–(4) consists of d independent scalar problems, and the expressions given by Theorems 1 and 2 for each component of $X(t)$ coincide with those given in [23] for the corresponding scalar problems.

**Example**

**1.**

Figure 1 presents a numerical example of application of the results of this section, showing the continuous solution given by Theorem 1 (lines) and the exact numerical solution of Theorem 2 with $N=5$ (points), for the problem (3)–(4) with parameters $\tau =1$ and

$$A=\left(\begin{array}{cc}-3/2& 1\\ -2& 3/2\end{array}\right),\phantom{\rule{1.em}{0ex}}B=\left(\begin{array}{cc}5/4& -1\\ 2& -7/4\end{array}\right),\phantom{\rule{1.em}{0ex}}F(t)=\left(\begin{array}{c}2(t+1)\\ {(t+1)}^{2}\end{array}\right).$$

## 3. Nonstandard Finite Difference Methods of Increasing Orders

The exact numerical solution given by Theorem 2 has the drawback of the integral term in (6), as an exact expression could be obtained for certain initial functions $F(t)$, but in general a numerical approximation would be needed. A class of methods could be derived by approximating this integral term, either by using some numerical integration algorithm or by approximating the initial function with some family of functions that allowed the explicit computation of the integral. Instead, as proposed in [23] for the scalar problem, a family of nonstandard methods of increasing orders can be derived by computing the exact solution in the first M intervals and then discarding the integral term, as shown in the next theorem. We define two classes of methods of order M, ${\mathcal{F}}_{M}$ and ${\mathcal{T}}_{M}$ methods, depending on whether the full sum in (6) is kept or a truncated sum is used.

**Theorem**

**3.**

Let $N\ge 1$ and $h=\tau /N$. For a given $M\ge 1$, assume that the values of ${X}_{n}$, for $n=-N\dots MN$, are computed using the exact scheme of Theorem 2. Define F${}_{M}$ and T${}_{M}$ schemes to compute successive values for any $m>M$ by the expressions

$${\mathcal{F}}_{M}:=\phantom{\rule{1.em}{0ex}}{X}_{n+1}={\mathrm{e}}^{Ah}\sum _{k=0}^{m-1}\frac{{B}^{k}{h}^{k}}{k!}{X}_{n-kN},\phantom{\rule{1.em}{0ex}}(m-1)\tau \le nh<m\tau ,$$

$${\mathcal{T}}_{M}:=\phantom{\rule{1.em}{0ex}}{X}_{n+1}={\mathrm{e}}^{Ah}\sum _{k=0}^{M}\frac{{B}^{k}{h}^{k}}{k!}{X}_{n-kN},\phantom{\rule{1.em}{0ex}}(m-1)\tau \le nh<m\tau .$$

Then, both numerical schemes, ${\mathcal{F}}_{M}$ and ${\mathcal{T}}_{M}$, have local error $O({h}^{M+1})$ and order M.

**Proof.**

Let $\parallel \phantom{\rule{0.166667em}{0ex}}\parallel $ be any vector norm and a compatible norm for matrices, and consider the scheme ${\mathcal{T}}_{M}$. Assume that $\parallel X({t}_{k})-{X}_{k}\parallel =O({h}^{M+1})$ for $k\le n$, which is the case for $nh\le M\tau $. Then, for $m\ge M+1$ and $(m-1)\tau \le nh<m\tau $, using (6), one gets

$$\begin{array}{ll}\parallel X({t}_{n+1})-{X}_{n+1}\parallel \le & \parallel {\mathrm{e}}^{Ah}\parallel {\displaystyle \sum _{k=0}^{M}}\frac{{\parallel B\parallel}^{k}{h}^{k}}{k!}\parallel X({t}_{n-kN})-{X}_{n-kN}\parallel \\ & \text{\hspace{0.17em}}+\frac{{\parallel B\parallel}^{m}}{(m-1)!}{\int}_{{t}_{n}-m\tau}^{{t}_{n}-m\tau +h}{({t}_{n}-m\tau +h-s)}^{m-1}\parallel {\mathrm{e}}^{A({t}_{n}-m\tau +h-s)}\parallel \parallel F(s)\parallel ds.\end{array}$$

Let $M=\parallel B\parallel $, and ${M}_{1},{M}_{2}>0$ such that $\parallel {\mathrm{e}}^{As}\parallel <{M}_{1}$ and $\parallel F(s)\parallel <{M}_{2}$ for $s\in [0,h]$. Then, by the induction hypothesis, the first term in (10) is $O({h}^{M+1})$ and the second term is bounded by

$$\frac{{M}^{m}{M}_{1}{M}_{2}}{(m-1)!}{\int}_{{t}_{n}-m\tau}^{{t}_{n}-m\tau +h}{({t}_{n}-m\tau +h-s)}^{m-1}ds<\frac{{M}^{m}{M}_{1}{M}_{2}}{(m-1)!}{h}^{m}\le O({h}^{M+1}).$$

Similar arguments result in the same bounds holding for the scheme ${\mathcal{F}}_{M}$. □

**Remark**

**2.**

The results of Theorem 3 also hold if the values for ${X}_{n}$ in the first intervals are computed using any numerical method of order at least $O({h}^{M+1})$, instead of using the exact scheme. Although both types of schemes, ${\mathcal{F}}_{M}$ and ${\mathcal{T}}_{M}$, have the same order, more general dynamic consistency properties can be proved for the class of ${\mathcal{F}}_{M}$ schemes, as shown in the next section.

The error analysis of the methods provided by Theorem 3 is illustrated in the next two figures. Errors of numerical solutions for Example 1, computed using ${\mathcal{T}}_{M}$ schemes of three different orders, are shown in Figure 2 (top). The corresponding errors relative to the expected order, i.e., errors divided by ${h}^{M}$, are shown in Figure 2 (bottom), with results in agreement with the expected orders given by Theorem 3.

Figure 3 presents the errors in relation with the size of the mesh for numerical solutions of Example 1 computed using ${\mathcal{T}}_{3}$, the truncated method with $M=3$. Errors overlap when divided by ${h}^{3}$, clearly showing that the method is of order three, as established in Theorem 3.

## 4. Dynamic Consistency Properties

In this section we analyse the consistency between dynamic properties of the numerical solutions resulting from applying the ${\mathcal{F}}_{M}$ and ${\mathcal{T}}_{M}$ schemes defined in Theorem 3 and the continuous solutions of problem (3)–(4).

#### 4.1. Asymptotic Stability

First we will show that the ${\mathcal{F}}_{M}$ schemes defined in Theorem 3 preserve delay-dependent stability, i.e., that they are $\tau (0)$-stable [28].

It is well known that for the trivial solution of (3)–(4) to be asymptotically stable it is necessary and sufficient that all the roots ${\lambda}_{i}$ of the characteristic equation
where I is the $d\times d$ identity matrix, have negative real parts, $\Re ({\lambda}_{i})<0$. This condition, involving a transcendental equation with an infinite number of roots, is difficult to verify in general. However, when A and B commute, there is a common Schur basis for them, and they can be simultaneously reduced to triangular form, with elements in the diagonal corresponding to the eigenvalues of each matrix [29]. Thus, in this case, condition (11) is equivalent to
where $({\alpha}_{i},{\beta}_{i})$ are pairs of eigenvalues of A and B, as they appear in the i diagonal position in the common triangular form. Hence, writing $(\alpha ,\beta )$ for any of these pairs, it follows that if the trivial solution of (3)–(4) is asymptotically stable then
implies $\Re (\lambda )<0$.

$$det(\lambda I-A-{\mathrm{e}}^{-\lambda \tau}B)=0,$$

$$\prod _{i=1}^{d}(\lambda -{\alpha}_{i}-{\mathrm{e}}^{-\lambda \tau}{\beta}_{i})=0,$$

$$\lambda -\alpha -{\mathrm{e}}^{-\lambda \tau}\beta =0$$

Consider now the difference equations system (8) defining the ${\mathcal{F}}_{M}$ scheme. For any n such that $\phantom{\rule{1.em}{0ex}}(m-1)\tau \le nh=n\tau /N<m\tau $, the integer part of $n/N$ is $[n/N]=m-1$. Thus, we can write (8) in the form of a Volterra difference system of convolution type,
by setting ${B}_{j}=0$, the d-dimensional zero matrix, when $j\ne kN$, and
when $j=kN$, for integer k. Thus, using the Z-transform method, it holds that the system (14) is asymptotically stable if all roots of the characteristic equation
satisfy $|z|<1$ [30] (Theorem 5.21), where $\tilde{B}(z)$ is the Z transform of B. In this case,

$$\phantom{\rule{1.em}{0ex}}{X}_{n+1}=\sum _{j=0}^{n}{B}_{j}{X}_{n-j},$$

$${B}_{j}={\mathrm{e}}^{Ah}\frac{{B}^{j/N}{h}^{j/N}}{(j/N)!}$$

$$det(zI-\tilde{B}(z))=0,$$

$$\tilde{B}(z)=\sum _{j=0}^{\infty}{B}_{j}{z}^{-j}={\mathrm{e}}^{Ah}\sum _{k=0}^{\infty}\frac{{B}^{k}{h}^{k}}{k!}{z}^{-kN}={\mathrm{e}}^{Ah}{\mathrm{e}}^{Bh/{z}^{N}}.$$

Now we have the basis to prove our next theorem.

**Theorem**

**4**

**Proof.**

From the common triangular decompositions of A and B, it follows that every root of (16) must satisfy, for some pair of ordered eigenvalues $(\alpha ,\beta )$,

$$z-{\mathrm{e}}^{\alpha h}{\mathrm{e}}^{\beta h/{z}^{N}}=0\u27f9ln(z)-\alpha h-\beta h/{z}^{N}=0.$$

Writing $ln(z)=\lambda \tau /N$, so that ${z}^{-N}=exp(-\lambda \tau )$, one gets from (18)
which is equivalent to (13), since $h=\tau /N$. Hence, if the trivial solution of (3)–(4) is asymptotically stable it must hold that $\Re (\lambda )<0$, and therefore $|z|=exp(\Re (\lambda \tau /N))<1$. □

$$\lambda \tau /N-\alpha h-\beta hexp(-\lambda \tau )=0,$$

**Remark**

**3.**

For the class of ${\mathcal{T}}_{M}$ schemes, a general and unconditional result similar to Theorem 4 is not to be expected, as shown by considering the simple case where $A=0$, $M=1$, and $N=1$, so that the ${\mathcal{T}}_{1}$ scheme reduces to

$${X}_{n+1}={X}_{n}+Bh{X}_{n-1}.$$

#### Delay Independent Stability

Our next theorem shows that the class of ${\mathcal{T}}_{M}$ schemes do preserve absolute or delay independent stability, i.e., that they are P-stable [6] (p. 296). This is also trivially the case for ${\mathcal{F}}_{M}$ schemes, as P-stability is a weaker condition than $\tau (0)$-stability.

**Theorem**

**5**

**Proof.**

Using the common triangular forms of A and B, and considering a pair of ordered eigenvalues $(\alpha ,\beta )$, a necessary condition for the trivial solution of (3)–(4) to be delay-independent asymptotically stable is [31,32]

$$\Re (\alpha )+|\beta |<0.$$

The solution of the difference system (9) defining the ${\mathcal{T}}_{M}$ scheme is asymptotically stable if all roots of the characteristic equation
are inside the unit disc. A nonzero z is a root of (22) if for a pair $(\alpha ,\beta )$ it holds that

$$det\left({z}^{MN+1}I-{\mathrm{e}}^{Ah}\sum _{k=0}^{M}\frac{{B}^{k}{h}^{k}}{k!}{z}^{(M-k)N}\right)=0$$

$$z-{\mathrm{e}}^{\alpha h}\sum _{k=0}^{M}\frac{{\beta}^{k}{h}^{k}}{k!}{z}^{-kN}=0.$$

The stability analysis provided by Theorems 4 and 5 assures that, for a fixed delay, the region of asymptotic stability for (3)–(4) is contained in the region of asymptotic stability of ${\mathcal{F}}_{M}$ schemes, while for ${\mathcal{T}}_{M}$ schemes it can only be assured that the region of asymptotic stability of (3)–(4) for all delays is contained in the corresponding region for the numerical solution. However, ${\mathcal{T}}_{M}$ schemes usually perform much better than can be guaranteed, as shown in the next example.

**Example**

**2.**

Figure 4 shows the numerical solutions computed with the method ${\mathcal{T}}_{2}$, with $N=5$, for the pure delay problem (7) with parameters
and two different values of delay, $\tau =3$ and $\tau =3.3$.

$$B=\left(\begin{array}{cc}-0.435& 0.0325\\ 0.13& -0.435\end{array}\right),\phantom{\rule{1.em}{0ex}}F(t)=\left(\begin{array}{c}cos(\pi t)\\ {(t+1)}^{2}\end{array}\right),$$

Matrix B has real eigenvalues, ${\lambda}_{1}=-0.37$ and ${\lambda}_{2}=-0.5$. Hence, in this case the trivial solution of (7) is asymptotically stable if all the eigenvalues β of B satisfy $|\beta |\tau <\pi /2$ [6] (p. 289), i.e., for $\tau <\pi $. As shown in Figure 4, the numerical solutions present the correct behaviour, even for values of τ close to the limit of stability. For both components, the solution approach zero as t increases for $\tau =3$, inside the region of stability (Figure 4, top), while they diverge for $\tau =3.3$, outside the region of stability (Figure 4, bottom).

#### 4.2. Oscillation and Positivity

Our next theorem shows that ${\mathcal{F}}_{M}$ schemes also preserve the oscillation properties of exact solutions for problem (3)–(4).

We recall that a solution of (3) is said to oscillate if every component of the solution has arbitrary large zeros; otherwise it is called non-oscillatory [33] (Definition 5.0.1). It is known that every solution of the delay differential system (3) oscillates if and only if the characteristic Equation (11) has no real roots [33] (Theorem 5.1.1).

**Theorem**

**6**

We will use the result of the following lemma, whose proof is similar to that of Theorem 7.1.1 in [33].

**Lemma**

**1.**

**Proof**

**of**

**Theorem**

**6.**

Using common triangular decompositions of A and B, if every solution of (3)–(4) oscillates then, for any pair of ordered eigenvalues $(\alpha ,\beta )$, Equation (13), or equivalently Equation (19), has no real roots. If we assume that there is a non-oscillatory solution of (8) we get a contradiction, since, from Lemma 1, there would be a positive z satisfying
and writing $z=exp(\lambda h)$, we would get Equation (19) with $\lambda $ a real root. □

$$z-{\mathrm{e}}^{\alpha h}{\mathrm{e}}^{\beta h/{z}^{N}}=0,$$

**Remark**

**4.**

For the class of ${\mathcal{T}}_{M}$ schemes, a general result similar to Theorem 6 seems difficult, although particular cases could be dealt with, as shown in our next proposition.

**Proposition**

**1.**

If every solution of the pure delay problem (7) oscillates, then the numerical solutions computed using the ${\mathcal{T}}_{1}$ scheme also oscillate.

**Proof.**

For the pure delay problem (7), an equivalent condition for every solution to oscillate is that B has no real eigenvalues in the interval $[-1/\mathrm{e}\tau ,+\infty )$ [33] (Theorem 5.2.2). The characteristic equation for the system of difference equations (9) defining the ${\mathcal{T}}_{1}$ scheme, i.e., Equation (22) with $A=0$ and $M=1$, reads
and every solution oscillates if (26) has no positive roots [33] (Theorem 7.1.1). But z is a root of (26) if for an eigenvalue $\beta $ of B it holds that

$$det\left(({z}^{N+1}-{z}^{N})I-Bh\right)=0,$$

$${z}^{N+1}-{z}^{N}=\beta h.$$

Thus, if every solution of (7) oscillates, so that any possible real eigenvalue $\beta $ of B satisfies $\beta \tau <-1/\mathrm{e}$, and we assume that there is a positive root of (27), we get a contradiction. From (27), if z is positive, then $\beta $ is real and ${z}^{N}(z-1)=\beta \tau /N<0$. Hence, it follows that $z<1$ and

$$N{z}^{N}(1-z)=-\beta \tau >{\mathrm{e}}^{-1}.$$

But for $0<z<1$, the maximum value of $N{z}^{N}(1-z)$ is attained when $z=N/(N+1)$, so that
□

$$N{z}^{N}(1-z)\le {\left(\frac{N}{N+1}\right)}^{N+1}<{\mathrm{e}}^{-1}.$$

**Example**

**3.**

Figure 5 shows the numerical solution computed with the method ${\mathcal{T}}_{2}$, with $N=10$, for the first component of the pure delay problem (7) with parameters $\tau =1$ and B and $F(t)$ as in Example 2. In this case, every solution oscillates if all the eigenvalues β of B satisfy $|\beta |\tau >1/\mathrm{e}\approx 0.3679$. As shown in Figure 4, the numerical solutions preserve the correct behaviour, even for a value of τ very close to the limit of oscillation.

#### Positivity

Conditions for the solution of a DDE system to preserve positivity, in the sense that for any component-wise positive initial function $F(t)$ the solution always remains positive, are necessarily very restrictive.

Consider the pure delay problem (7). If $B=({b}_{ij})>0$ element-wise, i.e., ${b}_{ij}>0,\phantom{\rule{0.166667em}{0ex}}i,j=1\dots d$, then it is clear from the expression of the exact solution given in (5) that for any component-wise positive initial function $F(t)$ all components of the solution $X(t)$ remain positive for all $t>0$. In this case, it is also clear from the expressions of ${\mathcal{F}}_{M}$ and ${\mathcal{T}}_{M}$ schemes given in Theorem 3 that the numerical solutions computed with both methods also remain positive for all $t>0$.

If B is only non-negative, i.e., $B\ge 0$ element-wise, then the exact as well as the numerical solutions remain non-negative for any non-negative initial function and all $t>0$. The condition of all elements of B being non-negative is also necessary to preserve positivity, for if there is an element of B, say ${b}_{1r},$ negative, then it is possible to find an initial function, component-wise positive, for which some component of $X(t)$ becomes negative, already in the first interval $0<t<\tau $. To see this, take $F(t)$ with components ${F}_{r}(t)={t}^{2}$ and ${F}_{j}(t)=\delta {t}^{2},\phantom{\rule{0.166667em}{0ex}}j\ne r$, and choose $\delta $ such that

$$0<\delta <-{b}_{1r}/|\sum _{j\ne r}{b}_{1j}|.$$

Taking into account that, from (5), for $0<t<\tau $ one gets $X(t)=BG(t),$ where the components of $G(t)$ are ${G}_{r}(t)=h(t)$ and ${G}_{j}(t)=\delta h(t),\phantom{\rule{0.166667em}{0ex}}j\ne r$, with $h(t)=({(t-\tau )}^{3}-{(-\tau )}^{3})/3$, it follows that the first component of $X(t)$ becomes negative,
since $h(t)>0$ for $t\in (0,\tau ).$

$${X}_{1}(t)={b}_{1r}h(t)+\delta \sum _{j\ne r}{b}_{1j}h(t)<\left({b}_{1r}-{b}_{1r}\frac{{\sum}_{j\ne r}{b}_{1j}}{|{\sum}_{j\ne r}{b}_{1j}|}\right)h(t)<0,$$

For the general linear problem (3)–(4), if $B>0$ and also $A>0$ element-wise, then it is also immediate that positivity is preserved both in the exact solution and in the numerical solutions computed using the ${\mathcal{F}}_{M}$ and ${\mathcal{T}}_{M}$ schemes. For $B\ge 0$, non-negativity of the solutions, both exact and numerical, is preserved if A is Metzler, i.e., with non-negative off-diagonal elements, as then $exp(At)$ is non-negative for any $t>0$.

## 5. Conclusions

Despite the growing interest in NSFD methods, including their application to some problems with delay, the scheme presented in Theorem 2 is possibly the first example of an exact scheme for a system of delay differential equations, generalising to systems of linear DDE with commuting matrix coefficients the results presented in [23] for scalar linear DDE problems.

The families of ${\mathcal{F}}_{M}$ and ${\mathcal{T}}_{M}$ schemes defined in Theorem 3 allow the computation of numerical solutions for problem (3)–(4) with high accuracy and low computational costs for extended time intervals, showing good dynamic consistency properties. In particular, ${\mathcal{F}}_{M}$ schemes have been proved to preserve delay-dependent asymptotic stability of the continuous solution, i.e., they are $\tau (0)$-stable difference methods, while ${\mathcal{T}}_{M}$ schemes have been proved to preserve delay-independent asymptotic stability, i.e., they are P-stable methods. Also, ${\mathcal{F}}_{M}$ schemes preserve the oscillation behaviour of the exact solution, which has also been proved for the ${\mathcal{T}}_{1}$ scheme when applied to the pure delay problem (7). Both types of scheme also provide numerical solutions that remain positive, or non-negative, when the original problem satisfy conditions assuring the corresponding property.

Several problems and lines of research are open from the results presented in this work. Proving dynamic consistency properties similar to those of ${\mathcal{F}}_{M}$ schemes for some particular ${\mathcal{T}}_{M}$ schemes, either in general or when applied to some type of problems or under certain conditions, could deserve further attention, as ${\mathcal{T}}_{M}$ schemes offer the same accuracy than ${\mathcal{F}}_{M}$ schemes with reduced computational needs. Applying the new schemes to low order systems, e.g., with coefficients being $2\times 2$ or $3\times 3$ matrices, might allow to express the systems of difference equations defining the schemes in the more usual form of a NSFD method, with derivatives for each component being approximated by the corresponding increments divided by a scalar function $\phi (h)=h+O({h}^{2})$, as has been done for some examples of systems without delay [34,35]. This could also be the case when considering problems where the matrix coefficients A and B posses some special structure.

## Author Contributions

Conceptualization, M.Á.C. and F.R.; methodology and formal analysis, all authors; writing—original draft preparation, F.R.; writing—review and editing, all authors.

## Funding

This research was funded by Ministerio de Economía y Competitividad grant number CGL2017-89804-R.

## Conflicts of Interest

The authors declare no conflict of interest. The funders had no role in the design of the study; in the collection, analyses, or interpretation of data; in the writing of the manuscript, or in the decision to publish the results.

## References

- Kuang, Y. Delay Differential Equations. With Applications in Population Dynamics; Academic Press: San Diego, CA, USA, 1993. [Google Scholar]
- Kolmanovskii, V.; Myshkis, A. Introduction to the Theory and Applications of Functional Differential Equations; Kluwer Academic Publishers: Dordrecht, The Netherlands, 1999. [Google Scholar]
- Smith, H. An Introduction to Delay Differential Equations with Applications to the Life Sciences; Springer: New York, NY, USA, 2011. [Google Scholar]
- Wu, M.; He, Y.; She, J.-H. Stability Analysis and Robust Control of Time-Delay Systems; Science Press: Beijing, China; Springer: Heidelberg, Germany, 2010. [Google Scholar]
- Chalishajar, D.N.; Kumar, A. Total controllability of the second order semi-linear differential equation with infinite delay and non-instantaneous impulses. Math. Comput. Appl.
**2018**, 23, 32. [Google Scholar] [CrossRef] - Bellen, A.; Zennaro, M. Numerical Methods for Delay Differential Equations; Oxford University Press: Oxford, UK, 2003. [Google Scholar]
- Mickens, R.E. Nonstandard Finite Difference Models of Differential Equations; World Scientific: Singapore, 1994. [Google Scholar]
- Mickens, R.E. (Ed.) Advances on Applications of Nonstandard Finite Difference Schemes; World Scientific: Singapore, 2005. [Google Scholar]
- Patidar, K.C. Nonstandard finite difference methods: Recent trends and further developments. J. Differ. Equ. Appl.
**2016**, 22, 817–849. [Google Scholar] [CrossRef] - Stuart, A.M.; Humphries, A.R. Dynamical Systems and Numerical Analysis; Cambridge University Press: Cambridge, UK, 1998. [Google Scholar]
- Jódar, L.; Villanueva, R.J.; Arenas, A.J.; González, G.C. Nonstandard numerical methods for a mathematical model for influenza disease. Math. Comput. Simul.
**2008**, 79, 622–633. [Google Scholar] [CrossRef] - Arenas, A.J.; Moraño, J.A.; Cortés, J.C. Non-standard numerical method for a mathematical model of RSV epidemiological transmission. Comput. Math. Appl.
**2008**, 56, 670–678. [Google Scholar] [CrossRef] - Arenas, A.J.; González-Parra, G.; Chen-Charpentier, B.M. A nonstandard numerical scheme of predictor–corrector type for epidemic models. Comput. Math. Appl.
**2010**, 59, 3740–3749. [Google Scholar] [CrossRef] - Mickens, R.E.; Washington, T.M. NSFD discretizations of interacting population models satisfying conservation laws. Comput. Math. Appl.
**2013**, 66, 2307–2316. [Google Scholar] [CrossRef] - Guerrero, F.; González-Parra, G.; Arenas, A.J. A nonstandard finite difference numerical scheme applied to a mathematical model of the prevalence of smoking in Spain: A case study. Comput. Appl. Math.
**2014**, 33, 13–25. [Google Scholar] [CrossRef] - Sekiguchi, M.; Ishiwata, E. Global dynamics of a discretized SIRS epidemic model with time delay. J. Math. Anal. Appl.
**2010**, 371, 195–202. [Google Scholar] [CrossRef] - Wang, Y. Dynamics of a nonstandard finite-difference scheme for delay differential equations with unimodal feedback. Commun. Nonlinear Sci. Numer. Simul.
**2012**, 17, 3967–3978. [Google Scholar] [CrossRef] - Su, H.; Li, W.; Ding, X. Numerical dynamics of a nonstandard finite difference method for a class of delay differential equations. J. Math. Anal. Appl.
**2013**, 400, 25–34. [Google Scholar] [CrossRef] - Xu, J.; Geng, Y. Stability preserving NSFD scheme for a delayed viral infection model with cell-to-cell transmission and general nonlinear incidence. J. Differ. Equ. Appl.
**2017**, 23, 893–916. [Google Scholar] [CrossRef] - Zhou, J.; Yang, Y. Global dynamics of a discrete viral infection model with time delay, virus-to-cell and cell-to-cell transmissions. J. Differ. Equ. Appl.
**2017**, 23, 1853–1868. [Google Scholar] [CrossRef] - Dang, Q.A.; Hoang, M.T. Lyapunov direct method for investigating stability of nonstandard finite difference schemes for metapopulation models. J. Differ. Equ. Appl.
**2018**, 24, 15–47. [Google Scholar] [CrossRef] - Garba, S.M.; Gumel, A.B.; Hassan, A.S.; Lubuma, J.M.-S. Switching from exact scheme to nonstandard finite difference scheme for linear delay differential equation. Appl. Math. Comput.
**2015**, 258, 388–403. [Google Scholar] [CrossRef] - García, M.A.; Castro, M.A.; Martín, J.A.; Rodríguez, F. Exact and nonstandard numerical schemes for linear delay differential models. Appl. Math. Comput.
**2018**, 338, 337–345. [Google Scholar] [CrossRef] - Pospíšil, M. Representation and stability of solutions of systems of functional differential equations with multiple delays. Electron. J. Qual. Theory
**2012**, 54, 1–30. [Google Scholar] [CrossRef] - Bellman, R.; Cooke, K.L. Differential-Difference Equations; Academic Press: New York, NY, USA, 1963. [Google Scholar]
- El’sgol’ts, L.E.; Norkin, S.B. Introduction to the Theory and Application of Differential Equations with Deviating Arguments; Academic Press: New York, NY, USA, 1973. [Google Scholar]
- Martín, J.A.; Rodríguez, F.; Company, R. Analytic solution of mixed problems for the generalized diffusion equation with delay. Math. Comput. Model.
**2004**, 40, 361–369. [Google Scholar] [CrossRef] - Guglielmi, N. On the asymptotic stability properties of Runge–Kutta methods for delay differential equations. Numer. Math.
**1997**, 77, 467–485. [Google Scholar] [CrossRef] - Horn, R.A.; Johnson, C.R. Matrix Analysis; Cambridge University Press: Cambridge, UK, 1985. [Google Scholar]
- Elaydi, S.N. An Introduction to Difference Equations; Springer: New York, NY, USA, 1996. [Google Scholar]
- Čermák, J.; Jánský, J.; Nechvátal, L. Exact versus discretized stability regions for a linear delay differential equation. Appl. Math. Comput.
**2019**, 347, 712–722. [Google Scholar] [CrossRef] - Nishiguchi, J. On parameter dependence of exponential stability of equilibrium solutions in differential equations with a single constant delay. Discrete Contin. Dyn. Syst.
**2016**, 36, 5657–5679. [Google Scholar] [CrossRef] - Györi, I.; Ladas, G. Oscillation Theory of Delay Differential Equations; Clarendon Press: Oxford, UK, 1991. [Google Scholar]
- Roeger, L.-I.W. Exact finite-difference schemes for two-dimensional linear systems with constant coefficients. J. Comput. Appl. Math.
**2008**, 219, 102–109. [Google Scholar] [CrossRef] - Quang, A.D.; Tuan, H.M. Exact finite difference schemes for three-dimensional linear systems with constant coefficients. J. Vietnam J. Math.
**2018**, 46, 471–492. [Google Scholar] [CrossRef]

**Figure 1.**Exact solutions (lines) and numerical solutions provided by the exact scheme (points) for the two components of Example 1. (

**a**) First component, ${X}_{1}(t)$. (

**b**) Second component, ${X}_{2}(t)$.

**Figure 2.**Absolute errors (log-scale) of numerical solutions for Example 1, computed using three different ${\mathcal{T}}_{M}$ schemes of increasing orders, with $h=0.1$. (

**a**,

**b**) Absolute errors for the first and second component, respectively. (

**c**,

**d**) Errors divided by ${h}^{M}$.

**Figure 3.**Errors (log-scale) of numerical solutions for Example 1, computed with the method ${\mathcal{T}}_{3}$ using three different mesh sizes. (

**a**,

**b**) Absolute errors for the first and second component, respectively. (

**c**,

**d**) Errors divided by ${h}^{3}$.

**Figure 4.**Numerical solutions computed with the method ${\mathcal{T}}_{2}$ for Example 2 with two different values of delay, showing stable and unstable behaviours. (

**a**,

**b**) First and second component, respectively, with delay $\tau =3$. (

**c**,

**d**) First and second component, respectively, with delay $\tau =3.3$.

**Figure 5.**Numerical solution for the first component of Example 1 and zoom-views in different intervals. (

**a**) $t\in [0,50]$. (

**b**) $t\in [13,22]$. (

**c**) $t\in [20,25]$. (

**d**) $t\in [46,50]$.

© 2019 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).