Mathematical Analysis and Numerical Solution of a Model of HIV with a Discrete Time Delay

We propose a mathematical model based on a set of delay differential equations that describe intracellular HIV infection. The model includes three different subpopulations of cells and the HIV virus. The mathematical model is formulated in such a way that takes into account the time between viral entry into a target cell and the production of new virions. We study the local stability of the infection-free and endemic equilibrium states. Moreover, by using a suitable Lyapunov functional and the LaSalle invariant principle, it is proved that if the basic reproduction ratio is less than unity, the infection-free equilibrium is globally asymptotically stable. In addition, we designed a non-standard difference scheme that preserves some relevant properties of the continuous mathematical model.


Introduction
History has recorded that infectious diseases have caused devastation in the human population. Despite the great advances in epidemic control, it was believed that infectious diseases would soon be eradicated, but this has clearly not been the case. Microorganisms adapt and evolve, and consequently, new infectious diseases such as AIDS, Ebola or COVID-19 appear, which cause many deaths. In addition, the genome of some microorganisms can sometimes change slightly and consequently, they can acquire resistance to some drugs [1]. According to the World Health Organization, since its first registration in the 1980s, Human Immunodeficiency Virus (HIV), the causative agent of Acquired Immunodeficiency Syndrome (AIDS), has caused more than 35 million deaths worldwide [2]. The greatest impact of deaths caused by AIDS occurs in underdeveloped or very poor countries, especially in sub-Saharan Africa [2,3].
HIV is an RNA virus that belongs to the retroviridae family, specifically to the lentivirus subfamily, and acts against the immune system, weakening its defense systems against infections and certain types of cancer, which is why the infected person gradually loses its immunodeficiency [4,5]. The HIV replication process is active and dynamic in the sense that when the virus enters the body, the cells that have the CD4+ receptor are infected, most of them are TCD4+ lymphocytes. After entering the cell, the HIV virus can remain latent, replicate in a controlled manner, or undergo massive replication that results in a cytopathic effect for the infected cell. In most lymphocytes the virus is latent, and the infection gradually decreases the amount of these in both the tissues and the blood. This leads the patient to a severe state of cellular immunosuppression, and then a group of microorganisms causes infections. As a consequence, there is a great mortality of people affected by HIV [6].
Epidemiologists conduct scientific experiments, sometimes in controlled settings through self-experimentation, to analyze the spread and possible control strategies of infectious diseases. However, designing such controlled experiments is sometimes impossible due to ethical concerns and the possible collection of erroneous data [1,7,8]. These reasons motivate the possibility of using mathematical models as tools to corroborate the perception of disease transmission, test theories, and suggest better intervention and control strategies.
Recently, there have been a growing literature regarding mathematical models for virus infection within-host [9][10][11][12][13][14][15][16][17][18][19]. These mathematical models include a variety of characteristics related to the viral dynamics. For instance, some models include discrete time delays, cell to cell viral transmissions, and the most well-known virus to cell transmission [10,15,17,[19][20][21]. This article presents a new mathematical model, by means of a set of differential equations with delay, to determine the effect of how to produce viruses by target cells inside the dynamics of viruses. In this case, two types of virus-infected cells are analyzed: the cells in the eclipse phase that are not producing the virus I E , and the cells that are actively producing the virus I. The cells in the eclipse phase change to the state of virus production at a m rate, and the mortality rate of each cell type is δ I E and δ I , respectively. Cells in the eclipse phase may die because they could be recognized as infectious by mediators of innate immunity or due to the accumulation of DNA intermediates in the cell cytoplasm, see [22,23].
In this study, we also design a non-standard finite difference (NSFD) scheme that allows us to obtain numerical solutions of a set of delayed and ordinary differential equations, which describes the dynamics of HIV infection within-host. First, we apply the techniques designed by Mickens for the construction of the non-standard finite difference (NSFD) scheme to our HIV mathematical model. Secondly, we prove some main properties of the non-standard finite difference (NSFD) scheme, and that agree with qualitative properties on the HIV mathematical model with discrete time delay. One important property that the non-standard finite difference (NSFD) scheme has is that it allows us to guarantee accurate and positive solutions. This is very important when solving inverse problems related to estimation of parameters [13,[47][48][49][50][51]. Finally, we perform some numerical simulations that show the advantages regarding accuracy and computational cost. This paper is organized as follows. In Section 2, we present the mathematical model of HIV within-host with discrete time delay. Section 3 is devoted to the stability mathematical analysis. In Section 4, we construct the NSFD numerical scheme. We include in this section the study of some properties of this numerical scheme such as stability analysis. In Section 5, the numerical simulation results using the constructed NSFD scheme are shown, and the last section is devoted to the conclusions.

Mathematical Model of HIV Within-Host with Discrete Time Delay
We construct the mathematical model using a combination of virus facts, hypotheses, and previous proposed mathematical models within-host [9,11,14,[52][53][54][55]. Despite there has been a growing number of studies related to viral dynamics within-host there are still some aspects that are not well understood [8,9,18,[56][57][58]. Moreover, mathematical models include assumptions that make them more tractable to be able to extract useful information and test different hypotheses [9,55,59,60]. We start noticing that it has been argued that at least in vitro, most HIV-infected cells die before virus production begins [22,61,62]. Virusproducing cells produce virions V at a rate of Nδ I , where N is the average number of infectious virions released by an infected cell during its lifetime. In general, it is accepted that most virions produced by infected cells are not infectious [63][64][65], and since these virions are not contributing to the infection of new cells, non-infectious virions are not considered in this model. On the other hand, V virions that are infectious can be removed by the immune system from the population of virus-free cells at intrinsic clearance rate C, or they can infect target cells (CD4+ T) at a β rate, with T the concentration of target cells, where Λ is the generation rate of uninfected CD4+ T cells and µ 0 mortality rate of uninfected cells. In the constructed mathematical model there are two classes of infected cells. The first one is the class that includes the cells in the eclipse phase which are not making the virus, I E . The second class include the cells that are actively producing the virus, I. Cells in the eclipse phase transition to the class I at a rate, m. These cells die at rate δ I E . The cells in class I then die at rate δ I . Cells in the eclipse phase die due to the immune systems. Notice that the number of targets cells T are not virus-infected and vary depending on the parameters Λ and the particular death rate for target cells µ 0 .
Based on the previous assumptions, we propose a model that describes the intracellular dynamics of HIV and is given by the following system of ordinary differential equations, Notice, that the transmission term βT(t)V(t) also appears in the equation for virions because of the assumption that it takes only one virion to infect a target cell [52,66]. The possibility of multiple infected cells is excluded [66]. It also should be noted that during the eclipse phase (the time from viral entry to the active production of viral particles) the infected cells are not producing virions [8,9,16,67,68]. This delay affects the maximum viral load time and the probability that a viral infection will be established [9,[68][69][70], and therefore should be explicitly modeled [9,68]. For this case, let ∆ > 0 be the duration of the eclipse phase and i E (t, τ) the density of cells at a time t that were infected τ units of time before of t, i.e., are infected cells of age τ. Then i E (t, ∆) represents the proportion of cells in the eclipse phase that go into the state of virus production, whereby Since the mortality rate of eclipse cells δ I E is constant, it is appropriate to assume that i E (t, τ) satisfies the equation of McKendrick-Von Foerster age-structured population dynamics model, see [71] that is subject to the boundary condition i E (t, 0) = βT(t)V(t). Thus, the solution of the Equation (3) is given by i E (t, τ) = βT(t − τ)V(t − τ)e −δ I E τ . Therefore, Equation (2) is given by The total number of cells in the eclipse phase is given by I E (t) = Thus the mathematical model given in (1) takes the form where ∆ is the duration of the eclipse phase, e −δ I E ∆ represents the probability that an infected cell will survive a time ∆ after viral entry. Notice that ∆ is a fixed time delay, and then we have a differential equation with a discrete time delay. For a better understanding of the mathematical model, we can analyze it from the following flow chart shown in Figure 1 [54]: In addition, the system (6) satisfies the initial conditions given by with ξ 1 (s), ξ 2 (s) positive continuous functions defined from the interval [−∆, 0] to R 2 + , and equipped with the norm ξ 1,2 = sup −∆≤s≤0 |ξ 1,2 |.

Properties of the Solutions of the Mathematical Model
Using the fundamental theory of functional differential equations [72,73], it follows that the solution of the system (6) with the initial condition (7) exists for all t ≤ 0 and is unique.
Next, we will establish different dynamic properties of the solution of the mathematical model described by the system of Equation (6). Since the system (6) represents a biological model, it is important to determine the nature of the solution. Thus, if it is assumed that all the parameters are non-negative as well as the initial conditions I E (s), I(s), V(s), T(s), for s ∈ [−∆, 0]. Therefore, we must guarantee the positivity and boundedness of the solution (I E (t), I(t), V(t), T(t)) of the system (6) at [0, ∞). The following results characterizes these properties. Proof. Let us start by noting that the solutions of the differential equations of I E (t) and I(t) given in (6) can be written as Therefore, the positivity of the solutions T(t) and V(t) for all t > 0, allows us to guarantee the positivity of I E (t) and I(t) and thus of system (6). Thus, for T(t) given as in (6) we have that T(t) > 0, for all t ≥ 0. Indeed, suppose that the positivity does not holds, therefore there must be a t 0 > 0 such that However, in the interval [0, t 0 ) the function T(t) is positive, and at point t 0 the derivative at t 0 is non-positive. Thus, from the fourth equation of model (6), it follows that for t 0 , we affirm that if V(t) is given by the system (6), it follows that Indeed, suppose that there exists a t 1 > 0 such that Thus, from the second equation of system (6), if follows that for t 2 ∈ (∆, t 1 ) it holds From the initial conditions given by (7) and the Thus, I(t) > 0, for all t ∈ [0, t 1 ). Next, from third equation of system (6) for t 1 > 0, This is a contradiction since Proof. From system (6), one can see that where M = min δ I E , δ I , µ 0 . This implies that Thus, Accordingly, I E (t), I(t) and T(t) are uniformly boundedness. Even more, given ε > 0, there exists t 1 > 0 such that for all t ≥ t 1 , Then, since It follows that ness. This completes the proof.

Equilibrium Points
The model described by the system of differential Equation (6) has two stationary states, the first one corresponds to the disease-free equilibrium and the second to the endemic equilibrium, which we will denote P 0 and P * respectively. To determine both states we must calculate the critical points of the system (6) by setting The disease-free equilibrium point of a model are solutions of steady state in the absence of infection. For this case, we must consider I E = 0, I = 0, V = 0, and T > 0, in the system (11). Then P 0 will be of the form On the other hand, we can determine the basic reproductive number using the next generation matrix methodology. With the terms of infection and viral production in the mathematical model (11), matrices F and V are given by , which it is the number of target cells before infection. Thus, the basic reproductive number R 0 , is calculated as the spectral radius of the matrix given by Therefore, the basic reproductive number R 0 is given by Now, the endemic equilibrium point of a model is its steady-state solutions in the presence of infection or disease, for which it must be considered I E > 0, I > 0, V > 0 and T > 0 in the system (11.) Then P * will be of the form P * = (I * E , I * , V * , T * ). In this case, from the system (11) the following equalities are obtained Replacing (16) in (14) and (15), is obtains Then Next, we replace (18) in (17) to get Now, substituting (18) in (16) one gets Finally, we replace (18) and (21) in (13) to obtain Note that I *

Local Stability of the Equilibrium Points
Theorem 3. The disease-free equilibrium point P 0 of the system (6) is locally asymptotically stable if R 0 < 1.
Proof. The eigenvalues of the Jacobian matrix of system (6) evaluated at point P 0 , are given as the roots of polynomial Therefore, the first two eigenvalues of the Jacobian matrix evaluated at P 0 are λ 1 = −δ I < 0 and λ 2 = −µ 0 < 0.
Next, since R 0 < 1 then the coefficients of equation are positives. Thus, since there is no sign change between its terms, and by Descartes' sign rule it is concluded that Equation (23) does not have positive roots. Now, if λ is replaced by −λ in (23) then Thus, if R 0 < 1 Equation (24) has two sign changes in its terms, and by Descartes' sign rule it is concluded that there are exactly two negative roots in Equation (23). Therefore, Theorem 4. The P * endemic point of the system (6) is locally asymptotically stable if R 0 > 1.
Proof. We note that R 1 = Ne −δ I E ∆ − 1 > 0. Thus, the characteristic equation is given by Therefore, the first eigenvalue of the Jacobian matrix will be λ 1 = −δ I E < 0, and the other, are the roots of polynomial If R 0 > 1 all the coefficients of Equation (25) are positive, i.e., there is no sign change between their terms, and by Descartes's sign rule it is concluded that there are no positive roots. Now if λ is replaced by −λ in (25) it gives us that Then, if R 0 > 1 the polynomial (26) has three sign changes between its terms, and by Descartes's sign rule it is concluded that there are exactly three negative roots of Equation (25). Thus, P * is locally asymptotically stable if R 0 > 1.

Global Stability Analysis of the Mathematical Model
Since the variable I E does not appear in the other three equations, without loss of generality we will only consider the following three-dimensional system, To analyze the global stability of the equilibrium points of the system (27), we use the method of the Lyapunov's functions, and we will use the Volterra function for x > 0, which is no negative for any x > 0 and G(x) = 0 if and only if x = 1.

Proof. We define the Lyapunov functional
Now, calculating the time derivative of V (t) along the solution of model (27), one gets that Thus, dV (t) dt < 0 when R 0 < 1. Therefore, by Lyapunov-LaSalle Invariance Principle, the infection-free equilibrium E f is globally asymptotically stable.

Design of a NSFD Scheme for the Mathematical Model
The use of differential equations in the modeling of the transmission of infectious diseases has represented a versatile tool to understand better the dynamics of a variety of infectious diseases [7,59,60,[74][75][76]. Mathematical models based on differential equations have been useful to study how to reduce the burden of infectious diseases. The models allow the determination of optimal controls and estimate the impact of a variety of virus on the disease dynamics [67,75,77]. One advantage of mathematical models is that different simulations can be performed, and this allows us to analyze different main driven factors of epidemics under a variety of complex scenarios [8,11,59]. However, there are no general formulas that allow the obtaining of precise analytical solutions for many differential equation systems. These solutions exist only occasionally and are often difficult to find, so good approximations are necessary that preserve the qualitative properties of said solution, for which numerical methods have been used, see [24,25,31,[48][49][50][78][79][80][81][82][83].
Discrete epidemic models generated by numerical methods contain additional parameters to those that already exist in differential equations, such as the time and space steps. Variations in these additional parameters can generate solutions to the discrete equations that do not correspond to any solution of the original differential equations, producing fictitious bifurcations, artificial chaos, spurious solutions, and false stable states [24][25][26]45,83,84]. Therefore, we must choose numerical discrete schemes that guarantee the qualitative properties of the mathematical models. There are several methods that can be used to obtain accurate solutions. For instance, the Richardson extrapolation on uniform and nonuniform grids or NSFD schemes have been used for that end [45,[85][86][87][88][89][90] .
Another, important aspect where a robust numerical method plays an important role is when solving inverse problems to estimate the parameters of the model [48,51,56,57,91,92]. Thus, for mathematical models of a variety of virus is of paramount importance to have a robust and efficient numerical method for solving the differential equations [25,49,51]. Usually, when a differential equation is solved numerically a certain tolerance is prescribed and this has an impact in the success in estimating the parameters [48,49,93,94]. In this paper, we deal with a mathematical model that is based on system of differential equations with discrete time delay [17,32,60,72,[95][96][97]. There are different numerical methods to deal with this type of equations, and some are analogous to the ones used for ordinary differential equations but with additional issues [50,[98][99][100][101][102]. One particular numerical method that we are interested in is by using NSFD schemes to guarantee some properties of the continuous mathematical model. Some previous works using this methodology have been developed for linear and nonlinear delay differential equations [103][104][105][106][107].
For the construction of a discrete numerical scheme that allows us to efficiently approximate the solutions of the system (6), we use the methodology proposed by Ronald Mickens, see [24][25][26][27]. In that order of ideas, for the discrete approximation of the time derivative of a function X(t) ∈ C 1 (R), we define the non-standard derivative as where ϕ(h) is a real positive valued function that satisfies ϕ(h) = h + O(h 2 ), and N is to denote the non-standard derivative.
Although there is no general algorithm for constructing an NSFD schema that approximates the solutions of a given system of differential equations, the following general rules are often useful to correctly design these schemes.

Rule 1.
The discrete derivatives in a numerical scheme must be of the same orders as the continuous derivatives that appear in the differential equation. Rule 2. Discrete derivatives may have non-trivial denominators. Rule 3. Nonlinear terms that appear in differential equations must have non-local representations. Rule 4. The numerical solution must preserve all the special conditions that hold for the solutions of the corresponding differential equations. Rule 5. The scheme must not introduce unnecessary or false solutions, i.e., convergence to false steady states.
Let us denote by I n E , I n , V n and T n the approximations of I E (nh), I(nh), V(nh) and T(nh), respectively, for n = 0, 1, 2..., and for h size step in time of the scheme. The value of I n+1 E for n = 0, 1, · · · , is calculated using Equation (8) and a quadrature formula. For this case, we use with ∆ = m 1 h. Next, we make the following non-local approximations of the terms on the right side of the system (27) Then, we approximate the derivatives on the left side of the system (27) as follows Consequently, the system (27) can be discretized as an implicit NSFD scheme given by And the explicit form is given by The initial conditions of scheme (34) are given by The positivity of scheme (34) is trivially satisfied, since for n > 0 it holds that T n , I n , V n are positive. Theorem 6. Let (T n , I n , V n ) be a solution of system (34). Then is uniformly bounded for all n > 0.
Proof. From the first equation of scheme (33), one gets that When n → ∞ and since ϕ(h) = h + O(h 2 ), then ϕ(h) coincide with 0 in the limit as h → 0. This implies that lim sup n→∞ T n ≤ Λ µ 0 .
Next, let W n = T n−m 1 + e δ I E ∆ I n . From first and second equation of system (33), one obtains give > 0 we can choose a M ∈ N such that I n ≤ Λe −δ I E ∆ d + for n ≥ M. Using the last equation of (33) it is concluded that  (27) it follows that I n E is bounded.

Equilibrium Points of the NSFD Numerical Scheme
The equilibrium points of the scheme (34) are given by analyzing the behavior of system when n approaches to infinity. Thus, after a few calculations we find that Note that the equations of the scheme (35) correspond to Equations (14)- (16). Thus, the critical points of the discrete scheme will coincide in the limit h → 0, with those of the continuous model.

Local Stability of the NSFD Numerical Scheme
For the study of the local stability of the critical points of the numerical scheme (34) it is necessary to use the following lemma: Lemma 1. The roots of the quadratic polynomial λ 2 − a 1 λ + a 2 = 0, satisfy |λ i | < 1 for i = 1, 2 if and only if the following conditions hold: Proof. See [7]. Theorem 7. The disease-free equilibrium point P f = 0, 0, Λ µ 0 of the scheme (34) is locally asymptotically stable if R 0 < 1.

Proof.
Calculating the eigenvalues of the Jacobian matrix of the system (34) at the diseasefree point, we obtain the following characteristic polynomial Thus, the first eigenvalue is The other two eigenvalues, are the roots of quadratic polynomial where p = 1 + ϕ(h)δ I > 0 and q = µ 0 + µ 0 ϕ(h)C + ϕ(h)βΛ. Next, let a 1 = 1 p + µ 0 q and We have the following affirmations. 1.

2.
Since a 1 > 0, it is sufficient to prove that 1 + a 2 > 0. By hypothesis 1 > R 0 , then Accordingly Given that that is a 2 < 1. Next, by virtue of Lemma 1 we have that the eigenvalues of the Jacobian matrix of the system (35) evaluated at P f satisfy |λ i | < 1. for i = 1, 2. Then P f is locally asymptotically stable if R 0 < 1.

Global Stability of the NSFD Numerical Scheme
Several authors have used discrete Lyapunov functions to study the global behavior of numerical solutions generated by non-standard finite difference schemes (NSFD), see [19,[106][107][108][109][110]. For the study of the global stability of the critical points of the numerical scheme (34) it is necessary to use the Lyapunov functions and Equation (28).

Proof. Let the following Lyapunov function be
Using the inequality ln z ≤ z − 1, the difference of L n in (37) satisfies It follows that L n+1 − L n ≤ 0 for all n ≤ 0 if R 0 ≤ 1. This means that L n is monotone decreasing sequence and since L n ≥ 0 for n ≥ 0 then there exists a limit, i.e., lim n→∞ L n ≥ 0.
Hence lim n→∞ L n+1 − L n = 0, which implies that lim n→∞ T n = T 0 , lim n→∞ I n = 0, and from (34) lim n→∞ V n = 0. By the previous analysis, we conclude that P f is globally asymptotically stable for scheme (34).

Numerical Simulations Using the NSFD Scheme
In this section, we present some numerical solutions of the mathematical model of HIV. To carry out the simulations we use the constructed NSFD numerical scheme (34). We choose the parameter values based on existing experimental data and previous model studies, see [54,106,111,112]. The values of these parameters are given in Tables 1 and 2. For the first case we choose values such R 0 < 1 and for the second we have the case R 0 > 1.
For the numerical simulations we use a small step size, h = 0.001. For the discrete derivatives given in system (33), we have many options for the denominator function ϕ. We have chosen ϕ(h) = (1 − exp(−hp))/p, where p = max A, ∆, µ 0 , δ I , δ I E are parameters of the model and included in the numerical scheme (33). This particular ϕ usually provides better numerical results based on previous articles related to NSFD schemes [113,114]. In addition, this option satisfies the asymptotic relation ϕ(h) = h + O(h 2 ), and Rule 1. We performed numerical simulations to show that the solutions obtained by the proposed NSFD scheme and the well-known MATLAB routine dde23 agree. A great advantage of the proposed NSFD numerical scheme (34) is that the computation time is smaller. For the first case, the numerical solution using the NSFD scheme is obtained in approximately 0.083992 s, while the dde23 routine spent 2.573003 s. For the second case, the numerical solution using the NSFD scheme is obtained in approximately 0.176461 s, while the routine dde23 spent 11.181812 s. The results obtained are shown in Figures 2 and  3 respectively. It can be seen that the numerical solution of the proposed NSFD numerical scheme (34) and the one obtained by means of the routine dde23 agree.

Conclusions
We proposed a mathematical model based on a set of delay differential equations that describe intracellular HIV infection. The model considers three different subpopulations of cells and the HIV virus. The mathematical model is formulated in such a way that takes into account the time between viral entry into a target cell and the production of new virions. Moreover, this time is included using a discrete time delay. We analyzed the local stability of the infection-free and endemic equilibrium states. By using a suitable Lyapunov functional and the LaSalle invariant principle, it is proved that if the basic reproduction ratio is less than unity, the infection-free equilibrium is globally asymptotically stable. In addition, we designed a non-standard difference scheme that preserves some properties of the continuous model. We prove that the constructed NSFD scheme has the same equilibrium points of the continuous model, and the disease-free equilibrium holds the same stability properties. As required by the constraints of the real phenomena, the solutions given by the numerical scheme satisfy positivity and boundedness. The numerical simulations corroborate that the developed NSFD numerical scheme preserves the properties of the continuous model and presents a robust behavior when working with a variety of parameter values.