# A Partial Lagrangian Approach to Mathematical Models of Epidemiology

Authors: R. Naz; I. Naeem; F. M. Mahomed
Journal: Mathematical Problems in Engineering
 (2015)

---

## Abstract

This paper analyzes the first integrals and exact solutions of
mathematical models of epidemiology via the partial Lagrangian
approach by replacing the three first-order nonlinear ordinary
differential equations by an equivalent system containing one
second-order equation and a first-order equation. The partial
Lagrangian approach is then utilized for the second-order ODE to
construct the first integrals of the underlying system. We
investigate the SIR and HIV models. We obtain two first integrals
for the SIR model with and without demographic growth. For the HIV
model without demography, five first integrals are established and
two first integrals are deduced for the HIV model with demography.
Then we utilize the derived first integrals to construct exact
solutions to the models under investigation. The dynamic properties
of these models are studied too. Numerical solutions are derived
for SIR models by finite difference method and are compared with
exact solutions.


---

## Body

## 1. Introduction

Epidemiology has become an exciting area for the modern application of mathematics. Mathematical models play a vital role in analyzing the spread and control of different diseases. Graunt [1] was the first scientist who tried to quantify causes for death in 1662 and this analysis led to the foundation of modern epidemiological theory. The first epidemiological mathematical model describing infectious disease was proposed by the Swiss mathematician Bernoulli in 1760. Bernoulli studied the impact of immunization with cowpox upon the expectation of life of the immunized population and argued the importance of variolation [2, 3].In 1927, Kermack and McKendrick [4] developed infectious disease models to study the Great Plague of London for the period of 1665-1666. These models served as the foundation of theoretical models in epidemiology [5]. The population is divided into three categories (compartments) as susceptible, infected, and recovered [4] and the model is called the SIR model. Later on, Brauer [6] formulated the SIR model which included births and deaths. The systems of nonlinear differential equations arising from the SIR models represent the Lotka-Volterra type equations [7–9]. In 1981, the human immunodeficiency virus (HIV) appeared which causes the sexually transmitted disease, namely, the acquired immunodeficiency syndrome (AIDS). The results reported in the analysis of HIV transmission in San Francisco [10] were replicated through a mathematical model developed by Anderson [11]. Song et al. [12] looked at the transmission dynamics of the tuberculosis model while Song et al. [13] discussed the global dynamics of the tuberculosis model with a density dependent demographic growth. A tremendous variety of models have been formulated for infectious diseases [14]. The study of mathematical models of epidemiology is essential in order to uncover the essential aspects of infectious diseases spread and helps public health decision makers to compare, plan, evaluate, and implement different control programs [14, 15].Most of the mathematical models in epidemiology give rise to a system of linear and nonlinear first-order ordinary differential equations (ODEs) and several qualitative and quantitative techniques have been applied to discuss the dynamic properties of these models. One branch of the literature has applied numerical methods to study the dynamics of these models which include [16–19]. A separate strand of the literature has looked at the dynamics of these models through the stability analysis of the dynamical systems [20–22]. We apply Lagrangian methods to study the additional features of first integrals and reductions relating to the dynamics of these models. A small number of papers have utilized Lie symmetry methods for epidemiology models [23–30]. The optimal control problems arising in epidemics can be solved by the newly developed partial Hamiltonian approach [31].Any system of first-order ODEs possesses an infinite number of Lie point symmetries and in order to reduce the number of symmetries from infinite to finite, the Lie group theorists replace this system by a system containing a second-order ODE [30]. Nucci and Leach [23] derived an explicit solution of the SIS model by the Painlevé analysis and the Lie theory. The second-order ODE for the SIS model possesses only one trivial Lie point symmetry and thus hidden Lie symmetries were computed by increasing the order of the second-order ODE by the Riccati type transformation [23]. Nucci [24] has shown that the same results for the SIS model can be derived by using the Jacobi last multiplier approach. The Jacobi last multiplier yields a transformation which converts the system of first-order ODEs for the SIS model to a coupled system of one first-order and one second-order ODE which admits more Lie symmetries. The Lie group analysis of a mathematical model which describes HIV transmission was performed by Torrisi and Nucci [25], Nucci [26], and Edwards and Nucci [27]. Leach and Andriopoulos [28] utilized the Lie group method to predict the cause of infectious diseases and compare the effects of different control strategies for SARS (Severe Acute Respiratory Syndrome) epidemic of 2002-2003. Lie integrable cases of the simplified multistrain/two-stream model for tuberculosis and dengue fever were discussed by Nucci and Leach [29]. Nucci and Leach [30] performed the singularity and symmetry analysis of the SIR model with and without demographic growth, the model describing the transmission of HIV, and the model describing the transmission of tuberculosis with and without demographic growth. To the best of our knowledge the direct search for first integrals for mathematical models in epidemiology has not yet been considered in the literature and is the subject of this work. We apply the partial Lagrangian approach which was developed in [32, 33] to construct first integrals. This approach is similar to the Noether method and works for even order ODEs. However, one requires a partial Lagrangian instead of the standard Lagrangian. The partial Noether condition which is similar to the Noether condition is then invoked for each of the partial Noether operators in order to explicitly (by means of a formula) determine the corresponding first integrals. The approach is useful since it uses a partial Lagrangian which is easier to work out than the standard Lagrangian which may be not possible or difficult to obtain (see the examples in [33]). We show its effectiveness here. Then, we utilize the derived first integrals to obtain exact solutions of the epidemiological models under consideration.The outline of this paper is as follows. In Section2, we give an overview of the partial Lagrangian approach. Section 3 deals with the first integrals of the SIR model without and with demography which are derived via the partial Lagrangian approach. We utilize these first integrals to find the reductions and exact solutions of the model. In Section 4, we study several features associated with the dynamics of the HIV model. Finally, concluding remarks are presented in Section 5.


## 2. Preliminaries

We now provide an overview of the partial Lagrangian approach as proposed in [32, 33].Consider akth-order ODE system,(1)Eαt,q,q1,q2,…,qk=0,α=1,…,m,where t is the independent variable, qi,i=1,…,m, are the m dependent variables, and qj,j=1,…,k, is the jth total derivative of q with respect to the independent variable t.The total derivative operator with respect tot in this context is defined as(2)Dt=∂∂t+q˙i∂∂qi+q¨i∂∂q˙i+⋯so that Dt(qi)=q˙i,…,Dt(qk-1)=qk.The following are the basic operators defined in the spaceA which is the vector space of differential functions.The Lie-Bäcklund operatorX is given by(3)X=ξ∂∂t+ηi∂∂qi+∑s≥1ζsi∂∂qsi,where(4)ζsi=Dtζs-1i-qsiDtξ,s≥1,i=1,…,m,in which ζ0i≡ηi.The Euler-Lagrange operator is defined by(5)δδqi=∂∂qi+∑s≥1-Dts∂∂qsi,i=1,2,…,m.The characteristic form of the Lie-Bäcklund operator (3) is(6)X=ξDt+Wi∂∂qi+∑s≥1DtsWi∂∂qsi,where Wi is theLie characteristic function(7)Wi=ηi-ξq˙i,i=1,…,m.The partial Noether method for the construction of first integrals (see [32, 33]) is applied to even order ODEs that have no Lagrangian or ODEs which satisfy a partial Euler-Lagrangian system. This method also applies to even order ODEs for which a Lagrangian is sometimes difficult to determine. For example, the second-order ODE (19) discussed at length below is of even order two and has a standard Lagrangian which is not obvious. However a partial Lagrangian for it is rather simple and one can take it to be L=S˙2/2. For odd order ODEs, such as a third-order ODE, one can only use the Noether or partial Noether method if one converts this ODE to fourth order by introducing a potential variable, for example, q=u′, for q′′′=0, or a system containing a second- and first-order ODE. For the system of three first-order ODEs studied herein we convert this system to one which has a second-order ODE (see below).Definition 1 (partial Lagrangian).
Suppose that thekth-order differential system (1) can be expressed as(8)Eα=Eα0+Eα1=0.A function, L=L(t,q,q(1),q(2),…,q(l)),l≤k, if it exists, is known as a partial Lagrangian for system (1) if(9)δLδqi=fiβEβ1provided Eβ1≠0 for some β. Here fiβ is an invertible matrix. If one has that Eβ1=0, then one has the standard Lagrangian L and Noether’s theorem is applicable.Definition 2 (partial Noether operator [33]).
The operatorX as in (3), which satisfies(10)XL+LDtξ=DtB+ηi-ξq˙iδLδqi,i=1,…,m,where B is the gauge term, is referred to as a partial Noether operator corresponding to the partial Lagrangian L. In the special case when δL/δqi=0 one has the Noether operator which gives the divergence invariance of the functional associated with the standard Lagrangian L.Theorem 3 (partial Noether first integral [33]).
The first integral of system (1) associated with the partial Noether operator X corresponding to the partial Lagrangian L is determined from [33](11)I=NL-Bfor suitable gauge function B or in expanded form by(12)I=ξL+WiδLδqti+∑s≥1DtsWiδLδqs+1i-B,where Wi is the characteristic of the conservation law related to this first integral I.


