Introduction

Infectious diseases have long been a major public health concern, causing millions of deaths every year. Vaccine development has been a significant step toward preventing the spread of infectious diseases, but vaccine effectiveness can vary depending on factors such as the duration of immunity provided by the vaccine. Mathematical models are effective tools for studying the spread of infectious diseases and assessing the effectiveness of interventions like vaccination.

Several studies have explored SIRS (Susceptible-Infectious-Recovered-Susceptible) disease models with various transmission rates, Several studies have explored SIRS (Susceptible-Infectious-Recovered-Susceptible) disease models with various transmission rates, providing insights into the complex dynamics of infectious diseases within diverse populations. For instance1, analyzed epidemic spreading in complex networks, while2 investigated global stability in multi-group SIRS models with varying population sizes. In3, the global stability of SIRS models with saturation incidence were studied, while4 examined the global stability of SIS, SIR, and SIRS models with density-dependent bilinear incidence. Other works that analysis SIS models are in5 and6. In7, global stability was investigated in an SIRS deterministic model with vaccine and generalized nonlinear incidence, while8 analyzed a stochastic SIVS epidemic model with nonlinear saturated incidence. Additionally, studies by9 and10 investigated the stability of SIRS models with nonlinear incidence, time delay, and temporary immunity. Moreover11, and12 employed Lyapunov functional techniques to analyze the global stability of delayed SIRS epidemic models. These diverse investigations highlight the importance of considering various transmission rates in SIRS disease models to better understand disease dynamics and inform effective control strategies.

Modeling the impact of waning immunity on the transmission of infectious diseases have been considered in literature. In13 the author considered variable latent periods for Tuberculosis, and proved that the qualitative behaviors for the model predicted are similar to those given by the model with an exponentially distributed period of latency. An epidemic model with distributed time delay is derived in14 to describe the dynamics of infectious diseases with varying immunity. According to15, waning immunity shortens inter-epidemic periods and makes disease eradication difficult. In16, a general model is developed to study both immunity loss and immunity boosting, specifically in the context of subclinical infections. Also considers the impact of various assumptions about the nature of immunity. The authors show in17 that moderate waning times (40–80 years) and high levels of vaccination (greater than 70\(\%\)) can cause large-scale oscillations with a large number of symptomatic cases at the peak. In18 the authors show that variable infectivity and recovery rate lead to backward bifurcations under certain conditions for SIRS and SIS models. This makes controlling the disease is more complicated as making the basic reproduction number less than one is not enough to control the disease.

I am motivated by the work19 in which the author considered temporary immunity within a SIRS model when the rate of loss of immunity depend on the time since recovery from disease. The authors conducted the qualitative analysis for this model without considering any form of disease-control intervention. Furthermore, the demographic influence was not taken into account in this study. In this work, I will generalize this model to include, birth, death and vaccination, and examine the impact of demographic characteristics and vaccinations on the qualitative analysis undertaken in that work. In fact, this work can be considered an improving of my research on COVID-1922, where I will explore answers to the following questions: (1) How the waning of immunity affects the epidemic period? (2) How the waning of immunity affects the vaccine effectiveness in controlling the disease? what will be the disease eradication period? (3) How the waning of immunity will affect the vaccine efficacy? (4) Does extending the duration of immunity confer by a vaccine significantly reduce the spread of disease?

The rest of the paper is organized as follows. In section “Formulation of the model” I introduce the mathematical model. In sections “Disease free equilibrium (DFE)” and “Endemic euilibrium (EE)” I discuss the existence and the stability of the DFE for the full model and the existence of the EE for a simplified model using calculated formula for the basic reproduction number. In section “Example of variable immunity losing rate ρ(⊤)” I introduce two simple functions for variable rate of losing immunity and reformulate the basic reproduction number and the mean value for losing immunity. Finally, I conclude with a summary in section “Discussion”.

Formulation of the model

I use a compartmental modeling approach to develop a mathematical model of an infectious disease with a vaccine and a variable immunity period. Specifically, I divide the population into three compartments: susceptible individuals, infected individuals, and recovered individuals.

Variables and parameters

The model divides the population into three groups based on immunity and disease status. The classes are susceptible S(t), infected I(t), and recovered with temporary immune class \(R(t,\tau )\), with \(\tau\) representing the time since recovery or acquiring immunity from vaccination at the moment t.

When susceptibles come into contact with an infected individual, they become infected, and the rate of transmission is \(\beta\). Vaccinated individuals leave the susceptible class to the recovered class at a rate of \(\nu\) (vaccinating rate). Infected individuals recover at \(\alpha\) rates and join the recovered class \(R(t,\tau )\). Recovered individuals may lose immunity at a rate of \(\rho (\tau )\) and fall into the susceptible category. The disease has a \(\gamma\) death rate. The net recruitment rate of individuals to susceptibles is \(\Lambda\) and that determines the population growth. Furthermore, natural death costs \(\mu\).

The model

The ODEs that represent the dynamics in this model are

$$\begin{aligned}&\frac{dS}{dt}={}\Lambda -\beta S(t)I(t)-(v+\mu )S(t)+\int _{0}^{\infty }\rho (\tau ) R(t,\tau )d\tau \end{aligned}$$
(1)
$$\begin{aligned}&\frac{dI}{dt}={}\beta S(t)I(t)-(\alpha +\gamma +\mu )I(t)\end{aligned}$$
(2)
$$\begin{aligned}&\frac{\partial R}{\partial t}+{}\frac{\partial R}{\partial \tau }=-(\rho (\tau )+\mu )R(t,\tau ) \end{aligned}$$
(3)

with the initial conditions \(S(0)=S_0>0\), \(I(0)=I_0>0\), \(R(0,\tau )=0\) and the boundary condition

$$\begin{aligned} R(t,0)=\alpha I(t)+vS(t), \end{aligned}$$
(4)

this equation indicates that individuals who recently recovered from infection or were just vaccinated enter the recovery class with zero time since recovery.

The total population is

$$\begin{aligned} N(t)=S(t)+I(t)+\int _0^\infty R(t,\tau )d\tau \end{aligned}$$
(5)

Introducing

$$\begin{aligned} P(\tau )=e^ {-\int _0^\tau \rho (s)ds} \end{aligned}$$
(6)

to be the probability that an immune individual remains immune at time \(\tau\) after recovery. Note that \(P(0)=1\) and will assume that \(\lim _{\tau \rightarrow \infty } P(\tau ) = 0\). Note that the average time to lose immunity is \(\overline{P}=\int _0^\infty P(\tau )d\tau\). Note that in the case \(\rho (\tau )=\rho _1\) constant, I have \(\overline{P}=\frac{1}{\rho _1}\).

