Next Article in Journal
Comparing Direct and Indirect Transmission in a Simple Model of Veterinary Disease
Next Article in Special Issue
Bounded Solutions of Semilinear Time Delay Hyperbolic Differential and Difference Equations

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

Article
Exact and Nonstandard Finite Difference Schemes for Coupled Linear Delay Differential Systems
by 1,2,*
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 ′ ( t ) = A X ( t ) + B X ( t − τ ) ,$ 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
$x ′ ( t ) = α x ( t ) + β x ( t − τ ) , t > 0 ,$
$x ( t ) = f ( t ) , − τ ≤ t ≤ 0 ,$
where $α , β ∈ R$, $τ > 0$, and $f : [ − τ , 0 ] → R$ is a continuous function. The method of [22] was exact in the initial time interval $0 ≤ t ≤ τ$, 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).
In the present work, we consider the coupled linear delay system
$X ′ ( t ) = A X ( t ) + B X ( t − τ ) , t > 0 ,$
satisfying the initial condition
$X ( t ) = F ( t ) , − τ ≤ t ≤ 0 ,$
where $X ( t )$ and $F ( t )$ are d-dimensional real vector functions, and A and B are $d × d$ commuting real matrices, in general not simultaneously diagonalizable.
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 $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 $− τ ≤ t ≤ 0$, and, for $( m − 1 ) τ < t ≤ m τ$ and $m ≥ 1$,
$X ( t ) = ∑ k = 0 m − 1 B k ( t − k τ ) k k ! e A ( t − k τ ) F ( 0 ) + ∑ k = 0 m − 2 B k + 1 k ! ∫ − τ 0 ( t − ( k + 1 ) τ − s ) k e A ( t − ( k + 1 ) τ − s ) F ( s ) d s + B m ( m − 1 ) ! ∫ − τ t − m τ ( t − m τ − s ) m − 1 e A ( t − m τ − s ) F ( s ) d s ,$
where the second summation is assumed to be empty for $m = 1$.
Proof.
For $m = 1$, one has $X ( t ) = e A t F ( 0 ) + B ∫ − τ t − τ e A ( t − τ − s ) F ( s ) d s$, so that $X ( 0 ) = F ( 0 )$ and $X ′ ( t ) = A X ( t ) + B F ( t − τ ) = A X ( t ) + B X ( t − τ ) .$ For $m > 1$, it is also immediate to check that $X ′ ( t ) = A X ( t ) + B X ( t − τ ) ,$ and that the expressions given by (5) for two consecutive intervals agree at the connecting points $t = m τ$. Thus, $X ( t )$ is continuous for $t > − τ$, 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 $N h = τ$, for some integer $N ≥ 1$. Writing $t n ≡ n h$ and $X n ≡ X ( t n )$, for $n ≥ − N$, the numerical solution given by $X n = F ( t n )$, for $− N ≤ n ≤ 0$, and, for $( m − 1 ) τ ≤ n h < m τ$ and $m ≥ 1$ by
$X n + 1 = e A h ∑ k = 0 m − 1 B k h k k ! X n − k N + B m ( m − 1 ) ! ∫ t n − m τ t n − m τ + h ( t n − m τ + h − s ) m − 1 e A ( t n − m τ + h − s ) F ( s ) d s ,$
defines an exact numerical scheme for problem (3)–(4).
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
$E 1 ( t n + 1 ) = E 1 ( t n + h ) = ∑ k = 0 m − 1 B k ( t n − k τ + h ) k k ! e A ( t n − k τ + h ) F ( 0 ) = e A h ∑ k = 0 m − 1 ∑ r = 0 k B r h r r ! B k − r ( t n − r τ − ( k − r ) τ ) k − r ( k − r ) ! e A ( t n − r τ − ( k − r ) τ ) F ( 0 ) = e A h ∑ k = 0 m − 1 B k h k k ! ∑ r = 0 m − 1 − k B r ( t n − k τ − r τ ) r r ! e A ( t n − k τ − r τ ) F ( 0 ) = e A h ∑ k = 0 m − 1 B k h k k ! E 1 ( t n − k N ) .$
In a similar way, one gets
$E 2 ( t n + 1 ) = e A h ∑ k = 0 m − 2 B k h k k ! E 2 ( t n − k N ) = e A h ∑ k = 0 m − 1 B k h k k ! E 2 ( t n − k N ) ,$
since $E 2 ( t n − ( m − 1 ) N ) = 0$ for $( m − 1 ) τ ≤ t n < m τ$. Also,
$E 3 ( t n + 1 ) = e A h ∑ k = 0 m − 1 B k h k k ! E 3 ( t n − k N ) + B m ( m − 1 ) ! ∫ t n − m τ t n − m τ + h ( t n − m τ + h − s ) m − 1 e A ( t n − m τ + h − s ) F ( s ) d s ,$
so that expression (6) is recovered. □
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 ′ ( t ) = B X ( t − τ ) , t > 0 , X ( t ) = F ( t ) , − τ ≤ t ≤ 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 $τ = 1$ and
$A = − 3 / 2 1 − 2 3 / 2 , B = 5 / 4 − 1 2 − 7 / 4 , F ( t ) = 2 ( t + 1 ) ( t + 1 ) 2 .$

