Next Article in Journal
Evolutionary Computation for Feature Optimization and Image-Based Dimensionality Reduction in IoT Intrusion Detection
Next Article in Special Issue
A Mathematical Model to Study the Combined Uses of Infected Pests and Nutrients in Crop Pest Control: Stability Changes and Optimal Control
Previous Article in Journal
Characterizations for S-Convex-Averaging Domains via Two-Dimensional Diffusion-Wave Equations
Previous Article in Special Issue
Identification and Empirical Likelihood Inference in Nonlinear Regression Model with Nonignorable Nonresponse
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Global Dynamics and Optimal Control of a Dual-Target HIV Model with Latent Reservoirs

by
Fawaz K. Alalhareth
1,*,
Fahad K. Alghamdi
2,
Mohammed H. Alharbi
2 and
Miled El Hajji
2,3
1
Department of Mathematics, College of Arts and Sciences, Najran University, Najran 66462, Saudi Arabia
2
Department of Mathematics and Statistics, Faculty of Science, University of Jeddah, P.O. Box 80327, Jeddah 21589, Saudi Arabia
3
ENIT-LAMSIN, Tunis El Manar University, BP. 37, Tunis 1002, Tunisia
*
Author to whom correspondence should be addressed.
Mathematics 2025, 13(23), 3868; https://doi.org/10.3390/math13233868
Submission received: 11 November 2025 / Revised: 26 November 2025 / Accepted: 1 December 2025 / Published: 2 December 2025
(This article belongs to the Special Issue Modeling, Control and Optimization of Biological Systems)

Abstract

In this paper, we develop a mathematical model to investigate HIV infection dynamics, where we focus on the virus’s dual-target mechanism involving both CD 4 + T cells and macrophages. Our model is structured as a system of seven nonlinear ordinary differential equations describing the interactions between susceptible, latent, and infected cells, alongside free virus particles. We derive the basic reproduction number, R 0 , as two components, R 01 and R 02 , which quantify the respective contributions of CD 4 + T cells and macrophages to viral spread. It is deduced that the infection-free steady state is globally asymptotically stable once R 0 1 , ensuring viral eradication. For R 0 > 1 , a stable endemic steady state emerges, indicating the persistence of the infection. Later, we develop an optimal control strategy to study the impact of reverse transcriptase and protease inhibitors. This analysis identifies a critical drug efficacy threshold, ϵ = 1 1 R 0 , necessary for viral eradication. The numerical simulations and the sensitivity analysis provide key parameters that drive viral dynamics, offering practical insights for designing targeted therapies, particularly during the early stages of infection.

1. Introduction

The Human Immunodeficiency Virus (HIV) continues to pose one of the most significant global health challenges, which has claimed millions of lives since its discovery. During the early stages of infection, HIV primarily attacks two key components of the immune system, which are CD 4 + T cells and macrophages. The progressive loss of CD 4 + T cells and the establishment of persistent viral reservoirs in macrophages ultimately lead to Acquired Immunodeficiency Syndrome (AIDS), characterized by a severe collapse of immune function and heightened vulnerability to opportunistic infections.
Mathematical modeling has proven indispensable for predicting complex dynamics of HIV infection and for designing potential therapeutic strategies. Early simple foundational models, such as the ones introduced by Perelson et al. [1], employed simple systems of ordinary differential equations (ODEs) to describe the interactions between uninfected cells, infected cells, and free virus particles, providing key quantitative estimates of viral clearance rates, infected cell lifespans, and the efficacy of antiretroviral therapy (ART). Building on these basic models, subsequent studies have progressively incorporated additional layers of biological complexity. Notable extensions include the incorporation of latent reservoirs by Rong et al. [2], which provided crucial insights into viral persistence and rebound dynamics. More recently, Li et al. [3] developed a model that explicitly included monocytes/macrophages, highlighting their significant contribution to viral persistence and providing a foundational framework for exploring dual-target dynamics. Further refinements have integrated immune responses [4,5,6,7], latent reservoirs [8,9,10,11], time delays [12], and stochastic elements [13] to enhance the biological realism and predictive power of these models.
Nevertheless, there remains a research gap in quantifying how the infection dynamics of CD 4 + T cells and macrophages jointly influence overall viral persistence. While the model by Li et al. [3] was a pivotal step, few studies have since leveraged this foundation to perform a comprehensive analysis of global stability and optimal control that explicitly dissects the individual and combined roles of these two cellular reservoirs.
In this study, we aim to develop and analyze a novel mathematical model that addresses this gap by addressing HIV dynamics with dual-target cells which are CD 4 + T cells and macrophages. Note that this study examines an early-stage HIV infection prior to the development of robust adaptive immune responses. This focus is justified by the critical role of innate immunity and direct viral cytopathy during initial infection establishment. The model is represented by a system of seven nonlinear ODEs that capture the interactions among susceptible, latent, and infected cells as well as free virions.
The primary mathematical contributions of this work are threefold: (i) the rigorous global stability analysis of a seven-dimensional dual-target system using constructed Lyapunov functions and LaSalle’s invariance principle; (ii) the explicit decomposition of the basic reproduction number R 0 = R 01 + R 02 to quantify distinct cellular contributions; and (iii) the resolution of a non-convex optimal control problem for a coupled ODE system, addressing the challenge of potential non-uniqueness via a multi-start numerical algorithm to ensure a robust and effective therapeutic strategy.
The main contributions of this study are given as follows:
  • Providing the biological feasibility and mathematical well-posedness of the proposed model, ensuring, in particular, the positivity and boundedness of the solution components.
  • Providing an explicit expression for the basic reproduction number R 0 , decomposed into two additive components, R 01 and R 02 , corresponding to the contributions of both CD 4 + T cells and macrophages, respectively.
  • Providing an analysis of the global asymptotic stability (GAS) of both the disease-free and endemic equilibria using Lyapunov functions and LaSalle’s invariance principle.
  • Providing an optimal control strategy to evaluate the impact of antiretroviral drugs on viral suppression and treatment cost minimization.
  • Providing a sensitivity analysis and numerical simulations to identify key parameters influencing the threshold dynamics.
The remainder of this paper is organized as follows. In Section 2, we present the formulation of the mathematical model and its biological interpretation. Section 3 establishes the model’s positivity, boundedness, and existence of solutions and derives the basic reproduction number. Section 4 characterizes the existence and uniqueness of the equilibrium points. Section 5 investigates the local and global stability properties of the steady states. In Section 6, we propose an optimal control strategy and derive necessary conditions of optimality. Section 7 provides numerical simulations and sensitivity analyses validating the theoretical findings. Finally, Section 8 concludes on the findings and discusses implications for future HIV research.

2. Mathematical Modeling

In an early-stage of HIV infection, the virus primarily attacks CD 4 + T cells, a type of white blood cell that plays a crucial role in the immune system. While CD 4 + T cells are the main target, HIV has other secondary targets like macrophages: immune cells that engulf and destroy pathogens. Mathematical modeling played an important role in understanding HIV infection dynamics. Several mathematical models have evolved from simple ordinary differential equation (ODE) systems to more sophisticated multiscale approaches, incorporating immunology, virology, and drug pharmacokinetics.
The seminal work by [1] established the classic three-component model leading to basic virus dynamics:
T ˙ = λ d T T k V T , I ˙ = k V T δ I , V ˙ = N δ I c V ,
where T, I, and V represent target cells, infected cells, and free virus, respectively. This model introduced key parameters like the viral clearance rate (c) and infected cell death rate ( δ ). Ref. [14] demonstrated the importance of latent reservoirs, leading to modifications by [2]:
L ˙ = α k V T μ L a L L ,
where L represents latently infected cells with activation rate a L . Several deterministic mathematical models have played crucial roles in understanding HIV dynamics, treatment optimization, and disease progression. Recent studies have focused on incorporating time-varying parameters, multiple infection routes, and immune response dynamics to improve model accuracy. Deterministic models have been used to optimize ART regimens by minimizing viral load and drug toxicity. Mathematical modeling of HIV dynamics provides critical insights into viral progression, immune response, and treatment strategies. Recent studies have explored HIV dynamics under periodic environmental conditions, incorporating general transmission rates and multiple infection routes. Alharbi [15] investigated HIV dynamics in a periodic environment with general transmission rates, demonstrating how seasonality affects viral behavior. This study highlights the role of time-dependent parameters in shaping long-term dynamics, offering a framework for understanding real-world fluctuations in transmission. El Hajji and Alnjrani [16] extended this analysis by incorporating a general incidence rate in a seasonal setting, proving the existence of periodic solutions under certain conditions. Their work emphasizes how varying contact rates influence infection patterns [16]. In a follow-up study, El Hajji and Alnjrani [17] examined HIV dynamics with three infection routes, revealing complex periodic behavior driven by multiple transmission pathways. Their results suggest that including diverse infection mechanisms improves model realism, particularly in seasonal contexts. These studies collectively advance HIV modeling by integrating periodicity, generalized incidence rates, and multi-route infections, enhancing predictive accuracy and theoretical understanding. Dual-target HIV models highlight the importance of combining antiviral and immune-based strategies for functional cures. Recent work underscores the role of latency control, immune modulation, and resistance prevention in optimizing therapeutic outcomes.
In this paper, we consider a seven-dimensional system of differential equations modeling HIV dynamics with two target cell populations (CD 4 + T cells and macrophages), showing how HIV targets two cell types (see the diagram provided in Figure 1):
S ˙ 1 = Λ 1 m 1 S 1 p 1 σ 1 S 1 V , L ˙ 1 = p 1 σ 1 S 1 V ( ν 1 + δ 1 ) L 1 , I ˙ 1 = δ 1 L 1 d 1 I 1 , S ˙ 2 = Λ 2 m 2 S 2 p 2 σ 2 S 2 V , L ˙ 2 = p 2 σ 2 S 2 V ( ν 2 + δ 2 ) L 2 , I ˙ 2 = δ 2 L 2 d 2 I 2 , V ˙ = η 1 d 1 I 1 + η 2 d 2 I 2 m v V .
The variables and parameter significance are detailed in Table 1.

3. Preliminaries

