#### Abstract

In this paper, we study the SIR epidemic model with vital dynamics , from the point of view of integrability. In the case of the death/birth rate , the SIR model is integrable, and we provide its general solutions by implicit functions, two Lax formulations and infinitely many Hamilton-Poisson realizations. In the case of , we prove that the SIR model has no polynomial or proper rational first integrals by studying the invariant algebraic surfaces. Moreover, although the SIR model with is not integrable and we cannot get its exact solution, based on the existence of an invariant algebraic surface, we give the global dynamics of the SIR model with .

#### 1. Introduction and Statement of the Main Results

Over the past one hundred years, the mathematical modelling of epidemics has been the object of a large number of studies. The Susceptible-Infected-Recovered (SIR) model is one of the most interesting and best understood nonlinear epidemic models [1, 2]. The first SIR model was proposed by Kermack and McKendrick in 1927 [2]. After that, many different epidemic models including time delay, age structure, space factor, white noise, multigroup, and seasonality have been proposed and studied (see [1] and the references therein). Observing the spread of marketing message is analogous to an epidemic, Rodrigues and Fonseca [3] used a SIR model to study the effects of a viral marketing strategy.

We consider the SIR epidemic model with vital dynamics which is given by where is the number of healthy individuals who are susceptible to the disease, is the number of infected individuals who can transmit the disease to the healthy ones, and is the number of individuals who have been infected and then recovered from the disease and the parameters , and denote the average number of contacts per infective per day, the recovery rate, the death rate, and the initial total fixed number of the individuals, respectively. It is assumed that the birth rate is equal to the death rate in this model (1). For , it is called the SIR model without vital dynamics and was proposed by Kermack and McKendrick [2].

The aim of this paper is to study system (1) from the integrability point of view. The integrability of differential equations has been an old and important problem and has attracted much attention. Many scholars have developed a lot of ways to deal with the integrability for both partial differential equations (see [4–13] for instance) and ordinary differential equations (see [14–16] for instance). In particular, the existence of first integrals plays a crucial role in the integrability of ordinary differential equations [17–20]. If the considered system of ordinary differential equations admits a straight line solution, by the differential Galois method, one can usually prove that this system has no rational first integrals for almost all the parameters [21–23]. However, this method cannot tell whether this system is integrable for the remaining parameters. The SIR epidemic model (1) is exactly the case. Another tool that deals with the integrability of 3D differential systems is the Darboux theory of integrability [15, 16], which is a useful tool to find first integrals for polynomial ordinary differential equations, and has been successfully applied in many nonlinear models [24–27]. This theory can also help us make a more precise analysis of the global dynamics of a system topologically (see [28, 29] and the references therein). In the framework of the Darboux theory of integrability, we will give a complete classification of the irreducible Darboux polynomials, of the polynomial first integrals, of the proper rational first integrals, and of the algebraic integrability for the SIR model.

In the case of the constant population, i.e., , the SIR model (1) admits a first integral and can be reduced into a planar system with respect to the variables . The integrability of the reduced planar system has been investigated extensively by different methods, namely, the Adomian decomposition method [30], the homotopy analysis method [31], and the variational iteration method [32]. Recently, Bohner et al. investigated a rational SIR model with the constant population and the time-dependent coefficients and present an alternative solution method to Gleissner’s approach [33]. Based on a quantum mechanical method, Williams et al. provided an exact analytical solution of the stochastic SIR model with the constant population [34]. However, in the case of the varying population, i.e., , the integrability of the full SIR model is an area where little research has been done. Harko et al. reduced the SIR model (1) into the Abel equation and provided its form series solution by using a perturbation approach [35]. To our knowledge, the first integrals of the SIR model (1) with have not been investigated previously. The aim of this work is to cover this gap.

Recall that a real polynomial is called a Darboux polynomial of system (1) if it satisfies for some polynomial , called a cofactor of . Clearly, if is a Darboux polynomial, then is invariant with respect to the flow of system (1). Hence, we call an invariant algebraic surface of system (1). It is well known that a polynomial function is a Darboux polynomial iff each irreducible factor is also a Darboux polynomial. Hence, for simplicity, we only focus on the irreducible Darboux polynomials of system (1).

Our main result on the integrability of system (1) is as follows, which characterizes all irreducible Darboux polynomials of system (1).

Theorem 1. *All irreducible Darboux polynomials of system (1) consist of with the cofactors and with the cofactor .*

In addition, Darboux polynomials can help us construct the algebraic (polynomial or rational) first integrals. By Theorem 1, we can easily obtain the following result.

Corollary 2. *The following statements hold for system (1).
*(1)*It has a polynomial first integral if and only if , and in this case, the polynomial first integral is *(2)*It has no any proper rational first integral*(3)*It is not algebraically integrable*