## 3. The First Integrals and Closed Form Solutions of SIR Model without and with Demography

In this section, we study the SIR model first analyzed by Kermack and McKendrick [4] and this model may be applied to diseases which cause permanent immunity after recovering from the disease. The model is applicable to diseases like diphtheria, typhoid fever, measles, mumps, smallpox, and chickenpox. We analyze the two variants of the model: the SIR model without demography and the SIR model with demography. The partial Lagrangian approach is utilized to obtain the first integrals for the SIR model with and without demographic growth. We utilize these first integrals to find the exact solutions of the SIR model with and without demographic growth.


### 3.1. The First Integrals and Exact Solutions of SIR Model without Demography

In this model a fixed populationN (no demography) is considered and is divided into three compartments, namely, susceptible S, infected I, and recovered R such that S+I+R=N. The SIR model without demography describing the effects of the Black Death in the seventeenth century is represented by the following dynamical system of ODEs:(13)S˙=-βSI,(14)I˙=βSI-γI,(15)R˙=γI,with the initial conditions S(0)=N1≥0, I(0)=N2≥0, R(0)=N3≥0, 0≤β≤1, and 0≤γ≤1 and where dot denotes differentiation with respect to the time and β and γ denote the infection and the recovery rates, respectively. If we add (13)–(15), we have(16)ddtSt+It+Rt=0.The model is consistent with S(t)+I(t)+R(t)=N and thus the total population is an arbitrary positive constant of integration. Notice that R occurs only in the last equation and hence the R equation can indeed be omitted as(17)Rt=N-It-St.From (13), we have(18)I=-S˙βSand this converts (14) to the following second-order ODE in S:(19)S¨-S˙2S-βSS˙+γS˙=0.


#### 3.1.1. First Integrals via Partial Lagrangian Approach

We apply the partial Lagrangian approach to construct first integrals of the second-order ODE (19) and we utilize these first integrals to deduce exact solutions for S. Once S is known to us then I can be computed from (18) and finally R(t)=N-I(t)-S(t).Equation (19) admits the partial Lagrangian L=S˙2/2 and the corresponding partial Euler-Lagrange equation is(20)-S˙2S-βSS˙+γS˙=δLδS,where(21)δδS=∂∂S-Dt∂∂S˙+Dt2∂∂S¨-⋯.The partial Noether operatorX=ξ∂/∂t+η∂/∂S corresponding to L satisfies (10); that is,(22)ηt+ηSS˙-S˙ξt-S˙2ξSS˙+S˙22ξt+ξSS˙=η-S˙ξ-S˙2S-βSS˙+γS˙+Bt+S˙BS,where ξ=ξ(t,S), η=η(t,S), and B=B(t,S). Now we separate (22) with respect to powers of S˙ and we obtain the following overdetermined system for ξ, η, and B:(23)S˙3:ξS+2Sξ=0,S˙2:ηS-12ξt+ηS+ξγ-βS=0,S˙:ηt-ηγ-βS-BS=0,S˙0:Bt=0.The solution of system (23) yields the following partial Noether operators and gauge terms:(24)ξ=c2S2,η=c1S+c2β-γln⁡SS,B=c1-γln⁡S+βS+c212γ2ln⁡S2+12β2S2-βγSln⁡S.Formula (12), with ξ, η, and B from (24), results in the following two first integrals:(25)I1=γln⁡S-βS+S˙S,I2=12γln⁡S-βS+S˙S2.Notice that the integrals are connected by(26)I2=I122,and thus only one first integral is functionally independent.


#### 3.1.2. The Exact Solutions of SIR Model

Now we utilizeI1 and derive the exact solutions to (19). Setting I1=g1, we have(27)γln⁡S-βS+S˙S=g1,which is integrable by quadratures(28)∫dSSg1-γln⁡S+βS=t+g2,where g1 and g2 are arbitrary constants. Now, the solution for the infected I can be derived from (18) (29)I=1βγln⁡S-βS-g1,and finally R from (17) is given by(30)R=N-1βγln⁡S-g1.An interesting solution exists for the special case when γ=0 and thus (28) gives rise to the following implicit solution:(31)S=g1g1g2e-g1t-β,I=-g1β-g1g1g2e-g1t-β,R=g1β+N.Exact solution (31) is new and not reported in the literature before. The Painlevé analysis and the Lie symmetry analysis of the SIR model were performed by Leach and Andriopoulos [28]. It is noted that the exact solutions of the SIR model with no demography can be utilized as benchmarks for numerical solutions that are deduced for this model.


#### 3.1.3. The Comparison of Exact and Numerical Solutions of SIR Model

Now we compare exact solutions (31) with the numerical integration of system (13)–(15). We take initial values as N1=20, N2=15, and N3=10, respectively, and β=0.01 as adopted in [17]. The values of arbitrary constants are g1=-0.35 and g2=0.0214. We have employed finite difference method in order to solve system (13)–(15) numerically. In particular, we have used backward finite differences to approximate the first-order derivatives which gives us an implicit scheme for the solution of equation system. For a fixed time step τ, we have partitioned the time domain [0,10] as follows:(32)t0<t1<t2<⋯<tm.System (13)–(15) follows implicit scheme as follows:(33)Sk+1=Sk-τβSk+1Ik,Ik+1=Ik+τβSk+1Ik+1-τγIk+1,Rk+1=Rk+τγIk+1.with the initial conditions(34)S0=20,I0=15,R0=10.In order to implement the aforementioned scheme, we have developed a code inMATLAB and used m=200 time nodes to execute the simulations. The exact and numerical solutions of S(t) and I(t) are graphically represented by Figures 1 and 2. It can be observed that the numerical results are in complete agreement with the exact solution curves.Figure 1
Exact and numerical solutions forS(t).Figure 2
Exact and numerical solutions forI(t).


### 3.2. The First Integrals and Exact Solutions of SIR Model with Demography

In many infectious diseases new susceptible agents enter into the population and therefore deaths must be included in the model (this means we consider the model with demography). Assume that the death rate at any epidemiological compartment isμ≥0 and a birth rate equals the death rate, thus ensuring that the total population size is constant N. The SIR model, including births and deaths, is represented by the following dynamical system of ODEs:(35)S˙=-βSI+μN-S,(36)I˙=βSI-γ+μI,(37)R˙=γI-μR,with the initial conditions S(0)=N1≥0, I(0)=N2≥0, R(0)=N3≥0, 0≤β≤1, and 0≤γ≤1 and where dot denotes differentiation with respect to the time and β and γ denote the infection and the recovery rates, respectively. As adopted in the standard literature, if we add (35)–(37) and integrate the resultant equation, this gives(38)St+It+Rt=N+N0e-μt,where N0 is the arbitrary constant of integration and it must be chosen as zero to ensure that the total population size is constant, namely, N. We note that R occurs only in the last equation and hence the R equation can be omitted by(39)Rt=N-It-St.From (36), we have (40)S=I˙βI+γ+μβand this converts (35) to the following second-order ODE in I:(41)I¨-I˙2I+μ+βII˙+μγ+μ-βNI+βμ+γI2=0.