This section establishes the biological and mathematical foundations of the HIV dynamics model (3). The model ensures that all state variables (susceptible, latent, infected cells, and free virus) remain non-negative for all time t 0 if initial conditions are non-negative. Solutions are bounded within a feasible set Ω , confirming the model’s well-posedness. The set Ω is defined to guarantee that total cell populations and viral load remain within biologically realistic limits. The model’s right-hand side is continuous and differentiable, ensuring solution existence (Peano’s theorem). Local Lipschitz continuity guarantees uniqueness (Picard–Lindelöf theorem). The proofs leverage invariant sets, Lyapunov functions, and dynamical systems theory to validate the model’s consistency with biological principles. Let σ 1 = min ( m 1 , ν 1 , d 1 ) and σ 2 = min ( m 2 , ν 2 , d 2 ) . Let us define the feasible set for the model’s variables, denoted by Ω .
Lemma 1.
The dynamics (3) admit a positively invariant set
Ω = ( S 1 , L 1 , I 1 , S 2 , L 2 , I 2 , V ) R + 7 ; S 1 + L 1 + I 1 Λ 1 σ 1 , S 2 + L 2 + I 2 Λ 2 σ 2 ,               V Λ 1 η 1 d 1 m v σ 1 + Λ 2 η 2 d 2 m v σ 2 .
Therefore, the dynamics (3) admit a unique positive bounded solution.
Proof. 
Since we have
S ˙ 1 S 1 = 0 = Λ 1 > 0 , L ˙ 1 L 1 = 0 = p 1 σ 1 S 1 V 0 , for all S 1 , V 0 , I ˙ 1 I 1 = 0 = δ 1 L 1 0 , for all L 1 0 , S ˙ 2 S 2 = 0 = Λ 2 > 0 , L ˙ 2 L 2 = 0 = p 2 σ 2 S 2 V 0 , for all S 2 , V 0 , I ˙ 2 I 2 = 0 = δ 2 L 2 0 , for all L 2 0 , V ˙ 1 V = 0 = η 1 d 1 I 1 + η 2 d 2 I 2 0 , for all I 1 , I 2 0 .
Therefore, R 0 7 is invariant by the model (3). Let us denote T 1 = S 1 + L 1 + I 1 and T 2 = S 2 + L 2 + I 2 to be the total macrophages and CD 4 + T cells compartments, respectively. According to model (3), we have
T ˙ 1 = Λ 1 m 1 S 1 ν 1 L 1 d 1 I 1 Λ 1 σ 1 T 1 T 1 ( t ) Λ 1 σ 1 if T 1 ( 0 ) Λ 1 σ 1 .
Similarly,
T ˙ 2 = Λ 2 m 2 S 2 ν 2 L 2 d 2 I 2 Λ 2 σ 2 T 2 T 2 ( t ) Λ 2 σ 2 if T 2 ( 0 ) Λ 2 σ 2 .
From Equation (3), we have
V ˙ = η 1 d 1 I 1 + η 2 d 2 I 2 m v V η 1 d 1 Λ 1 σ 1 + η 2 d 2 Λ 2 σ 2 m v V V ( t ) Λ 1 η 1 d 1 m v σ 1 + Λ 2 η 2 d 2 m v σ 2 if V ( 0 ) Λ 1 η 1 d 1 m v σ 1 + Λ 2 η 2 d 2 m v σ 2 .
Hence, Ω is positively invariant with regard to system (3).
Let X = ( S 1 , L 1 , I 1 , S 2 , L 2 , I 2 , V ) T R + 7 and write the system in vector form:
d X d t = F ( X ) ,
where F ( X ) is the right-hand side of system (3). The function F ( X ) consists of polynomial terms in the variables S 1 , L 1 , I 1 , S 2 , L 2 , I 2 , and V. Since polynomials are continuous and differentiable everywhere, F ( X ) is continuous on R + 7 . By the Peano existence theorem [18], for any initial condition X ( 0 ) R + 7 , there exists at least one solution X ( t ) defined on some interval [ 0 , t 0 ) . To prove uniqueness, we show that F ( X ) is locally Lipschitz continuous. The Jacobian matrix of F ( X ) is
J ( X ) = m 1 p 1 σ 1 V 0 0 0 0 0 p 1 σ 1 S 1 p 1 σ 1 V ( ν 1 + δ 1 ) 0 0 0 0 p 1 σ 1 S 1 0 δ 1 d 1 0 0 0 0 0 0 0 m 2 p 2 σ 2 V 0 0 p 2 σ 2 S 2 0 0 0 p 2 σ 2 V ( ν 2 + δ 2 ) 0 p 2 σ 2 S 2 0 0 0 0 δ 2 d 2 0 0 0 η 1 d 1 0 0 η 2 d 2 m v .
Since all entries of J ( X ) are continuous and bounded in any compact subset of R + 7 , F ( X ) is locally Lipschitz. By the Picard–Lindelöf theorem [19], the solution X ( t ) is unique for any initial condition X ( 0 ) R + 7 . Since solutions starting in Ω remain bounded, they can be extended for all t 0 . System (3) admits a unique solution X ( t ) for all t 0 given any initial condition X ( 0 ) Ω . The proof relies on
  • Continuity and differentiability of F ( X ) (existence);
  • Local Lipschitz continuity of F ( X ) (uniqueness);
  • Positive invariance of Ω (global existence).
Therefore, system (3) admits a unique solution for all t 0 given initial conditions in Ω .    □

Derivation of R 0 via Next-Generation Matrix Method

Let us define S 1 0 = Λ 1 m 1 and S 2 0 = Λ 2 m 2 and let us define the basic reproduction number as the following.
Lemma 2.
The basic reproduction number is given by
R 0 = R 01 + R 02 , w h e r e R 01 = p 1 η 1 δ 1 σ 1 Λ 1 m v m 1 ( ν 1 + δ 1 ) a n d R 02 = p 2 η 2 δ 2 σ 2 Λ 2 m v m 2 ( ν 2 + δ 2 ) .
Proof. 
Let us use the next-generation matrix method [20,21] to find the basic reproduction number. The infected compartments in system (3) are X = ( L 1 , I 1 , L 2 , I 2 , V ) T . Decompose the right-hand side into new infections ( F ) and transitions ( V ):
F = p 1 σ 1 S 1 V 0 p 2 σ 2 S 2 V 0 0 , V = ( ν 1 + δ 1 ) L 1 δ 1 L 1 + d 1 I 1 ( ν 2 + δ 2 ) L 2 δ 2 L 2 + d 2 I 2 η 1 d 1 I 1 η 2 d 2 I 2 + m v V .
At E 0 = Λ 1 m 1 , 0 , 0 , Λ 2 m 2 , 0 , 0 , 0 , compute
F = 0 0 0 0 p 1 σ 1 S 1 0 0 0 0 0 0 0 0 0 0 p 2 σ 2 S 2 0 0 0 0 0 0 0 0 0 0 0 , V = ν 1 + δ 1 0 0 0 0 δ 1 d 1 0 0 0 0 0 ν 2 + δ 2 0 0 0 0 δ 2 d 2 0 0 η 1 d 1 0 η 2 d 2 m v .
The inverse matrix of V is given by
V 1 = 1 ν 1 + δ 1 0 0 0 0 δ 1 d 1 ( ν 1 + δ 1 ) 1 d 1 0 0 0 0 0 1 ν 2 + δ 2 0 0 0 0 δ 2 d 2 ( ν 2 + δ 2 ) 1 d 2 0 0 η 1 m v 0 η 2 m v 1 m v .
The next-generation matrix K = F V 1 is provided hereafter
K = 0 p 1 σ 1 S 1 0 η 1 m v 0 p 1 σ 1 S 1 0 η 2 m v p 1 σ 1 S 1 0 m v 0 0 0 0 0 0 p 2 σ 2 S 2 0 η 1 m v 0 p 2 σ 2 S 2 0 η 2 m v p 2 σ 2 S 2 0 m v 0 0 0 0 0 0 0 0 0 0 .
The dominant eigenvalue solves
det ( K λ I ) = 0 λ λ p 1 σ 1 S 1 0 η 1 δ 1 m v ( ν 1 + δ 1 ) p 2 σ 2 S 2 0 η 2 δ 2 m v ( ν 2 + δ 2 ) = 0 .
Thus,
R 0 = p 1 σ 1 S 1 0 η 1 δ 1 m v ( ν 1 + δ 1 ) + p 2 σ 2 S 2 0 η 2 δ 2 m v ( ν 2 + δ 2 ) .
Substituting S 1 0 = Λ 1 m 1 and S 2 0 = Λ 2 m 2 ; therefore, the basic reproduction number is given by R 0 = p 1 η 1 δ 1 σ 1 Λ 1 m v m 1 ( ν 1 + δ 1 ) R 01 + p 2 η 2 δ 2 σ 2 Λ 2 m v m 2 ( ν 2 + δ 2 ) R 02 .    □
Let us now discuss the existence of equilibrium points of system (3).

4. Equilibria of the System

This section analyzes the equilibrium points of the HIV dual-target model (3), which describes the interactions between susceptible, latent, and infected cells (CD 4 + T cells and macrophages) and free virus.
Lemma 3.
  • The system (3) admits a disease-free steady state defined by
    E 0 = S 1 0 , 0 , 0 , S 2 0 , 0 , 0 , 0 .
  • If R 0 > 1 , then the system (3) admits an endemic equilibrium point denoted by
    E = S 1 , L 1 , I 1 , S 2 , L 2 , I 2 , V .
