1 Introduction

Over the last decades, infectious diseases have gained increasing recognition as a key component in the dynamics of populations (Anderson and May 1991; Thieme 2003). Mathematical modeling can help characterize the epidemiology of infectious diseases, and provide advise on control strategies such as the use of antiviral drugs or quarantine strategies (Gojovic et al. 2009). The most commonly used dynamical models of epidemics employ differential equations and the methods of analysis for such equations have become fairly well known. For instance, SIR models are appropriate for diseases with permanent immunity such as measles and mumps, and periodic oscillatory behavior cannot happen in the autonomous classical SIR model (Beretta and Takeuchi 1995). If individuals are infectious for life and never removed from the class of infectious, such as herpes or HIV, SI model (Diekmann and Montijn 1982) is a good choice. SIS models (Hethcote and Driessche 2000) describe the case when individuals can recover from the disease but there is no acquired immunity, so they return to the susceptible class: examples include sexually transmitted diseases, plague and meningitis, in which no periodic alternation can occur (Hethcote 1976).

However, the need to model more realistic phenomenon, to include broader biologically significant effects, such as the distributions of some special periods at different stages and the spatial dispersion in the spread of diseases, has led to models that employ more involved formulations including integro-differential and functional differential equations (Thieme 2003). In recent years, various extensions of the classical SIR models have thus been constructed (see Bairagil and Chattopadhyay 2008; Cooke and Driessche 1996; Driessche et al. 2007; Hethcote et al. 1981; Liu et al. 1987; Taylor and Carr 2009; Yang and Xiao 2010 and the references therein). For example, upon infection, it is often the case that an individual is not immediately infectious. During this latent period, the host is no longer in the susceptible class but cannot yet be considered to be in the infectious class, so remains in an intermediate class: in the case of yellow fever, for instance, an appropriate SEIR model with an “exposed” class is useful (Driessche et al. 2007; Yang and Xiao 2010). For diseases that confer only temporary immunity, an SEIRS model provides a more appropriate description (Genik and Driessche 1999). Temporary immunity plays a crucial role in the spread of diseases such as cholera, pertussis, influenza and malaria, where waning immunity and multiple strains induce the return of individuals to the susceptible class.

Distributed delays have been included in a variety of population models, e.g., white blood cell models in Yuan and Bélair (2011), SIS and SEIS models in Busenberg and Cooke (1980), Cooke and Yorke (1973), Greenberg and Hoppensteadt (1975). In those disease transmission models, the disease either dies out or approaches an endemic steady state, while in a SIRS model with time delay in a removed class (Hethcote et al. 1989), there may exist periodic oscillations. In Yan and Feng (2010), statistical methods are used to show that the probability distributions of the latent period and the infectious period are primary features in an SEIR model.

In this paper, we consider an epidemic model containing both infectious latent period and temporary immune period as an extension of the standard SEIRS framework. By analyzing the dynamical behavior of the model with general or specific distributions in latent and immune periods, we provide insight into the possibility that delayed factors may have an impact on the virulence of diseases such as influenza besides their effects on virus transmission. The article is structured as follows. In Sect. 2, we present an SEIRS model, focusing on its general structure and explaining how the different compartments are coupled together. Dynamical properties of the disease-free equilibrium and the existence of the endemic equilibrium are investigated with general distribution functions in the durations of latency and temporary immunity. Sect. 3 is devoted to the extension of this dynamical analysis with specific distribution functions, the qualitative behavior at the endemic equilibrium point, including disease persistence, the local/global stabilities and possible oscillations have been addressed. Numerical simulations and epidemic interpretations are given in Sect. 4. We summarize our results and give some remarks in Sect. 5.

2 A general SEIRS model

Motivated by the ideas in building the epidemiological models in Cooke and Driessche (1996), Driessche et al. (2007), Hethcote et al. (1981), Thieme (2003), we consider a population of constant size \(N\) divided into four disjoint classes \(S(t), E(t), I(t)\) and \(R(t)\) representing respectively the number of susceptible, exposed (not yet infectious), infectious and recovered individuals at time \(t\). We take the durations of the latent (or exposed) and temporary immunity (or recovery) stages explicitly into account. The flow of individuals between the different classes in the population is thus given in the diagram of Fig. 1, under the assumptions that a) all newborns are assumed susceptible (\(S\)); b) the natural disease-independent death and birth occur at equal constant rates \(b\); and individuals rarely die of a certain disease (negligible disease-related death); c) the force of infection is of the standard type (“mass action”), \(\beta I/N\) with infectious (\(I\)) transmission rate (average number of contacts per infective per day) \(\beta \), so that susceptible are transferred at a rate \(\frac{\beta SI}{N}\). The newly infected individuals enter the exposed class (\(E\)), where they remain for a latent period, after the transmission of infection from susceptible to potentially infective, but before the potential infective can transmit infection and move into the infectious class. To allow for a general latent period, we let \(P(t)\) be the probability of individuals remaining in the exposed class \(t\) units after becoming exposed. An infectious individual may in due course be removed from the infectious class because of recovery or isolation, to simplify the analysis, the waiting time in the infectious class is assumed to be exponentially distributed with mean waiting time \(\frac{1}{\gamma }\), although the biological realism of this assumption may be debated. If the immunity is not permanent, the recovered (\(R\)) individuals can become susceptible again after a certain period of time. Let \(Q(t)\) be the probability of individuals remaining in the recovered class \(t\) units of time after having recovered (either by removal or acquired immunity). According to the natural progression of the disease, we assume that \(P(t), Q(t)\) are functions satisfying the following conditions:

Fig. 1
figure 1

SEIRS model

\((H)\) nonnegative, nonincreasing and piecewise continuous with

$$\begin{aligned} P(0^+)=Q(0^+)=1, \qquad P(\infty )=Q(\infty )=0. \end{aligned}$$
(1)

Thus the progression of an individual is from susceptible, to infectious, through an exposed process, then to temporary recovery, and back to susceptible, recurrently.

With arbitrarily distributed latent and immune stages, the number of individuals who become exposed (respectively, recovered) at some time \(u\in (0, t)\) and are still in the \(E\) (respectively, \(R\)) class at time \(t\) is given by

$$\begin{aligned} E(t)=\int \limits _0^t \beta \displaystyle \frac{S(u)I(u)}{N} e^{-b(t-u)}P(t-u) du \end{aligned}$$

and

$$\begin{aligned} R(t)=\int \limits _0^t \gamma I(u) e^{-b(t-u)}Q(t-u) du. \end{aligned}$$

Rescaling the number of individuals in each class by the total population \(N\), i.e. \(\frac{S}{N} \rightarrow \hat{S}, \frac{E}{N} \rightarrow \hat{E}, \frac{I}{N} \rightarrow \hat{I}\) and \( \frac{R}{N} \rightarrow \hat{R}\) yields

$$\begin{aligned} \begin{aligned} \hat{E}(t)&=\int \limits _0^t \beta \hat{S}(u)\hat{I}(u) e^{-b(t-u)}P(t-u) du ,\\ \hat{R}(t)&= \int \limits _0^t \gamma \hat{I}(u) e^{-b(t-u)}Q(t-u) du. \end{aligned} \end{aligned}$$
(2)

To simplify the notations in the following, we use \(S,E,I,R\) to replace \(\hat{S},\hat{E},\hat{I}, \hat{R}\) respectively, by ignoring the \(\hat{\cdot }\) sign. Equation (2) can be converted (under mild conditions related to initial conditions) to the equivalent integro-differential equations (Cooke and Driessche 1996; Driessche et al. 2007),

$$\begin{aligned} \begin{aligned} \dot{E}&=\beta S(t)I(t) -bE(t) + \int \limits _0^t \beta S(u)I(u) e^{-b(t-u)}P'(t-u)du ,\\ \dot{R}&=\gamma I(t) -bR(t) + \int \limits _0^t \gamma I(u) e^{-b(t-u)}Q'(t-u)du , \end{aligned} \end{aligned}$$
(3)

where the integral is a Stieltjes integral. Obviously, both integral terms in Eq. (3) are negative due to the nonincreasing properties of \(P(t)\) or \(Q(t)\). Using the negative integral term in \(\dot{E}\) or \(\dot{R}\) in Eq. (3) as the inflow to the \(I\) or \(S\) class, the SEIRS model can be formulated as the integro-differential system,

$$\begin{aligned} \begin{aligned} \dot{S}&= b - \beta S(t)I(t) - b S(t) - \int \limits _0^t \gamma I(u) e^{-b(t-u)} Q'(t-u)du , \\ \dot{E}&=\beta S(t)I(t) -bE(t) + \int \limits _0^t \beta S(u)I(u) e^{-b(t-u)}P'(t-u)du ,\\ \dot{I}&= -\int \limits _0^t \beta S(u)I(u) e^{-b(t-u)}P'(t-u)du - b I(t) - \gamma I(t),\\ \dot{R}&=\gamma I(t) -bR(t) + \int \limits _0^t \gamma I(u) e^{-b(t-u)}Q'(t-u)du . \end{aligned} \end{aligned}$$
(4)

It is easy to see that \(S(t)+E(t)+I(t)+R(t)=1\), implying that the population is demographically closed and all changes are due to the infection mechanism.

Letting \(t-s=u\) in the integral terms, we can rewrite system (4) as

$$\begin{aligned} \begin{aligned} \dot{S}&= b - \beta S(t)I(t) - b S(t) - \int \limits _0^t \gamma I(t-s) e^{-bs} d Q(s) , \\ \dot{E}&=\beta S(t)I(t) -bE(t) + \int \limits _0^t \beta S(t-s)I(t-s) e^{-bs}d P(s) ,\\ \dot{I}&= -\int \limits _0^t \beta S(t-s)I(t-s) e^{-bs}d P(s) - b I(t) - \gamma I(t), \\ \dot{R}&=\gamma I(t) -bR(t) + \int \limits _0^t \gamma I(t-s) e^{-bs}d Q(s) . \end{aligned} \end{aligned}$$
(5)

Noticing that the equations for \(\dot{S}\) and \(\dot{I}\) in (5) are decoupled from the equations for \(\dot{E}\) and \(\dot{R}\), so we can consider the coupled equations \(\dot{S}\) and \(\dot{I}\) first,