#### 3.2.1. First Integrals via Partial Lagrangian Approach

We apply the partial Lagrangian approach to construct first integrals of the second-order ODE (41). We utilize these first integrals to find exact solutions for I and then S can be computed from (40) and finally we have R(t)=N-I(t)-S(t).The partial Euler-Lagrange equation corresponding to the partial LagrangianL=I˙2/2 of (41) is given by(42)-I˙2I+μ+βII˙+μγ+μ-βNI+βμ+γI2=δLδI,where(43)δδI=∂∂I-Dt∂∂I˙+Dt2∂∂I¨-⋯.If we assume thatξ=ξ(t,I), η=η(t,I), and B=B(t,I), then the partial Noether determining equation (10) corresponding to L after separation with respect to powers of I˙ results in the following overdetermined system for ξ, η, and B:(44)I˙3:12ξI+ξI=0,I˙2:ηI-ξt2+ηI+μξ+βIξ=0,I˙:ηt-μη-βηI+ξIμγ+μ-βN+βμ+γξI2-BI=0,I˙0:Bt+ημγ+μ-βNI+ηβμ+γI2=0.The solution of the first three equations of system (44) yields(45)ξ=FtI2,η=1I-FtβI+12ln⁡IFt-ln⁡IF˙tμ+gt,B=-34μF˙t+12μ2Ft+14F′′tln⁡I2·-μgt+Ftμγ+μ-βN+g˙t+FtβμI-12F˙tβIln⁡I+12Ftβ2I2+-βgt-12F˙tβ+βμ+γFtI+ht.The last equation of system (44), with knowledge of ξ, η, and B from system (45), gives γ=0 and(46)Ft=c1e2μt,gt=-c1e2μtμ-βN+c2eμt,ht=12c1e2μtμ-βN2-c2μ-βNeμt+c3,where c1, c2, and c3 are arbitrary constants and without loss of generality we can choose c3=0. The unknown ξ, η, and B from system (45) with the help of (47) result in(47)ξ1=0,η1=eμtI,B1=-βI-μ+βNeμt,ξ2=e2μtI2,η2=-e2μtβI+μ-βNI,B2=e2μt12β2I2+βμ-βNI+12μ-βN2.Finally we determine the following two first integrals with γ=0:(48)I1=βI+μ-βN+I˙Ieμt,I2=12βI+μ-βN+I˙I2e2μt.For the case γ≠0, no first integral exists. Notice that the integrals are connected by(49)I2=I122,and therefore only one first integral is functionally independent.


#### 3.2.2. The Exact Solutions and Transition Dynamics of SIR Model with Demographic Growth

Now we utilizeI1 and derive the exact solutions to (41) for the γ=0 case. Setting I1=g1, we have(50)βI+μ-βN+I˙Ieμt=g1,and this can be rewritten as(51)I˙+μ-βN-g1e-μtI=-βI2.Equation (51) is the familiar Bernoulli differential equation. Equation (40) with the aid of (51) takes the following form:(52)S=N-I+1βg1e-μt.Finally, R from (39) gives(53)R=-1βg1e-μt.An interesting particular solution can be derived if we set g1=0. Then the implicit solution of Bernoulli’s equation (51) is given by(54)I=βN-μβ+g2βN-μe-βN-μt.In this case R=0 and S takes the following form:(55)S=N-βN-μβ+g2βN-μe-βN-μt.The time derivative of (52) with g1=0 yields(56)S˙S=-I˙I.It is clear from (56) that the growth rates of susceptible and infected agents in the population are negatively related. This makes true sense because if the number of susceptible agents in the population increases, then the number of infected agents in population will decrease and vice versa. This is an interesting result which has not been pointed out before in the literature.The exact solutions obtained can be used as benchmarks for any numerical solution to this SIR model with demographic growth.


#### 3.2.3. The Comparison of Exact and Numerical Solutions of SIR Model with Demography

Now we compare exact solutions (54) and (55) with the numerical integration of system (35)–(37). We take initial values as N1=15, N2=10, and N3=0, respectively, and β=0.01 and μ=0.20 as adopted in [17]. The values of arbitrary constants are g1=0 and g2=-0.1. Similar procedures as those we used for SIR model without demography have been employed for system equations (35)–(37) in order to obtain the numerical simulations and compared with the exact solution curves in Figures 3 and 4. The exact and numerical solutions overlap.Figure 3
Exact and numerical solutions forS(t) for SIR model with demography.Figure 4
Exact and numerical solutions forI(t) for SIR model with demography.


## 3.1. The First Integrals and Exact Solutions of SIR Model without Demography

In this model a fixed populationN (no demography) is considered and is divided into three compartments, namely, susceptible S, infected I, and recovered R such that S+I+R=N. The SIR model without demography describing the effects of the Black Death in the seventeenth century is represented by the following dynamical system of ODEs:(13)S˙=-βSI,(14)I˙=βSI-γI,(15)R˙=γI,with the initial conditions S(0)=N1≥0, I(0)=N2≥0, R(0)=N3≥0, 0≤β≤1, and 0≤γ≤1 and where dot denotes differentiation with respect to the time and β and γ denote the infection and the recovery rates, respectively. If we add (13)–(15), we have(16)ddtSt+It+Rt=0.The model is consistent with S(t)+I(t)+R(t)=N and thus the total population is an arbitrary positive constant of integration. Notice that R occurs only in the last equation and hence the R equation can indeed be omitted as(17)Rt=N-It-St.From (13), we have(18)I=-S˙βSand this converts (14) to the following second-order ODE in S:(19)S¨-S˙2S-βSS˙+γS˙=0.


### 3.1.1. First Integrals via Partial Lagrangian Approach

We apply the partial Lagrangian approach to construct first integrals of the second-order ODE (19) and we utilize these first integrals to deduce exact solutions for S. Once S is known to us then I can be computed from (18) and finally R(t)=N-I(t)-S(t).Equation (19) admits the partial Lagrangian L=S˙2/2 and the corresponding partial Euler-Lagrange equation is(20)-S˙2S-βSS˙+γS˙=δLδS,where(21)δδS=∂∂S-Dt∂∂S˙+Dt2∂∂S¨-⋯.The partial Noether operatorX=ξ∂/∂t+η∂/∂S corresponding to L satisfies (10); that is,(22)ηt+ηSS˙-S˙ξt-S˙2ξSS˙+S˙22ξt+ξSS˙=η-S˙ξ-S˙2S-βSS˙+γS˙+Bt+S˙BS,where ξ=ξ(t,S), η=η(t,S), and B=B(t,S). Now we separate (22) with respect to powers of S˙ and we obtain the following overdetermined system for ξ, η, and B:(23)S˙3:ξS+2Sξ=0,S˙2:ηS-12ξt+ηS+ξγ-βS=0,S˙:ηt-ηγ-βS-BS=0,S˙0:Bt=0.The solution of system (23) yields the following partial Noether operators and gauge terms:(24)ξ=c2S2,η=c1S+c2β-γln⁡SS,B=c1-γln⁡S+βS+c212γ2ln⁡S2+12β2S2-βγSln⁡S.Formula (12), with ξ, η, and B from (24), results in the following two first integrals:(25)I1=γln⁡S-βS+S˙S,I2=12γln⁡S-βS+S˙S2.Notice that the integrals are connected by(26)I2=I122,and thus only one first integral is functionally independent.


### 3.1.2. The Exact Solutions of SIR Model