Proof. 
Equilibrium points occur when all time-derivatives are zero, leading to the following system:
0 = Λ 1 m 1 S 1 p 1 σ 1 S 1 V , 0 = p 1 σ 1 S 1 V ( ν 1 + δ 1 ) L 1 , 0 = δ 1 L 1 d 1 I 1 , 0 = Λ 2 m 2 S 2 p 2 σ 2 S 2 V , 0 = p 2 σ 2 S 2 V ( ν 2 + δ 2 ) L 2 , 0 = δ 2 L 2 d 2 I 2 , 0 = η 1 d 1 I 1 + η 2 d 2 I 2 m v V .
We have the following cases:
If V = 0 , the model has an infection-free equilibrium E 0 = S 1 0 , 0 , 0 , S 2 0 , 0 , 0 , 0 .
If V 0 , we obtain
S 1 = Λ 1 m 1 + p 1 σ 1 V , S 2 = Λ 2 m 2 + p 2 σ 2 V , L 1 = p 1 σ 1 Λ 1 V ( ν 1 + δ 1 ) ( m 1 + p 1 σ 1 V ) , I 1 = δ 1 p 1 σ 1 Λ 1 V d 1 ( ν 1 + η 1 ) ( m 1 + p 1 σ 1 V ) , L 2 = p 2 σ 2 λ 2 V ( ν 2 + δ 2 ) ( m 2 + p 2 σ 2 V ) , I 2 = δ 2 p 2 σ 2 Λ 2 V d 2 ( ν 2 + δ 2 ) ( m 2 + p 2 σ 2 V ) ,
and V satisfies the following equation
η 1 δ 1 p 1 σ 1 Λ 1 ( ν 1 + δ 1 ) ( m 1 + p 1 σ 1 V ) + η 2 δ 2 p 2 σ 2 Λ 2 ( ν 2 + δ 2 ) ( m 2 + p 2 σ 2 V ) m v = 0 .
Define a function f by
f ( V ) = η 1 δ 1 p 1 σ 1 Λ 1 ( ν 1 + δ 1 ) ( m 1 + p 1 σ 1 V ) + η 2 δ 2 p 2 σ 2 Λ 2 ( ν 2 + δ 2 ) ( m 2 + p 2 σ 2 V ) m v .
Then we have
f ( 0 ) = η 1 δ 1 p 1 σ 1 Λ 1 m 1 ( ν 1 + δ 1 ) + η 2 δ 2 p 2 σ 2 Λ 2 m 2 ( ν 2 + δ 2 ) m v = m v η 1 δ 1 p 1 σ 1 Λ 1 m v m 1 ( μ 1 + δ 1 ) + η 2 δ 2 p 2 σ 2 Λ 2 m v m 2 ( ν 2 + δ 2 ) 1 = m v R 0 1 .
Therefore, f ( 0 ) > 0 once R 0 > 1 . Note that R 01 and R 02 describe the number of newly infected CD 4 + T cells and infected macrophages caused by an infected CD 4 + T cell and an infected macrophage. We have f ( V ) m v < 0 whenever V . Moreover,
f ( V ) = η 1 δ 1 p 1 2 σ 1 2 Λ 1 ( ν 1 + δ 1 ) ( m 1 + p 1 σ 1 V ) 2 + η 2 δ 2 p 2 2 σ 2 2 Λ 2 ( ν 2 + δ 2 ) ( m 2 + p 2 σ 2 V ) 2 < 0 .
Then the function f is decreasing for R 0 > 1 , admitting a unique value V ( 0 , ) , satisfying f ( V ) = 0 . Therefore,
S 1 = Λ 1 m 1 + p 1 σ 1 V > 0 , I 1 = δ 1 p σ 1 Λ 1 V d 1 ( ν 1 + δ 1 ) ( m 1 + p 1 σ 1 V ) > 0 , L 1 = p σ 1 Λ 1 V ( ν 1 + δ 1 ) ( m 1 + p 1 σ 1 V ) > 0 , S 2 = Λ 2 m 2 + p 2 σ 2 V > 0 , L 2 = p 2 σ 2 Λ 2 V ( ν 2 + δ 2 ) ( m 2 + p 2 σ 2 V ) > 0 , I 2 = δ 2 p 2 σ 2 Λ 2 V d 2 ( ν 2 + δ 2 ) ( m 2 + p 2 σ 2 V ) > 0 ,
where V satisfies the following quadratic equation:
a 2 V 2 + a 1 V + a 0 = 0 ,
where the coefficients a 2 , a 1 , and a 0 are given by
a 2 = m v p 1 p 2 σ 1 σ 2 ( ν 1 + δ 1 ) ( ν 2 + δ 2 ) > 0 , a 1 = m v ( m 2 p 1 σ 1 + m 1 p 2 σ 2 ) ( η 1 + μ 1 ) ( δ 2 + ν 2 ) p 1 p 2 σ 1 σ 2 ( η 2 δ 2 λ 2 ( η 1 + μ 1 ) + η 1 η 1 λ 1 ( δ 2 + ν 2 ) ) , a 0 = m v m 1 m 2 ( ν 1 + δ 1 ) ( ν 2 + δ 2 ) 1 R 0 .
Since a 0 < 0 for R 0 > 1 then Equation (4) admits a unique positive solution given by V = a 1 + a 1 2 4 a 2 a 0 2 a 2 > 0 . We get an endemic steady state E = S 1 , L 1 , I 1 , S 2 , L 2 , I 2 , V . Therefore, E exists only if R 0 > 1 .    □

5. Global Stability

Global stability analysis using Lyapunov theory is a fundamental tool in control theory and dynamical systems to determine whether a system’s equilibrium point is stable over the entire state space. The development of Lyapunov functions is based on the approach outlined in [22]. Let us examine the global asymptotic stability of all stable states in the model (3). This section rigorously analyzes the long-term behavior of the HIV dual-target model (3) by proving the global asymptotic stability (GAS) of its equilibria using Lyapunov functions and LaSalle’s invariance principle.
Theorem 1.
The trivial equilibrium E 0 is GAS if R 0 1 and it is unstable if R 0 > 1 .
Proof. 
Consider F 0 ( S 1 , L 1 , I 1 , S 2 , L 2 , I 2 , V )
F 0 = S 1 S 1 0 S 1 0 ln S 1 S 1 0 + L 1 + ν 1 + δ 1 δ 1 I 1 + η 2 δ 2 ( ν 1 + δ 1 ) η 1 δ 1 ( ν 2 + δ 2 ) S 2 S 2 0 S 2 0 ln S 2 S 2 0 + η 2 δ 2 ( ν 1 + δ 1 ) η 1 δ 1 ( ν 2 + δ 2 ) L 2 + η 2 ( ν 1 + δ 1 ) η 1 δ 1 I 2 + ( ν 1 + δ 1 ) η 1 δ 1 V .
Calculating d F 0 d t along the solution of system (3) as
d F 0 d t = 1 S 1 0 S 1 S ˙ 1 + L ˙ 1 + ν 1 + δ 1 δ 1 I ˙ 1 + η 2 δ 2 ( ν 1 + δ 1 ) η 1 δ 1 ( ν 2 + δ 2 ) 1 S 2 0 S 2 S ˙ 2 + η 2 δ 2 ( ν 1 + δ 1 ) η 1 δ 1 ( ν 2 + δ 2 ) L ˙ 2 + η 2 ( ν 1 + δ 1 ) η 1 δ 1 I ˙ 2 + ( ν 1 + δ 1 ) η 1 δ 1 V ˙ 1 .
From Equation (3), we obtain
d F 0 d t = 1 S 1 0 S 1 Λ 1 m 1 S 1 p 1 σ 1 S 1 V + p 1 σ 1 S 1 V ( ν 1 + δ 1 ) L 1 + ν 1 + δ 1 δ 1 ( δ 1 L 1 d 1 I 1 ) + η 2 δ 2 ( ν 1 + δ 1 ) η 1 δ 1 ( ν 2 + δ 2 ) 1 S 2 0 S 2 ( Λ 2 m 2 S 2 p 2 σ 2 S 2 V ) + η 2 δ 2 ( ν 1 + δ 1 ) η 1 δ 1 ( ν 2 + δ 2 ) ( p 2 σ 2 S 2 V ( ν 2 + δ 2 ) L 2 ) + η 2 ( ν 1 + δ 1 ) η 1 δ 1 ( δ 2 L 2 d 2 I 2 ) + ( ν 1 + δ 1 ) η 1 δ 1 ( η 1 d 1 I 1 + η 2 d 2 I 2 m v V ) = 1 S 1 0 S 1 Λ 1 m 1 S 1 + p 1 σ 1 S 1 0 V + η 2 δ 2 ( ν 1 + δ 1 ) η 1 δ 1 ( ν 2 + δ 2 ) 1 S 2 0 S 2 ( Λ 2 m 2 S 2 ) + η 2 δ 2 ( ν 1 + δ 1 ) η 1 δ 1 ( ν 2 + δ 2 ) p 2 σ 2 S 2 0 V ( ν 1 + δ 1 ) η 1 δ 1 m v V = m 1 S 1 S 1 S 1 0 2 m 2 η 2 δ 2 ( ν 1 + δ 1 ) S 2 η 1 δ 1 ( ν 2 + δ 2 ) S 2 S 2 0 2 + p 1 σ 1 S 1 0 V + η 2 δ 2 ( ν 1 + δ 1 ) η 1 δ 1 ( ν 2 + δ 2 ) p 2 σ 2 S 2 0 V ( ν 1 + δ 1 ) η 1 δ 1 m v V .
Collecting terms as
d F 0 d t = m 1 S 1 S 1 S 1 0 2 m 2 η 2 δ 2 ( ν 1 + δ 1 ) S 2 η 1 δ 1 ( ν 2 + δ 2 ) S 2 S 2 0 2 + m v ( ν 1 + δ 1 ) η 1 δ 1 η 1 δ 1 p 1 σ 1 S 1 0 m v ( ν 1 + δ 1 ) + η 2 δ 2 p 2 σ 2 S 2 0 m v ( ν 2 + δ 2 ) 1 V .
Finally, we obtain
d F 0 d t = m 1 S 1 S 1 S 1 0 2 m 2 η 2 δ 2 ( ν 1 + δ 1 ) S 2 η 1 δ 1 ( ν 2 + δ 2 ) S 2 S 2 0 2 + m v ( ν 1 + δ 1 ) η 1 δ 1 R 0 1 V .
Let us denote by Γ 0 the largest invariant subset of Γ 0 = ( S 1 , L 1 , I 1 , S 2 , L 2 , I 2 , V ) : d F 0 d t = 0 .Therefore, for all S 1 , L 1 , I 1 , S 2 , L 2 , I 2 , V > 0 , we have d F 0 d t 0 when R 0 1 . Moreover, d F 0 d t = 0 when S 1 = S 1 0 , S 2 = S 2 0 , and ( R 0 1 ) V = 0 . According to [23], solutions of system (3) limit to Γ 0 , satisfying S 1 ( t ) = S 1 0 , S 2 ( t ) = S 2 0 , and
( R 0 1 ) V = 0 .
Let us consider two cases:
  • If R 0 < 1 , then from Equation (5), we obtain V = 0 . As Γ 0 is invariant, then we get V ˙ 1 ( t ) = 0 and
    0 = V ˙ 1 = η 1 d 1 I 1 + η 2 d 2 I 2 I 1 ( t ) = I 2 ( t ) = 0 , for any t ,
    Furthermore, since I 1 = 0 , then I ˙ 1 ( t ) = 0 , and thus L 1 ( t ) = 0 , for any t. Similarly, I 2 = 0 , then I ˙ 2 ( t ) = 0 , and thus L 2 ( t ) = 0 , for any t. Hence, Γ 0 = E 0 .
  • If R 0 = 1 , we have S 1 = S 1 0 , S 2 = S 2 0 , then S ˙ 1 ( t ) = S ˙ 2 ( t ) = 0 . Therefore,
    Λ 1 m 1 S 1 0 p 1 σ 1 S 1 0 V = 0 V ( t ) = 0 , for any t ,
    Equation (6) implies that I 1 ( t ) = I 2 ( t ) = L 1 ( t ) = L 2 ( t ) = 0 for all t 0 . Hence, Γ 0 = E 0 .