Well posedness

Theorem 1

Any solution \((S (t), I(t), R(t, \tau ))\) of the system (1)–(3) with the non-negative initial conditions and the boundary condition (4) is nonnegative and bounded for \(t\ge 0\).

Proof

Solution is nonnegative: For the nonnegativity of I, note that when solving (2), I have For the nonnegativity of \(R(t,\tau )\), I use the characteristic method to find an explicit formula for \(R(t,\tau )\). I have

$$\begin{aligned} I(t)=I_0 e^{\int _0^t (\beta S(s)-\mu -\alpha -\gamma )ds} \end{aligned}$$
(7)

which is nonnegative for \(t\ge 0\).

$$\begin{aligned} R(t,\tau )&={} \left\{ \begin{array}{lr} R(\tau -t,0)e^{\int _0^\tau (-\mu -\rho (s))ds}, &{} \text {if } t \le \tau \\ R(0,t-\tau )e^{\int _0^\tau (-\mu -\rho (s))ds}, &{} \text {if } \tau \le t \end{array} \right. \nonumber \\&={}\left\{ \begin{array}{lr} (\alpha I(\tau -t)+vS(\tau -t) )e^{\int _0^\tau (-\mu -\rho (s))ds}, &{} \text {if } t \le \tau \\ 0, &{} \text {if } \tau \le t \end{array} \right. \end{aligned}$$
(8)

which is nonnegative if both S and I are nonnegative. For the nonnegativity of S, I have

$$\begin{aligned} \frac{dS}{dt}|_{S=0}=\Lambda +\int _{0}^{\infty }\rho (\tau )R(t,\tau )dt \end{aligned}$$
(9)

which is positive as

$$\begin{aligned} R(t,\tau )|_{S=0}&={} \left\{ \begin{array}{lr} \alpha I(\tau -t)e^{\int _0^a (-\mu -\rho (s))ds}, &{} \text {if } t \le \tau \\ 0, &{} \text {if } \tau \le t \end{array} \right. \end{aligned}$$
(10)

This implies that S can’t go below \(S=0\) as it is increasing at this value. Solution is bounded From (8), I have \(\lim _{\tau \rightarrow \infty } R(t, \tau )=0\). Also, when differentiating (5), I have

$$\begin{aligned} \begin{aligned} \frac{dN}{dt}&={}\frac{dS}{dt}+\frac{dI}{dt}+\int _0^\infty \frac{\partial R}{\partial t}d\tau \\&={}\frac{dS}{dt}+\frac{dI}{dt}+\int _0^\infty (-\frac{\partial R}{\partial \tau }-(\rho (\tau )+\mu )R(t,\tau )) d\tau \\&={}\frac{dS}{dt}+\frac{dI}{dt}-R(t,\tau )|_{\tau \rightarrow \infty }+R(t,0)- \int _0^\infty (\rho (\tau )+\mu )R(t,\tau )) d\tau \\&={}\Lambda -\mu N-\gamma I\\&\le {}\Lambda -\mu N \end{aligned} \end{aligned}$$

As a result,

$$\begin{aligned} N(t)\le \frac{\Lambda }{\mu }+\left( N(0)-\frac{\Lambda }{\mu }\right) e^{-\mu t} \end{aligned}$$

Therefore, if \(N(0)\le \frac{\Lambda }{\mu }\), then \(N(t)\le \frac{\Lambda }{\mu }\) too. \(\square\)

Corollary 1

The set \(\Omega =\left\{ (S,I,R)\in \mathbb {R}_{+}^{3}:,\,\ 0\le S, I, R\le \frac{\Lambda }{\mu }\right\}\) is invariant for the dynamic system (13).

Disease free equilibrium (DFE)

To find the DFE, I set \(I=0\), the right hand side of (1) to zero and \(\frac{\partial R}{\partial t}=0\) in (3), then I solve for S and R. Then the DFE is \((S^0,0,R^0(\tau ))\) with

$$\begin{aligned} R^0(\tau )&={} vS^0 e^{-\mu \tau } P(\tau ) \end{aligned}$$
(11)

and

$$\begin{aligned} S^0=\frac{\Lambda }{\mu (1+vQ)} \end{aligned}$$
(12)

with

$$\begin{aligned} Q=\int _0^\infty e^{-\mu \tau } P(\tau ) d\tau . \end{aligned}$$
(13)

Here \(e^{-\mu \tau }\) is the probability of staying alive when no disease till time \(\tau\). \(e^{-\mu \tau } P(\tau )\) is the likelihood of staying alive and immune till time \(\tau\). The entire likelihood of natural death for individuals who entered the immune class \(R(t,\tau )\) is represented by Q.

Note that from (5), the total population in this is

$$\begin{aligned} N^0=S^0+\int _0^\infty R^0(\tau )d\tau =\frac{\Lambda }{\mu }. \end{aligned}$$
(14)

It’s important to note that in the absence of a vaccine, the DFE level of susceptible individuals is independent of immunity loss. At the DFE, both the level of infected individuals and recovered individuals are zero. However, if a vaccine is introduced, the levels of both susceptible and recovered individuals will depend on the rate of immunity loss.

Stability of the DFE

I consider small perturbations around the DFE of the form

$$\begin{aligned} \begin{aligned} S(t)&=S^0+x_0e^{\lambda t}\\ I(t)&=y_0e^{\lambda t}\\ R(t,\tau )&=R^0(\tau )+z_0(\tau ) e^{\lambda t}\\ \end{aligned} \end{aligned}$$
(15)

which, when plugged in (3) and solve for \(z_0\), I have

$$\begin{aligned} z_0(\tau )=(\alpha y_0+vx_0)e^{-(\lambda +\mu )\tau }P(\tau ) \end{aligned}$$
(16)

and when plugged in (1), I have

$$\begin{aligned} (\lambda +\mu +v)x_0+\beta S^0 y_0-\int _0^\infty \rho (\tau ) z_0(\tau )d\tau =0. \end{aligned}$$
(17)

By inserting (16) into (17), I get

$$\begin{aligned} \left( \lambda +\mu +v-v\int _0^\infty e^{-(\lambda +\mu )\tau }\rho (\tau ) P(\tau )d\tau \right) x_0+\left( \beta S^0-\alpha \int _0^\infty e^{-(\lambda +\mu )\tau }\rho (\tau ) P(\tau )d\tau \right) y_0=0 \end{aligned}$$
(18)

and from (2), I have

$$\begin{aligned} (\lambda -\beta S^0+\alpha +\gamma +\mu ) y_0=0 \end{aligned}$$
(19)

The two equations (18) and (19) can be written in matrix form as \(J [x_0\,\,y_0]^T=[0\,\,0]^T\) with

$$\begin{aligned} J = \left[ {\begin{array}{cccc} \lambda +\mu +v-v\int _0^\infty e^{-(\lambda +\mu )\tau }\rho (\tau ) P(\tau )d\tau &{}\beta S^0-\alpha \int _0^\infty e^{-(\lambda +\mu )\tau }\rho (\tau ) P(\tau )d\tau \\ 0&{}\lambda -\beta S^0+\alpha +\gamma +\mu \\ \end{array} } \right] \end{aligned}$$

This linear system has none trivial solution if and only if \(\det (J)=0\).

Then first real \(\lambda\) value that makes \(\det (J)=0\) is \(\lambda _1=\beta S^0-(\alpha +\gamma +\mu )\), which is negative if and only if

$$\begin{aligned} R_0:=\frac{\beta \Lambda }{\mu (\alpha +\gamma +\mu )(1+vQ)}<1 \end{aligned}$$
(20)

with \(R_0\) is the basic reproduction number. Other solutions for \(\det (J)=0\) are the zeros for the following function

$$\begin{aligned} F(\lambda ):=\lambda +\mu +v-v\int _0^\infty e^{-(\lambda +\mu )\tau }\rho (\tau ) P(\tau )d\tau \end{aligned}$$
(21)

First, I will prove that the roots of \(F(\lambda )\) are negative for the following special case for \(\rho (\tau )\).

Special case for \(\rho (\tau )\)

Here I discuss a scenario where individuals gain \(100\%\) immunity for a period T and then lose it at a constant rate \(\rho _2\).

$$\begin{aligned} \rho (\tau )=\left\{ \begin{array}{ll} 0 &{} 0\le \tau \le T \\ \rho _2 &{} \tau >T \\ \end{array} \right. \end{aligned}$$

with \(\rho _2\) constant. Note that in this case

$$\begin{aligned} Q=\frac{1}{\mu }\Big (1-e^{-\mu T}\Big )+\frac{1}{\mu +\rho _2}e^{-\mu T} \end{aligned}$$
(22)

Also, for \(\lambda \ne -(\mu +\rho _2)\), the function F can be simplified to

$$\begin{aligned} F(\lambda ,T)=\lambda +\mu +v-\frac{v\rho _2 e^{-(\lambda +\mu )T}}{\lambda +\mu +\rho _2} \end{aligned}$$
(23)

and \(F(\lambda ,T)=0\) is equivalent to

$$\begin{aligned} (\lambda +\mu +v)(\lambda +\mu +\rho _2)-v\rho _2 e^{-(\lambda +\mu )T}=0 \end{aligned}$$

or

$$\begin{aligned} \lambda ^2+ (2\mu +v+\rho _2)\lambda +(\mu +v)(\mu +\rho _2)-v\rho _2 e^{-(\lambda +\mu )T}=0 \end{aligned}$$
(24)

Note that in case \(T=0\), this polynomial has positive coefficients, therefore two negative roots. As a result for \(T=0\), the DFE is locally asymptotically stable when \(R_0<1\) and unstable for \(R_0>1\).

For \(T>0\)

I define

$$\begin{aligned} G(\lambda , T):=P_2(\lambda )+Q_0(T)e^{-\lambda T} \end{aligned}$$
(25)

with \(P_2(\lambda ):=\lambda ^2+ (2\mu +v+\rho _2)\lambda +(\mu +v)(\mu +\rho _2)\) and \(Q_0(T)=-v\rho _2 e^{-\mu T}\)

Considering \(\lambda =\omega i\) with \(\omega >0\) as the purely imaginary roots of the equation \(G(\omega i, T) = 0\), upon substitution of \(\lambda =\omega i\) into the equation \(G(\lambda , T) = 0\) and subsequent separation of the real and imaginary parts, I obtain:

$$\begin{aligned}{} & {} -\omega ^2+(\mu +v)(\mu +\rho _2)-v\rho _2 e^{-\mu T} \cos (\omega T)=0 \end{aligned}$$
(26)
$$\begin{aligned}{} & {} (2\mu +v+\rho _2)\omega ++v\rho _2 e^{-\mu T} \sin (\omega T)=0 \end{aligned}$$
(27)

which after solving implies

$$\begin{aligned} \omega ^4-2(\mu +v)(\mu +\rho _2)\omega ^2+(2\mu +v+\rho _2)^2+(\mu +v)^2(\mu +\rho _2)^2-v^2\rho _2^2 e^{-2\mu T} =0 \end{aligned}$$
(28)

with the substitution \(\theta =\omega ^2\), then solving the quadratic equation for \(\theta\), I have

$$\begin{aligned} \theta =(\mu +v)(\mu +\rho _2)\pm \sqrt{-(2\mu +v+\rho _2)^2+v^2\rho _2^2 e^{-2\mu T}} \end{aligned}$$
(29)

since the \(-(2\mu +v+\rho _2)^2+v^2\rho _2^2 e^{-2\mu T}<0\) for \(T>0\). Therefore, \(\theta\) is complex number and no \(\omega >0\) real number exists. From the continuity of \(G(\lambda , T)\) in T, I conclude that all roots for it stay in the left half plane for all T. Therefore, the DFE is locally asymptotically stable for \(R_0<1\) and \(T \ge 0\).

General case for \(\rho (\tau )\)

I need to study the following two cases for \(\lambda\):

Case 1: \(\lambda\) is real number. In this case F satisfies the following

$$\begin{aligned} \begin{aligned} F(0)&={}\mu +v-v\int _0^\infty e^{-\mu \tau }\rho (\tau ) P(\tau )d\tau \\&={} \mu +v-v\Big (-P(\infty )e^{-\infty }+P(0)e^0-\mu \int _0^\infty e^{-\mu \tau } P(\tau )d\tau \Big )\\&={} \mu (1+v\int _0^\infty e^{-\mu \tau } P(\tau )d\tau )\\&\quad>{}0 \end{aligned} \end{aligned}$$
(30)

and

$$\begin{aligned} \begin{aligned} F'(\lambda )&={} 1+v\int _0^\infty \tau e^{-(\lambda +\mu )\tau } \rho (\tau ) P(\tau )d\tau \\&\quad>{}0 \end{aligned} \end{aligned}$$
(31)

Therefore, F can’t have nonnegative \(\lambda\) roots. As a result, the DFE is locally asymptotically stable when \(R_0<1\) and unstable when \(R_0>1\).

Case 2: \(\lambda =u+wi\) complex number. The real component of \(F(\lambda )\) in this case is

$$\begin{aligned} \begin{aligned} Re(F(\lambda ))&={}u+\mu +v-v\int _0^\infty e^{-(u+\mu )\tau }cos(w \tau )\rho (\tau ) P(\tau )d\tau \\&\quad >{}u+\mu +v-v\int _0^\infty e^{-(u+\mu )\tau }\rho (\tau ) P(\tau )d\tau \\:&={}f(u) \end{aligned} \end{aligned}$$
(32)

As f(u) has no nonnegative roots, \(Re(F(\lambda ))=0\) has no nonnegative roots too. Therefore, if \(\lambda =u+wi\) is a root for F, then \(u< 0\).

Moreover,

$$\begin{aligned} \begin{aligned} Re(F(\lambda ))|_{u=0}&={}\mu +v-v\int _0^\infty e^{-\mu \tau }cos(w \tau )\rho (\tau ) P(\tau )d\tau \\&\quad >{}\mu +v-v\int _0^\infty \rho (\tau ) P(\tau )d\tau \\:&={}\mu \end{aligned} \end{aligned}$$
(33)

Therefore \(\lambda =wi\) is not an eigenvalue and Hopf bifurcation near the DFE is impossible too. To summarize, \(\det (J)=0\) roots include \(\lambda =\lambda _1\) and all other possible eigenvalue satisfies \(Re(\lambda )<0\). In fact, I established the following result:

Theorem 2

The DFE is locally asymptotically stable when \(R_0< 1\) and unstable when \(R_0>1\).

\(R_0\) is the disease threshold amount, which estimates the average number of secondary infections caused by a single infected individual in in a population of susceptibles at a demographic steady state when some susceptible individuals have been vaccinated.

Theorem 3

For the no vaccine case (\(v=0\)) and \(\rho (\tau )\) is bounded for large \(\tau\), the DFE is globally asymptotically stable when \(R_0<1\) and unstable for \(R_0>1\).

Proof

From (12) I have

$$\begin{aligned} \Lambda =\mu S^0 \end{aligned}$$
(34)

Now define the following Lyapunov function

$$\begin{aligned} V(t)=S(t)-S^0-S^0\ln \left( \frac{S}{S^0}\right) +I(t)+\int _0^\infty m(\tau )R(t,\tau )d\tau \end{aligned}$$
(35)

with \(m(\tau )=\int _\tau ^\infty \rho (s)e^{-\int _\tau ^s(\mu +\rho (\xi ))d\xi }ds\).

It is clear that \(V|_{DFE}=S^0-S^0-S^0\ln (1)+I^0+\int _0^\infty m(\tau ) *0 d\tau =0\) also

$$\begin{aligned} \begin{aligned} V'(t)&={}\frac{\left( S(t)-S^0 \right) }{S(t)}S'(t)+I'(t)+\int _0^\infty m(\tau )\frac{\partial R(t,\tau )}{\partial t} d\tau \\&={}\frac{\left( S(t)-S^0 \right) }{S(t)}\Big ( \Lambda -\beta S(t)I(t)-\mu S(t)+\int _{0}^{\infty }\rho (\tau ) R(t,\tau )d\tau \Big )\\&\quad +{}\beta S(t)I(t)-(\alpha +\gamma +\mu )I(t)\\&\quad +{}\int _0^\infty m(\tau )(-\frac{\partial R(t,\tau )}{\partial \tau }-(\mu +\rho (\tau ))R(t,\tau )) d\tau \\ \end{aligned} \end{aligned}$$
(36)

Substitute from (34), I have

$$\begin{aligned} \begin{aligned} V'(t)&={}\frac{(S(t)-S^0)}{S(t)}\Big ( \mu (S^0-S)-\beta S(t)I(t)+\int _{0}^{\infty }\rho (\tau ) R(t,\tau )d\tau \Big )\\&\quad +{}\beta S(t)I(t)-(\alpha +\gamma +\mu )I(t)\\&\quad +{}\int _0^\infty m(\tau )(-\frac{\partial R(t,\tau )}{\partial \tau }-(\mu +\rho (\tau ))R(t,\tau )) d\tau \\&={}\frac{1}{S(t)}\Big ( -\mu (S^0-S)^2-S^0\int _{0}^{\infty }\rho (\tau ) R(t,\tau )d\tau \Big )\\&\quad +{}\left( \beta S^0-(\alpha +\gamma +\mu )+m(0)\alpha \right) I(t)\\&\quad -{}\int _{0}^{\infty }m(\tau )(\mu +\rho (\tau )) R(t,\tau )d\tau \end{aligned} \end{aligned}$$
(37)

To have \(V'(t)<0\), I need \(R_0<1\) when \(m(\tau )\) is chosen such that \(m(0)<<1\). \(\square\)

Endemic equilibrium (EE)

The EE \((S^e,I^e,R^e(\tau ))\) is found by setting the right hand sides of (1, 2) and \(\frac{\partial R}{\partial t}=0\) in (3), then solve for S, I and R. From (2), I have

$$\begin{aligned} S^e=\frac{\alpha +\gamma +\mu }{\beta } \end{aligned}$$

and from (3)

$$\begin{aligned} R^e(\tau )=(vS^e+\alpha I^e) e^{-\mu \tau } P(\tau ) \end{aligned}$$

which when plugged in (1) and solved for \(I^e\), I have

$$\begin{aligned} I^e&={}\frac{\Lambda -\mu S^e(1+vQ)}{\gamma +\mu +\mu \alpha Q}\\&={}\frac{\mu S^e(1+vQ)(R_0-1)}{\gamma +\mu +\mu \alpha Q} \end{aligned}$$

which is positive only for \(R_0>1\).

Note that in this case

$$\begin{aligned} N^e=S^e+I^e+(\alpha I^e+v S^e)Q=\frac{\Lambda -\gamma I^e}{\mu } \end{aligned}$$

It is important to emphasize that the equilibrium level of susceptible individuals (\(S^e\)) is independent of the vaccine and immunity loss, while the equilibrium levels of infected (\(I^e\)) and recovered (\(R^e\)) individuals are dependent on these factors. This EE state indicates that the input and output rates of the susceptible population are balanced, and the effect of the vaccine is not apparent in this case.

Stability of the EE

Considering the following small perturbations around the EE

$$\begin{aligned} \begin{aligned} S(t)&=S^e+x_0e^{\lambda t}\\ I(t)&=I^e+y_0e^{\lambda t}\\ R(t,\tau )&=R^e(\tau )+z_0(\tau ) e^{\lambda t} \end{aligned} \end{aligned}$$

which when I plug in (3) and solve for \(z_0\), I have

$$\begin{aligned} z_0(\tau )=(\alpha y_0+vx_0)e^{-(\lambda +\mu )\tau }P(\tau ) \end{aligned}$$
(38)

and from (1), I have

$$\begin{aligned} (\lambda +\beta I^e+\mu +v)x_0e^{\lambda t}+\beta S^e y_0e^{\lambda t}-\int _0^\infty \rho (\tau ) z_0(\tau )d\tau e^{\lambda t}-w_1(\tau )=0 \end{aligned}$$
(39)

with

$$\begin{aligned} \begin{aligned} w_1(\tau )&=\Lambda -\beta S^e(t)I^e(t)-(v+\mu )S^e(t)+\int _0^\infty \rho (\tau ) R^e(\tau )d\tau \\&=0 \end{aligned} \end{aligned}$$

Now, plug in (38) in (39), I have

$$\begin{aligned} (\lambda +\beta I^e+\mu +v-v\int _0^\infty e^{-(\lambda +\mu )\tau }\rho (\tau ) P(\tau )d\tau ) x_0+(\beta S^e -\alpha \int _0^\infty e^{-(\lambda +\mu )\tau }\rho (\tau ) P(\tau )d\tau ) y_0=0 \end{aligned}$$
(40)

Also, from (2), I have

$$\begin{aligned} -\beta I^e x_0+(\lambda -\beta S^e+\mu +\alpha +\gamma ) y_0-w_2=0 \end{aligned}$$
(41)

with

$$\begin{aligned} w_2=\beta S^eI^e-(\alpha +\gamma +\mu )I^e=0 \end{aligned}$$

as \(-\beta S^e+\mu +\alpha +\gamma =0\). Therefore, (41) is reduced to

$$\begin{aligned} -\beta I^e x_0+\lambda y_0=0 \end{aligned}$$
(42)

Therefore, the system (40) and (42) can be written on the matrix for \(M[x_0\,\,y_0]^T=[0\,\,0]^T\), with

$$\begin{aligned} M = \left[ {\begin{array}{cccc} \lambda +\beta I^e+\mu +v-v\int _0^\infty e^{-(\lambda +\mu )\tau }\rho (\tau ) P(\tau )d\tau &{}\beta S^e-\alpha \int _0^\infty e^{-(\lambda +\mu )\tau }\rho (\tau ) P(\tau )d\tau \\ -\beta I^e&{}\lambda \\ \end{array} } \right] \end{aligned}$$

This system has nontrivial solution \([x_0\,\,y_0]^T\ne [0\,\,0]^T\), if and only if \(F(\lambda ):=\det (M)=0\) with

$$\begin{aligned} F(\lambda )={}(1+vQ^*(\lambda ))(\lambda ^2+\mu \lambda )+\beta I^e\Big ((1+\alpha Q^*(\lambda ))\lambda +\mu +\gamma +\alpha \mu Q^*(\lambda )\Big ) \end{aligned}$$
(43)

in which

$$\begin{aligned} Q^*(\lambda )=\int _0^\infty e^{-(\lambda +\mu )\tau }P(\tau )d\tau \end{aligned}$$
(44)

with \(Q^*(0)=Q\). Note that integration by parts was done here.

I need to study the following two cases:

Case 1: \(\lambda\) is real number.

Note that for \(\lambda \ge 0\) and \(R_0>1\)

$$\begin{aligned} \begin{aligned} F(\lambda )&>{} (1+vQ^*(\lambda ))(\lambda ^2+\mu \lambda )\\ \ge&0 \end{aligned} \end{aligned}$$

therefore \(F(\lambda )\) has no nonnegative roots.

Case 2: \(\lambda =u+wi\) is complex number.

The matrix \(M=A+Bi\) with

$$\begin{aligned}{} & {} A= \left[ {\begin{array}{cccc} u+\beta I^e+\mu +v-v\int _0^\infty e^{-(u+\mu )\tau }\rho (\tau )\cos (w \tau ) P(\tau )d\tau &{}\beta S^e-\alpha \int _0^\infty e^{-(u+\mu )\tau }\cos (w\tau )\rho (\tau ) P(\tau )d\tau \\ -\beta I^e&{}u\\ \end{array} } \right] \\{} & {} B= \left[ {\begin{array}{cccc} w-v\int _0^\infty e^{-(u+\mu )\tau }\rho (\tau )\sin (w \tau ) P(\tau )d\tau &{}-\alpha \int _0^\infty e^{-(u+\mu )\tau }\sin (w\tau )\rho (\tau ) P(\tau )d\tau \\ 0&{}w\\ \end{array} } \right] \end{aligned}$$

Again to have nontrivial solution I need both \(\det (A)=\det (B)=0.\) Introducing the function \(Q_c(u,w)\) and \(Q_s(u,w)\), with

$$\begin{aligned}{}&\begin{aligned} Q_c(u,w)&={}\int _0^\infty e^{-(u+\mu )\tau }\cos (w \tau ) \rho (\tau )P(\tau )d\tau \\&\le {}\int _0^\infty e^{-(u+\mu )\tau }\rho (\tau ) P(\tau )d\tau \\&=1-(u+\mu )Q(u) \end{aligned} \\&\begin{aligned} Q_s(u,w)&={}\int _0^\infty e^{-(u+\mu )\tau }\sin (w \tau ) \rho (\tau )P(\tau )d\tau \\&\le {}\int _0^\infty e^{-(u+\mu )\tau } \rho (\tau ) P(\tau )d\tau \\&=1-(u+\mu )Q(u)\\ \end{aligned} \\&\begin{aligned} \det (A)&={}u(u+\beta I^e+\mu +v(1-Q_c(u,w)))+\beta I^e (\gamma +\mu +\alpha (1-Q_c(u,w)))\\&\ge {} u(u+\beta I^e+\mu +v(u+\mu )Q(u))+\beta I^e (\gamma +\mu +\alpha (u+\mu )Q(u)) \end{aligned} \end{aligned}$$

If \(R_0>1\), \(\det (A)=0\) only for \(u\le 0\).

$$\begin{aligned} Also, \begin{aligned} 0=\det (B)=w(w-vQ_s(u,w)) \end{aligned} \end{aligned}$$
(45)

since \(w\ne 0\), I must have

$$\begin{aligned} \int _0^\infty (w-e^{-(u+\mu )\tau }\sin (w \tau ) )\rho (\tau )P(\tau )d\tau =0 \end{aligned}$$

which leads to \(w=-e^{-(u+\mu )\tau }\sin (w \tau )\). In sum, regardless of w value I must have the real part of the eigenvalue u negative.

In the following theorem I use \(R_0\) to describe the stability of the DFE

Theorem 4

The EE exists and is locally asymptotically stable if and only if \(R_0>1\).

In sum, I noted that without a vaccine, \(R_0\) is independent of immunity loss. Moreover, if \(R_0<1\), then all solutions will converge to the same DFE point, but possibly with increasing oscillations as the delay increases. If \(R_0>1\) regardless of the presence of a vaccine, then all solutions will converge to the same level of susceptible individuals, but different levels of infected and recovered individuals that depend on the rate of immunity loss.

Example of variable immunity losing rate \(\rho (\tau )\)

Step function

Here, I discuss a scenario where individuals gain partial immunity after recovering from an infection or receiving a vaccination. This immunity lasts for some time T before gradually decreasing. To represent this, we utilize a step function, chosen for its approximation purposes despite lacking a direct biological interpretation. This simplifies the calculations and provides necessary approximations.

Note that in case of considering

$$\begin{aligned} \rho (\tau )=\left\{ \begin{array}{ll} \rho _1 &{} 0\le \tau \le T \\ \rho _2 &{} \tau >T \\ \end{array} \right. \end{aligned}$$

In this case, from (6), I have

$$\begin{aligned} P(\tau )=\left\{ \begin{array}{ll} e^{-\rho _1 \tau } &{} 0\le \tau \le T \\ e^{(\rho _2-\rho _1) T-\rho _2 \tau } &{} \tau >T \\ \end{array} \right. \end{aligned}$$

and the mean value for losing immunity is

$$\begin{aligned} \overline{P}=\frac{1}{\rho _1}\left( 1- e^{-\rho _1 T}\right) +\frac{1}{\rho _2} e^{-\rho _1 T} \end{aligned}$$

Moreover, from (13) I have

$$\begin{aligned} Q=\frac{1}{\mu +\rho _1}\Big (1-e^{-(\mu +\rho _1)T}\Big )+\frac{1}{\mu +\rho _2}e^{-(\mu +\rho _1)T} \end{aligned}$$

When \(T\rightarrow \infty\), then I have \(\overline{P}\rightarrow \frac{1}{\rho _1}\), and \(Q\rightarrow \frac{1}{\mu +\rho _1}\). Also, from (20) I have

$$\begin{aligned} R_0\rightarrow \frac{\beta \Lambda (\mu +\rho _1) }{\mu (\alpha +\gamma +\mu )(\mu +\rho _1+v)} \end{aligned}$$

Note that for the special case \(\rho _1=0\), \(\overline{P}=T+\frac{1}{\rho _2}\) and \(Q=\frac{1}{\mu }\Big (1-e^{-\mu T}\Big )+\frac{1}{\mu +\rho _2}e^{-\mu T}\).

Critical efficacy period \(T_c^*\)

Note that \(R_0<1\) is equivalent to

$$\begin{aligned} T>\frac{-1}{\mu +\rho _1} \ln \Big (\frac{1}{\rho _1-\rho _2}(\frac{(\mu +\rho _1)(\mu +\rho _2)}{v}(\frac{\beta \Lambda (\mu +\rho _2)}{\mu (\alpha +\gamma +\mu )}-1)-\mu -\rho _2 )\Big )=:T_c(\rho _1, \rho _2) \end{aligned}$$
(46)

To give the inequality (46) more meaning, I define \(T_c^*(\rho _2)=\lim _{\rho _1 \rightarrow 0}T_c(\rho _1, \rho _2)\), that is the lowest efficacy period for vaccine needed to control the disease. Here

$$\begin{aligned} T_c^*(\rho _2)=\frac{-1}{\mu } \ln \Bigg (\frac{-1}{\rho _2}\left( \frac{\mu (\mu +\rho _2)}{v}\left( \frac{\beta \Lambda (\mu +\rho _2)}{\mu (\alpha +\gamma +\mu )}-1 \right) -\mu -\rho _2 \right) \Bigg ) \end{aligned}$$
(47)

Linear function

$$\begin{aligned} \rho (\tau )=\rho _0\tau \end{aligned}$$

with \(\rho _0\) constant. In this case \(P(\tau )=e^{-\frac{\rho _0\tau ^2}{2}}\) and the mean value for losing immunity is \(\overline{P}=\sqrt{\frac{\pi }{2\rho _0}}\).Moreover, \(Q=\sqrt{\frac{\pi }{2\rho _0}}e^{\frac{\mu ^2 }{2\rho _0}}\). Note that \(\frac{dR_0}{dQ}<0\) and \(\frac{dQ}{d\rho _0}<0\), which implies \(\frac{dR_0}{d\rho _0}=\frac{dR_0}{dQ}\times \frac{dQ}{d\rho _0}>0\) . In sum, \(R_0\) is increasing function in \(\rho _0\), the slope of \(\rho (\tau )\) in this case.

Sensitivity of \(R_0\) to parameters changes

Given the uncertainty in parameter values, I conducted a comprehensive analysis of various parameter ranges to understand how changes in parameters affect the model’s \(R_0\) value. The parameter ranges are presented in Table 1, indicating the 95\(\%\) confidence intervals for the estimated parameter values obtained from the two cited references. To do this, I used Latin Hypercube sampling and partial rank correlation coefficients (PRCCs) to identify which parameters have the greatest impact on \(R_0\) [?]. Latin Hypercube Sampling is a statistical method that helps us explore how an outcome variable reacts to changes in input variables. PRCCs allow us to measure the relative sensitivity of each parameter, regardless of whether it increases or decreases the outcome variable.

In Fig. 1, the graph illustrates the PRCCs for each input parameter. This visual representation clearly highlights that \(R_0\) is most influenced by variations in five key parameters: the transmission rate (\(\beta\)), the rate of losing immunity (\(\rho\)), the recovery rate (\(\alpha\)), the disease-induced death rate (\(\gamma\)), and the vaccinating rate (\(\nu\)). This underscores that effective disease control hinges on maintaining a low transmission rate, a reduced rate of immunity loss, and elevated rates of disease-induced death, recovery, and vaccination. Intriguingly, even slight adjustments in the values of \(\beta\), \(\rho\), and \(\nu\) can shift \(R_0\) from above one to below one, emphasizing their substantial impact on the dynamics of \(R_0\), as demonstrated in Fig. 2.

Figure 1
figure 1

Sensitivity analysis of \(R_0\) with respect to each model parameter.

Figure 2
figure 2

Monte Carlo simulations for 1000 runs drawn from parameter ranges using Latin Hypercube Sampling. \(\beta\),\(\alpha\), \(\gamma\), v and \(\rho\) are the parameters that should be used to control the disease.

Estimation of time series solution

Simulating disease dynamics in the absence of vaccination can serve as a baseline for comparing the impact of vaccination strategies. Also, simulating the effect of varying the duration of immunity provided by the vaccine can also assist in determining the minimum duration of immunity required to control the disease. The parameter values and the initial conditions will be taken from the Table 1 and the Table 2.

The discretization of the model (1)–(3) is conducted as follows: I employ a forward difference for the time derivatives in the equations, and a centered difference for the age derivative. Here, I set \(\Delta t=0.01\) and \(\Delta \tau =0.1\), with \(\frac{\Delta t}{\Delta x}<1\) in this case. \(t_i=i*\Delta t\) for \(i=0,1,\ldots 1000\) and \(\tau _j=j \Delta \tau\) for \(j=0,1,\ldots ,30,000\). The time span extends from 0 to 300, with the period since recovery spanning from 0 to 100. The code has been implemented in MATLAB and a samples codes are included in the supplementary information of this work.

I generate a time series solution for the model without vaccination, as shown in Fig. 3. The value of \(\rho (\tau )\) was set to 0.03, and also to the function \(\rho (\tau )=0.03 u(\tau -50)\) with \(u(\tau )\) the unit step function, which has the same constant value but with a 50-days delay. The resulting value of \(R_0\) was found to be 6.0157 in both cases. Our analysis indicates that delaying the loss of natural immunity by 50 days leads to a lower number of infected individuals and a higher number of individuals in the recovered class. Additionally, the phase portrait depicting the relationship between S(t) and I(t) as shown in the Fig. 4 for various delays in the loss of immunity rate \(\rho (\tau )=0.03 u(\tau -T)\) for \(T=0,25,50,75\). In scenarios without vaccination, when there’s a delay in losing immunity, the disease dynamics slow down in reaching the EE. This delay results in a higher number of recovered individuals at the EE level, potentially saving lives by reducing the likelihood of reinfection.

In Fig. 5, I conducted the simulation again with a vaccine rate \(v=0.5\). Our results showed \(R_0=0.1575\) for the delayed loss of immunity \(\rho (\tau )=0.03u(\tau -50)\) with \(u(\tau )\) the unit step function. Additionally, I observed an \(R_0=0.3410\) for the constant loss of immunity rate \(\rho (\tau )=\frac{1}{30}\). These findings support the idea that delayed loss of immunity leads to a significant decrease in the number of infected individuals and an increase in the number of recovered individuals. Also, when this supports the state forward idea that a longer duration of immunity gained through vaccination makes the vaccine more effective in controlling the disease. Furthermore, the phase portrait illustrating the correlation between S(t) and I(t) can be seen in Fig. 6, with different delays in the loss of immunity rate \(\rho (\tau )=0.03u(\tau -T)\) for \(T=00,25,50,75\). \(R_0=0.3410,0.2153, 0.1575,0.1300\) respectively. In scenarios with vaccination, when there’s a delay in losing immunity: the more the delay in losing immunity the smaller the \(R_0\) and the faster the disease is controlled. Also, the same implies higher number of recovered immune individuals at the DFE level and the lower the susceptibles, potentially saving more lives by reducing the likelihood of reinfection.

To demonstrate the rule of the vaccine in controlling the disease, we compare Figs. 3 (vaccine \(v=0\)) and 5 (vaccine \(v=0.5\)). With the same rate of immunity loss, it is evident that the number of susceptible Figure (a) and infected Figure (b) individuals is higher in the long run for the no-vaccine case compared to the vaccine case (converges to \(I=0\)). Also, the number of recovered individuals in the long run is significantly lower in Fig. 3d compared to Fig. 5d. This observation indicates that the vaccine not only reduces the number of susceptible individuals and completely eradicates the infected individuals but also increases the number of recovered individuals, thereby saving many lives.

In order to confirm our results, I repeated the simulation using the linear function \(\rho (\tau )=0.0006\tau\) with \(\tau \in [0,100]\) along with its average value of \(\rho (\tau )=0.03\) over the same interval. The results are shown in Fig. 7. Significant differences exist between the two results, emphasizing the importance of using partial differential equations for the recovered population, as they account for the delay caused by the variable rate of immunity loss. It’s important to note that in cases of constant average rates of immunity loss, the disease tends to be more severe due to the higher \(R_0\) value. This likely results in more people getting reinfected, leading to increased fatalities.

Figure 3
figure 3

Comparison of time series solutions for the no-vaccine case (\(v=0\)) with constant rate \(\rho (\tau )=0.03\) and the step function rate \(\rho (\tau )=0.03u(\tau -50)\) for losing immunity, including: (a) proportions of susceptible individuals, (b) proportions of infected individuals, (c) proportions of recovered individuals R(t) and \(\int _0^{100} R(t,\tau )d\tau\). Finally in (d) The proportions of recovered individuals \(R(\tau ,t)\) for the step function scenario. In both scenarios, we have \(R_0=6.0157\), and the solutions converge to the equilibrium points: EE \((S^e,I^e,R^e)=( 0.1662,0.3961,0.4377)\) for the constant rate and to the EE \((S^e I^e,\int _0^\infty R^e(\tau )d\tau )=(0.1662,0.1456,0.6882)\) for the step function.

Figure 4
figure 4

S–I phase portrait for the step function \(\rho (\tau )=\frac{1}{30}u(t-T)\) for \(T=0,25,50,75\) for the no vaccine case (\(v=0\)). Here \(R_0=6.0157\). The solutions converge to the EE \((S^e, I^e,R^e)= (0.1662,0.3961,0.4377), (S^e, I^e,\int _0^\infty R^e(\tau )d\tau )=(0.1662, 0.2990,0.5348), ( 0.1662,0.1456,0.6882), (0.1662,0.0521,0.6257)\) respectively.

Figure 5
figure 5

Comparing the time series solutions for the constant rates \(\rho (\tau )=0.03\) and for the step function \(\rho (\tau )=0.03u(\tau -50)\) of losing immunity in the vaccine case (\(v=0.5\)). I have (a) The proportions of susceptible individuals, (b) the proportions of infected individuals. (c) The proportions of recovered individuals \(R(\tau ,t)\) for the step function scenario. (d) The proportion of recovered R(t) and \(\int _0^{100} R(t,\tau )d\tau\). Here, with \(R_0 =0.3410\) and \(R_0=0.1575\) , for the log run, the solution converges to DFE \((S^0,I^0,R^0)=(0.0910,0,0.9090)\) and the DFE \((S^0, I^0,\int _0^\infty R^0(\tau )d\tau )=(0.0429,0.0000,0.9571)\) respectively.

Figure 6
figure 6

S–I phase portrait for the step function \(\rho (\tau )=\frac{1}{30}u(t-T)\) for \(T=0,25,50,75\) for the vaccine case (\(v=0.5\)). Here \(R_0=0.3410,0.2153, 0.1575,0.1300\) and the solutions converge to the DFE \((S^0, I^0,R^0)=(0.0910,0,0.9090)\), and to the DFE \((S^0, I^0,\int _0^\infty R^0(\tau )d\tau )=(0.0653,0.0000,0.9347),(0.0429,0.0000,0.9571), (0.0216,0.0000,0.9784)\) respectively.

Figure 7
figure 7

Comparing the model’s time series solutions for the linear rate of losing immunity \(\rho (\tau )=0.0006\tau\) and its average value \(\rho (\tau )=0.03\) over the time interval \(\tau \in [0,100]\) . Here, the vaccination rate is set to \(v=0.5\). The graph illustrates: (a) The proportions of susceptible individuals, (b) the proportions of infected individuals, (c) the proportions of individuals who have recovered from the disease with the linear rate of immunity loss , and (d) the average of recovered \(\overline{R}(t)=\int _0^{100} R(t,\tau )d \tau\) in the linear rate case, and the recovered rate R(t) in the case of the average rate. Here, with \(R_0=0.2330\) and \(R_0 =0.3410\), for the log run, the solution converges to the DFE \((S^0, I^0,\int _0^\infty R^0(\tau )d\tau )=(0.0387, 0.0000, 0.9433)\) and the DFE \((S^0,I^0,R^0)=(0.0567, 0.0000,0.9613)\) respectively.

For \(R_e>1\), \(S^e\) is independent of the vaccine

In Fig. 8, we apply the model with \(\beta =0.6\) to ensure that \(R_0>1\) when \(v\ne 0\), specially when \(v=0.1\) and \(v=0.4\) . The model is applied with a constant rate of losing immunity, \(\rho =0.03\). We found that the time series solution converges to the EE and \(S^e\) in both cases equals the theoretical value \(S^e=\frac{\alpha +\gamma +\mu }{\beta }=0.0554.\)

Figure 8
figure 8

Comparing the time series solutions for vaccine rates \(v=0.1\) and \(v=0.4\) with a constant rate of losing immunity (\(\rho =0.03\)), I observed the following: (a) The proportions of susceptible individuals. (b) The proportions of infected individuals. (c) The proportions of recovered individuals. Here, with \(R_0 =18.0470\) and \(R_0=1.2609\) , the long-run solution converges to the EE \((S^e,I^e,R^e)=(0.0554,0.4487,0.4958)\) and \((S^e, I^e,R^e)=(0.0554,0.0983,0.8463)\) respectively.

Table 1 Sample values for parameters.
Table 2 Initial conditions for the model.

Discussion

I have developed an SIRS model for infectious diseases incorporating vaccination and variable immunity periods. This model combines two ordinary differential equations (ODEs) and one partial differential equation (PDE). I have derived formulas for the basic reproduction number, the disease-free equilibrium, and the endemic equilibrium. Through small perturbation analysis, I have demonstrated that the disease-free equilibrium is globally asymptotically stable when \(R_0<1\) and unstable when \(R_0>1\). Additionally, I have proven the existence and local asymptotic stability of the endemic equilibrium for \(R_0>1\).

Furthermore, I have explored two simple variable immunity loss rates: the step function and linear function. For the step function rate, I have obtained a formula for \(R_0\) and shown that its limit reduces to the conventional \(R_0\) for the classical SIRS ODEs model with a constant rate of immunity loss. Moreover, I have derived a formula to determine the critical efficacy period required for any a given vaccine to effectively control the disease.

I have utilized sensitivity analysis to demonstrate that \(R_0\) is highly sensitive to variations in several critical parameters, including transmission rate, immunity loss rate, recovery rate, disease-induced death rate, and vaccination rate. It has been revealed that maintaining low transmission rates, minimizing immunity loss, and increasing recovery and vaccination rates are crucial for effective disease control. Even minor adjustments in these parameters can significantly influence the value of \(R_0\), underscoring their crucial role in mitigating disease spread.

The simulation conducted for the model indicates that delaying the loss of immunity slows down disease dynamics, whether or not a vaccine is present, resulting in lower reinfection rates and reduced disease severity. Moreover, this delay decreases the basic reproduction number (\(R_0\)), facilitating faster disease control. Furthermore, fixing the rate of immunity loss, we have demonstrated that the vaccine similarly affects the basic reproduction number (\(R_0\)), leading not only to a reduction in the number of susceptible and infected individuals but also to an increase in the number of recovered individuals, thereby saving many lives.

Conclusion

In summary, this study emphasizes the significance of accounting for delays in immunity loss when modeling infectious diseases. The delay in losing immunity slows down disease dynamics, regardless of vaccine involvement, thereby decreasing the risk of reinfection. This delay also contributes to reducing \(R_0\) in the presence of vaccination, potentially leading to faster disease control. The vaccine similarly reduces \(R_0\), the number of susceptible and infected individuals, and increases the number of recovered individuals. If the vaccine provides a long-lasting immunity period, it can further expedite disease control. These findings have significant implications for designing effective vaccination programs and public health policies, especially in light of the potential extension of immunity periods offered by future vaccines.

This study has some limitations. Future research could enhance the model by integrating additional factors, such as the influence of asymptomatic individuals or the effects of vaccine efficacy on disease transmission dynamics. Moreover, it’s crucial to recognize that individuals of different ages may encounter diverse rates of vaccine immunity loss.