$$\begin{aligned} \begin{aligned} \dot{S}&= b - \beta S(t)I(t) - b S(t) - \int \limits _0^t \gamma I(t-s) e^{-bs} d Q (s) ,\\ \dot{I}&= -\int \limits _0^t \beta S(t-s)I(t-s) e^{-bs}d P(s) - b I(t) - \gamma I(t). \end{aligned} \end{aligned}$$
(6)

Denoting \(D_1=\{(S,I) \in R^2: S, \ I \ge 0, \ S+I \le 1\}\) as a desired invariant region in the \((S,I)\) plane, we have

Lemma 1

Let \((S(0), I(0))\in D_1\) satisfy \(S(0)+I(0)=1\), then System (6) has a unique solution with \((S(t), I(t)) \in D_1\) and \(S(t), I(t) \ge 0\) for all \(t\ge 0\).

Proof

The existence, uniqueness and continuity of the solution of Eq. (6) can be obtained from Miller (1971).

When \(I(0)=0\) and \(S(0)=1\), it is obvious from the initial condition \(S(0)+I(0)=1\) that \(S(t)=1, I(t)=0\) for all \(t>0\).

When \(I(0)>0\), then \(I(t), S(t) \ge 0\) for \(t >0\). If not, there exists a finite time \(t_0>0\) such that \(I(t), S(t) \ge 0\) for \(t\in [0,t_0]\) and either

$$\begin{aligned} (i)&I(t_0)=0, \ I'(t_0)\le 0 \qquad \mathrm{or}\\ (ii)&S(t_0)=0, \ S'(t_0)\le 0. \end{aligned}$$