Lyapunov–LaSalle asymptotic stability theorem [24,25,26] reveals that E 0 = S 1 0 , 0 , 0 , S 2 0 , 0 , 0 , 0 is globally asymptotically stable only if R 0 1 , showing that infected compartments ( L 1 , I 1 , L 2 , I 2 , V ) decay to zero while susceptible cells ( S 1 , S 2 ) stabilize at their maximal levels.
To prove that E 0 is unstable when R 0 > 1 , the Jacobian matrix J = J ( S 1 , L 1 , I 1 , S 2 , L 2 , I 2 , V ) of model (3) is calculated as
J = ( m 1 + p 1 σ 1 V ) 0 0 0 0 0 p 1 σ 1 S 1 p 1 σ 1 V ( ν 1 + δ 1 ) 0 0 0 0 p 1 σ 1 S 1 0 δ 1 d 1 0 0 0 0 0 0 0 ( m 2 + p 2 σ 2 V ) 0 0 p 2 σ 2 S 2 0 0 0 p 2 σ 2 V ( ν 2 + δ 2 ) 0 p 2 σ 2 S 2 0 0 0 0 δ 2 d 2 0 0 0 η 1 d 1 0 0 η 2 d 2 m v .
Consequently, at E 0 ,
J = m 1 0 0 0 0 0 p 1 σ 1 S 1 0 ( ν 1 + δ 1 ) 0 0 0 0 p 1 σ 1 S 1 0 δ 1 d 1 0 0 0 0 0 0 0 m 2 0 0 p 2 σ 2 S 2 0 0 0 0 ( ν 2 + δ 2 ) 0 p 2 σ 2 S 2 0 0 0 0 δ 2 d 2 0 0 0 η 1 d 1 0 0 η 2 d 2 m v ,
and the characteristic equation is given by
det ( J X I ) = ( X + m 1 ) ( X + m 2 ) H ( X ) = 0 ,
where X is the eigenvalue and
H ( X ) = X 5 + B 4 X 4 + B 3 X 3 + B 2 X 2 + B 1 X + B 0 ,
where
B 4 = d 1 + d 2 + m v + δ 1 + δ 2 + ν 1 + ν 2 , B 3 = m v ( η 1 + δ 2 + μ 1 ) + δ 2 ( η 1 + μ 1 ) + ν 2 ( m v + η 1 + μ 1 ) + d 2 ( m v + η 1 + δ 2 + μ 1 + ν 2 ) + d 1 ( d 2 + m v + η 1 + δ 2 + μ 1 + ν 2 ) , B 2 = m v ( η 1 + μ 1 ) ( δ 2 + ν 2 ) + d 2 ( ( η 1 + μ 1 ) ( δ 2 + ν 2 ) + m v ( η 1 + δ 2 + μ 1 + ν 2 ) ) + d 1 ( ( η 1 + μ 1 ) ( δ 2 + ν 2 ) + m v ( η 1 + δ 2 + μ 1 + ν 2 ) + d 2 ( m v + η 1 + δ 2 + μ 1 + ν 2 ) ) d 1 η 1 p 1 σ 1 η 1 λ 1 m 1 d 2 η 2 p 2 σ 2 δ 2 λ 2 m 2 , B 1 = d 2 m v ( η 1 + μ 1 ) ( δ 2 + ν 2 ) + d 1 ( m v ( η 1 + μ 1 ) ( δ 2 + ν 2 ) + d 2 ( η 1 + μ 1 ) ( δ 2 + ν 2 ) + d 2 ( m v ( η 1 + δ 2 + μ 1 + ν 2 ) ) ) d 1 η 1 p 1 σ 1 η 1 λ 1 ( d 2 + δ 2 + ν 2 ) m 1 d 2 η 2 p 2 σ 2 δ 2 λ 2 ( d 1 + η 1 + μ 1 ) m 2 , B 0 = d 1 d 2 m v ( δ 1 + μ 1 ) ( δ 2 + ν 2 ) d 1 d 2 η 1 p 1 σ 1 η 1 λ 1 ( δ 2 + ν 2 ) m 1 d 1 d 2 η 2 p 2 σ 2 δ 2 λ 2 ( η 1 + μ 1 ) m 2 .
Clearly,
H ( 0 ) = d 1 d 2 m v ( δ 1 + μ 1 ) ( δ 2 + ν 2 ) d 1 d 2 η 1 p 1 σ 1 η 1 λ 1 ( δ 2 + ν 2 ) m 1 d 1 d 2 η 2 p 2 σ 2 δ 2 λ 2 ( η 1 + μ 1 ) m 2            = d 1 d 2 m v ( δ 1 + ν 1 ) ( δ 2 + ν 2 ) ( 1 R 0 ) < 0 if R 0 > 1 , lim X H ( X ) = .
Then there exists a positive root of H ( X ) = 0 on ( 0 , ) if R 0 > 1 . Therefore E 0 is unstable when R 0 > 1 .    □
Theorem 2.
If R 0 > 1 then E exists and is GAS.
Proof. 
Define a function F ( S 1 , L 1 , I 1 , S 2 , L 2 , I 2 , V )
F = S 1 S 1 S 1 ln S 1 S 1 + L 1 L 1 L 1 ln L 1 L 1 + ν 1 + δ 1 δ 1 I 1 I 1 I 1 ln I 1 I 1 + η 2 δ 2 ( ν 1 + δ 1 ) η 1 δ 1 ( ν 2 + δ 2 ) S 2 S 2 S 2 ln S 2 S 2 + η 2 δ 2 ( ν 1 + δ 1 ) η 1 δ 1 ( ν 2 + δ 2 ) L 2 L 2 L 2 ln L 2 L 2 + η 2 ( ν 1 + δ 1 ) η 1 δ 1 I 2 I 2 I 2 ln I 2 I 2 + ( ν 1 + δ 1 ) η 1 δ 1 V V V ln V V .
We calculate d F d t as
d F d t = 1 S 1 S 1 Λ 1 m 1 S 1 p 1 σ 1 S 1 V + 1 L 1 L 1 p 1 σ 1 S 1 V ( ν 1 + δ 1 ) L 1 + ν 1 + δ 1 δ 1 1 I 1 I 1 δ 1 L 1 d 1 I 1 + η 2 δ 2 ( ν 1 + δ 1 ) η 1 δ 1 ( ν 2 + δ 2 ) 1 S 2 S 2 Λ 2 m 2 S 2 p 2 σ 2 S 2 V + η 2 δ 2 ( ν 1 + δ 1 ) η 1 δ 1 ( ν 2 + δ 2 ) 1 L 2 L 2 p 2 σ 2 S 2 V ( ν 2 + δ 2 ) L 2 + η 2 ( ν 1 + δ 1 ) η 1 δ 1 1 I 2 I 2 δ 2 L 2 d 2 I 2 + ( ν 1 + δ 1 ) η 1 δ 1 1 V V η 1 d 1 I 1 + η 2 d 2 I 2 m v V .
Collecting terms, we get
d F d t = 1 S 1 S 1 Λ 1 m 1 S 1 + p 1 σ 1 S 1 V p 1 σ 1 S 1 V L 1 L 1 + ( ν 1 + δ 1 ) L 1 ( ν 1 + δ 1 ) L 1 I 1 I 1 + ν 1 + δ 1 δ 1 d 1 I 1 + η 2 δ 2 ( ν 1 + δ 1 ) η 1 δ 1 ( ν 2 + δ 2 ) 1 S 2 S 2 Λ 2 m 2 S 2 + p 2 η 2 δ 2 ( ν 1 + δ 1 ) η 1 δ 1 ( ν 2 + δ 2 ) σ 2 S 2 V p 2 η 2 δ 2 ( ν 1 + δ 1 ) η 1 δ 1 ( ν 2 + δ 2 ) σ 2 S 2 V L 2 L 2 + η 2 δ 2 ( ν 1 + δ 1 ) η 1 δ 1 L 2 η 2 δ 2 ( ν 1 + δ 1 ) η 1 δ 1 L 2 I 2 I 2 + η 2 ( ν 1 + δ 1 ) η 1 δ 1 d 2 I 2 ( ν 1 + δ 1 ) η 1 δ 1 m v V ( ν 1 + δ 1 ) δ 1 d 1 I 1 V V η 2 ( ν 1 + δ 1 ) η 1 δ 1 d 2 I 2 V V + ( ν 1 + δ 1 ) η 1 δ 1 m v V .
By using the equilibrium conditions
Λ 1 = m 1 S 1 + p 1 σ 1 S 1 V , Λ 2 = m 2 S 2 + p 2 σ 2 S 2 V , η 1 d 1 I 1 + η 2 d 2 I 2 = m v V , p 1 σ 1 S 1 V = ( ν 1 + δ 1 ) L 1 , δ 1 L 1 = d 1 I 1 , p 2 σ 2 S 2 V = ( ν 2 + δ 2 ) L 2 , δ 2 L 2 = d 2 I 2 ,
we get d 1 I 1 = δ 1 L 1 = δ 1 p 1 ( ν 1 + δ 1 ) σ 1 S 1 V , d 2 I 2 = δ 2 L 2 = p 2 δ 2 ( ν 2 + δ 2 ) σ 2 S 2 V , and
d F d t = 1 S 1 S 1 m 1 S 1 m 1 S 1 + p 1 σ 1 S 1 V 1 S 1 S 1 p 1 σ 1 S 1 V L 1 L 1 + p 1 σ 1 S 1 V p 1 σ 1 S 1 V I 1 I 1 L 1 L 1 + p 1 σ 1 S 1 V + η 2 δ 2 ( ν 1 + δ 1 ) η 1 δ 1 ( ν 2 + δ 2 ) 1 S 2 S 2 m 2 S 2 m 2 S 2 + p 2 η 2 δ 2 ( ν 1 + δ 1 ) η 1 δ 1 ( ν 2 + δ 2 ) σ 2 S 2 V 1 S 2 S 2 p 2 η 2 δ 2 ( ν 1 + δ 1 ) η 1 δ 1 ( ν 2 + δ 2 ) σ 2 S 2 V S 2 V L 2 S 2 V L 2 + p 2 η 2 δ 2 ( ν 1 + δ 1 ) η 1 δ 1 ( ν 2 + δ 2 ) σ 2 S 2 V p 2 η 2 δ 2 ( ν 1 + δ 1 ) η 1 δ 1 ( ν 2 + δ 2 ) I 2 I 2 L 2 L 2 σ 2 S 2 V + p 2 η 2 δ 2 ( ν 1 + δ 1 ) η 1 δ 1 ( ν 2 + δ 2 ) σ 2 S 2 V p 1 σ 1 S 1 V I 1 I 1 V V p 2 η 2 δ 2 ( ν 1 + δ 1 ) η 1 δ 1 ( ν 2 + δ 2 ) σ 2 S 2 V I 2 I 2 V V + p 1 σ 1 S 1 V + p 2 η 2 δ 2 ( ν 1 + δ 1 ) η 1 δ 1 ( ν 2 + δ 2 ) σ 2 S 2 V = m 1 S 1 S 1 2 S 1 m 2 η 2 δ 2 ( ν 1 + δ 1 ) η 1 δ 1 ( ν 2 + δ 2 ) S 2 S 2 2 S 2 + p 1 σ 1 S 1 V 4 S 1 S 1 I 1 I 1 V V I 1 I 1 L 1 L 1 S 1 V S 1 V L 1 L 1 + p 2 η 2 δ 2 ( ν 1 + δ 1 ) η 1 δ 1 ( ν 2 + δ 2 ) σ 2 S 2 V 4 S 2 S 2 I 2 I 2 V V I 2 I 2 L 2 L 2 S 2 V S 2 V L 2 L 2 .
Finally, we get
d F d t = m 1 S 1 S 1 2 S 1 m 2 η 2 δ 2 ( ν 1 + δ 1 ) η 1 δ 1 ( ν 2 + δ 2 ) S 2 S 2 2 S 2 + p 1 σ 1 S 1 V 4 S 1 S 1 I 1 I 1 V V I 1 I 1 L 1 L 1 S 1 V S 1 V L 1 L 1 + p 2 σ 2 η 2 δ 2 ( ν 1 + δ 1 ) η 1 δ 1 ( ν 2 + δ 2 ) S 2 V 4 S 2 S 2 I 2 I 2 V V I 2 I 2 L 2 L 2 S 2 V S 2 V L 2 L 2 .
We recall the arithmetic mean–geometric mean inequality
r 1 + r 2 + · · · + r n n r 1 r 2 · · · r n n , for all r 1 , r 2 , · · · , r n 0 .
Hence, we get d F d t 0 .
Moreover, d F d t = 0 if S 1 , L 1 , I 1 , S 2 , L 2 , I 2 , V = S 1 , L 1 , I 1 , S 2 , L 2 , I 2 , V . The Lyapunov–LaSalle asymptotic stability theorem indicates that E is globally asymptotically stable once R 0 > 1 .    □