Now we utilizeI1 and derive the exact solutions to (19). Setting I1=g1, we have(27)γln⁡S-βS+S˙S=g1,which is integrable by quadratures(28)∫dSSg1-γln⁡S+βS=t+g2,where g1 and g2 are arbitrary constants. Now, the solution for the infected I can be derived from (18) (29)I=1βγln⁡S-βS-g1,and finally R from (17) is given by(30)R=N-1βγln⁡S-g1.An interesting solution exists for the special case when γ=0 and thus (28) gives rise to the following implicit solution:(31)S=g1g1g2e-g1t-β,I=-g1β-g1g1g2e-g1t-β,R=g1β+N.Exact solution (31) is new and not reported in the literature before. The Painlevé analysis and the Lie symmetry analysis of the SIR model were performed by Leach and Andriopoulos [28]. It is noted that the exact solutions of the SIR model with no demography can be utilized as benchmarks for numerical solutions that are deduced for this model.


### 3.1.3. The Comparison of Exact and Numerical Solutions of SIR Model

Now we compare exact solutions (31) with the numerical integration of system (13)–(15). We take initial values as N1=20, N2=15, and N3=10, respectively, and β=0.01 as adopted in [17]. The values of arbitrary constants are g1=-0.35 and g2=0.0214. We have employed finite difference method in order to solve system (13)–(15) numerically. In particular, we have used backward finite differences to approximate the first-order derivatives which gives us an implicit scheme for the solution of equation system. For a fixed time step τ, we have partitioned the time domain [0,10] as follows:(32)t0<t1<t2<⋯<tm.System (13)–(15) follows implicit scheme as follows:(33)Sk+1=Sk-τβSk+1Ik,Ik+1=Ik+τβSk+1Ik+1-τγIk+1,Rk+1=Rk+τγIk+1.with the initial conditions(34)S0=20,I0=15,R0=10.In order to implement the aforementioned scheme, we have developed a code inMATLAB and used m=200 time nodes to execute the simulations. The exact and numerical solutions of S(t) and I(t) are graphically represented by Figures 1 and 2. It can be observed that the numerical results are in complete agreement with the exact solution curves.Figure 1
Exact and numerical solutions forS(t).Figure 2
Exact and numerical solutions forI(t).


## 3.1.1. First Integrals via Partial Lagrangian Approach

We apply the partial Lagrangian approach to construct first integrals of the second-order ODE (19) and we utilize these first integrals to deduce exact solutions for S. Once S is known to us then I can be computed from (18) and finally R(t)=N-I(t)-S(t).Equation (19) admits the partial Lagrangian L=S˙2/2 and the corresponding partial Euler-Lagrange equation is(20)-S˙2S-βSS˙+γS˙=δLδS,where(21)δδS=∂∂S-Dt∂∂S˙+Dt2∂∂S¨-⋯.The partial Noether operatorX=ξ∂/∂t+η∂/∂S corresponding to L satisfies (10); that is,(22)ηt+ηSS˙-S˙ξt-S˙2ξSS˙+S˙22ξt+ξSS˙=η-S˙ξ-S˙2S-βSS˙+γS˙+Bt+S˙BS,where ξ=ξ(t,S), η=η(t,S), and B=B(t,S). Now we separate (22) with respect to powers of S˙ and we obtain the following overdetermined system for ξ, η, and B:(23)S˙3:ξS+2Sξ=0,S˙2:ηS-12ξt+ηS+ξγ-βS=0,S˙:ηt-ηγ-βS-BS=0,S˙0:Bt=0.The solution of system (23) yields the following partial Noether operators and gauge terms:(24)ξ=c2S2,η=c1S+c2β-γln⁡SS,B=c1-γln⁡S+βS+c212γ2ln⁡S2+12β2S2-βγSln⁡S.Formula (12), with ξ, η, and B from (24), results in the following two first integrals:(25)I1=γln⁡S-βS+S˙S,I2=12γln⁡S-βS+S˙S2.Notice that the integrals are connected by(26)I2=I122,and thus only one first integral is functionally independent.


## 3.1.2. The Exact Solutions of SIR Model

Now we utilizeI1 and derive the exact solutions to (19). Setting I1=g1, we have(27)γln⁡S-βS+S˙S=g1,which is integrable by quadratures(28)∫dSSg1-γln⁡S+βS=t+g2,where g1 and g2 are arbitrary constants. Now, the solution for the infected I can be derived from (18) (29)I=1βγln⁡S-βS-g1,and finally R from (17) is given by(30)R=N-1βγln⁡S-g1.An interesting solution exists for the special case when γ=0 and thus (28) gives rise to the following implicit solution:(31)S=g1g1g2e-g1t-β,I=-g1β-g1g1g2e-g1t-β,R=g1β+N.Exact solution (31) is new and not reported in the literature before. The Painlevé analysis and the Lie symmetry analysis of the SIR model were performed by Leach and Andriopoulos [28]. It is noted that the exact solutions of the SIR model with no demography can be utilized as benchmarks for numerical solutions that are deduced for this model.


## 3.1.3. The Comparison of Exact and Numerical Solutions of SIR Model

Now we compare exact solutions (31) with the numerical integration of system (13)–(15). We take initial values as N1=20, N2=15, and N3=10, respectively, and β=0.01 as adopted in [17]. The values of arbitrary constants are g1=-0.35 and g2=0.0214. We have employed finite difference method in order to solve system (13)–(15) numerically. In particular, we have used backward finite differences to approximate the first-order derivatives which gives us an implicit scheme for the solution of equation system. For a fixed time step τ, we have partitioned the time domain [0,10] as follows:(32)t0<t1<t2<⋯<tm.System (13)–(15) follows implicit scheme as follows:(33)Sk+1=Sk-τβSk+1Ik,Ik+1=Ik+τβSk+1Ik+1-τγIk+1,Rk+1=Rk+τγIk+1.with the initial conditions(34)S0=20,I0=15,R0=10.In order to implement the aforementioned scheme, we have developed a code inMATLAB and used m=200 time nodes to execute the simulations. The exact and numerical solutions of S(t) and I(t) are graphically represented by Figures 1 and 2. It can be observed that the numerical results are in complete agreement with the exact solution curves.Figure 1
Exact and numerical solutions forS(t).Figure 2
Exact and numerical solutions forI(t).


## 3.2. The First Integrals and Exact Solutions of SIR Model with Demography

In many infectious diseases new susceptible agents enter into the population and therefore deaths must be included in the model (this means we consider the model with demography). Assume that the death rate at any epidemiological compartment isμ≥0 and a birth rate equals the death rate, thus ensuring that the total population size is constant N. The SIR model, including births and deaths, is represented by the following dynamical system of ODEs:(35)S˙=-βSI+μN-S,(36)I˙=βSI-γ+μI,(37)R˙=γI-μR,with the initial conditions S(0)=N1≥0, I(0)=N2≥0, R(0)=N3≥0, 0≤β≤1, and 0≤γ≤1 and where dot denotes differentiation with respect to the time and β and γ denote the infection and the recovery rates, respectively. As adopted in the standard literature, if we add (35)–(37) and integrate the resultant equation, this gives(38)St+It+Rt=N+N0e-μt,where N0 is the arbitrary constant of integration and it must be chosen as zero to ensure that the total population size is constant, namely, N. We note that R occurs only in the last equation and hence the R equation can be omitted by(39)Rt=N-It-St.From (36), we have (40)S=I˙βI+γ+μβand this converts (35) to the following second-order ODE in I:(41)I¨-I˙2I+μ+βII˙+μγ+μ-βNI+βμ+γI2=0.


### 3.2.1. First Integrals via Partial Lagrangian Approach