It is not surprising that the SIR model without vital dynamics, i.e., , has a first integral which is the total number of individuals in the given population. Furthermore, system (1) with has another first integral , which can help us compute the number of individuals that will never contract the infection. Let us mention that the first integral can be built by the classical Jacobi last multiplier method, observing system (1) admits a Jacobi last multiplier . In a word, the system with is a completely integrable system with two functionally independent first integrals . Based on this fact, we have the following remarks on its integrability. (i)The orbits of system (1) with are contained in the curvesand its general solutions are given by the following implicit functions: where are constants (ii)System (1) with has two Lax formulations , where the matrices and are given by(iii)System (1) with has infinitely many Hamilton-Poisson realizations parameterized by the group ; that is, is a Hamilton-Poisson realization where the Poisson bracket readsfor any functions , , the Casimir function the Hamiltonian function and the coefficients such that

As mentioned above, the SIR model with is integrable with two first integrals, which implies it is orbitally equivalent to a linear differential system. Meanwhile, the SIR model with has no polynomial/rational first integrals. However, based on the existence of an invariant algebraic surface, we can characterize the global phase portraits of the SIR model with , which helps us understand the final evolutions of this model and the spread of the disease.

Theorem 3. *The following statements hold for system (1) with .
*(a)*All orbits with initial points not on the invariant algebraic surface and not at infinity are heteroclinic ones, which all positively approach the surface and negatively go to infinity*(b)*The dynamics of system (1) at the infinity is topologically equivalent to the one described in Figure 1*(c)*System (1) on the invariant algebraic surface has four topologically different phase portraits, which are described in Figure 2*

**(a)**

**(b)**

**(c)**

**(d)**Theorem 3 provides the final evolutions of this model. As we have shown, there are only two possible final evolutions for this model. In the first type, both infective and recovered individuals tend to zero; that is, the disease fails to spread, and in the second type, the infective individuals cannot tend to zero; that is, the disease is endemic.

The paper is organized as follows: in Section 2, we prove Theorem 1 and Corollary 2. The proof of Theorem 3 will be given in Section 3. In the last section we draw our conclusions, including some discussions on the biological meaning of our results.

#### 2. Proof of Theorem 1 and Corollary 2

##### 2.1. Proof of Theorem 1

When , it is easy to see that is a Darboux polynomial of system (1) with zero cofactor. In what follows, we deal with the case . For simplicity, we introduce the change of variables and a time rescaling . Then, system (1) becomes where the prime denotes a derivative with respect to the new time and the coefficients and . Clearly, to complete the proof of Theorem 1, we need only to prove the next result.

Proposition 4. *All irreducible Darboux polynomials of system (10) consist of with the cofactors and with the cofactor .*

Suppose is a Darboux polynomial of system (10) with the cofactor , that is,

Comparing the degree of both sides of (11), we get that the cofactor is a polynomial with degree less than two. Without loss of generality, we set . Then, we claim . In fact, we write as powers in the variable , i.e., , where each is a polynomial in the variables and and . Computing the coefficient in (11) of , we have which implies .

We make the change of the variables , , , and and rewrite (10) into

Let be the highest weight degree in the weight homogeneous components of in with the weight exponent . Set where is a weight homogeneous polynomial of weight degree in . Since is a Darboux polynomial of system (10) with the cofactor , it is not difficult to check that is a Darboux polynomial of system (12) with the cofactor , that is, where we still use instead of .

Equating the terms with in (14) yields where stands for a linear partial differential operator

To solve (15), we introduce the change of variables and transform (15) into where is written in terms of . Solving (18) yields with being an arbitrary smooth function in . Clearly, in order for to be a weight homogeneous polynomial of degree in , we must have , and for some nonzero number and nonnegative integers .

Similarly, equating the terms with in (14) leads to

Substituting into (20) yields

Proceeding as above, by (17) we rewrite (21) as

Integrating the above equation with respect to , we obtain with being an arbitrary smooth function. In order for to be a weight-homogeneous polynomial of weight degree , we must have which is a constant, , and

Equating the terms with in (14) for , we have

In particular, for we substitute into (25) and obtain or equivalently

Solving the above linear differential equation, we get

In order for to be a weight-homogeneous polynomial of weight degree , we have , which implies

Proceeding as above, from (25) with and (29), we get

Working in a similar way to solve , we can prove that where is the dilogarithm function defined by and the coefficients are given by

In order for to be a weight-homogeneous polynomial of weight degree , we have and the function is a constant, which implies with being a constant. Using the same argument similar to that above, we solve and get with . Furthermore, by recursive calculations, we can prove that

Therefore, the Darboux polynomial of system (10) and the cofactor , which completes the proof.

##### 2.2. Proof of Corollary 2

###### 2.2.1. Proof of Statement (1) of Corollary 2

It follows from Theorem 1 and the fact that a function is a polynomial first integral if and only if it is a Darboux polynomial with the zero cofactor.

###### 2.2.2. Proof of Statement (2) of Corollary 2

Assume system (1) has a proper rational first integral with being relative prime; then, are two different Darboux polynomials with the same nonzero cofactor; see [16] for instance, which contradicts Theorem 1.

###### 2.2.3. Proof of Statement (3) of Corollary 2

It follows from statements (1) and (2) and a well-known result that a polynomial vector field in is algebraically integrable if and only if it has functionally independent rational first integrals.

#### 3. Proof of Theorem 3