6. Optimal Control Analysis

To formulate an optimal control problem for the HIV dynamics model (3), we introduce control variables to represent therapeutic interventions. The goal is to minimize the viral load and the cost of treatment.
We consider the following control functions:
  • u 1 ( t ) : Drug efficacy in blocking viral infection (e.g., reverse transcriptase inhibitors).
  • u 2 ( t ) : Drug efficacy in reducing viral production (e.g., protease inhibitors).
The controlled system is given by
S ˙ 1 = Λ 1 m 1 S 1 ( 1 u 1 ( t ) ) p 1 σ 1 S 1 V , L ˙ 1 = ( 1 u 1 ( t ) ) p 1 σ 1 S 1 V ( ν 1 + δ 1 ) L 1 , I ˙ 1 = δ 1 L 1 d 1 I 1 , S ˙ 2 = Λ 2 m 2 S 2 ( 1 u 1 ( t ) ) p 2 σ 2 S 2 V , L ˙ 2 = ( 1 u 1 ( t ) ) p 2 σ 2 S 2 V ( ν 2 + δ 2 ) L 2 , I ˙ 2 = δ 2 L 2 d 2 I 2 , V ˙ = ( 1 u 2 ( t ) ) ( η 1 d 1 I 1 + η 2 d 2 I 2 ) m v V .
The objective functional to be minimized is
J ( u 1 , u 2 ) = 0 t f A 1 L 1 + A 2 I 1 + A 3 L 2 + A 4 I 2 + A 5 V + 1 2 ( B 1 u 1 2 + B 2 u 2 2 ) d t ,
where
  • A 1 , A 2 , A 3 , A 4 , A 5 are weight constants for the infected compartments and viral load.
  • B 1 , B 2 are weight constants for the cost of controls.
  • t f is the final time.
The optimal control problem is to find ( u 1 ( t ) , u 2 ( t ) ) , such that
J ( u 1 , u 2 ) = min u 1 , u 2 U J ( u 1 , u 2 ) ,
where U is the set of admissible controls defined by
U = { ( u 1 ( t ) , u 2 ( t ) ) u i ( t ) is measurable , 0 u i ( t ) u i , max , t [ 0 , t f ] , i = 1 , 2 } .
The Hamiltonian is given by
H = A 1 L 1 + A 2 I 1 + A 3 L 2 + A 4 I 2 + A 5 V + 1 2 ( B 1 u 1 2 + B 2 u 2 2 ) + λ S 1 [ Λ 1 m 1 S 1 ( 1 u 1 ) p 1 σ 1 S 1 V ] + λ L 1 [ ( 1 u 1 ) p 1 σ 1 S 1 V ( ν 1 + δ 1 ) L 1 ] + λ I 1 [ δ 1 L 1 d 1 I 1 ] + λ S 2 [ Λ 2 m 2 S 2 ( 1 u 1 ) p 2 σ 2 S 2 V ] + λ L 2 [ ( 1 u 1 ) p 2 σ 2 S 2 V ( ν 2 + δ 2 ) L 2 ] + λ I 2 [ δ 2 L 2 d 2 I 2 ] + λ V [ ( 1 u 2 ) ( η 1 d 1 I 1 + η 2 d 2 I 2 ) m v V ] ,
where λ S 1 , λ L 1 , λ I 1 , λ S 2 , λ L 2 , λ I 2 , λ V are the adjoint variables. The optimality conditions are H u 1 = 0 and H u 2 = 0 . Solving these equations gives
u 1 = min max 0 , p 1 σ 1 S 1 V ( λ L 1 λ S 1 ) + p 2 σ 2 S 2 V ( λ L 2 λ S 2 ) B 1 , u 1 , max , u 2 = min max 0 , ( η 1 d 1 I 1 + η 2 d 2 I 2 ) λ V B 2 , u 2 , max .
The adjoint system is derived from the Hamiltonian H by differentiating with respect to each state variable. The adjoint equations are given by
d λ S 1 d t = H S 1 = λ S 1 ( m 1 + ( 1 u 1 ) p 1 σ 1 V ) λ L 1 ( 1 u 1 ) p 1 σ 1 V , d λ L 1 d t = H L 1 = A 1 + λ L 1 ( ν 1 + δ 1 ) λ I 1 δ 1 , d λ I 1 d t = H I 1 = A 2 + λ I 1 d 1 λ V ( 1 u 2 ) η 1 d 1 , d λ S 2 d t = H S 2 = λ S 2 ( m 2 + ( 1 u 1 ) p 2 σ 2 V ) λ L 2 ( 1 u 1 ) p 2 σ 2 V , d λ L 2 d t = H L 2 = A 3 + λ L 2 ( ν 2 + δ 2 ) λ I 2 δ 2 , d λ I 2 d t = H I 2 = A 4 + λ I 2 d 2 λ V ( 1 u 2 ) η 2 d 2 , d λ V d t = H V = A 5 + λ S 1 ( 1 u 1 ) p 1 σ 1 S 1 λ L 1 ( 1 u 1 ) p 1 σ 1 S 1 + λ S 2 ( 1 u 1 ) p 2 σ 2 S 2 λ L 2 ( 1 u 1 ) p 2 σ 2 S 2 + λ V m v .
The adjoint system is solved backward in time with the following transversality conditions:
λ S 1 ( t f ) = λ L 1 ( t f ) = λ I 1 ( t f ) = λ S 2 ( t f ) = λ L 2 ( t f ) = λ I 2 ( t f ) = λ V ( t f ) = 0 .
The adjoint variables λ S 1 , λ L 1 , λ I 1 , λ S 2 , λ L 2 , λ I 2 , λ V represent the shadow prices associated with the state variables S 1 , L 1 , I 1 , S 2 , L 2 , I 2 , V , respectively. Their dynamics describe how the cost of the infection changes over time, accounting for the impact of the controls u 1 and u 2 . The adjoint equations ensure that the optimal controls balance the trade-off between reducing the viral load and minimizing the cost of treatment. The transversality conditions reflect that at the final time t f , there is no additional cost associated with the state variables. The optimal control analysis provides a framework for determining the most effective drug administration strategies to minimize viral load and treatment costs. Numerical simulations can be used to validate the theoretical results and illustrate the effectiveness of the proposed controls.

7. Numerical Simulations

7.1. Stability of Equilibria

In this section, we present some numerical examples performing the theoretical findings concerning the system (3) and given in Section 5. The major of the used parameter values of the model (3) are extracted from the literature and provided in Table 2. The initial value problem was solved numerically using the ode45 solver (MATLAB R2022b software) for several initial conditions. By modifying specific parameter values that have a major impact on the threshold parameters and, in turn, the stability dynamics, the theoretical results obtained in the previous sections will be verified.
  • For σ 1 = 0.003 and σ 2 = 0.0004 , we get R 0 = 0.752 < 1 , then the infection-free equilibrium point E 0 = ( 1000 , 0 , 0 , 1000 , 0 , 0 , 0 ) is globally asymptoticaly stable (see Figure 2). These results confirm the findings of Theorem 1, that the trajectories of the model (3) converges, for any initial value, to the infection-free equilibrium point E 0 . In this case, the susceptible CD 4 + T cells and the susceptible macrophages converge to their maximum values while the other components converge with the HIV to zero.
  • For σ 1 = 0.007 and σ 2 = 0.001 , we get R 0 = 1.755 > 1 , then the infection-free equilibrium point E is GAS (see Figure 3). These results confirm the findings of Theorem 2, that the trajectories of the model (3) converge, for any initial value, to the endemic equilibrium point E . The system (3) becomes persistent, so that all components converge to non-zero values and the HIV disease persists.
We use some arbitrary infection rates σ 1 and σ 2 such that we obtain the two following main cases:
Figure 2 and Figure 3 validate theoretical stability conditions for HIV eradication ( R 0 1 ) or persistence ( R 0 > 1 ). Figure 2 reflects the stability of the infection-free equilibrium ( R 0 = 0.752 < 1 ). This figure illustrates the dynamics of the HIV model when the basic reproduction number R 0 is less than 1 ( R 0 = 0.752 ), indicating that the infection-free equilibrium is globally asymptotically stable (GAS). Susceptible Cells ( S 1 , S 2 ): The populations stabilize at their maximum values (1000 and 1000, respectively), as no infection persists. All infected and latent cell populations ( L 1 , I 1 , L 2 , I 2 ) decay to zero over time. The viral load (V) declines to zero, confirming HIV eradication when R 0 1 . The trajectories converge to E 0 regardless of initial conditions, validating Theorem 1. This represents a healthy state, where the immune system clears the virus. Figure 3 reflects the stability of the endemic equilibrium ( R 0 = 1.755 > 1 ). This figure shows the system dynamics when R 0 > 1 , leading to persistent HIV infection. Susceptible cells ( S 1 , S 2 ) stabilize at lower levels due to ongoing infection. The infected/latent cells ( L 1 , I 1 , L 2 , I 2 ) reach non-zero steady states, indicating chronic infection. The free virus (V) stabilizes at a positive level, demonstrating viral persistence. The convergence to E confirms Theorem 2.