If \((i)\) holds, from \(I'(t) \ge -(b+\gamma ) I(t) \) for \(t\in [0,t_0]\), we have

$$\begin{aligned} I(t_0) \ge I(0) e^{-(b+\gamma )t_0} > 0 \end{aligned}$$

which contradicts the above condition \((i)\); if \((ii)\) holds, then since \(I(t)\ge 0\) for \(t\in [0,t_0]\), \( S'(t_0) = b- \int _0^t \gamma I(t-s) e^{-bs} d Q(s)>0\) contradicts \(S'(t_0) \le 0\). Therefore, \(I(t)\ge 0\) and \(S(t) \ge 0\) for all \(t>0\) in \(D_1\), i.e., \(D_1\) is positively invariant.

More specifically, if \((S(0), I(0)) \in D_1\) and \(I(0)>0\), then \(I(t) >0\) and \(S(t)>0\) for all finite \(t>0\); if \(I(0)=0\), then \(S(t)=1, I(t)=0\) for all \(t \ge 0\).\(\square \)

The result in Lemma 1 and Eq. (2) imply \(E(t)\ge 0\) and \(R(t)\ge 0\) for all \(t \ge 0\).

Let \(C=C (( -\infty ,0],\mathbb R ^4)\) be the continuous functions with the norm \(||\phi ||=\max _{\theta \in (-\infty ,0]} |\phi |\) for \(\phi \in C\). For any given continuous function \(v=(v_1,v_2,v_3,v_4): (-\infty ,0] \longrightarrow \mathbb R ^4\), denote \(v_t=(v_1(t+\cdot ),v_2(t+\cdot ),v_3(t+\cdot ),v_4(t+\cdot ))\in C \) for all \(t \in [0,\alpha )\) with \(\alpha >0\), and \(C_+=C( (-\infty ,0],\mathbb R _+^4)\).

We define \(F(t,\phi )=\left( \!\begin{array}{c} b-\beta \phi _1(0)\phi _3(0)-b \phi _1(0)-\displaystyle \int \limits _0^t \gamma \phi _3(-s)e^{-bs} d Q(s) \\ \beta \phi _1(0)\phi _3(0)-b \phi _2(0)+ \displaystyle \int \limits _0^t \beta \phi _1(-s)\phi _3(-s)e^{-bs} d P(s) \\ - \displaystyle \int \limits _0^t \beta \phi _1(-s)\phi _3(-s)e^{-bs} d P(s) -(b+\gamma )\phi _3(0) \\ \gamma \phi _3(0)-b \phi _4(0) + \displaystyle \int \limits _0^t \gamma \phi _3(-s)e^{-bs} d Q(s) \end{array}\!\right) \) for any \(\phi \in C_+\). Obviously, system (5) can be simply written as

$$\begin{aligned} v'(t)=F(t,v_t), \end{aligned}$$
(7)

which is a non-autonomous delayed system with delay relating to the time by \(\tau (t)=t\). This is a very challengeable research topic and there is few result in the literature, especially for the general forms of \(P\) and \(Q\). First of all, we can obtain the positivity result following the standard theorems in Miller (1971), Smith (1995), Zhao (2003),

Theorem 2

For any \(\phi \in C_+\), system (7) (or (5)) has a unique nonnegative solution \(v(t,\phi )\) in

$$\begin{aligned} D_2=\{(S,E,I,R)\in R^4_+: 0 \le S+E+I+R \le 1\}, \end{aligned}$$
(8)

with \(v_0=\phi \) and \(v_t(\phi ) \in C_+\) for all \( t \ge 0\).

We then consider the limiting system of (7) when \(t \longrightarrow \infty \), which is

$$\begin{aligned} \begin{aligned} \dot{w_1}&= b - \beta w_1(t) w_3(t) - b w_1(t) - \int \limits _0^{\infty } \gamma v_3(t-s) e^{-bs} d Q(s) , \\ \dot{w_2}&=\beta w_1(t)w_3(t) -bw_2(t) + \int \limits _0^{\infty } \beta w_1(t-s) w_3(t-s) e^{-bs}d P(s) ,\\ \dot{w_3}&= -\int \limits _0^{\infty } \beta w_1(t-s)w_3(t-s) e^{-bs}d P(s) - b w_3(t) - \gamma w_3(t), \\ \dot{w_4}&=\gamma w_3(t) -b w_4(t) + \int \limits _0^{\infty } \gamma w_3(t-s) e^{-bs}d Q(s) . \end{aligned} \end{aligned}$$
(9)

From the result in Mischaikow et al. (1995), we know that, the non-autonomous solution semi-flow of (7) is asymptotic to the autonomous solution semi-flow of (9) on \(C_+\).

Denote \(\hat{P} = \int _0^\infty e^{-bs}P(s)ds\) as the average time that an individual remains in the exposed class before leaving it (by either becoming infectious or dying). It is obvious that \( \hat{P} < \int _0^\infty e^{-bs} ds = \frac{1}{b}\). Let \(P^*=-\int _0^\infty e^{-b s} d P(s), \) we have \(P^* = 1 - b \hat{P} \in (0,1)\,\) which represents the fraction of the population surviving in the exposed stage. Similarly, \(\hat{Q} = \int _0^\infty e^{-bs}Q(s)ds < \frac{1}{b}\) denotes the average time that an individual remains in the removed class before losing temporary immunity, and \(Q^*=- \int _0^\infty e^{-b s} d Q(s) = 1 - b \hat{Q} \in (0,1)\,\) describes the fraction having temporary immunity or recovery.

The steady states of (9) should therefore satisfy

$$\begin{aligned} \begin{aligned} b-\beta w_1 w_3 -bw_1 + \gamma w_3 Q^*&=0, \\ \beta w_1 w_3 - b w_2 - \beta w_1 w_3 P^*&= 0, \\ \beta P^* w_1 w_3 -(b+\gamma )w_3&=0, \\ \gamma w_3 - b w_4- \gamma Q^* w_3&= 0. \end{aligned} \end{aligned}$$
(10)

Let \(R_0=\frac{\beta P^*}{b+\gamma }=\frac{\beta (1-b\hat{P})}{b+\gamma }\) be the average number of effective contacts of an infective during the infectious period, which is the basic reproduction number. We can show, from (10), that there is a disease-free equilibrium (DFE) \(EP^0=(1,0,0,0)\) which is the only equilibrium when \(R_0<1\), whereas when \(R_0>1\), there is an additional, unique endemic equilibrium (EE) point \(EP^*=(w_1^*,w_2^*,w_3^*,w_4^*)\) which is given in terms of the basic reproduction number \(R_0\), as

$$\begin{aligned} \begin{aligned} w_1^*&=\displaystyle \frac{b+\gamma }{\beta P^*} =\displaystyle \frac{1}{R_0},\\ w_2^*&=\displaystyle \frac{(R_0-1)[\beta -(b+\gamma )R_0]}{R_0(\beta -\gamma R_0 Q^*)}, \\ w_3^*&=\displaystyle \frac{b(1-w_1^*)}{\beta w_1^*-\gamma Q^*}=\displaystyle \frac{b(R_0-1)}{\beta -\gamma R_0Q^*}, \\ w_4^*&=\displaystyle \frac{\gamma w_3^* (1-Q^*)}{b}=\displaystyle \frac{\gamma (1-Q^*)(R_0-1)}{\beta -\gamma R_0 Q^*}. \end{aligned} \end{aligned}$$
(11)

It is easy to verify that \(\beta -\gamma R_0Q^*>0\) always holds since \(0<P^*, Q^*<1\).

The stability of the disease-free equilibrium \(EP^0\) is described in the following result.

Theorem 3

  1. (i)

    \((1,0,0,0)\) is globally asymptotically stable in (9) if \(R_0<1\) and unstable if \(R_0>1\).

  2. (ii)

    When \(R_0 <1\), all the solutions in (7), denoted by \(v(t)=(v_1(t),v_2(t),v_3(t), v_4(t))\), converge to \((1,0,0,0)\) as \(t \longrightarrow \infty \).

Proof

At first, we consider the decoupled equations \(\dot{w_1}\) and \(\dot{w_3}\) from (9).

$$\begin{aligned} \begin{aligned} \dot{w_1}&= b - \beta w_1(t) w_3(t) - b w_1(t) - \int \limits _0^{\infty } \gamma v_3(t-s) e^{-bs} d Q(s) , \\ \dot{w_3}&= -\int \limits _0^{\infty } \beta w_1(t-s)w_3(t-s) e^{-bs}d P(s) - b w_3(t) - \gamma w_3(t). \end{aligned} \end{aligned}$$
(12)

At the trivial equilibrium point \(E=(1,0)\) in (12), the corresponding characteristic equation is

$$\begin{aligned} \Delta _0(\lambda )=(\lambda +b)(\lambda +b+\gamma +A(\lambda ))=0, \end{aligned}$$

where \(A(\lambda )= \beta \int _0^{\infty } e^{-(b+\lambda )s} d P(s). \) Since \(\lambda =-b<0\), it suffices to consider \(h_0(\lambda )=\lambda +b+\gamma +A(\lambda )=0\). From

$$\begin{aligned} h_0(0)=b+\gamma +\beta \displaystyle \int \limits _0^{\infty } e^{-bs} d P(s)=b+\gamma -\beta P^* =(b+\gamma )(1-R_0), \end{aligned}$$

we see that if \(R_0<1\), then \(h_0(0) >0\), implying \(\lambda =0\) is not a root of the characteristic equation.

Assume now that \(\lambda =\mu +iv\) does satisfy \(h_0(\lambda )=0\) with \(\mu \ge 0\). From

$$\begin{aligned} |\lambda +b+\gamma | = |-A_2(\lambda )| \le \beta P^*, \end{aligned}$$

we have

$$\begin{aligned} (\mu +b+\gamma )^2 +v^2 \le \beta ^2 {P^*}^2 \le (b+\gamma )^2 \end{aligned}$$
(13)

since \(R_0=\frac{\beta P^*}{b+\gamma } <1\). Obviously, Eq. (13) cannot hold for \(\mu \ge 0\). Therefore when \(R_0<1\), \(E=(1,0)\) is locally asymptotically stable in (12).

When \(R_0>1\), \(h_0(0)<0\). Since \(\lim _{\lambda \rightarrow +\infty } h_0(\lambda ) = +\infty \), there exists a positive \(\bar{\lambda } >0\), such that \(h_0(\bar{\lambda }) =0\) due to the continuity of \(h_0(\lambda )\) with respect to \(\lambda \). Therefore \(E=(1,0)\) is unstable in system (12).

Consequently, the local stability and unstability of \((1,0,0,0)\) in (9) with respect to \(R_0<1\) and \(R_0>1\) follow.

Furthermore, we can prove the global attractivity of \((1,0,0,0)\) in (9) when \(R_0<1\). Indeed, define \(X^\infty =\lim _{t \rightarrow \infty } \sup X(t)\). From Lemma 1, we know that \(w_1(t), w_3(t) \in [0,1]\), so \(w_1^\infty , w_3^\infty \) (defined similarly as \(X^\infty \)) \(\in [0,1]\). There thus exists a sequence \(t_n \rightarrow \infty \) such that \(w_3(t_n) \rightarrow w_3^\infty \) and \(w_3'(t_n) \rightarrow 0\) as \(n \rightarrow \infty \). From

$$\begin{aligned} w_3'(t)&= - \int \limits _0^{\infty } \beta w_1(t-s)w_3(t-s)e^{-bs}d P(s) -(b+\gamma )w_3(t), \end{aligned}$$

it follows that

$$\begin{aligned} (b+\gamma )w_3^\infty \le sup\left( -\int \limits _0^{\infty } \beta w_1(t_n-s)w_3(t_n-s)e^{-bs}d P(s) \right) \le \beta w_1^\infty w_3^\infty P^*. \end{aligned}$$

If \(w_3^\infty >0\), then \(w_1^\infty \ge \frac{b+\gamma }{\beta P^*} = \frac{1}{R_0} >1\), giving a contradiction. Hence \(w_3^\infty =0\) and \(w_1^\infty =1\). From Eqs. (2) and (9), we have \(w_2^\infty =\beta w_1^\infty w_3^\infty \hat{P}=0\) and \(w_4^\infty =\gamma w_3^\infty \hat{Q}=0\). Therefore, \(w_2(t), w_3(t), w_4(t) \rightarrow 0\) and \( w_1(t) \rightarrow 1 \) as \(t \rightarrow \infty \), indicating that the disease-free equilibrium point \((1,0,0,0)\) is globally asymptotically stable if \(R_0<1\). This completes the proof in (i).

Now we define \(M=C(( -\infty ,0],\mathbb R _+^2)\) and

$$\begin{aligned} \omega =\{(\psi _1,\psi _3) \in M: \lim _{n \longrightarrow \infty }(v_1(t+\cdot ),v_3(t+\cdot ))=(\psi _1,\psi _3) \text { for some} \ t_n \longrightarrow \infty \}. \end{aligned}$$

In view of Theorem 2, it is easy to see that \(\omega \) is a nonempty and compact subset of \(M\) and the solutions in (12) are uniformly bounded and ultimately bounded in \(M\). By the continuous-time version of Zhao (2003)(Lemma 1.2.2), it follows that \(\omega \) is an internally chain transitive set for the solution semi-flow of (12) on the positively invariant set \(M\).

When \(R_0 <1\), from the above analysis, we have \(W^s(E)=M\), where \(W^s(E)\) is the stable set of \(E=(1,0)\) for the solution semi-flow of (12), and hence \(\omega \cap W^s(E) \ne \emptyset \). Therefore \(\omega =E\) follows from Zhao (2003) (Theorem 1.2.1). Consequently,

$$\begin{aligned} \lim _{t \longrightarrow \infty } v_2(t)=0, \qquad \lim _{t \longrightarrow \infty } v_4(t)=0. \end{aligned}$$

Hence, all the solutions in (7) are convergent to \((1,0,0,0)\) as \(t \longrightarrow \infty \). This is the conclusion in (ii).\(\square \)

The results in Theorem 3 show that there is a sharp threshold associated with \(R_0\). When \(R_0 <1\), the disease disappears as time advances, and when \(R_0>1\), the disease becomes endemic. Although we cannot provide rigorous proof about the persistence of the disease in the general model (5) or (7), due to the time-dependent delay, the threshold value of the basic reproduction number \(R_0\) is an important index relating to the epidemic potential of an infectious disease, which is a key epidemiological quantity in determining whether or not an infectious disease can spread through a population. The value of \(R_0\) is directly proportional to \(P^*\), the fraction of individuals surviving the latent period. From \(P^*=1-b \hat{P}\), \(\hat{P}\) is the mean sojourn time (death-adjusted) in the exposed stage, we understand that longer mean sojourn time \(\hat{P}\) will reduce the magnitude of disease transmission. In other words, if the latency period is long many infected people will die before they would have become infectious, so this should reduce \(R_0\). On the other hand, \(R_0\) is independent of the probability distribution in the temporary recovery period, implying that changes in the distribution of the immunity period do not give rise to a disease outbreak, but influence the strength of the infectious class. In other words, since initially only few will be infectious or recovered, it doesn’t matter if they return quickly to the susceptible state or not.

Although we already know the existence of the endemic equilibrium \(EP^*\) in (9) when \(R_0>1\), the dynamics of the original non-autonomous system (5) and the limiting system (9) at the unique \(EP^*\) cannot be readily determined due to the complexity of the non-autonomous system with arbitrary probability functions \(P\) and \(Q\). In the following section, we focus on the situation when \(R_0>1\), and present some dynamical analysis for special probability distributions in the two different stages.

3 The model with particular probability distributions

The general probabilities \(P(s)\) and \(Q(s)\) in (5) relate to the rate of removal from the latent or immune class at stage age \(s\) by natural progression of the disease. It should be mentioned that, some particular forms of probability functions, such as the weak kernel function \(k_1(s)\) and the uniform distribution \(k_2(s)\), satisfy the assumption (\(H\)), where

$$\begin{aligned} k_1(s)=e^{-\omega s} \ (\omega >0), \qquad k_2(s)=\left\{ \begin{array}{l@{\quad }l} 1 &{} s\in [0,l] \\ 0 &{} s \ge l \end{array}\right. \!\!. \end{aligned}$$
(14)

We will show that, with such \(k_i, (i=1,2)\), the general system (5) becomes a system of ordinary differential equations (ODEs) (with \(k_1\)) or delay differential equations (DDEs) (with \(k_2\)). In fact, depending on the probability density in the process, for example, in Blyuss and Kyrychko (2010), the authors choose the probability function \(g(\xi )\) of taking time \(\xi \) to lose acquired immunity with \(\int _0^{\infty }g(s)ds=1\) and \(g\ge 0\), so that the probability of still having immunity \(s\) time units after acquiring it is \(1-\int _0^s g(\xi )d\xi \) which corresponds to \(Q(s)\) in (5) satisfying \(Q'(s)=-g(s)\). In this way, if \(g(s)\) is taken as the general \(\gamma \)-distribution, we have the related distribution \(Q(s)\). e.g., if \(g(s)\) is the strong kernel, \(g(s)=\omega ^2 s e^{-\omega s}\), then \(Q(s)=(\omega s+1)e^{-\omega s}\). With such \(Q(s)\), \(R(t)\) in Eq. (2) becomes

$$\begin{aligned} R(t)=\displaystyle \int \limits _0^t \gamma I(u)e^{-(b+\omega )(t-u)}[\omega (t-u)+1] du, \end{aligned}$$

then

$$\begin{aligned} R'(t)=\gamma I(t) -(b+\omega ) R(t)+ \displaystyle \int \limits _0^t \gamma \omega I(u) e^{-(b+\omega )(t-u)}du \end{aligned}$$

is a non-autonomous equation. Note that the strong kernel function \(g(s)\) does not satisfy the condition \((H)\). Similarly, if we take the probability function as a modified uniform distribution \(P(t)={\left\{ \begin{array}{ll} 1-m t, &{} t \in [0,\tau ] \\ 0 &{} t > \tau \end{array} \right. }\) (\(\tau =\frac{1}{m}\)) in Bhattacharya and Adler (2012) (or more generally \(P(t)={\left\{ \begin{array}{ll} 1-m_1 t, &{} t \in [0,\tau ] \\ 1-m_2 t &{} t > \tau \end{array} \right. }\)), then when \(t <\tau \), \(E'(t)=\beta S(t)I(t)-b E(t)- \int _0^t m \beta e^{-b(t-u)} S(u)I(u) du\); whileas when \(t > \tau \),

$$\begin{aligned} E'(t)=\beta S(t)I(t)- b E(t) -\displaystyle \int \limits _{t-\tau }^t m \beta e^{-b(t-u)} S(u)I(u) du \end{aligned}$$

is not an autonomous system either.

Therefore, in this section, we study the qualitative properties of the SEIRS model (5) when \(R_0>1\), in four cases where the latent and immune periods are characterized by particular and commonly used probability distributions \(k_i(t), (i=1,2)\) given in (14).

Case (i): \(P(t)=e^{-\omega _1 t}, \ Q(t)=e^{-\omega _2 t}\)

With both exponential distributions, \(E(t)=\int _0^t \beta S(u)I(u) e^{-(b+\omega _1)(t-u)} du,\) and thus \(E'(t)=\beta S(t)I(t) -(b+\omega _1)E(t)\). Similarly, \(R'(t)=\gamma I(t) -(b+\omega _2)R(t)\). Hence, system (5) becomes a system of ODEs

$$\begin{aligned} \begin{aligned} \dot{S}&= b - \beta S(t)I(t) - b S(t) + \omega _2 R(t), \\ \dot{E}&=\beta S(t)I(t) - (b+\omega _1) E(t), \\ \dot{I}&= \omega _1 E(t) - (b + \gamma ) I(t), \\ \dot{R}&=\gamma I(t) -(b+\omega _2)R(t), \end{aligned} \end{aligned}$$
(15)

with

$$\begin{aligned} \hat{P}= \displaystyle \frac{1}{b+\omega _1},\ P^*= \displaystyle \frac{\omega _1}{b+\omega _1}; \qquad \hat{Q}=\displaystyle \frac{1}{b+\omega _2}, \ Q^*=\displaystyle \frac{\omega _2}{b+\omega _2}. \end{aligned}$$

The basic reproduction number \(R_0\) becomes \(R_0=\frac{\beta \omega _1}{(b+\gamma )(b+\omega _1)}\), where \(\frac{\omega _1}{\omega _1+b}\) corresponds to the fraction of individuals surviving in the latent class.

System (15) is a special case studied in Hethcote and Driessche (1991), Li et al. (1999) with linear incidence. We summerize the stability result in the following.

Theorem 4

When \(R_0>1\), the system (15) is uniformly persistent in the sense that, there exists a constant \(0 < \epsilon _0<1\) such that \(\lim _{t \rightarrow \infty } S(t) (E(t), I(t), R(t)) > \epsilon _0\). Moreover, the endemic equilibrium point \(EP^*\) is always locally asymptotically stable, and under either of the conditions, i) \(\gamma \omega _2<\epsilon _0(\beta \epsilon _0+\gamma +b)(\beta \epsilon _0+\omega _2+b)\) or ii) \(\omega _1 - \gamma -b<\omega _2\), it is also globally asymptotically stable in \(D_2\setminus \{(1,0,0,0)\}\), where \(D_2\) is given in (8).

Theorem 4 implies that, in the SEIRS model without time delay, when the basic reproduction number \(R_0>1\), the disease is not only uniformly persistent, but also convergent to a constant when the average immunity period is sufficiently small or sufficiently large. In such circumstances, oscillations cannot occur in the system, and outbreak of the disease is possible if there is no intervening treatment such as vaccination.

Case (ii): \(P(t)=e^{-\omega t}, \ Q(t)= \left\{ \begin{array}{ll} 1 &{} \ t\in [0,\tau ] \\ 0 &{} \ t > \tau \end{array}\right. \)

With an average latency time of \(\frac{1}{\omega }\) and a constant period \(\tau \) of temporary immunity, we have

$$\begin{aligned} E(t)=\int \limits _0^t \beta S(u)I(u) e^{-(b+\omega )(t-u)} du. \end{aligned}$$

When \(t \in [0,\tau ]\),

$$\begin{aligned} R(t)=\int \limits _0^t \gamma I(u) e^{-b(t-u)} Q(t-u) du = \int \limits _0^t \gamma I(u) e^{-b(t-u)} du, \end{aligned}$$

and if \(t > \tau \), \( R(t) = \int _{t-\tau }^t \gamma I(u) e^{-b(t-u)} du.\)

We therefore obtain the following systems: when \(0 \le t<\tau \),

$$\begin{aligned} \begin{aligned} \dot{S}&= b - \beta S(t)I(t) - b S(t), \\ \dot{E}&=\beta S(t)I(t) -(b+\omega ) E(t),\\ \dot{I}&= \omega E(t) - (b + \gamma ) I(t), \\ \dot{R}&=\gamma I(t) -b R(t)\,; \end{aligned} \end{aligned}$$
(16)

and when \(t>\tau \),

$$\begin{aligned} \begin{aligned} \dot{S}&= b - \beta S(t)I(t) - b S(t) + \gamma e^{-b \tau } I(t-\tau ),\\ \dot{E}&=\beta S(t)I(t) -(b+\omega ) E(t),\\ \dot{I}&= \omega E(t) - (b + \gamma ) I(t), \\ \dot{R}&=\gamma I(t) - \gamma e^{-b \tau } I(t-\tau ) -b R(t). \end{aligned} \end{aligned}$$
(17)

the latter being a system of DDEs with a constant delay \(\tau \). From the biological interpretation, the delay is assumed to be finite. Once the initial condition (I.C.) in (16) is given, the I.C. needed for (17) is indeed given by the solution of (16) for \(t \in [0,\tau ]\). The basic reproduction number \(R_0=\frac{\beta \omega }{(b+\gamma )(b+\omega )}\) is identical to that in Case (i), which is independent of the temporary immunity period \(\tau \).

The existence of the endemic equilibrium \(EP^*\) in System (17) is consistent with that in (9) with the components shown in (11). Adapting ideas from Lou and Zhao (2011), Wang and Zhao (2006), we can study the persistence of the disease when \(R_0>1\). We only need to consider the decoupled equations ,

$$\begin{aligned} \begin{aligned} \dot{E}&=\beta (1-E(t)-I(t)-R(t))I(t) -(b+\omega ) E(t), \\ \dot{I}&= \omega E(t) - (b + \gamma ) I(t), \\ \dot{R}&=\gamma I(t) - \gamma e^{-b \tau } I(t-\tau ) -b R(t), \end{aligned} \end{aligned}$$
(18)

from (17) and \(S(t)=1-E(t)-I(t)-R(t)\). Let

$$\begin{aligned} D_3&= \{(E,I,R)\in \mathbb R ^3_+: 0 \le E+I+R \le 1\}, \\ X&= \{ \phi =(\phi _1, \phi _2, \phi _3) \in C([-\tau , 0], D_3)\} \end{aligned}$$

and the solution semi-flow \(\Phi (t)\phi = u_t(\phi ), \phi \in X, t \ge 0\). From the result in Theorem 2, we know that every solution \((E(t,\phi ), I(t,\phi ), R(t,\phi ))\) with \(\phi \in X\) eventually enters into \(X\). Thus the solution semi-flow is point dissipative on \(X\) and \(\Phi (t): X \rightarrow X\) is compact for each \(t > \tau \). From (Hale 1988, Theorem 3.4.8), \(\Phi (t)\) admits a global attractor which attracts every bounded set in \(X\).

The following result shows that the disease is persistent if \(R_0>1\).

Theorem 5

When \(R_0>1\), the disease is uniformly persistent in the sense that there is a positive number \(\eta \) such that every solution \((E(t), I(t), R(t))\) in System (18) with \(R(0) \ge 0\) and \(E(0)>0,I(0)>0\) satisfies \(\lim _{t \rightarrow \infty } \inf E(t) \ge \eta \) and \(\lim _{t \rightarrow \infty } \inf I(t) \ge \eta \).

Proof

In order to use persistence theory, we define

$$\begin{aligned} X^1_0&= \{\phi \in X, \phi _1(0)>0,\phi _2(0)>0\}, \\ \partial X^1_0&= X{\setminus } X^1_0=\{\phi \in X, \phi _1(0)=0 \ \mathrm{or} \ \phi _2(0)=0\}, \end{aligned}$$

and

$$\begin{aligned} M^1_{\partial }=\{\phi \in \partial X^1_0: \Phi (t) \phi \in \partial X^1_0, t \ge 0\}. \end{aligned}$$

Let \(\omega (\phi )\) be the omega limit set of the orbit \(\gamma ^+(\phi )=\{\Phi (t)\phi : \forall t \ge 0\}\), and set \(M^1=(0,0,0)\). ?‘From (18), we have, \(E'(t) \ge - (b+\omega ) E(t)\) and \(I'(t) \ge - (b+\gamma ) I(t)\). For any given \(\phi \in X^1_0\), it is obvious that \(E(t) \ge \phi _1(0) e^{-(b+\omega )t }>0\) and \(I(t) \ge \phi _2(0) e^{-(b+\gamma ) t} >0\), that is, \(\Phi (t) X^1_0 \subset X^1_0\). For any given \(\psi \in M^1_{\partial }\), we have \(\Phi (t) \psi \in \partial X^1_0\) for \(t \ge 0\), that is, for each \(t>0\), \(E(t, \psi ) \equiv 0\) or \(I(t, \psi ) \equiv 0\). If \(E(t, \psi )\equiv 0\), then in view of the equations \(\dot{I},\dot{R}\) in System (18), \(\lim _{t \rightarrow \infty } I(t, \psi )=0,\lim _{t \rightarrow \infty } R(t, \psi )=0\) follow. In the case of \(I(t, \psi )\equiv 0\), then from the equations \(\dot{E},\dot{R}\), \(\lim _{t \rightarrow \infty } E(t, \psi )=0, \lim _{t \rightarrow \infty } R(t, \psi )=0\). Therefore \(\omega (\psi )=\{M^1\}\) for \(\psi \in M^1_{\partial }\).

Further, we have the following claim:

Claim \(\lim _{t \rightarrow \infty } ||\Phi (t)(\phi ) -M^1|| \ge \epsilon \) for all \(\phi \in X^1_0\).

By contradiction, suppose that \(\lim _{t \rightarrow \infty } ||\Phi (t)(\phi ) -M^1|| < \epsilon \) for some \(\phi _0 \in X^1_0\). Then there exists \(t_0>0\) such that \(E(t, \phi _0) < \epsilon /3, I(t, \phi _0) < \epsilon /3\), \(R(t, \phi _0) < \epsilon /3\) and \(S(t,\phi _0)>1-\epsilon \) for \(t > \tau +t_0\).

Now from the linearization of (18) at \((0,0,0)\), we consider

$$\begin{aligned} \begin{aligned} \dot{E}&=\beta I(t) - (b+\omega )E(t), \\ \dot{I}&=\omega E(t)-(b+\gamma )I(t). \end{aligned} \end{aligned}$$
(19)

It is easy to check that, if \(R_0>1\), the principle eigenvalue \(\lambda _1>0\) in (19), and the corresponding eigenfunction is positive. Due to the continuity of \(\lambda \), there exists a sufficiently small positive number \(\epsilon \) such that \(\lambda _1(\epsilon )>0\).

If \(\phi _1(0)>0, \phi _2(0)>0\), in view of the equations for \(\dot{E},\dot{I}\) in System (18), we have

$$\begin{aligned} \dot{E}&\ge \beta (1-\epsilon ) I(t) -(b+\omega ) E(t),\\ \dot{I}&= \omega E(t) -(b+\gamma )I(t). \end{aligned}$$

In the following ODEs system

$$\begin{aligned} \dot{u_1}&= \beta (1-\epsilon ) u_2(t) -(b+\omega ) u_1(t),\\ \dot{u_2}&= \omega u_1(t) -(b+\gamma )u_2(t), \end{aligned}$$

there exists a solution \(\mathbf{u}(t)=e^{\lambda _1(\epsilon )t}\phi _0\), where \(\phi _0\) is the positive eigenfunction associated with \(\lambda _1(\epsilon )\), \(\mathbf{u}\) and \(\phi _0\) are vectors with two components.

Since \(E(t,\phi _0) >>0, I(t, \phi _0) >> 0\) for all \(t >0\), the comparison theory implies that there exists a small \(\xi >0\) such that \((E(t,\phi _0),I(t, \phi _0))^T \ge \xi e^{\lambda _1(\epsilon )t}\phi _0\) for all \(t \ge t_0\). Thus \(\lim _{t \rightarrow \infty } (E(t,\phi _0),I(t, \phi _0) )^T= \infty \) because of \(\lambda _1>0\), which is a contradiction. Thus the claim holds.

Define a continuous function \(p: X \rightarrow R_+\) by \(p(\phi )=\min \{\phi _1(0),\phi _2(0)\}\) for any \(\phi \in X\). It is clear that \(p^{-1}(0, \infty ) \subset X^1_0\) and if \(p(\phi )>0\) then \(p(\Phi (t)\phi )>0\) for all \(t >0\). Note that any forward orbit of \(\Phi (t)\) in \(M^1_{\partial }\) converges to \(M^1\). The above claim indicates that \(M^1\) is isolated in \(X\) and \(W^s(M^1) \bigcap X^1_0 = \emptyset \), here \(W^s(M^1)\) is the stable set of \(M^1\). Moreover, there is no cycle in \(M^1_{\partial }\) from \(M^1\) to \(M^1\). Thus from the result in Smith and Zhao (2001), we know that, in the case of \(\phi _1(0) <\phi _2(0)\), there exists an \(\eta _1>0\) such that \(\min \{p(\psi ): \psi \in \omega (\phi )\} > \eta _1\) for any \(\phi \in X^1_0\), and so \(\lim _{t \rightarrow \infty } E(t,\phi )=\lim _{t \rightarrow \infty }\inf p(\Phi (t)\phi ) \ge \eta _1\). Consequently, by solving the equation \(\dot{I}\) in (18) using the variation-of-constant method, we can obtain \(\lim _{t \rightarrow \infty } I(t,\phi )\ge \eta _2\) for any \(\phi \in X^1_0\) and some \(\eta _2>0\). Whileas if \(\phi _1(0)>\phi _2(0)\), we have similar result with \(\lim _{t \rightarrow \infty } I(t,\phi )=\lim _{t \rightarrow \infty }\inf p(\Phi (t)\phi ) \ge \eta _1\) and \(\lim _{t \rightarrow \infty } E(t,\phi )\ge \eta _2\) as well. Letting \(\eta =\min \{\eta _1,\eta _2\}\) finishes the proof.\(\square \)

To examine the local stability at \(EP^*\), we can consider only the first three coupled equations in the system. The corresponding characteristic equation is

$$\begin{aligned} \Delta _2(\lambda )=\lambda ^3 +a_{21} \lambda ^2 + a_{22} \lambda +a_0 - \beta \gamma w_3^* \omega e^{-(\lambda +b)\tau } =0 \end{aligned}$$

with

$$\begin{aligned} a_{21} \!=\! \beta w_3^* \!+\! 3 b \!+\! \omega \!+\! \gamma , \quad a_{22}\!=\! (b\!+\!\beta w_3^*)(2b\!+\!\gamma \!+\!\omega ), \quad a_0 \!=\! \beta w_3^* (b\!+\!\omega )(b\!+\!\gamma ). \end{aligned}$$

Since

$$\begin{aligned} \Delta _2(0)=a_0 - \beta \gamma w_3^* \omega e^{-b \tau }=\beta w_3^*[\omega \gamma (1-e^{-b \tau }) + b(\omega +\gamma +b)]>0, \end{aligned}$$

\(\lambda =0\) is not a root of \(\Delta _2(\lambda )=0\).

When \(\tau =0\), we can obtain that \(EP^*\) is locally asymptotically stable by the Routh-Hurwitz criterion since \( a_{21}>0\), \(a_{22}>0\), \(a_0-\beta \gamma \omega w_3^* = b \beta w_3^*(b+\omega +\gamma )>0\) and

$$\begin{aligned}&a_{21} a_{22} -(a_0-\beta \gamma \omega w_3^*) = (\beta w_3^* + 2b +\omega +\gamma )[\beta w_3^* (2b+\omega +\gamma )\\&\quad +b(3b+\omega +\gamma )] >0. \end{aligned}$$

For \(\tau > 0\), if we assume that \(\lambda =i \nu \) is a root of \(\Delta _2(\lambda )=0\), then

$$\begin{aligned} (a_0-a_{21} \nu ^2)^2 + \nu ^2 (a_{22}-\nu ^2)^2 = (\beta \gamma w_3^* \omega )^2 e^{-2b\tau } . \end{aligned}$$

Let \(\mu =\nu ^2\) and define

$$\begin{aligned} h_1(\mu )=\mu ^3 + (a_{21}^2 - 2 a_{22})\mu ^2 +(a_{22}^2 -2 a_0 a_{21})\mu + a_0^2-(\beta \gamma w_3^* \omega )^2 e^{-2b\tau }=0,\nonumber \\ \end{aligned}$$
(20)

where

$$\begin{aligned} a_{21}^2 - 2 a_{22}&= w_3^* \beta (w_3^* \beta + 2 b) + b(5 b+ 4 \omega + 4 \gamma ) +(\omega +\gamma )^2 >0, \\ a_0^2-(\beta \gamma w_3^* \omega )^2 e^{-2b\tau }&= (w_3^* \beta )^2 [\omega ^2 \gamma ^2(1-e^{-2 b \tau }) + b(b+\omega +\gamma )\\&\times \,(b(b+\omega +\gamma )+2\omega \gamma )]>0, \qquad \\ a_{22}^2 -2 a_0 a_{21}&= (w_3^*\beta )^2[\omega ^2 + \gamma ^2 + 2b(b+\omega +\gamma )] + 2 w_3^* \beta \\&\times \, [b^3 -\omega \gamma (3b+\omega +\gamma )] \\&+\, b^2 (2b+\omega +\gamma )^2. \end{aligned}$$

For the distribution of the roots in a third-order polynomial \(P_3(x)=x^3 +l_1 x^2 +l_2 x +l_3=0\), by using basic algebra, one can verify that:

  1. (a)

    if all the coefficients \(l_i, (i=1,2,3)\) are positive, then there is no positive real zero of \(P_3(x)\);

  2. (b)

    if \(l_1>0, l_2<0\) and

    $$\begin{aligned} 0<l_3\le -\bar{x}(\bar{x}^2+l_1 \bar{x}+l_2), \end{aligned}$$
    (21)

    there exists one or two positive real roots of \(P_3(x)=0\), where one root is associated with the equality sign, \(\bar{x}=\frac{\sqrt{l_1^2-3l_2}-l_1}{3}\).

Since the sign of \(a_{22}^2 -2 a_0 a_{21}\) in (20) can be negative, it is possible for \(h_1(\mu )=0\) to have one or two positive real roots, implying that there may exist purely imaginary roots of \(\Delta _2(\lambda )=0\). Therefore, for system (17), there are circumstances under which oscillations or stability switches may take place provided the transversality condition is satisfied.

To discuss possible oscillations or stability switches with respect to the immune period \(\tau \) analytically, we can use methods similar to the ones in Beretta and Kuang (2002), although the present case is much more involved because \(w_3^*=\frac{b(R_0-1)}{\beta -\gamma R_0 e^{-b \tau }}\) depends on \(\tau \). Substituting \(w_3^*\) into \(\Delta _2(\lambda )=0\) and ignoring constant factors, we have

$$\begin{aligned} \tilde{\Delta }_2(\lambda )=P_1(\lambda , \tau )+P_2(\tau ) e^{-\lambda \tau }=0, \end{aligned}$$

where \(P_1(\lambda , \tau )=p_1(\tau ) \lambda ^3+p_2(\tau )\lambda ^2 +p_3(\tau ) \lambda +p_4(\tau )\), the real number \(P_2(\tau )=b \gamma \omega e^{-b \tau } (( b+\gamma )(b+\omega )-\beta \omega )<0\) since \(R_0=\frac{\beta \omega }{(b+\gamma )(b+\omega )}>1\). Here, \(p_i(\tau ), (i=1,\cdots ,4)\) are differentiable functions which we omit for simplicity. Assuming that \(\tilde{\Delta }_2(i \nu )=0, \nu >0\), and letting

$$\begin{aligned} G(\nu , \tau )=|P_1(i \nu , \tau )|^2-P_2^2=(p_4-p_2 \nu ^2)^2+\nu ^2(p_3-p_1 \nu ^2)^2-P_2^2, \end{aligned}$$

we can separate the real and imaginary parts of \(\tilde{\Delta }_2(i\nu )=0\) and obtain

$$\begin{aligned} \tan \nu \tau = \frac{\nu (p_3-\nu ^2 p_1)}{p_2 \nu ^2-p_4}, \end{aligned}$$
(22)

and

$$\begin{aligned} p_1^2 \mu ^3+(p_2^2-2 p_1 p_3) \mu ^2 + (p_3^2-2p_2p_4)\mu +p_4^2-P_2^2=0, \end{aligned}$$
(23)

where \(\nu \) must satisfy \(G(\nu , \tau )=0\) and \(\mu =\nu ^2\).

The positive critical values of \(\tau ^*\) and \(\nu ^*\) could be found from (22) and (23), when all the other parameters are fixed. With an argument similar to that in Beretta and Kuang (2002), we have the following result.

Theorem 6

Assume that \(\nu ^*(\tau ^*)=\sqrt{\mu ^*(\tau ^*)}\), \(\tau ^*\) and \(\nu ^*\) (or \(\mu ^*(\tau ^*)\)) are positive real roots of (22) and (23). Then a pair of simple conjugate pure imaginary roots \(\lambda (\tau ^*)=\pm i\nu ^*(\tau ^*)\) exists which crosses the imaginary axis from left to right if \(\delta (\tau ^*)>0\) and crosses the imaginary axis from right to left if \(\delta (\tau ^*)<0\), where

$$\begin{aligned} \delta (\tau ^*)&= sign \left\{ \frac{\nu ^* G'_{\nu }-\tau ^*G'_{\tau }}{2} + P'_{1I\tau }P'_{1R\nu }-b[\tau ^*(P^2_{1R}+P^2_{1I})\right. \\&\left. +P_{1R}P'_{1I\nu }-P_{1I}P'_{1R\nu }] {}\right\} , \end{aligned}$$

\(P_1(i\nu ^*, \tau ^*)=P_{1R}(i \nu ^*, \tau ^*)+I P_{1I}(i \nu ^*, \tau ^*)\), \(G'_{\nu }(G'_{\tau }, P'_{1R\nu }, P'_{1I\nu })\) is the partial derivative of \(G (P_{1R}, P_{1I})\) at \((\nu ^*,\tau ^*)\).

Remark 1

  1. (i)

    From the discussion of the roots in \(h_1(\mu )=0\), we know that it is possible to have one or more positive roots \(\nu ^*\) and \(\tau ^*\) in Eqs. (22) and (23). When only one positive \(\nu ^*\) exists, stability switches occur only at the corresponding \(\tau ^*\), \(EP^*\) losses its stability and periodic solutions bifurcate via a Hopf bifurcation. If two positive \(\nu ^*_1,\nu ^*_2\) are feasible, then the stability switches may depend on all real roots in \(\tau ^*_i\). For instance, \(EP^*\) may be stable for \(\tau \) in one of a number of finite intervals \((\tau ^*_i, \tau ^*_{i+1})\) and unstable for other values of \(\tau \).

  2. (ii)

    Due to the complexity of the system, the conditions given in this subsection become quite involved, and we seek appropriate conditions for oscillatory behavior by numerical methods.

It is interesting to notice that in both Cases (i) and (ii), with the same latency period, but different immunity period, the endemic equilibrium point has significantly different dynamical properties. With the decreasing exponential probability as the immunity period, \(EP^*\) is at least locally asymptotically stable and oscillations are excluded for small or large average immune time, the disease approaches a stable state and remains present in the population. With the probability distribution taken as a step-function, i.e. individuals remain in the removed class for a fixed period of time \(\tau \), oscillations become possible. This provides an additional example to support the conjecture in Hethcote et al. (1981): a constant-parameter epidemic model can have periodic solutions for some parameter values if and only if the model is cyclic and involves temporary immunity through which individuals can be significantly delayed in the immune class.

The above analysis shows that an immune period may lead to instability of the endemic equilibrium and, via Hopf bifurcation, to periodic oscillations of the disease dynamics. In Taylor and Carr (2009), the authors use asymptotic methods to find conditions for periodic outbreaks in a SIRS model, while in Hethcote et al. (1981), a delay was introduced into an integro-differential SIRS model to induce oscillations. Oscillations are also presented in Genik and Driessche (1999) for an embedded SIRS model.

Case (iii) \(P(t)=\left\{ \begin{array}{ll} 1 &{} \ t\in [0,\tau ] \\ 0 &{} \ t > \tau \end{array}\right. , \ Q(t)=e^{-\omega t}\)

If the latency period is assumed to be a constant \(\tau \), with \(0<t<\tau \),

$$\begin{aligned} E(t)=\int \limits _0^t \beta S(u)I(u) e^{-b(t-u)} du, \ \mathrm{then} \ E'(t)=\beta S(t) I(t) - bE(t)\,; \end{aligned}$$

while for \(t>\tau \), \(E(t) = \int _{t-\tau }^t \beta S(u)I(u) e^{-b(t-u)} du\) yields

$$\begin{aligned} E'(t)= \beta S(t)I(t) - \beta e^{-b \tau } S(t-\tau )I(t-\tau ) - b E(t). \end{aligned}$$

Having the average recovery time \(\frac{1}{\omega }\), \(R'(t)=\gamma I(t) -(b+\omega ) R(t)\) follows from \(R(t)=\int _0^t \gamma I(u) e^{-(b+\omega )(t-u)} du \).

When \(t>\tau \), therefore, we are led to the DDEs system

$$\begin{aligned} \begin{aligned} \dot{S}&= b - \beta S(t)I(t) - b S(t) + \omega R(t), \\ \dot{E}&=\beta S(t)I(t) -\beta e^{-b \tau } S(t-\tau )I(t-\tau ) -b E(t), \\ \dot{I}&= \beta e^{-b \tau } S(t-\tau )I(t-\tau )- (b + \gamma ) I(t), \\ \dot{R}&=\gamma I(t) -(b+\omega ) R(t). \end{aligned} \end{aligned}$$
(24)

For this case, \(P^*=e^{-b \tau }\) and \(Q^*=\frac{\omega }{b+\omega }.\)

The basic reproduction number is \(R_0= \frac{\beta e^{-b \tau }}{b+\gamma }\), where \(e^{-b \tau }\) is the fraction surviving the latent class, indicating that the latency time \(\tau \) will affect the value of \(R_0\). With short latency period, say \(\tau <\hat{\tau }\), where the critical value \(\hat{\tau }\) is,

$$\begin{aligned} \hat{\tau }=\frac{1}{b}\ln \frac{\beta }{b+\gamma }, \end{aligned}$$
(25)

we have \(R_0>1\), hence the endemic equilibrium exists. Similar to Case (ii), we consider the coupled equations related to \(S,I,R\) in System (24),

$$\begin{aligned} \begin{aligned} \dot{S}&= b - \beta S(t)I(t) - b S(t) + \omega R(t), \\ \dot{I}&= \beta e^{-b \tau } S(t-\tau )I(t-\tau )- (b + \gamma ) I(t), \\ \dot{R}&=\gamma I(t) -(b+\omega ) R(t). \end{aligned} \end{aligned}$$
(26)

We obtain the following persistence result.

Theorem 7

When \(R_0>1\), the disease is uniformly persistent in the sense that there is a positive number \(\eta \) such that every solution \((S(t), I(t), R(t))\) in (24) with \(S(0) \ge 0, R(0) \ge \) and \(I(0)>0\) satisfies \(\lim _{t \rightarrow \infty } \inf I(t) \ge \eta \).

Proof

The proof is analogous to that in Theorem 5 by replacing \(X_0^1,\partial X_0^1, M_{\partial }^1,M^1\) with \(X_0^2,\partial X_0^2, M_{\partial }^2,M^2\) and the continuous function \(p(\phi )=\phi _2(0)\), where

$$\begin{aligned} X^2_0=\{\phi \in X, \phi _2(0)>0\}, \qquad \partial X^2_0=X{\setminus } X_0=\{\phi \in X, \phi _2(0)=0\}, \end{aligned}$$

and

$$\begin{aligned} M^2_{\partial }=\{\phi \in \partial X^2_0: \Phi (t) \phi \in \partial X^2_0, t \ge 0\}, \qquad M^2=(1,0,0). \end{aligned}$$

\(\square \)

To discuss the stability at \(E\!P^*\), we know the corresponding characteristic equation in (26),

$$\begin{aligned} \Delta _3(\lambda )=\lambda ^3+a_{31} \lambda ^2 + a_{32} \lambda +a_{33} - (b_2 \lambda ^2 + b_1 \lambda +b_0) e^{-\tau (b+\lambda )} =0 \end{aligned}$$

where

$$\begin{aligned} a_{31}&= \beta w_3^* + 3b+\omega +\gamma , \qquad \qquad \qquad a_{32}= \omega (\beta w_3^* + 2b+\gamma )+\beta w_3^* (2b+\gamma )\\&\qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \quad \quad +\,b(3b+2\gamma ), \\ a_{33}&= (b+\gamma )(b+\omega )(b+\beta w_3^*), \qquad \quad \ b_2 = \beta w_1^*, \\ b_1&= \beta w_1^*(2b+\omega ), \qquad \qquad \qquad \qquad b_0=\beta [b w_1^*(b+\omega )+ w_3^* \gamma \omega ]. \qquad \end{aligned}$$

Since \(\Delta _3(0)=a_{33}-b_0e^{-b\tau }=\beta w_3^*[b(b+\omega +\gamma )+\omega \gamma (1-e^{-b\tau })] >0\), \(\lambda =0\) is not a root of \(\Delta _3(\lambda )=0\).

When \(\tau =0\), \(\Delta _3(\lambda )=\lambda ^3 + (a_{31}-b_2) \lambda ^2 + (a_{32}-b_1) \lambda +a_{33}-b_0=0\) with

$$\begin{aligned} a_{31}-b_2&= 2b+\omega +\beta w_3^* >0, \quad a_{32}-b_1=\beta w_3^*(2b+\gamma +\omega )+b(b+\omega )>0,\\ a_{33}-b_0&= \beta b w_3^* (b+\gamma +\omega )>0, \qquad \mathrm{and} \\&(a_{31}-b_2)(a_{32}-b_1)-(a_{33}-b_0)\\&\quad =(b+\omega +\beta w_3^*) \times \,[\beta w_3^*(2b+\omega +\omega ) + b(2b+\omega )]>0. \end{aligned}$$

Thus \(EP^*\) is locally asymptotically stable when \(\tau =0\) .

When \(\tau > 0\), letting \(\lambda =i \nu \), from \(\Delta _3(i\nu )=0\) we have

$$\begin{aligned} |-i \nu ^3 - a_{31} \nu ^2 + i a_{32} \nu +a_{33}| = |(-b_2 \nu ^2 + i b_1 \nu +b_0) e^{-\tau (b+ i\nu )}|. \end{aligned}$$

Denoting \(\nu ^2=\mu \) yields

$$\begin{aligned} h_2(\mu )&= \mu ^3 \!+ \!(a_{31}^2 \!-\! 2 a_{32} - e^{-2\tau b} b_2^2) \mu ^2 + [a_{32}^2-2a_{33}a_{31}-e^{-2\tau b}(b_1^2-2b_0b_2)]\mu \\&\quad + a_{33}^2-b_0^2e^{-2\tau b}\stackrel{\small \mathrm{{def}}}{=}\mu ^3+c_2 \mu ^2 +c_1 \mu +c_0=0 , \end{aligned}$$

in which, after a direct but tedious computation, we have

$$\begin{aligned} c_2&= (b+\beta w_3^*)^2 + (b+\omega )^2, \\ c_1&= b^2(b+\omega )^2 + 2 \beta w_3^* \gamma \omega (b+\gamma ) e^{-b \tau } + \beta w_3^* (2b+\beta w_3^*)[(b+\omega )^2+(b+\gamma )^2] \\ c_0&= \beta w_3^* \{ \beta w_3^* b(b+\omega +\gamma )(2\gamma \omega +b\gamma +b\omega +b^2) +2 b^3 [\omega ^2+(b+\gamma )^2+2 b \omega ] \\&+\,(\omega \gamma )^2 \beta w_3^* (1- e^{-2 b \tau }) +2b\omega \gamma [ (2-e^{-b \tau }) b (\gamma + \omega )\\&+\,(1-e^{-b \tau }) \gamma \omega +(4-e^{-b \tau })b^2 ]\}. \end{aligned}$$

Obviously, all the coefficients \(c_i (i=0,1,2)\) are positive, so there is no positive root of \(h_2(\mu )=0\), implying that there is no purely imaginary root of \(\Delta _3(\lambda )=0\) when \(\tau > 0\). Therefore, \(EP^*\) is stable and the variation of the time delay \(\tau \) in a feasible region cannot destroy this stability. Moreover, from numerical simulations, we conjecture that \(EP^*\) is globally asymptotically stable with \(R_0>1\).

We can thus see the critical differences between the delays in the latency and the immunity periods. In Cases (i) and (iii), without delay in the temporary immune stage, the endemic equilibrium \(EP^*\) is at least locally asymptotically stable and no oscillations can arise; if there is a delay in the immune period, then oscillations become possible.

Case (iv) \(P(t)=\left\{ \begin{array}{ll} 1 &{} \ t\in [0,\tau _1] \\ 0 &{} \ t > \tau _1 \end{array}\right. , \ Q(t)=\left\{ \begin{array}{ll} 1 &{} \ t\in [0,\tau _2] \\ 0 &{} \ t > \tau _2 \end{array}\right. \)

For the case when two stages have fixed durations, we have \(P^*=e^{-b \tau _1}\) and \(Q^*=e^{-b \tau _2}.\) The basic reproduction number \(R_0=\frac{\beta e^{-b \tau _1}}{b+\gamma }\) is the same as that in Case (iii). Combining the information obtained in Cases (ii) and (iii), we have the following systems with different time intervals. When \(t \le \min \{\tau _1,\tau _2\}\), the system is an ODEs system,

$$\begin{aligned} \dot{S}&= b - \beta S(t)I(t) - b S(t),\\ \dot{E}&= \beta S(t)I(t) -b E(t), \\ \dot{I}&= - (b + \gamma ) I(t),\\ \dot{R}&= \gamma I(t) -b R(t). \end{aligned}$$

When \(\min \{\tau _1,\tau _2\} < t \le \max \{\tau _1,\tau _2\}\), the system becomes a DDEs system with one delay \(\min \{\tau _1,\tau _2\}\). Without loss of generality, we assume \(\tau _1<\tau _2\), so the system is,

$$\begin{aligned} \dot{S}&= b - \beta S(t)I(t) - b S(t),\\ \dot{E}&= \beta S(t)I(t) -\beta e^{-b \tau _1} S(t-\tau _1)I(t-\tau _1) -b E(t),\\ \dot{I}&= \beta e^{-b \tau _1} S(t-\tau _1)I(t-\tau _1) - (b + \gamma ) I(t), \\ \dot{R}&= \gamma I(t) -b R(t). \end{aligned}$$

When \(t > \max \{\tau _1,\tau _2\}\), the SEIRS model becomes a DDEs with two delays \(\tau _1\) and \(\tau _2\),

$$\begin{aligned} \dot{S}&= b - \beta S(t)I(t) - b S(t) + \gamma e^{-b \tau _2} I(t-\tau _2), \nonumber \\ \dot{E}&= \beta S(t)I(t) -\beta e^{-b \tau _1} S(t-\tau _1)I(t-\tau _1) -b E(t),\nonumber \\ \dot{I}&= \beta e^{-b \tau _1} S(t-\tau _1)I(t-\tau _1) - (b + \gamma ) I(t), \nonumber \\ \dot{R}&= \gamma I(t) -\gamma e^{-b \tau _2} I(t-\tau _2) -b R(t). \end{aligned}$$
(27)

To investigate the long-time behavior near the endemic equilibrium point \(EP^*\) in (27), we notice first that \(EP^*\) only exists when the latency time is short enough, say \(\tau _1<\hat{\tau }\) (where \(\hat{\tau }\) is given in (25) which yields \(R_0>1\)). Secondly, from the decoupled equations

$$\begin{aligned} \dot{S}&= b - \beta S(t)I(t) - b S(t) + \gamma e^{-b \tau _2} I(t-\tau _2), \nonumber \\ \dot{I}&= \beta e^{-b \tau _1} S(t-\tau _1)I(t-\tau _1) - (b + \gamma ) I(t), \end{aligned}$$
(28)

we can obtain the persistent result parallel to that in Cases (ii) and (iii),

Theorem 8

When \(\tau _1<\hat{\tau }\), the disease is uniformly persistent in the sense that there is a positive number \(\eta \) such that every solution \((S(t), I(t))\) in System (28) with \(S(0) \ge 0\) and \(I(0)>0\) satisfies \(\lim _{t \rightarrow \infty } \inf I(t) \ge \eta \).

The proof is analogous to that in Case (iii) with \(X=\{\phi =(\phi _1,\phi _2)\in C([-\tau ,0],D_2\}\), where \(\tau =\max \{\tau _1,\tau _2\}\) and \(M^3=(1,0)\).

Thirdly, since the characteristic equation in (28) is

$$\begin{aligned} \Delta _4(\lambda )&= \lambda ^2 + (2b+\gamma + \beta w_3^*) \lambda + (b+\beta w_3^*)(b+\gamma ) - \beta w_1^* e^{-\tau _1(\lambda +b)} (\lambda +b)\\&\quad - \beta \gamma w_3^* e^{-(\tau _1 +\tau _2)(b+\lambda )}] =0, \end{aligned}$$

so

$$\begin{aligned} \Delta _4(0)=\beta w_3^*[(1-e^{-b(\tau _1 + \tau _2)})\gamma + b ]>0 \end{aligned}$$

from \(S^1=\frac{1}{R_0} = \frac{b+\gamma }{\beta e^{-b \tau _1}}\), implying that \(\lambda =0\) is not the root of \(\Delta _4(\lambda )=0\).

When both delays are zero, \(\Delta _4(\lambda )=(\lambda +\beta w_3^*)(\lambda +b)\). It is clear that \(EP^*\) is then locally asymptotically stable. When \(\tau _2=0\) and \(\tau _1>0\), a discussion similar to that in Case (iii) can show that \(EP^*\) is locally asymptotically stable, which is consistent with the result in Cooke and Driessche (1996). When \(\tau _1=0\) and \(\tau _2>0\), periodic oscillations and stability switches are possible, as in Case (ii) above. With general \(\tau _1>0,\tau _2>0\), assuming there exists \(\omega >0\), such that \(\Delta _4(i \omega )=0\), we can obtain the following relation, by noting that \(w_3^*=\frac{b(\beta e^{-b \tau _1}-b-\gamma )}{\beta (b+\gamma -\gamma e^{-b(\tau _1+\tau _2)})}\) depends on \(\tau _1\) and \(\tau _2\):

$$\begin{aligned} -\omega ^2+A_2(\tau _1,\tau _2)+A_3 \cos \tau _1 \omega + A_4 \omega \sin \tau _1 \omega&= -A_5(\tau _1,\tau _2) \cos (\tau _1+\tau _2)\omega , \nonumber \\ A_1(\tau _1,\tau _2) \omega -A_3\sin \tau _1 \omega + A_4 \omega \cos \tau _1 \omega&= A_5(\tau _1,\tau _2) \sin (\tau _1+\tau _2)\omega ,\nonumber \\ \end{aligned}$$
(29)

where

$$\begin{aligned} A_1(\tau _1,\tau _2)&= 2b+\gamma +\beta w_3^*, \qquad A_2(\tau _1,\tau _2)=(b+\beta w_3^*) (b+\gamma ),\\ A_3&= -b (b+\gamma ), \qquad A_4=-(b+\gamma ), \qquad A_5(\tau _1,\tau _2)=-\beta \gamma w_3^* e^{-(\tau _1+\tau _2) b}. \end{aligned}$$

Equation (29) are relatively complicated to tackle analytically. Using the DDE-BIFTOOL software package, we can present numerically obtained stability boundaries with respect to the two delays, all other parameters being kept constant. Through this Fig. 2, we can see that the stability at the endemic equilibrium is preserved for small values of the delay \(\tau _2\), and that stability switches are possible ; as this value is increased, oscillations become possible, and there may be multiple resonant oscillations within feasible delays. As \(\beta \) is increased, the possible dynamical behavior becomes more complicated and the stability region becomes involved, as is expected in delay equations with two discrete time delays (Bélair and Campbell 1994).

Fig. 2
figure 2

Stability switch boundaries for Eq. (29) with the parameters \(b = 0.00004, \gamma = 0.143\)

4 Numerical simulation

To illustrate the results obtained in the previous section, we perform numerical simulations using the parameter values in Liu et al. (1987), namely \(b=0.00004, \gamma = 0.143\) which imply an average life span of \(68.5\) years, and average infectious period of \(7\) days.

Since Case (i) has been studied by numerous investigators, we just want to point out the difference when using the probability functions \(P_1(s)=e^{-\omega _1s}, Q_1(s)=e^{-\omega _2s}\) and \(P_2(s)=(\omega _1 s +1)e^{-\omega _1 s}, Q_2(s)=(\omega _2 s +1)e^{-\omega _1 s} \) related to the weak and strong kernel functions, respectively.

It is interesting to note, in Fig. 3, that with the weak kernel probability distributions in both latent and immune periods, when \(\beta =0.198\), \(R_0<1\), so the disease-free equilibrium point is globally attractive (Fig. 3a); while with the same parameters, there exists a stable non-trivial steady state when the probability distributions are related to strong kernel functions (Fig. 3b). This observation implies that the non-autonomous system may produce significant change in the basic reproduction number, a theoretical observation we do not pursue further.

Fig. 3
figure 3

Solution curves obtained by choosing \(\beta =0.198,\omega _1=1,\omega _2=0.0106\) in Case (i). a \(P_1(s)= e^{-\omega _1 s} ~\mathrm{and }~ Q_1(s)=e^{-\omega _2 s}\); b \(P_2(s)=(\omega _1 s +1)e^{-\omega _1 s} ~\mathrm{and }~ Q_2(s)=(\omega _2 s +1)e^{-\omega _1 s} \)

For Case (ii), we choose \(\omega =1\) and when \(\beta =0.198\), \(R_0 \approx 1.384 > 1\). We expect that \(EP^*\) keeps its stability for small \(\tau \), then becomes unstable as \(\tau \) is increased, and a periodic solution bifurcates from \(E\!P^*\) via a Hopf bifurcation. In fact, with the chosen parameter values, when \(\tau =60\), we have \(l_1\approx 1.307, l_2 \approx -0.002, l_3 \approx 0.0001\) and \(\bar{x}=0.0007\) in (21), the difference \(l_3-[-\bar{x}(\bar{x}^2+l_1 \bar{x}+l_2)] \approx -6.3\times 10^{-7}\) is negative and very close to zero, implying the occurrence of periodic solutions. Figure 4 depicts the corresponding trajectories with different values of \(\tau \). When \(\tau =20\), Fig. 4a shows that the system approaching the endemic equilibrium point \(EP^*\) quickly; when \(\tau \) is increased to \(\tau =40\), the stability of \(E\!P^*\) remains through a damped oscillation (Fig. 4b); with further increases in \(\tau \), \(E\!P^*\) becomes unstable and stable oscillations appear in Fig. 4c when \(\tau =60\). It is interesting to observe that as \(\tau \) is increased, the epidemic spike spreads quickly due to the increase of the infectious strength which leads to recurrent epidemic outbreaks like seasonal variation in per capita infection rate.

Fig. 4
figure 4

Solution curves with \(\beta =0.198\) in Case (ii). a \(\tau =20\), b \(\tau =40\), c \(\tau =60\)

To capture the effect of the transmission rate \(\beta \), we increase the value of \(\beta \) to \(\beta =0.398\), which produces \(R_0=2.782>1\). Comparing with Fig. 4, the corresponding trajectories with different \(\tau \) are given in Fig. 5 with the same initial conditions.

Fig. 5
figure 5

Solution curves with \(\beta =0.398\) in Case (ii). a \(\tau =20\), b \(\tau =40\), c \(\tau =60\)

It is observed from Figs. 4 and 5 that, with increasing \(\beta \), the basic reproduction number \(R_0\) increases. When the steady-state is stable, (see (a)), the number of susceptible individuals decreases, and the number of infectious individuals increases, which sounds reasonable because more individuals are moved into the infectious class. Comparing (c) in Figs. 4 and 5, we can see that, when the system exhibits an oscillation, the infectious strain spreads rapidly and depletes the susceptible population; with fewer individuals available to become sick, the compartment regenerates faster, leading to a subsequent spike occurring sooner, so the frequency increases. Focusing on (b), at an intermediate value of \(\tau \), the steady state can remain stable for small values of \(\beta \) and lose stability for large \(\beta \). We notice that \(R_0 \approx 1.384\) is considered to be of moderate transmissibility which is close to the value in the influenza Asian A (H2N2) pandemic of 1957–1958 and Hong Kong A (H3N2) of 1968–1969; while \(R_0=2.782\) is considered to be highly transmissible which is close to the value in the influenza A (H1N1) of 1918–1919 (Boëlle et al. 2009).

For Case (iii), the theoretical result predicts that, when \(R_0>1\), with exponentially decreasing probability distribution in the temporary immunity stage, the disease is persistent independently of the length in the fixed latency period and \(EP^*\) is at least locally asymptotically stable. The numerical simulation results (Fig. 6) show very good agreement with this statement. From the epidemiological point of view, when the period of temporary immunity is distributed decreasingly, no matter how long the fixed latent period is, the disease remains if no preventive or control measure is implemented.

Fig. 6
figure 6

Solution curves with \(\beta =0.398\) in Case (iii). a \(\tau =20\), b \(\tau =40\), c \(\tau =60\)

For Case (iv), from Fig. 2, we observe that, with two delays in both latent and temporary immune periods, when the period of immunity is short (small \(\tau _2\)), the endemic equilibrium point is stable over a range of \(\tau _1\); with relative long period of immunity (large \(\tau _2\)), even when the latent period (\(\tau _1\)) is very short, oscillations can occur. To confirm the different dynamical behaviors shown in Fig. 2, we first fix the value of \(\tau _2\) at \(\tau _2=80\), then fix \(\tau _1=160\). Following the lines given in Fig. 2b with \(\beta =0.398\), when \(\tau _2=80\), we can observe stability switches for different values of \(\tau _1\) in Fig. 7, while for a fixed value of \(\tau _1=160\), it is also possible to observe stability switches. The numerical simulations with different values of \(\tau _2\) are given in Fig. 8.

Fig. 7
figure 7

Solution curves in Case (iv) with fixed \(\tau _2=80\) and different \(\tau _1\). The left column is \(S(t)\) and right one is \(I(t)\)

Fig. 8
figure 8

Solution curves in Case (iv) with fixed \(\tau _1=160\) and different \(\tau _2\). The left column is \(S(t)\) and right one is \(I(t)\)

It is interesting to note, from Fig. 7, that with \(\tau _2=80\), when \(\tau _1\) is small (\(\tau _1=5\)), there is oscillation; as \(\tau _1\) is increased, stability switches can occur, the oscillations become damped, and approach the endemic equilibrium with \(\tau _1=50\), and appear again with \(\tau _1=110\). The steady state can regain stability with long latency period (\(\tau _1=180\)). From Fig. 8, we can observe that, with fixed latent period \(\tau _1=160\), when the period of immunity is short (\(\tau _2=40\)), the endemic equilibrium point is stable; as \(\tau _2\) is increased, oscillations and stability switches can occur as well.

5 Conclusion and remarks

In this paper, we have analyzed an SEIRS model with distributed delays in latent and temporary immune periods. The integrative approach allows us to consider the interactive effect of the time duration in the stages of latency and temporary immunity, helping us to understand the epidemic patterns. With general distributed time delays in these two stages, the system becomes non-autonomous. By analyzing the limiting, autonomous system with infinite delays, we have shown that the basic reproduction number \(R_0=\frac{\beta (1- b \hat{P})}{b+\gamma }\) depends on the latent period only through the mean \(\hat{P}\), suggesting that the distribution of the latent period is the primary factor in controlling the spread of the disease, regardless of the distribution in the temporary immunity period. Furthermore, when \(R_0<1\), the disease free equilibrium in the limiting system attracts all the solutions in the original non-autonomous system. When \(R_0>1\), the endemic equilibrium exists in the limiting system with infinite delays and its stability depends on the distribution functions at each stage. When the distribution functions are taken as \(k_i(t)(i=1,2)\) in (14), the original non-autonomous system becomes a system of ODEs or DDEs with one or two delays. In the four particular cases, we have proven that the disease is always persistent, and the endemic equilibrium point is at least locally asymptotically stable when the duration of the temporary immunity follows an exponentially decreasing distribution. If the immunity period is fixed as a constant, oscillations might occur. This significant difference confirms that the different distributions of immune period qualitatively alter the dynamical behavior of the disease transmission process; the delay in the removed class gives rise to oscillations, but adding an exposed class does not induce qualitatively different features to the system dynamics. We have shown that the value of the reproduction number \(R_0\) determines the existence of endemic equilibrium which is independent of the distribution in the temporary immunity stage; once the endemic equilibrium exists, then the dynamical behavior is determined by the distribution of the immunity duration and independent of the distribution in the latency duration.

It is well known that, to control the outbreak of an infectious disease, the value of the basic reproduction number \(R_0\) must be reduced below one. The World Health Organization (WHO) recommends reducing it by avoiding gatherings, closing schools, restaurants, cinemas, etc. These actions result in decreasing the maximum number of infected individuals, and the delay of the epidemic peak. Mathematically, they are related to decreasing the contact rate \(\beta \) and increasing the recovery rate \(\gamma \). Besides these sanitary measures, our results show that the extension of the latent period (e.g., by vaccination) can be used to control the outbreak as well. Understanding the extents to which the interactive impact among the compartments affect the spread of disease in the population may have important implications for public health policies.