##### 3.1. Proof of Statement (a) of Theorem 3

According to Theorem 1, system (1) has a Darboux polynomial with the cofactor , which implies that is a time-dependent first integral of system (1), that is, along the flow of (1). Let be an arbitrary orbit of system (1) with the initial value satisfying . By we see that will approach the invariant surface as , whereas it goes to infinity as . Statement (a) follows.

##### 3.2. Proof of Statement (b) of Theorem 3

In order to understand the global dynamics of system (1) at infinity, we will use the Poincaré compactification in and analyze the flow at infinity for the local charts and , . See [36] for more details on the Poincaré compactification of a polynomial vector field.

###### 3.2.1. In the Local Chart and

Making the change of variables and the time rescaling , we obtain the Poincaré compactification of system (1) in the local chart

The plane at infinity is invariant, which corresponds to the points on the sphere at infinity, and so system (1) restricted to becomes which has a line of singular points and an isolated singular point . Moreover, system (40) has a first integral . Using this first integral, the phase portrait on the local chart is described in Figure 3. The flow on the local chart is the same with the flow of by reversing the time since the compactified vector field in coincides with the vector field in multiplied by [36].

###### 3.2.2. In the Local Chart and

To get the Poincaré compactification of system (1) in the local chart , we take the change of variables and the time rescaling and transform (1) into

When , system (41) becomes

Clearly, system (42) coincides with system (40) by reversing the time. Then, the phase portrait on the local chart is described in Figure 4. Again, the flow in the local chart is the same as the flow in the local chart by reversing the time.

###### 3.2.3. In the Local Chart and

Proceeding as above, making the change of variables and the time rescaling , system (1) becomes

On the invariant plane , system (43) is reduced to

System (44) has two lines of singular points and . It also has a first integral , which helps us get its phase portrait as shown in Figure 5. The flow at infinity in the local chart is the same as the flow on the local chart by reversing the time.

To summarize the above analysis, one obtains a global picture of the dynamical behavior of system (1) on sphere at infinity: it has two closed curves of equilibria and two nodes (see Figure 1).

##### 3.3. Proof of Statement (c) of Theorem 3

System (1) has the invariant algebraic surface . Restricted to this invariant algebraic surface, system (1) becomes

We first study the finite singular points of system (45). Clearly, system (45) has two singular points

One can check that the eigenvalues of the linear part at are and . Set , called the basic reproduction number. If , is a stable node. If , is a saddle. The eigenvalues of the linear part at are with . If , is a saddle. If and , is a stable focus. If and , is a stable node. In particular, if , coincides with , which is a semihyperbolic saddle-node point.

Next, we turn to study the infinite singularities by the Poincaré compactification in . In the local chart , where , , and , we have

It has two singularities and on the invariant line . The eigenvalues of the linear part at are and , which implies this point is a stable node. By Theorem 2.19 in [37], we see that is a saddle-node point consisting of two hyperbolic sectors with one parabolic sector. Similarly, we take the change of variables and and the time rescaling to obtain the Poincaré compactification of system (45) in the local chart

This system has an unstable node and a saddle node .

Finally, we show that system (45) has no limit cycles in . Since is an invariant manifold, limit cycles (if exits) must be in or . In the region , observing it follows from the Dulac Theorem that system (45) has no limit cycles. In the region , system (45) has either no singular points or a saddle, which implies system (45) has no limit cycles.

Summarizing the above analysis, we obtain that the dynamics of the system (1) on is topologically described by one of Figure 2 on the Poincaré disk.

#### 4. Conclusions

In this paper, by studying the invariant algebraic surfaces, we show that is the only value of the parameters for which the SIR epidemic model is integrable, and in this case, we provide its general solutions by implicit functions, two Lax formulations, and infinitely many Hamilton-Poisson realizations. When , the SIR model has no any algebraic first integral and we cannot get its exact solutions. However, based on the existence of the invariant algebraic surfaces, we characterize the topological structure of orbits for the SIR epidemic model with . Moreover, if the SIR model has a positive death/birth rate , the disease will ultimately approach either the disease-free steady state on or the endemic steady state on , depending on the basic reproduction number . In case the is small, saying less than one, the SIR model has no positive equilibrium point and the disease approaches the disease-free steady state on , which implies the disease will always fail to spread. In case the is big, saying larger than one, the SIR model admits a new positive equilibrium point through the transcritical bifurcation and the disease approaches the endemic steady state on . In case is equal to one, all the solutions in tend to on , which implies the disease is supposed to be controlled and the entire population tends to be healthy, but is susceptible to reinfection. These facts show that the basic reproduction number has played an important role in the spread of disease and the topological structure of orbits for the SIR model. The approach we used in this work may contribute to the understanding of the dynamics of the more general epidemic models.

#### Data Availability

All data included in this study are available upon request by contact with the corresponding author.

#### Conflicts of Interest

The authors declare that they have no conflicts of interest.

#### Acknowledgments

The author would like to acknowledge the financial support from the Scientific Research Program funded by Shaanxi Provincial Education Department (Program No. 19JZ051) and Xi'an Academy of Social Sciences (Program No. JG191).