7.2. Sensitivity Analysis

This section examines how variations in model parameters influence the basic reproduction number ( R 0 ), which determines whether HIV infection persists or is eradicated. The analysis identifies the most critical parameters for controlling HIV dynamics. This approach helps identify parameters that have the greatest impact on the basic reproductive number R 0 . Since R 0 is differentiable with respect to certain parameters, sensitivity indices are computed through partial derivatives [33]. Our objective is to perform sensitivity analyses on both basic reproductive numbers R 0 , evaluating their contributions to the stability of the infection-free equilibrium E 0 . The sensitivity indices of R 0 with respect to a parameter η are given by [34]
S l R 0 = R 0 l × l R 0 .
The explicit expression of R 0 is given by R 0 = p 1 η 1 δ 1 σ 1 Λ 1 m v m 1 ( ν 1 + δ 1 ) + p 2 η 2 δ 2 σ 2 Λ 2 m v m 2 ( ν 2 + δ 2 ) .
Note that
S Λ 1 R 0 = S η 1 R 0 = S σ 1 R 0 = S m 1 R 0 = p 1 η 1 δ 1 σ 1 Λ 1 m v m 1 R 0 ( ν 1 + δ 1 ) , S λ 2 R 0 = S η 2 R 0 = S σ 2 R 0 = S m 2 R 0 = p 2 η 2 δ 2 σ 2 Λ 2 m v m 2 R 0 ( ν 2 + δ 2 ) , S p 1 R 0 = p 1 η 1 δ 1 σ 1 Λ 1 m v m 1 R 0 ( ν 1 + δ 1 ) , S p 2 R 0 = p 2 η 2 δ 2 σ 2 Λ 2 m v m 2 R 0 ( ν 2 + δ 2 ) , S δ 1 R 0 = S ν 1 R 0 = ν 1 p 1 η 1 δ 1 σ 1 Λ 1 m v m 1 R 0 ( ν 1 + δ 1 ) 2 , S δ 2 R 0 = S ν 2 R 0 = ν 2 p 2 η 2 δ 2 σ 2 Λ 2 m v m 2 R 0 ( ν 2 + δ 2 ) 2 , S m v R 0 = 1 .
The sensitivity indices of R 0 with respect to the model’s parameters are presented in Table 3.
The sensitivity analysis (Figure 4) identifies which biological parameters most influence the basic reproduction number R 0 , and therefore, HIV infection dynamics. Parameters with positive sensitivity indices increase R 0 when raised, while those with negative indices decrease R 0 when increased.
  • Viral clearance rate ( m v ) has the strongest negative effect ( 1 ). Enhancing viral removal (e.g., via immune response or drugs) is the most effective way to reduce R 0 .
  • CD 4 + T cell-related parameters ( Λ 1 , η 1 , σ 1 , p 1 ) have high positive sensitivity ( 0.878 ). This indicates that viral production and infection in CD 4 + T cells are major drivers of HIV spread.
  • Macrophage-related parameters ( Λ 2 , η 2 , σ 2 , p 2 ) also contribute positively ( 0.122 ), but to a lesser extent. This supports the dual-target nature of HIV, though CD 4 + T cells dominate.
  • Death rates of latent cells ( ν 1 , ν 2 ) have small negative effects. Increasing latent cell death can help reduce viral persistence, but the impact is limited.
  • Transition rates from latent to active infection ( δ 1 , δ 2 ) have moderate positive effects. Slowing this transition may help control viral rebound.
  • Therapies should prioritize enhancing viral clearance and reducing viral production in both cell types.
  • Targeting CD 4 + T cell infection is more impactful than targeting macrophages alone.
  • The analysis supports the use of dual-target strategies for a comprehensive approach to HIV treatment.

7.3. Influence of Treatments on the HIV Dynamics

This section evaluates the impact of antiretroviral therapy (ART) on HIV infection dynamics by introducing a drug efficacy parameter ( ϵ [ 0 , 1 ] ) into the model [30]. The analysis identifies critical thresholds for treatment effectiveness and demonstrates how varying drug efficacy influences viral suppression. By adding an antiviral drug therapy for blocking viral infection [30] with efficacy ϵ [ 0 , 1 ] , we get
S ˙ 1 = Λ 1 m 1 S 1 p 1 ( 1 ϵ ) σ 1 S 1 V , L ˙ 1 = p 1 ( 1 ϵ ) σ 1 S 1 V ( ν 1 + δ 1 ) L 1 , I ˙ 1 = δ 1 L 1 d 1 I 1 , S ˙ 2 = Λ 2 m 2 S 2 ( 1 ϵ ) p 2 σ 2 S 2 V , L ˙ 2 = ( 1 ϵ ) p 2 σ 2 S 2 V ( ν 2 + δ 2 ) L 2 , I ˙ 2 = δ 2 L 2 d 2 I 2 , V ˙ 1 = η 1 d 1 I 1 + η 2 d 2 I 2 m v V .
The basic reproduction number of model (10) is given as
R 0 Therapy ( ϵ ) = p 1 η 1 δ 1 σ 1 Λ 1 ( 1 ϵ ) m v m 1 ( ν 1 + δ 1 ) + p 2 η 2 δ 2 σ 2 Λ 2 ( 1 ϵ ) m v m 2 ( ν 2 + δ 2 ) = ( 1 ϵ ) R 0 R 0 .
Assume that R 0 > 1 , and the objective is to make R 0 Therapy ( ϵ ) 1 and then stabilize the system at the disease-free steady state E 0 . Let us compute the critical drug efficacy ϵ as:
R 0 Therapy ( ϵ ) = 1 ϵ = 1 1 R 0 .
Then we get
R 0 Therapy ( ϵ ) 1 for all ϵ ϵ 1 ,
and thus, E 0 is GAS. For σ 1 = 0.00015 and σ 2 = 0.001 , we get ϵ = 0.6011 . Therefore,
(i)
If 0.6011 ϵ 1 , then R 0 Therapy ( ϵ ) 1 , and E 0 is GAS;
(ii)
If 0 ϵ < 0.6011 , then R 0 Therapy ( ϵ ) > 1 , and E becomes GAS.
The used drug efficacy ( ϵ ) values are given in Table 4.
As observed in Figure 5, increasing the drug efficacy ϵ leads to a reduction in the reproductive numbers R 0 Therapy ( ϵ ) and leads to an increase in the number of susceptible CD 4 + T cells and susceptible macrophages; however, the other components decrease. This shows that using anti-HIV drug therapies will improve the patient’s health.
Figure 5 describes the impact of antiviral therapy on HIV dynamics by evaluating the effect of drug efficacy ( ϵ ) on HIV dynamics, with R 0 Therapy = ( 1 ϵ ) R 0 . We obtain low efficacy for ϵ = 0.4 , 0.5 leading to R 0 Therapy > 1 , and then we obtain persistent infection. The critical efficacy is obtained for ϵ = 0.6011 , giving R 0 Therapy = 1 , describing the threshold for suppression. The high efficacy is obtained for ϵ = 0.7 , 0.8 , leading to R 0 Therapy < 1 , and then a viral clearance occurs. The critical efficacy ϵ = 1 1 R 0 determines treatment success. Exceeding ϵ ensures eradication.

7.4. Optimal Control Problem

The optimal control problem is solved using the forward–backward sweep method with the following steps (Algorithm 1):
Algorithm 1 Forward–Backward Sweep Method.
1:
Initialize all state variables x ( 0 ) and controls u ( 0 )
2:
Set convergence tolerance ϵ and maximum iterations M
3:
for k = 1 to M do
4:
      Forward Sweep:
5:
      Solve state equations forward in time with current controls u ( k 1 )
x ˙ = f ( t , x , u ) , x ( t 0 ) = x 0 .
6:
      Backward Sweep:
7:
      Solve adjoint equations backward in time with current states x ( k )
λ ˙ = H x , λ ( t f ) = 0 .
8:
      Control Update:
9:
      Compute new controls using optimality conditions
u ( k ) = arg min u U H ( t , x ( k ) , u , λ ( k ) ) .
10:
      Convergence Check:
11:
      if  u ( k ) u ( k 1 ) < ϵ  then
12:
           Break loop
13:
      end if
14:
end for
The state equations are solved forward in time using Euler’s method:
x n + 1 = x n + Δ t · f ( t n , x n , u n ) ,
where
  • Δ t is the fixed time step ( 0.1 days in implementation);
  • State vector x = ( S 1 , L 1 , I 1 , S 2 , L 2 , I 2 , V ) T ;
  • Right-hand side f represents the model Equation (1) with controls.
The adjoint system is solved backward using Euler’s method:
λ n 1 = λ n Δ t · g ( t n , x n , u n , λ n ) ,
where g represents the adjoint equations:
g = H x = H S 1 , H L 1 , , H V T .
The controls are updated using the optimality conditions:
u 1 ( k ) ( t ) = P [ 0 , u 1 , max ] p 1 σ 1 S 1 V ( λ L 1 λ S 1 ) + p 2 σ 2 S 2 V ( λ L 2 λ S 2 ) B 1 , u 2 ( k ) ( t ) = P [ 0 , u 2 , max ] ( η 1 d 1 I 1 + η 2 d 2 I 2 ) λ V B 2 ,
where P [ a , b ] denotes projection onto the interval [ a , b ] . The algorithm terminates when the relative change in controls falls below tolerance:
i = 1 N Δ t ( | u 1 ( k ) ( t i ) u 1 ( k 1 ) ( t i ) | + | u 2 ( k ) ( t i ) u 2 ( k 1 ) ( t i ) | ) i = 1 N Δ t ( | u 1 ( k 1 ) ( t i ) | + | u 2 ( k 1 ) ( t i ) | ) < ϵ .
  • Time Discretization: Uniform grid with step size Δ t = 0.1 days;
  • Initialization: Zero controls initial guess ( u 1 ( 0 ) and u 2 ( 0 ) );
  • Termination: ϵ = 10 4 or maximum 100 iterations;
  • Memory Handling: Stores full time history of states and adjoints;
  • Stability: The explicit Euler method requires small Δ t for stability.