We apply the partial Lagrangian approach to construct first integrals of the second-order ODE (41). We utilize these first integrals to find exact solutions for I and then S can be computed from (40) and finally we have R(t)=N-I(t)-S(t).The partial Euler-Lagrange equation corresponding to the partial LagrangianL=I˙2/2 of (41) is given by(42)-I˙2I+μ+βII˙+μγ+μ-βNI+βμ+γI2=δLδI,where(43)δδI=∂∂I-Dt∂∂I˙+Dt2∂∂I¨-⋯.If we assume thatξ=ξ(t,I), η=η(t,I), and B=B(t,I), then the partial Noether determining equation (10) corresponding to L after separation with respect to powers of I˙ results in the following overdetermined system for ξ, η, and B:(44)I˙3:12ξI+ξI=0,I˙2:ηI-ξt2+ηI+μξ+βIξ=0,I˙:ηt-μη-βηI+ξIμγ+μ-βN+βμ+γξI2-BI=0,I˙0:Bt+ημγ+μ-βNI+ηβμ+γI2=0.The solution of the first three equations of system (44) yields(45)ξ=FtI2,η=1I-FtβI+12ln⁡IFt-ln⁡IF˙tμ+gt,B=-34μF˙t+12μ2Ft+14F′′tln⁡I2·-μgt+Ftμγ+μ-βN+g˙t+FtβμI-12F˙tβIln⁡I+12Ftβ2I2+-βgt-12F˙tβ+βμ+γFtI+ht.The last equation of system (44), with knowledge of ξ, η, and B from system (45), gives γ=0 and(46)Ft=c1e2μt,gt=-c1e2μtμ-βN+c2eμt,ht=12c1e2μtμ-βN2-c2μ-βNeμt+c3,where c1, c2, and c3 are arbitrary constants and without loss of generality we can choose c3=0. The unknown ξ, η, and B from system (45) with the help of (47) result in(47)ξ1=0,η1=eμtI,B1=-βI-μ+βNeμt,ξ2=e2μtI2,η2=-e2μtβI+μ-βNI,B2=e2μt12β2I2+βμ-βNI+12μ-βN2.Finally we determine the following two first integrals with γ=0:(48)I1=βI+μ-βN+I˙Ieμt,I2=12βI+μ-βN+I˙I2e2μt.For the case γ≠0, no first integral exists. Notice that the integrals are connected by(49)I2=I122,and therefore only one first integral is functionally independent.


### 3.2.2. The Exact Solutions and Transition Dynamics of SIR Model with Demographic Growth

Now we utilizeI1 and derive the exact solutions to (41) for the γ=0 case. Setting I1=g1, we have(50)βI+μ-βN+I˙Ieμt=g1,and this can be rewritten as(51)I˙+μ-βN-g1e-μtI=-βI2.Equation (51) is the familiar Bernoulli differential equation. Equation (40) with the aid of (51) takes the following form:(52)S=N-I+1βg1e-μt.Finally, R from (39) gives(53)R=-1βg1e-μt.An interesting particular solution can be derived if we set g1=0. Then the implicit solution of Bernoulli’s equation (51) is given by(54)I=βN-μβ+g2βN-μe-βN-μt.In this case R=0 and S takes the following form:(55)S=N-βN-μβ+g2βN-μe-βN-μt.The time derivative of (52) with g1=0 yields(56)S˙S=-I˙I.It is clear from (56) that the growth rates of susceptible and infected agents in the population are negatively related. This makes true sense because if the number of susceptible agents in the population increases, then the number of infected agents in population will decrease and vice versa. This is an interesting result which has not been pointed out before in the literature.The exact solutions obtained can be used as benchmarks for any numerical solution to this SIR model with demographic growth.


### 3.2.3. The Comparison of Exact and Numerical Solutions of SIR Model with Demography

Now we compare exact solutions (54) and (55) with the numerical integration of system (35)–(37). We take initial values as N1=15, N2=10, and N3=0, respectively, and β=0.01 and μ=0.20 as adopted in [17]. The values of arbitrary constants are g1=0 and g2=-0.1. Similar procedures as those we used for SIR model without demography have been employed for system equations (35)–(37) in order to obtain the numerical simulations and compared with the exact solution curves in Figures 3 and 4. The exact and numerical solutions overlap.Figure 3
Exact and numerical solutions forS(t) for SIR model with demography.Figure 4
Exact and numerical solutions forI(t) for SIR model with demography.


## 3.2.1. First Integrals via Partial Lagrangian Approach

We apply the partial Lagrangian approach to construct first integrals of the second-order ODE (41). We utilize these first integrals to find exact solutions for I and then S can be computed from (40) and finally we have R(t)=N-I(t)-S(t).The partial Euler-Lagrange equation corresponding to the partial LagrangianL=I˙2/2 of (41) is given by(42)-I˙2I+μ+βII˙+μγ+μ-βNI+βμ+γI2=δLδI,where(43)δδI=∂∂I-Dt∂∂I˙+Dt2∂∂I¨-⋯.If we assume thatξ=ξ(t,I), η=η(t,I), and B=B(t,I), then the partial Noether determining equation (10) corresponding to L after separation with respect to powers of I˙ results in the following overdetermined system for ξ, η, and B:(44)I˙3:12ξI+ξI=0,I˙2:ηI-ξt2+ηI+μξ+βIξ=0,I˙:ηt-μη-βηI+ξIμγ+μ-βN+βμ+γξI2-BI=0,I˙0:Bt+ημγ+μ-βNI+ηβμ+γI2=0.The solution of the first three equations of system (44) yields(45)ξ=FtI2,η=1I-FtβI+12ln⁡IFt-ln⁡IF˙tμ+gt,B=-34μF˙t+12μ2Ft+14F′′tln⁡I2·-μgt+Ftμγ+μ-βN+g˙t+FtβμI-12F˙tβIln⁡I+12Ftβ2I2+-βgt-12F˙tβ+βμ+γFtI+ht.The last equation of system (44), with knowledge of ξ, η, and B from system (45), gives γ=0 and(46)Ft=c1e2μt,gt=-c1e2μtμ-βN+c2eμt,ht=12c1e2μtμ-βN2-c2μ-βNeμt+c3,where c1, c2, and c3 are arbitrary constants and without loss of generality we can choose c3=0. The unknown ξ, η, and B from system (45) with the help of (47) result in(47)ξ1=0,η1=eμtI,B1=-βI-μ+βNeμt,ξ2=e2μtI2,η2=-e2μtβI+μ-βNI,B2=e2μt12β2I2+βμ-βNI+12μ-βN2.Finally we determine the following two first integrals with γ=0:(48)I1=βI+μ-βN+I˙Ieμt,I2=12βI+μ-βN+I˙I2e2μt.For the case γ≠0, no first integral exists. Notice that the integrals are connected by(49)I2=I122,and therefore only one first integral is functionally independent.


## 3.2.2. The Exact Solutions and Transition Dynamics of SIR Model with Demographic Growth

Now we utilizeI1 and derive the exact solutions to (41) for the γ=0 case. Setting I1=g1, we have(50)βI+μ-βN+I˙Ieμt=g1,and this can be rewritten as(51)I˙+μ-βN-g1e-μtI=-βI2.Equation (51) is the familiar Bernoulli differential equation. Equation (40) with the aid of (51) takes the following form:(52)S=N-I+1βg1e-μt.Finally, R from (39) gives(53)R=-1βg1e-μt.An interesting particular solution can be derived if we set g1=0. Then the implicit solution of Bernoulli’s equation (51) is given by(54)I=βN-μβ+g2βN-μe-βN-μt.In this case R=0 and S takes the following form:(55)S=N-βN-μβ+g2βN-μe-βN-μt.The time derivative of (52) with g1=0 yields(56)S˙S=-I˙I.It is clear from (56) that the growth rates of susceptible and infected agents in the population are negatively related. This makes true sense because if the number of susceptible agents in the population increases, then the number of infected agents in population will decrease and vice versa. This is an interesting result which has not been pointed out before in the literature.The exact solutions obtained can be used as benchmarks for any numerical solution to this SIR model with demographic growth.


## 3.2.3. The Comparison of Exact and Numerical Solutions of SIR Model with Demography

Now we compare exact solutions (54) and (55) with the numerical integration of system (35)–(37). We take initial values as N1=15, N2=10, and N3=0, respectively, and β=0.01 and μ=0.20 as adopted in [17]. The values of arbitrary constants are g1=0 and g2=-0.1. Similar procedures as those we used for SIR model without demography have been employed for system equations (35)–(37) in order to obtain the numerical simulations and compared with the exact solution curves in Figures 3 and 4. The exact and numerical solutions overlap.Figure 3
Exact and numerical solutions forS(t) for SIR model with demography.Figure 4
Exact and numerical solutions forI(t) for SIR model with demography.