## 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, $F M$ and $T M$ methods, depending on whether the full sum in (6) is kept or a truncated sum is used.
Theorem 3.
Let $N ≥ 1$ and $h = τ / N$. For a given $M ≥ 1$, assume that the values of $X n$, for $n = − N … M N$, 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
$F M : = X n + 1 = e A h ∑ k = 0 m − 1 B k h k k ! X n − k N , ( m − 1 ) τ ≤ n h < m τ ,$
$T M : = X n + 1 = e A h ∑ k = 0 M B k h k k ! X n − k N , ( m − 1 ) τ ≤ n h < m τ .$
Then, both numerical schemes, $F M$ and $T M$, have local error $O ( h M + 1 )$ and order M.
Proof.
Let $∥ ∥$ be any vector norm and a compatible norm for matrices, and consider the scheme $T M$. Assume that $∥ X ( t k ) − X k ∥ = O ( h M + 1 )$ for $k ≤ n$, which is the case for $n h ≤ M τ$. Then, for $m ≥ M + 1$ and $( m − 1 ) τ ≤ n h < m τ$, using (6), one gets
$∥ X ( t n + 1 ) − X n + 1 ∥ ≤ ∥ e A h ∥ ∑ k = 0 M ∥ B ∥ k h k k ! ∥ X ( t n − k N ) − X n − k N ∥ + ∥ B ∥ m ( m − 1 ) ! ∫ t n − m τ t n − m τ + h ( t n − m τ + h − s ) m − 1 ∥ e A ( t n − m τ + h − s ) ∥ ∥ F ( s ) ∥ d s .$
Let $M = ∥ B ∥$, and $M 1 , M 2 > 0$ such that $∥ e A s ∥ < M 1$ and $∥ F ( s ) ∥ < M 2$ for $s ∈ [ 0 , h ]$. Then, by the induction hypothesis, the first term in (10) is $O ( h M + 1 )$ and the second term is bounded by
$M m M 1 M 2 ( m − 1 ) ! ∫ t n − m τ t n − m τ + h ( t n − m τ + h − s ) m − 1 d s < M m M 1 M 2 ( m − 1 ) ! h m ≤ O ( h M + 1 ) .$
Similar arguments result in the same bounds holding for the scheme $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, $F M$ and $T M$, have the same order, more general dynamic consistency properties can be proved for the class of $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 $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 $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 $F M$ and $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 $F M$ schemes defined in Theorem 3 preserve delay-dependent stability, i.e., that they are $τ ( 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 $λ i$ of the characteristic equation
$det ( λ I − A − e − λ τ B ) = 0 ,$
where I is the $d × d$ identity matrix, have negative real parts, $ℜ ( λ 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
$∏ i = 1 d ( λ − α i − e − λ τ β i ) = 0 ,$
where $( α i , β i )$ are pairs of eigenvalues of A and B, as they appear in the i diagonal position in the common triangular form. Hence, writing $( α , β )$ for any of these pairs, it follows that if the trivial solution of (3)–(4) is asymptotically stable then
$λ − α − e − λ τ β = 0$
implies $ℜ ( λ ) < 0$.
Consider now the difference equations system (8) defining the $F M$ scheme. For any n such that $( m − 1 ) τ ≤ n h = n τ / N < m τ$, 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,
$X n + 1 = ∑ j = 0 n B j X n − j ,$
by setting $B j = 0$, the d-dimensional zero matrix, when $j ≠ k N$, and
$B j = e A h B j / N h j / N ( j / N ) !$
when $j = k N$, 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
$det ( z I − B ˜ ( z ) ) = 0 ,$
satisfy $| z | < 1$ [30] (Theorem 5.21), where $B ˜ ( z )$ is the Z transform of B. In this case,
$B ˜ ( z ) = ∑ j = 0 ∞ B j z − j = e A h ∑ k = 0 ∞ B k h k k ! z − k N = e A h e B h / z N .$
Now we have the basis to prove our next theorem.
Theorem 4
($τ ( 0 )$-stability). Consider problem (3)–(4) and the $F M$ schemes defined in Theorem 3. If the trivial solution of (3)–(4) is asymptotically stable then the numerical solutions computed using $F M$ schemes are also asymptotically stable.
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 $( α , β )$,
$z − e α h e β h / z N = 0 ⟹ ln ( z ) − α h − β h / z N = 0 .$
Writing $ln ( z ) = λ τ / N$, so that $z − N = exp ( − λ τ )$, one gets from (18)
$λ τ / N − α h − β h exp ( − λ τ ) = 0 ,$
which is equivalent to (13), since $h = τ / N$. Hence, if the trivial solution of (3)–(4) is asymptotically stable it must hold that $ℜ ( λ ) < 0$, and therefore $| z | = exp ( ℜ ( λ τ / N ) ) < 1$. □
Remark 3.
For the class of $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 $T 1$ scheme reduces to
$X n + 1 = X n + B h X n − 1 .$
If B has a real eigenvalue β, the trivial solution of the pure delay problem (7) is asymptotically stable if $| β | < π / 2$, while the asymptotic stability of (20) requires the more stringent condition $| β | < 1$ [31].

#### Delay Independent Stability

Our next theorem shows that the class of $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 $F M$ schemes, as P-stability is a weaker condition than $τ ( 0 )$-stability.
Theorem 5
(P-stability). Consider problem (3)–(4) and the $T M$ schemes defined in Theorem 3. If the trivial solution of (3)–(4) is asymptotically stable for all values of τ, then the numerical solutions computed using $T M$ schemes are also asymptotically stable.
Proof.
Using the common triangular forms of A and B, and considering a pair of ordered eigenvalues $( α , β )$, a necessary condition for the trivial solution of (3)–(4) to be delay-independent asymptotically stable is [31,32]
$ℜ ( α ) + | β | < 0 .$
The solution of the difference system (9) defining the $T M$ scheme is asymptotically stable if all roots of the characteristic equation
$det z M N + 1 I − e A h ∑ k = 0 M B k h k k ! z ( M − k ) N = 0$
are inside the unit disc. A nonzero z is a root of (22) if for a pair $( α , β )$ it holds that
$z − e α h ∑ k = 0 M β k h k k ! z − k N = 0 .$
Thus, if condition (21) hold and we assume that there is a root with $| z | ≥ 1$, we would get a contradiction, since, from (23),
$| z | ≤ e ℜ ( α h ) ∑ k = 0 M | β | k h k k ! | z | − k N < e ( ℜ ( α ) + | β | ) h < 1 .$
□
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 $F M$ schemes, while for $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, $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 $T 2$, with $N = 5$, for the pure delay problem (7) with parameters
$B = − 0.435 0.0325 0.13 − 0.435 , F ( t ) = cos ( π t ) ( t + 1 ) 2 ,$
and two different values of delay, $τ = 3$ and $τ = 3.3$.
Matrix B has real eigenvalues, $λ 1 = − 0.37$ and $λ 2 = − 0.5$. Hence, in this case the trivial solution of (7) is asymptotically stable if all the eigenvalues β of B satisfy $| β | τ < π / 2$ [6] (p. 289), i.e., for $τ < π$. 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 $τ = 3$, inside the region of stability (Figure 4, top), while they diverge for $τ = 3.3$, outside the region of stability (Figure 4, bottom).

#### 4.2. Oscillation and Positivity

Our next theorem shows that $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
(Oscillation). If every solution of (3)–(4) oscillates, then the numerical solutions computed using $F M$ schemes also oscillate.
We will use the result of the following lemma, whose proof is similar to that of Theorem 7.1.1 in [33].
Lemma 1.
Consider the linear system of difference Equation (8) defining the $F M$ scheme. Every solution of (8) oscillates if and only if the characteristic Equation (16) has no positive roots.
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 $( α , β )$, 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
$z − e α h e β h / z N = 0 ,$
and writing $z = exp ( λ h )$, we would get Equation (19) with $λ$ a real root. □
Remark 4.
For the class of $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 $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 / e τ , + ∞ )$ [33] (Theorem 5.2.2). The characteristic equation for the system of difference equations (9) defining the $T 1$ scheme, i.e., Equation (22) with $A = 0$ and $M = 1$, reads
$det ( z N + 1 − z N ) I − B h = 0 ,$
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 $β$ of B it holds that
$z N + 1 − z N = β h .$
Thus, if every solution of (7) oscillates, so that any possible real eigenvalue $β$ of B satisfies $β τ < − 1 / e$, and we assume that there is a positive root of (27), we get a contradiction. From (27), if z is positive, then $β$ is real and $z N ( z − 1 ) = β τ / N < 0$. Hence, it follows that $z < 1$ and
$N z N ( 1 − z ) = − β τ > 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 ) ≤ N N + 1 N + 1 < e − 1 .$
□
Example 3.
Figure 5 shows the numerical solution computed with the method $T 2$, with $N = 10$, for the first component of the pure delay problem (7) with parameters $τ = 1$ and B and $F ( t )$ as in Example 2. In this case, every solution oscillates if all the eigenvalues β of B satisfy $| β | τ > 1 / e ≈ 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 i j ) > 0$ element-wise, i.e., $b i j > 0 , i , j = 1 … 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 $F M$ and $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 ≥ 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 1 r ,$ 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 < τ$. To see this, take $F ( t )$ with components $F r ( t ) = t 2$ and $F j ( t ) = δ t 2 , j ≠ r$, and choose $δ$ such that
$0 < δ < − b 1 r / | ∑ j ≠ r b 1 j | .$
Taking into account that, from (5), for $0 < t < τ$ one gets $X ( t ) = B G ( t ) ,$ where the components of $G ( t )$ are $G r ( t ) = h ( t )$ and $G j ( t ) = δ h ( t ) , j ≠ r$, with $h ( t ) = ( ( t − τ ) 3 − ( − τ ) 3 ) / 3$, it follows that the first component of $X ( t )$ becomes negative,
$X 1 ( t ) = b 1 r h ( t ) + δ ∑ j ≠ r b 1 j h ( t ) < b 1 r − b 1 r ∑ j ≠ r b 1 j | ∑ j ≠ r b 1 j | h ( t ) < 0 ,$
since $h ( t ) > 0$ for $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 $F M$ and $T M$ schemes. For $B ≥ 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 ( A t )$ 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 $F M$ and $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, $F M$ schemes have been proved to preserve delay-dependent asymptotic stability of the continuous solution, i.e., they are $τ ( 0 )$-stable difference methods, while $T M$ schemes have been proved to preserve delay-independent asymptotic stability, i.e., they are P-stable methods. Also, $F M$ schemes preserve the oscillation behaviour of the exact solution, which has also been proved for the $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 $F M$ schemes for some particular $T M$ schemes, either in general or when applied to some type of problems or under certain conditions, could deserve further attention, as $T M$ schemes offer the same accuracy than $F M$ schemes with reduced computational needs. Applying the new schemes to low order systems, e.g., with coefficients being $2 × 2$ or $3 × 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 $φ ( 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

1. Kuang, Y. Delay Differential Equations. With Applications in Population Dynamics; Academic Press: San Diego, CA, USA, 1993. [Google Scholar]
2. Kolmanovskii, V.; Myshkis, A. Introduction to the Theory and Applications of Functional Differential Equations; Kluwer Academic Publishers: Dordrecht, The Netherlands, 1999. [Google Scholar]
3. Smith, H. An Introduction to Delay Differential Equations with Applications to the Life Sciences; Springer: New York, NY, USA, 2011. [Google Scholar]
4. 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]
5. 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]
6. Bellen, A.; Zennaro, M. Numerical Methods for Delay Differential Equations; Oxford University Press: Oxford, UK, 2003. [Google Scholar]
7. Mickens, R.E. Nonstandard Finite Difference Models of Differential Equations; World Scientific: Singapore, 1994. [Google Scholar]
8. Mickens, R.E. (Ed.) Advances on Applications of Nonstandard Finite Difference Schemes; World Scientific: Singapore, 2005. [Google Scholar]
9. Patidar, K.C. Nonstandard finite difference methods: Recent trends and further developments. J. Differ. Equ. Appl. 2016, 22, 817–849. [Google Scholar] [CrossRef]
10. Stuart, A.M.; Humphries, A.R. Dynamical Systems and Numerical Analysis; Cambridge University Press: Cambridge, UK, 1998. [Google Scholar]
11. 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]
12. 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]
13. 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]
14. 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]
15. 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]
16. 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]
17. 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]
18. 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]
19. 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]
20. 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]
21. 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]
22. 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]
23. 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]
24. 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]
25. Bellman, R.; Cooke, K.L. Differential-Difference Equations; Academic Press: New York, NY, USA, 1963. [Google Scholar]
26. 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]
27. 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]
28. Guglielmi, N. On the asymptotic stability properties of Runge–Kutta methods for delay differential equations. Numer. Math. 1997, 77, 467–485. [Google Scholar] [CrossRef]
29. Horn, R.A.; Johnson, C.R. Matrix Analysis; Cambridge University Press: Cambridge, UK, 1985. [Google Scholar]
30. Elaydi, S.N. An Introduction to Difference Equations; Springer: New York, NY, USA, 1996. [Google Scholar]
31. Č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]
32. 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]
33. Györi, I.; Ladas, G. Oscillation Theory of Delay Differential Equations; Clarendon Press: Oxford, UK, 1991. [Google Scholar]
34. 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]
35. 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 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 $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 2. Absolute errors (log-scale) of numerical solutions for Example 1, computed using three different $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 $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 3. Errors (log-scale) of numerical solutions for Example 1, computed with the method $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 $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 $τ = 3$. (c,d) First and second component, respectively, with delay $τ = 3.3$.
Figure 4. Numerical solutions computed with the method $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 $τ = 3$. (c,d) First and second component, respectively, with delay $τ = 3.3$.
Figure 5. Numerical solution for the first component of Example 1 and zoom-views in different intervals. (a) $t ∈ [ 0 , 50 ]$. (b) $t ∈ [ 13 , 22 ]$. (c) $t ∈ [ 20 , 25 ]$. (d) $t ∈ [ 46 , 50 ]$.
Figure 5. Numerical solution for the first component of Example 1 and zoom-views in different intervals. (a) $t ∈ [ 0 , 50 ]$. (b) $t ∈ [ 13 , 22 ]$. (c) $t ∈ [ 20 , 25 ]$. (d) $t ∈ [ 46 , 50 ]$.