Figure 6 illustrates the results of the optimal control analysis applied to the HIV dynamics model described by the system of Equation (3). The figure is divided into several subplots, each depicting the temporal evolution of key model variables under the influence of optimized control strategies.
Figure 6 demonstrates the effect of an optimized, adaptive treatment strategy using reverse transcriptase inhibitors ( u 1 ( t ) ) and protease inhibitors ( u 2 ( t ) ). Unlike the constant drug efficacy in Figure 5, this approach applies treatment intensively during early infection and gradually reduces it as the viral load decreases. This dynamic strategy more effectively suppresses viral replication, preserves immune cells, and minimizes long-term drug exposure. The comparison of state variables from Figure 5 vs. Figure 6 is provided in Table 5.
  • Superior Viral Suppression: Optimal control achieves faster and more complete viral suppression compared to constant dosing.
  • Immune Preservation: The adaptive strategy better preserves CD 4 + T cells and macrophages, maintaining immune function.
  • Reservoir Control: More effective reduction in latent reservoirs, crucial for long-term management.
  • Treatment Efficiency: Achieves better outcomes with potentially lower cumulative drug exposure through time-varying optimization.
The comparison demonstrates that adaptive treatment strategies outperform constant dosing regimens, providing a rationale for personalized, response-guided HIV therapy.

8. Conclusions

In this study, we developed and analyzed a novel mathematical model that captures the dual-target dynamics of HIV infection in CD 4 + T cells and macrophages. We formulated a mathematical system composed of seven nonlinear ODEs, providing a more integrated perspective on viral pathogenesis. We established the model’s biological feasibility by proving the non-negativity and boundedness of trajectories. We derived the basic reproduction number, R 0 = R 01 + R 02 , reflecting the dual contributions of CD 4 + T cells and macrophages to viral spread. The global stability analysis is established using Lyapunov functions, confirming that the infection-free steady state is globally stable once R 0 1 , leading to viral clearance. However, once R 0 > 1 , the endemic steady state is globally stable, leading to a state of chronic infection. We introduced an optimal control framework that evaluates strategic drug administration. We identified a critical drug efficacy threshold, ϵ = 1 1 R 0 , which must be exceeded to achieve viral suppression. A sensitivity analysis highlighted viral production rates ( η 1 , η 2 ) and infection rates ( σ 1 , σ 2 ) as the most influential parameters on R 0 , suggesting that therapies targeting these processes could be particularly effective. Numerical simulations demonstrated that adaptive treatment strategies can significantly reduce viral load and preserve immune cells more efficiently than static dosing regimens.
While this study provides a deterministic ODE framework for HIV dual-target dynamics, several promising extensions could enhance the model’s realism and applicability:
  • Future work could incorporate stochastic elements to account for random fluctuations in viral dynamics and immune responses. Stochastic optimal control frameworks, as pioneered in epidemiological models [35], would better capture the inherent variability in HIV progression and treatment outcomes, particularly during early infection stages or near elimination thresholds.
  • The current model assumes homogeneous mixing, neglecting spatial aspects of HIV infection. Partial differential equation models incorporating diffusion and spatial structure [36] could elucidate the role of tissue-specific viral reservoirs, lymphatic system dynamics, and drug penetration gradients in treatment efficacy.
  • Practical treatment regimens often involve discrete intervention points rather than continuous control. Impulse control theory [37] could optimize structured treatment interruption strategies, vaccination schedules, or periodic drug administration, providing more clinically implementable protocols.
  • Fractional differential equations may better capture the memory effects and anomalous diffusion phenomena observed in HIV dynamics, particularly in latent reservoir activation and drug pharmacokinetics.
These advanced modeling frameworks would allow for a better understanding of HIV pathogenesis and would contribute to the development of more effective and personalized treatment strategies.

Author Contributions

Conceptualization, F.K.A. (Fawaz K. Alalhareth), F.K.A. (Fahad K. Alghamdi), M.H.A. and M.E.H.; methodology, F.K.A. (Fawaz K. Alalhareth), F.K.A. (Fahad K. Alghamdi), M.H.A. and M.E.H.; software, F.K.A. (Fawaz K. Alalhareth), F.K.A. (Fahad K. Alghamdi), M.H.A. and M.E.H.; investigation, F.K.A. (Fawaz K. Alalhareth), F.K.A. (Fahad K. Alghamdi), M.H.A. and M.E.H.; visualization, F.K.A. (Fawaz K. Alalhareth), F.K.A. (Fahad K. Alghamdi), M.H.A. and M.E.H.; writing—original draft, F.K.A. (Fawaz K. Alalhareth), F.K.A. (Fahad K. Alghamdi), M.H.A. and M.E.H.; writing—review and editing, F.K.A. (Fawaz K. Alalhareth), F.K.A. (Fahad K. Alghamdi), M.H.A. and M.E.H. All authors have read and agreed to the published version of the manuscript.

Funding

This work was funded by the Deanship of Graduate Studies and Scientific Research at Najran University for funding this work under the Najran Research Funding Program, grant code (NU/NRP/SERC/13/339).

Data Availability Statement

The original contributions presented in the study are included in the article. Further inquiries can be directed to the corresponding author.

Acknowledgments

The authors are thankful to the Deanship of Graduate Studies and Scientific Research at Najran University for funding this work under the Najran Research Funding Program—grant code (NU/NRP/SERC/13/339). The authors are also grateful to the unknown referees for the many constructive suggestions, which helped to improve the presentation of the paper.

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. Perelson, A.S.; Neumann, A.U.; Markowitz, M.; Leonard, J.M.; Ho, D.D. HIV-1 dynamics in vivo: Virion clearance rate, infected cell life-span, and viral generation time. Science 1996, 271, 1582–1586. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  2. Rong, L.; Gilchrist, M.A.; Feng, Z.; Perelson, A.S. Modeling within-host HIV-1 dynamics and the evolution of drug resistance: Trade-offs between viral enzyme function and drug susceptibility. J. Theor. Biol. 2007, 247, 804–818. [Google Scholar] [CrossRef] [Scilit]
  3. Li, Q.; Lu, F.; Wang, K. Modeling of HIV-1 Infection: Insights to the role of Monocytes/Macrophages, latently infected T4 cells, and HAART regimes. PLoS ONE 2012, 7, e46026. [Google Scholar] [CrossRef] [Scilit]
  4. De Boer, R.; Perelson, A. Target Cell Limited and Immune Control Models of HIV Infection: A Comparison. J. Theor. Biol. 1998, 190, 201–214. [Google Scholar] [CrossRef] [Scilit]
  5. Wodarz, D. Hepatitis C Virus Dynamics and Pathology: The Role of CTL and Antibody Responses. J. Gen. Virol. 2003, 84, 1743–1750. [Google Scholar] [CrossRef] [Scilit]
  6. Harroudi, S.; Meskaf, A.; Allali, K. Modelling the Adaptive Immune Response in HBV Infection Model with HBV DNA-Containing Capsids. Differ. Equ. Dyn. Syst. 2023, 31, 371–393. [Google Scholar] [CrossRef] [Scilit]
  7. Hu, Z.; Yang, J.; Li, Q.; Liang, S.; Fan, D. Mathematical Analysis of Stability and Hopf Bifurcation in a Delayed HIV Infection Model with Saturated Immune Response. Math. Methods Appl. Sci. 2024, 47, 9834–9857. [Google Scholar] [CrossRef] [Scilit]
  8. Nowak, M.A.; May, R.M. Virus Dynamics: Mathematical Principles of Immunology and Virology; Oxford University Press: Oxford, UK, 2000. [Google Scholar] [CrossRef] [Scilit]
  9. Pankavich, S. The effects of latent infection on the dynamics of HIV-1. Differ. Equ. Dyn. Syst. 2016, 24, 281–303. [Google Scholar] [CrossRef] [Scilit]
  10. Lv, L.; Yang, J.; Hu, Z.; Fan, D. Dynamics Analysis of a Delayed HIV Model with Latent Reservoir and Both Viral and Cellular Infections. Math. Methods Appl. Sci. 2025, 48, 6063–6080. [Google Scholar] [CrossRef] [Scilit]
  11. Hmarrass, H.; Qesmi, R. Global Stability and Hopf Bifurcation of a Delayed HIV Model with Macrophages, CD4+ T Cells with Latent Reservoirs and Immune Response. Eur. Phys. J. Plus 2025, 140, 335. [Google Scholar] [CrossRef] [Scilit]
  12. Culshaw, R.V.; Ruan, S. A Delay-Differential Equation Model of HIV Infection of CD4+ T-Cells. Math. Biosci. 2000, 165, 27–39. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  13. Liu, Q.; Jiang, D. Dynamical behavior of a higher order stochastically perturbed HIV/AIDS model with differential infectivity and amelioration. Chaos Solitons Fractals 2020, 141, 110333. [Google Scholar] [CrossRef] [Scilit]
  14. Finzi, D.; Hermankova, M.; Pierson, T.; Carruth, L.M.; Buck, C.; Chaisson, R.E.; Quinn, T.C.; Chadwick, K.; Margolick, J.; Brookmeyer, R.; et al. Identification of a reservoir for HIV-1 in patients on highly active antiretroviral therapy. Science 1997, 278, 1295–1300. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  15. Alharbi, M.H. HIV dynamics in a periodic environment with general transmission rates. AIMS Math. 2024, 9, 31393–31413. [Google Scholar] [CrossRef] [Scilit]
  16. El Hajji, M.; Alnjrani, R.M. Periodic Trajectories for HIV Dynamics in a Seasonal Environment with a General Incidence Rate. Int. J. Anal. Appl. 2023, 21, 96. [Google Scholar] [CrossRef] [Scilit]
  17. El Hajji, M.; Alnjrani, R.M. Periodic Behaviour of HIV Dynamics with Three Infection Routes. Mathematics 2024, 12, 123. [Google Scholar] [CrossRef] [Scilit]
  18. Peano, G. Sull’integrabilità delle equazioni differenziali di primo ordine. Atti Della R. Accad. Dei Lincei Rend. 1886, 21, 677–685. [Google Scholar]
  19. Teschl, G. Ordinary Differential Equations and Dynamical Systems; Graduate Studies in Mathematics; American Mathematical Society: Providence, RI, USA, 2012; Volume 140. [Google Scholar]
  20. den Driessche, P.V.; Watmough, J. Reproduction Numbers and Sub-Threshold Endemic Equilibria for Compartmental Models of Disease Transmission. Math. Biosci. 2002, 180, 29–48. [Google Scholar] [CrossRef] [Scilit]
  21. Diekmann, O.; Heesterbeek, J.; Roberts, M. The construction of next-generation matrices for compartmental epidemic models. J. R. Soc. Interface 2010, 7, 873–885. [Google Scholar] [CrossRef] [Scilit]
  22. Korobeinikov, A. Global properties of basic virus dynamics models. Bull. Math. Biol. 2004, 66, 879–883. [Google Scholar] [CrossRef] [Scilit]
  23. Hale, J.K.; Somolinos, A.S. Competition for a fluctuating nutrient. J. Math. Biol. 1983, 18, 255–280. [Google Scholar] [CrossRef] [Scilit]
  24. Barbashin, E.A. Introduction to the Theory of Stability; Wolters-Noordhoff: Groningen, The Netherlands, 1970. [Google Scholar]
  25. LaSalle, J.P. The Stability of Dynamical Systems; SIAM: Philadelphia, PA, USA, 1976. [Google Scholar]
  26. Lyapunov, A.M. The General Problem of the Stability of Motion; Taylor & Francis, Ltd.: Abingdon, UK, 1992; Volume 55, pp. 531–534. [Google Scholar] [CrossRef] [Scilit]
  27. Li, Y.; Zhang, L.; Zhang, J.; Liu, S.; Peng, Z. Dynamical modeling and data analysis of HIV infection with infection-age, CTLs immune response and delayed antibody immune response. J. Math. Biol. 2025, 91, 57. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  28. Wodarz, D. Mathematical models of immune effector responses to viral infections: Virus control versus the development of pathology. J. Comput. Appl. Math. 2005, 184, 301–319. [Google Scholar] [CrossRef] [Scilit]
  29. Perelson, A.S.; Kirschner, D.E.; De Boer, R. Dynamics of HIV infection of CD4+ T cells. Math. Biosci. 1993, 114, 81–125. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  30. Callaway, D.S.; Perelson, A.S. HIV-1 Infection and Low Steady State Viral Loads. Bull. Math. Biol. 2002, 64, 29–64. [Google Scholar] [CrossRef] [Scilit]
  31. Haase, A.T.; Henry, K.; Zupancic, M.; Sedgewick, G.; Faust, R.A.; Melroe, H.; Cavert, W.; Gebhard, K.; Staskus, K.; Zhang, Z.Q.; et al. Quantitative image analysis of HIV-1 infection in lymphoid tissue. Science 1996, 274, 985–989. [Google Scholar] [CrossRef] [Scilit]
  32. Nampala, H.; Luboobi, L.S.; Mugisha, J.Y.; Obua, C.; Jablonska-Sabuka, M. Modelling Hepatotoxicity and Antiretroviral Therapeutic Effect in HIV/HBV Co-Infection. Math. Biosci. 2018, 302, 67–79. [Google Scholar] [CrossRef] [Scilit]
  33. Marino, S.; Hogue, I.B.; Ray, C.J.; Kirschner, D.E. A Methodology for Performing Global Uncertainty and Sensitivity Analysis in Systems Biology. J. Theor. Biol. 2008, 254, 178–196. [Google Scholar] [CrossRef] [Scilit]
  34. Chitnis, N.; Hyman, J.M.; Cushing, J.M. Determining Important Parameters in the Spread of Malaria Through the Sensitivity Analysis of a Mathematical Model. Bull. Math. Biol. 2008, 70, 1272–1296. [Google Scholar] [CrossRef] [Scilit]
  35. Jaquette, D. A stochastic model for the optimal control of epidemics and pest populations. Math. Biosci. 1970, 8, 343–354. [Google Scholar] [CrossRef] [Scilit]
  36. Mehdaoui, M.; Alaoui, A.; Tilioua, M. Optimal control for a multi-group reaction–diffusion SIR model with heterogeneous incidence rates. Int. J. Dyn. Control 2023, 11, 1310–1329. [Google Scholar] [CrossRef] [Scilit]
  37. Leander, R.; Lenhart, S.; Protopopescu, V. Optimal control of continuous systems with impulse controls. Optim. Control Appl. Methods 2015, 36, 535–549. [Google Scholar] [CrossRef] [Scilit]