## 4. An HIV-Transmission Model with and without Demography

In this section, we derive the first integrals and exact solutions of the important model proposed by Anderson [11], which describes the HIV transmission in male homosexual/bisexual cohorts. The partial Lagrangian approach is employed to obtain the first integrals for the HIV model with and without demography. We utilize these first integrals to find the exact solutions of HIV model with and without demographic growth.


### 4.1. An HIV-Transmission Model without Demography

This compartmental model divides the population at timet into three compartments: susceptible (HIV negatives) u1(t), infected (HIV positives) u2(t), and AIDS patients u3(t). The model is represented by the following system of nonlinear ODEs:(57)u˙1=-βu1u2u1+u2+u3,(58)u˙2=βu1u2u1+u2+u3-νu2,(59)u˙3=νu2-αu3,where α is AIDS related death, 1/ν is the average incubation period for infected individual to develop AIDS, and β is the average probability that an infected individual will infect a susceptible partner. We can express u3(t) from (57) in terms of u1(t) and u2(t) and thus we have(60)u3=-βu1u2u˙1-u1-u2.Adding (57) and (58) results in(61)u˙2+νu2=-u˙1.Equation (59) with the help of (60) and (61) yields the following second-order ODE in u1(t):(62)u¨1-α-νu˙1-α+βu˙12βu1-α-βu˙12βu2=0.First-order system (57)–(59) is equivalent to coupled system (61) and (62) but no first integrals exist for this system unless α=β. Equation (62) for α=β case reduces to the following second-order ODE in terms of u1(t):(63)u¨1-α-νu˙1-2u˙12u1=0.


#### 4.1.1. First Integrals

We derive the first integrals of (63) by the partial Lagrangian approach. Then we find exact solutions for u1 with the help of these first integrals. Equation (61) results in u2 and finally (60) gives u3.Equation (63) admits the partial Lagrangian L=u˙12/2 and the corresponding partial Euler-Lagrange equation is(64)-α-νu˙1-α+βu˙12βu1=δLδu1,where(65)δδu1=∂∂u1-Dt∂∂u˙1+Dt2∂∂u¨1-⋯.If we assume thatξ=ξ(t,u1), η=η(t,u1), and B=B(t,u1), then the partial Noether operators determining equation after separation with respect to powers of u˙1 results in the following system:(66)u˙13:ξu1+4u1ξ=0,u˙12:ηu1-12ξt+2ηu1-ξα-ν=0,u˙1:ηt=-ηα-ν+Bu1,u˙10:Bt=0.The solution of system (66) provides the following partial Noether operators and gauge terms:(67)ξ1=0,η1=1u12eν-αt,B1=0,ξ2=1u14e2ν-αt,η2=0,B2=0,ξ3=0,η3=1u12,B3=ν-αu1,ξ4=1u14ν-α,η4=1u13,B4=ν-α2u12,ξ5=-eν-αt2u14α-ν,η5=eν-αtu13,B5=0.The first integral with ξ, η, and B from (67) can be written as follows:(68)I1=u˙1u12eν-αt,I2=e2ν-αtu˙122u14,I3=u˙1u12-ν-αu1,I4=12ν-αu˙1u12-ν-αu12,I5=eν-αtu˙12u14α-ν+u˙1u13.We easily notice that(69)I2=12I12,I4=12ν-αI3,and we can take I1 and I3 as functionally independent first integrals for second-order ODE (63). There is an additional dependence of I5 on I1 and I3.


#### 4.1.2. The Exact Solutions and Transition Dynamics of HIV Model

Now we utilize the derived first integrals to construct solutions of second-order ODE (63) which eventually yields the solutions to the dynamical system of first-order ODEs (57)–(59).SettingI1=g1, we have(70)u˙1u12eν-αt=g1,and this gives(71)u1=ν-αg1e-ν-αt+g2ν-α.Equation (61), after substituting u1 from (71), gives the following solution:(72)u2=∫g1ν-α2eαtg1e-ν-αt+g2ν-α2dt+g3e-νt,and finally u3 can be computed from (60).If we chooseg2=0 then the solutions for u2 and u3 take the simpler forms and we obtain the following solutions:(73)u1=ν-αg1eν-αt,u2=-ν-α22ν-αg1eν-αt+g3e-νt,u3=-ν-α2ν+βeν-αt-e-tνg1g32ν-αν-α-βν-α2ν-αg1.We derive the same solutions from the other first integrals as are obtained from the first integralI1.It is worthy to mention here that if we use one first integral to construct a solution, then we obtain a Bernoulli differential equation. The solution of Bernoulli’s differential equation yields the solution of our second-order ODE. We can obtain the same solution by using the two functionally independent first integralsI1 and I3. In this event no integration is required in order to obtain the solution.


### 4.2. An HIV-Transmission Model with Demography

The model is represented by the following nonlinear ODEs [26, 30]:(74)u˙1=-βcu1u2u1+u2+u3-μu1,(75)u˙2=βcu1u2u1+u2+u3-μ+νu2,(76)u˙3=νu2-αu3,where u1(t) is that portion of the population which is HIV negative, u2(t) is that portion of the population which is HIV positive, and u3(t) is the portion of the population which has AIDS. The parameter μ is the death rate from other causes, α is the death rate from AIDS, ν is the rate at which HIV positives develop AIDS, β is the rate of infection, and c is the rate of change of the partner. We can express u3(t) from (74) in terms of u1(t) and u2(t) and thus we have(77)u3=-βcu1u2u˙1+μu1-u1-u2.Adding (74) and (75) results in (78)u˙2+μ+νu2=-u˙1-μu1.Equation (76) with the help of (77) and (78) gives the following second-order ODE in u1(t) provided α=μ+βc (see [26]):(79)u¨1-2u˙12u1+βc+2μ-νu˙1+μμ-ν+βcu1=0.We derive the first integrals of (79) by the partial Lagrangian approach. Then we find exact solutions for u1 with the aid of these first integrals. Equation (78) results in u2 and, finally, (77) gives u3.


#### 4.2.1. First Integrals

Equation (79) admits the partial Lagrangian L=u˙12/2 and the corresponding partial Euler-Lagrange equation is(80)2u˙12u1-βc+2μ-νu˙1-μμ-ν+βcu1=δLδu1.If we assume thatξ(t,u1), η(t,u1), and B(t,u1), then the partial Noether operators determining equation after separation with respect to powers of u˙1 results in the following system:(81)u˙13:ξu1+4u1ξ=0,u˙12:ηu1-12ξt+2ηu1-βc+2μ-νξ=0,u˙1:ηt=-βc+2μ-νη+βμc+μ2-μνξ+Bu1,u˙10:Bt-βcμ+μ2-μνu1η=0.The solution of system (81) leads to the following partial Noether operators and gauge terms:(82)ξ1=0,η1=1u12e-μt,B=ν-μ-βce-μtu12,ξ2=0,η2=1u12e-βc+μ-νt,B=-μu1e-βc+μ-νt.The first integral with ξ, η, and B from (82) can be written as follows:(83)I1=e-μtu˙1u12+βc+μ-νu1,I2=e-βc+μ-νtμu1+u˙1u12.Thus the partial Lagrangian approach provided us with two independent first integrals for this case. Now we make use of the derived first integrals to construct the solutions to second-order ODE (79) which finally yields the solutions of the dynamical system of first-order ODEs (74)–(76). We can construct the solutions either from I1 or by using I2 or both. We use both of the first integrals I1 and I2 to establish the exact solutions. Setting I1=g1 and I2=g2, we have(84)e-μtu˙1u12+βc+μ-νu1=g1,e-βc+μ-νtμu1+u˙1u12=g2.Equations (84) provide the following exact solution for u1:(85)u1=βc-νg1eμt-g2eβc+μ-νt.Equation (78), after substituting u1 from (85), gives the following solution:(86)u2=∫-βc-ν2g2e2ν+βct/g1eνt-g2eβct2dt+g3eμ+νt,and finally u3 can be computed from (77). These solutions are the same as derived by Nucci [26].If we chooseg1=0, then the solutions for u2 and u3 take simpler forms and we obtain the following particular solutions:(87)u1=-βc-νg2e-βc+μ-νt,u2=-ν+βc2e--ν+μ+βct-2ν+βcg2+e-μ+νtg3,u3=ν-ν+βc2+g3g2νe-2ν+βct+-ν+βc2-2ν+βc-ν+βc-2ν+βcg2e-ν+μ+βct.The solutions given in (87) are new and have not been reported in literature before.We point out again that these exact solutions of the HIV-transmission models with and without demography are useful as benchmarks for numerical solutions that can be investigated for such models.


## 4.1. An HIV-Transmission Model without Demography

This compartmental model divides the population at timet into three compartments: susceptible (HIV negatives) u1(t), infected (HIV positives) u2(t), and AIDS patients u3(t). The model is represented by the following system of nonlinear ODEs:(57)u˙1=-βu1u2u1+u2+u3,(58)u˙2=βu1u2u1+u2+u3-νu2,(59)u˙3=νu2-αu3,where α is AIDS related death, 1/ν is the average incubation period for infected individual to develop AIDS, and β is the average probability that an infected individual will infect a susceptible partner. We can express u3(t) from (57) in terms of u1(t) and u2(t) and thus we have(60)u3=-βu1u2u˙1-u1-u2.Adding (57) and (58) results in(61)u˙2+νu2=-u˙1.Equation (59) with the help of (60) and (61) yields the following second-order ODE in u1(t):(62)u¨1-α-νu˙1-α+βu˙12βu1-α-βu˙12βu2=0.First-order system (57)–(59) is equivalent to coupled system (61) and (62) but no first integrals exist for this system unless α=β. Equation (62) for α=β case reduces to the following second-order ODE in terms of u1(t):(63)u¨1-α-νu˙1-2u˙12u1=0.


### 4.1.1. First Integrals

We derive the first integrals of (63) by the partial Lagrangian approach. Then we find exact solutions for u1 with the help of these first integrals. Equation (61) results in u2 and finally (60) gives u3.Equation (63) admits the partial Lagrangian L=u˙12/2 and the corresponding partial Euler-Lagrange equation is(64)-α-νu˙1-α+βu˙12βu1=δLδu1,where(65)δδu1=∂∂u1-Dt∂∂u˙1+Dt2∂∂u¨1-⋯.If we assume thatξ=ξ(t,u1), η=η(t,u1), and B=B(t,u1), then the partial Noether operators determining equation after separation with respect to powers of u˙1 results in the following system:(66)u˙13:ξu1+4u1ξ=0,u˙12:ηu1-12ξt+2ηu1-ξα-ν=0,u˙1:ηt=-ηα-ν+Bu1,u˙10:Bt=0.The solution of system (66) provides the following partial Noether operators and gauge terms:(67)ξ1=0,η1=1u12eν-αt,B1=0,ξ2=1u14e2ν-αt,η2=0,B2=0,ξ3=0,η3=1u12,B3=ν-αu1,ξ4=1u14ν-α,η4=1u13,B4=ν-α2u12,ξ5=-eν-αt2u14α-ν,η5=eν-αtu13,B5=0.The first integral with ξ, η, and B from (67) can be written as follows:(68)I1=u˙1u12eν-αt,I2=e2ν-αtu˙122u14,I3=u˙1u12-ν-αu1,I4=12ν-αu˙1u12-ν-αu12,I5=eν-αtu˙12u14α-ν+u˙1u13.We easily notice that(69)I2=12I12,I4=12ν-αI3,and we can take I1 and I3 as functionally independent first integrals for second-order ODE (63). There is an additional dependence of I5 on I1 and I3.


### 4.1.2. The Exact Solutions and Transition Dynamics of HIV Model

Now we utilize the derived first integrals to construct solutions of second-order ODE (63) which eventually yields the solutions to the dynamical system of first-order ODEs (57)–(59).SettingI1=g1, we have(70)u˙1u12eν-αt=g1,and this gives(71)u1=ν-αg1e-ν-αt+g2ν-α.Equation (61), after substituting u1 from (71), gives the following solution:(72)u2=∫g1ν-α2eαtg1e-ν-αt+g2ν-α2dt+g3e-νt,and finally u3 can be computed from (60).If we chooseg2=0 then the solutions for u2 and u3 take the simpler forms and we obtain the following solutions:(73)u1=ν-αg1eν-αt,u2=-ν-α22ν-αg1eν-αt+g3e-νt,u3=-ν-α2ν+βeν-αt-e-tνg1g32ν-αν-α-βν-α2ν-αg1.We derive the same solutions from the other first integrals as are obtained from the first integralI1.It is worthy to mention here that if we use one first integral to construct a solution, then we obtain a Bernoulli differential equation. The solution of Bernoulli’s differential equation yields the solution of our second-order ODE. We can obtain the same solution by using the two functionally independent first integralsI1 and I3. In this event no integration is required in order to obtain the solution.


## 4.1.1. First Integrals

We derive the first integrals of (63) by the partial Lagrangian approach. Then we find exact solutions for u1 with the help of these first integrals. Equation (61) results in u2 and finally (60) gives u3.Equation (63) admits the partial Lagrangian L=u˙12/2 and the corresponding partial Euler-Lagrange equation is(64)-α-νu˙1-α+βu˙12βu1=δLδu1,where(65)δδu1=∂∂u1-Dt∂∂u˙1+Dt2∂∂u¨1-⋯.If we assume thatξ=ξ(t,u1), η=η(t,u1), and B=B(t,u1), then the partial Noether operators determining equation after separation with respect to powers of u˙1 results in the following system:(66)u˙13:ξu1+4u1ξ=0,u˙12:ηu1-12ξt+2ηu1-ξα-ν=0,u˙1:ηt=-ηα-ν+Bu1,u˙10:Bt=0.The solution of system (66) provides the following partial Noether operators and gauge terms:(67)ξ1=0,η1=1u12eν-αt,B1=0,ξ2=1u14e2ν-αt,η2=0,B2=0,ξ3=0,η3=1u12,B3=ν-αu1,ξ4=1u14ν-α,η4=1u13,B4=ν-α2u12,ξ5=-eν-αt2u14α-ν,η5=eν-αtu13,B5=0.The first integral with ξ, η, and B from (67) can be written as follows:(68)I1=u˙1u12eν-αt,I2=e2ν-αtu˙122u14,I3=u˙1u12-ν-αu1,I4=12ν-αu˙1u12-ν-αu12,I5=eν-αtu˙12u14α-ν+u˙1u13.We easily notice that(69)I2=12I12,I4=12ν-αI3,and we can take I1 and I3 as functionally independent first integrals for second-order ODE (63). There is an additional dependence of I5 on I1 and I3.


## 4.1.2. The Exact Solutions and Transition Dynamics of HIV Model

Now we utilize the derived first integrals to construct solutions of second-order ODE (63) which eventually yields the solutions to the dynamical system of first-order ODEs (57)–(59).SettingI1=g1, we have(70)u˙1u12eν-αt=g1,and this gives(71)u1=ν-αg1e-ν-αt+g2ν-α.Equation (61), after substituting u1 from (71), gives the following solution:(72)u2=∫g1ν-α2eαtg1e-ν-αt+g2ν-α2dt+g3e-νt,and finally u3 can be computed from (60).If we chooseg2=0 then the solutions for u2 and u3 take the simpler forms and we obtain the following solutions:(73)u1=ν-αg1eν-αt,u2=-ν-α22ν-αg1eν-αt+g3e-νt,u3=-ν-α2ν+βeν-αt-e-tνg1g32ν-αν-α-βν-α2ν-αg1.We derive the same solutions from the other first integrals as are obtained from the first integralI1.It is worthy to mention here that if we use one first integral to construct a solution, then we obtain a Bernoulli differential equation. The solution of Bernoulli’s differential equation yields the solution of our second-order ODE. We can obtain the same solution by using the two functionally independent first integralsI1 and I3. In this event no integration is required in order to obtain the solution.


## 4.2. An HIV-Transmission Model with Demography

The model is represented by the following nonlinear ODEs [26, 30]:(74)u˙1=-βcu1u2u1+u2+u3-μu1,(75)u˙2=βcu1u2u1+u2+u3-μ+νu2,(76)u˙3=νu2-αu3,where u1(t) is that portion of the population which is HIV negative, u2(t) is that portion of the population which is HIV positive, and u3(t) is the portion of the population which has AIDS. The parameter μ is the death rate from other causes, α is the death rate from AIDS, ν is the rate at which HIV positives develop AIDS, β is the rate of infection, and c is the rate of change of the partner. We can express u3(t) from (74) in terms of u1(t) and u2(t) and thus we have(77)u3=-βcu1u2u˙1+μu1-u1-u2.Adding (74) and (75) results in (78)u˙2+μ+νu2=-u˙1-μu1.Equation (76) with the help of (77) and (78) gives the following second-order ODE in u1(t) provided α=μ+βc (see [26]):(79)u¨1-2u˙12u1+βc+2μ-νu˙1+μμ-ν+βcu1=0.We derive the first integrals of (79) by the partial Lagrangian approach. Then we find exact solutions for u1 with the aid of these first integrals. Equation (78) results in u2 and, finally, (77) gives u3.


### 4.2.1. First Integrals

Equation (79) admits the partial Lagrangian L=u˙12/2 and the corresponding partial Euler-Lagrange equation is(80)2u˙12u1-βc+2μ-νu˙1-μμ-ν+βcu1=δLδu1.If we assume thatξ(t,u1), η(t,u1), and B(t,u1), then the partial Noether operators determining equation after separation with respect to powers of u˙1 results in the following system:(81)u˙13:ξu1+4u1ξ=0,u˙12:ηu1-12ξt+2ηu1-βc+2μ-νξ=0,u˙1:ηt=-βc+2μ-νη+βμc+μ2-μνξ+Bu1,u˙10:Bt-βcμ+μ2-μνu1η=0.The solution of system (81) leads to the following partial Noether operators and gauge terms:(82)ξ1=0,η1=1u12e-μt,B=ν-μ-βce-μtu12,ξ2=0,η2=1u12e-βc+μ-νt,B=-μu1e-βc+μ-νt.The first integral with ξ, η, and B from (82) can be written as follows:(83)I1=e-μtu˙1u12+βc+μ-νu1,I2=e-βc+μ-νtμu1+u˙1u12.Thus the partial Lagrangian approach provided us with two independent first integrals for this case. Now we make use of the derived first integrals to construct the solutions to second-order ODE (79) which finally yields the solutions of the dynamical system of first-order ODEs (74)–(76). We can construct the solutions either from I1 or by using I2 or both. We use both of the first integrals I1 and I2 to establish the exact solutions. Setting I1=g1 and I2=g2, we have(84)e-μtu˙1u12+βc+μ-νu1=g1,e-βc+μ-νtμu1+u˙1u12=g2.Equations (84) provide the following exact solution for u1:(85)u1=βc-νg1eμt-g2eβc+μ-νt.Equation (78), after substituting u1 from (85), gives the following solution:(86)u2=∫-βc-ν2g2e2ν+βct/g1eνt-g2eβct2dt+g3eμ+νt,and finally u3 can be computed from (77). These solutions are the same as derived by Nucci [26].If we chooseg1=0, then the solutions for u2 and u3 take simpler forms and we obtain the following particular solutions:(87)u1=-βc-νg2e-βc+μ-νt,u2=-ν+βc2e--ν+μ+βct-2ν+βcg2+e-μ+νtg3,u3=ν-ν+βc2+g3g2νe-2ν+βct+-ν+βc2-2ν+βc-ν+βc-2ν+βcg2e-ν+μ+βct.The solutions given in (87) are new and have not been reported in literature before.We point out again that these exact solutions of the HIV-transmission models with and without demography are useful as benchmarks for numerical solutions that can be investigated for such models.


## 4.2.1. First Integrals

Equation (79) admits the partial Lagrangian L=u˙12/2 and the corresponding partial Euler-Lagrange equation is(80)2u˙12u1-βc+2μ-νu˙1-μμ-ν+βcu1=δLδu1.If we assume thatξ(t,u1), η(t,u1), and B(t,u1), then the partial Noether operators determining equation after separation with respect to powers of u˙1 results in the following system:(81)u˙13:ξu1+4u1ξ=0,u˙12:ηu1-12ξt+2ηu1-βc+2μ-νξ=0,u˙1:ηt=-βc+2μ-νη+βμc+μ2-μνξ+Bu1,u˙10:Bt-βcμ+μ2-μνu1η=0.The solution of system (81) leads to the following partial Noether operators and gauge terms:(82)ξ1=0,η1=1u12e-μt,B=ν-μ-βce-μtu12,ξ2=0,η2=1u12e-βc+μ-νt,B=-μu1e-βc+μ-νt.The first integral with ξ, η, and B from (82) can be written as follows:(83)I1=e-μtu˙1u12+βc+μ-νu1,I2=e-βc+μ-νtμu1+u˙1u12.Thus the partial Lagrangian approach provided us with two independent first integrals for this case. Now we make use of the derived first integrals to construct the solutions to second-order ODE (79) which finally yields the solutions of the dynamical system of first-order ODEs (74)–(76). We can construct the solutions either from I1 or by using I2 or both. We use both of the first integrals I1 and I2 to establish the exact solutions. Setting I1=g1 and I2=g2, we have(84)e-μtu˙1u12+βc+μ-νu1=g1,e-βc+μ-νtμu1+u˙1u12=g2.Equations (84) provide the following exact solution for u1:(85)u1=βc-νg1eμt-g2eβc+μ-νt.Equation (78), after substituting u1 from (85), gives the following solution:(86)u2=∫-βc-ν2g2e2ν+βct/g1eνt-g2eβct2dt+g3eμ+νt,and finally u3 can be computed from (77). These solutions are the same as derived by Nucci [26].If we chooseg1=0, then the solutions for u2 and u3 take simpler forms and we obtain the following particular solutions:(87)u1=-βc-νg2e-βc+μ-νt,u2=-ν+βc2e--ν+μ+βct-2ν+βcg2+e-μ+νtg3,u3=ν-ν+βc2+g3g2νe-2ν+βct+-ν+βc2-2ν+βc-ν+βc-2ν+βcg2e-ν+μ+βct.The solutions given in (87) are new and have not been reported in literature before.We point out again that these exact solutions of the HIV-transmission models with and without demography are useful as benchmarks for numerical solutions that can be investigated for such models.


## 5. Conclusions

This paper analyzed the first integrals and exact solutions of the SIR and HIV models with and without demographic growth. All these models are represented by systems of three nonlinear first-order ODEs. The system of first-order ODEs is replaced by a system containing at least one second-order ODE in order to obtain a partial Lagrangian to the system. The partial Lagrangian approach is then utilized for the second-order ODE in order to construct first integrals of the underlying system. New solutions were obtained which can be used as benchmarks for any numerical solution.First, we applied the partial Lagrangian approach to the SIR model without demography and obtained two first integrals. These first integrals are functionally dependent and thus we found only one functionally independent first integral. We utilize these first integrals to establish exact solutions to this model. Then we considered the SIR model with demography and established two first integrals for the special caseγ=0. For this model also the first integrals are functionally dependent and therefore only one first integral is functionally independent. The exact solutions to this model were presented. We also discussed some dynamic properties of all the variables of the model with the help of the derived first integrals. Numerical solutions were established for SIR models by finite difference method and were compared with exact solutions. For the HIV model without demography five first integrals are constructed via the partial Lagrangian approach and two first integrals are functionally independent. Then we utilize the derived first integrals to construct exact solutions to the HIV model. The partial Lagrangian approach yielded two first integrals for the HIV model with demography. The exact solutions and reductions were obtained for the HIV model with demography.



---

*Source: 602915-2015-06-24.xml*