Figure 1. HIV dynamics with two target cell populations (CD 4 + T cells and macrophages). Rectangles represent S 1 (susceptible CD 4 + T cells), L 1 (latent CD 4 + T cells), I 1 (infected CD 4 + T cells), S 2 (susceptible macrophages), L 2 (latent macrophages), I 2 (infected macrophages), and V (free HIV). This diagram aligns with the ODE system (3), showing how HIV targets two cell types and the resulting dynamics.
Figure 1. HIV dynamics with two target cell populations (CD 4 + T cells and macrophages). Rectangles represent S 1 (susceptible CD 4 + T cells), L 1 (latent CD 4 + T cells), I 1 (infected CD 4 + T cells), S 2 (susceptible macrophages), L 2 (latent macrophages), I 2 (infected macrophages), and V (free HIV). This diagram aligns with the ODE system (3), showing how HIV targets two cell types and the resulting dynamics.
Mathematics 13 03868 g001
Figure 2. Solutions of system (3) for different initial conditions where R 0 = 0.752 < 1 .
Figure 2. Solutions of system (3) for different initial conditions where R 0 = 0.752 < 1 .
Mathematics 13 03868 g002
Figure 3. Solutions of system (3) for different initial conditions where R 0 = 1.755 > 1 .
Figure 3. Solutions of system (3) for different initial conditions where R 0 = 1.755 > 1 .
Mathematics 13 03868 g003
Figure 4. Sensitivity analysis for R 0 : a bar chart that clearly compares the sensitivity indices, reinforcing these insights.
Figure 4. Sensitivity analysis for R 0 : a bar chart that clearly compares the sensitivity indices, reinforcing these insights.
Mathematics 13 03868 g004
Figure 5. Trajectories of dynamics (10) for different antiviral effectiveness rates, ϵ . This figure demonstrates the nonlinear impact of drug efficacy, emphasizing the need for treatments surpassing ϵ .
Figure 5. Trajectories of dynamics (10) for different antiviral effectiveness rates, ϵ . This figure demonstrates the nonlinear impact of drug efficacy, emphasizing the need for treatments surpassing ϵ .
Mathematics 13 03868 g005
Figure 6. Optimal control problem for the HIV dynamics model (3).
Figure 6. Optimal control problem for the HIV dynamics model (3).
Mathematics 13 03868 g006
Table 1. State variables and parameter descriptions.
Table 1. State variables and parameter descriptions.
NotationDescription
S 1 Susceptible CD 4 + T cells
L 1 Latent CD 4 + T cells
I 1 Infected CD 4 + T cells
S 2 Susceptible macrophages
L 2 Latent macrophages
I 2 Infected macrophages
VFree HIV
Λ 1 Generation rate of susceptible CD 4 + T cells, S 1
Λ 2 Generation rate of susceptible macrophages, S 2
σ 1 Incidence rate between HIV and susceptible CD 4 + T cells
σ 2 Incidence rate between HIV and susceptible macrophages
m 1 Cell death of susceptible CD 4 + T cells
m 2 Cell death of susceptible macrophages
d 1 Cell death of infected CD 4 + T cells
d 2 Cell death of infected macrophages
ν 1 Cell death of latent CD 4 + T cells
ν 2 Cell death of latent macrophages
m v Viral decay
δ 1 Transition rate from latent to active HIV-infected CD 4 + T cells
δ 2 Transition rate from latent to active HIV-infected macrophages
p 1 Probability that HIV particles infect CD 4 + T cells
p 2 Probability that HIV particles infect macrophages
η 1 , η 2 Viral production rates
Table 2. Used parameters for the numerical simulations, which conform to the latest literature on HIV viral dynamics model fitting [27].
Table 2. Used parameters for the numerical simulations, which conform to the latest literature on HIV viral dynamics model fitting [27].
ParameterValueSourceParameterValueSource
Λ 1 10 [28] m v 2.4  [29]
Λ 2 10 [28] η 1 6Assumed
m 1 0.01  [30] η 2 100Assumed
m 2 0.01  [30] δ 1 0.01 Assumed
d 1 0.5  [31] δ 2 0.01 Assumed
d 2 0.1  [31] p 1 0.3  [32]
ν 1 0.02 Assumed p 2 0.7  [32]
ν 2 0.02 Assumed
Table 3. Sensitivity of R 0 .
Table 3. Sensitivity of R 0 .
Parameter l Λ 1 η 1 σ 1 p 1 δ 1 p 2 Λ 2 η 2
S l R 0 0.878 0.878 0.878 0.878 0.5854 0.122 0.122 0.122
Parameter l σ 2 δ 2 ν 1 ν 2 m 2 m 1 m v
S l R 0 0.122 0.0813 0.0813 0.122 0.5854 0.878 1
Table 4. Variation in R 0 Therapy ( ϵ ) .
Table 4. Variation in R 0 Therapy ( ϵ ) .
ϵ 0.4 0.5 0.6011 0.7 0.8
R 0 Therapy ( ϵ ) 1.5042 1.2535 1 0.7521 0.5014
Table 5. Differences in state variables between constant vs. optimal control.
Table 5. Differences in state variables between constant vs. optimal control.
State VariableConstant Drug Efficacy (Figure 5)Optimal Adaptive Control (Figure 6)
Susceptible Cells ( S 1 , S 2 )Partial recovery only when ϵ ϵ ; slow stabilizationRapid and significant recovery; approaches healthy levels quickly
Latent Cells ( L 1 , L 2 )Persist at reduced levels when ϵ < ϵ Dramatically reduced and progressively cleared over time
Infected Cells ( I 1 , I 2 )Maintain substantial populations when ϵ < ϵ Rapid decline to near-zero levels
Free Virus (V)Persistent viral load unless ϵ ϵ Effectively suppressed to near-undetectable levels
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Alalhareth, F.K.; Alghamdi, F.K.; Alharbi, M.H.; El Hajji, M. Global Dynamics and Optimal Control of a Dual-Target HIV Model with Latent Reservoirs. Mathematics 2025, 13, 3868. https://doi.org/10.3390/math13233868

AMA Style

Alalhareth FK, Alghamdi FK, Alharbi MH, El Hajji M. Global Dynamics and Optimal Control of a Dual-Target HIV Model with Latent Reservoirs. Mathematics. 2025; 13(23):3868. https://doi.org/10.3390/math13233868

Chicago/Turabian Style

Alalhareth, Fawaz K., Fahad K. Alghamdi, Mohammed H. Alharbi, and Miled El Hajji. 2025. "Global Dynamics and Optimal Control of a Dual-Target HIV Model with Latent Reservoirs" Mathematics 13, no. 23: 3868. https://doi.org/10.3390/math13233868

APA Style

Alalhareth, F. K., Alghamdi, F. K., Alharbi, M. H., & El Hajji, M. (2025). Global Dynamics and Optimal Control of a Dual-Target HIV Model with Latent Reservoirs. Mathematics, 13(23), 3868. https://doi.org/10.3390/math13233868

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop