Skip to main content
Springer logoLink to Springer
. 2025 Aug 22;91(3):30. doi: 10.1007/s00285-025-02264-3

Bistability and complex bifurcation diagrams generated by waning and boosting of immunity

Francesca Scarabel 1,2,✉,#, Mónika Polner 2,3,✉,#, Daniel Wylde 1, Maria Vittoria Barbarossa 2, Gergely Röst 2,3
PMCID: PMC12373696  PMID: 40844643

Abstract

We investigate an epidemiological model that incorporates waning of immunity at the individual level and boosting of the immune system upon re-exposure to the pathogen. When immunity is fully restored upon boosting, the system can be expressed as an SIRS-type model with discrete and distributed delays. We conduct a numerical bifurcation analysis varying the boosting force and the maximum period of immunity (in the absence of boosting), while keeping other parameters fixed at values representative of a highly infectious disease like pertussis. The stability switches of the endemic equilibrium, identified numerically, are validated using an established analytical approach, confirming that the equilibrium is unstable in a bounded parameter region, and stable outside this region. Using recently developed continuation methods for models with discrete and distributed delays, we explore periodic solutions and their bifurcations. Our analysis significantly extends previous findings and reveals a rich dynamical landscape, including catastrophic bifurcations of limit cycles, torus bifurcations, and bistability regions where two stable periodic solutions coexist, differing in amplitude and period. These complex bifurcations have critical public health implications: perturbations—such as non-pharmaceutical interventions—can shift the system between attractors, leading to long-term consequences from short-term measures.

Keywords: SIRS model, Bifurcation analysis, Oscillations, Torus bifurcation

Introduction

Boosting of the immune system through re-exposure to an infectious pathogen plays a key role in the dynamics of diseases without lifelong immunity, affecting the success of vaccination programmes with imperfect or waning vaccine protection (Schuette and Hethcote 1999; Heffernan and Keeling 2009; Lavine et al. 2011; Dafilis et al. 2012).

Waning and boosting of immunity are particularly challenging to describe mathematically as they introduce delayed feedback loops. To keep the models tractable, the waning of immunity is often modeled using a chain of compartments with full or partial immunity. However, various analyses have shown that such models predict periodic outbreaks only if the chain is long enough, while an overly simplified model could disregard interesting dynamical outcomes and predict damped oscillations to an endemic equilibrium (Hethcote et al. 1981; Gonçalves et al. 2011; Röst and Tekeli 2020). For this reason, structured models that capture the within-host dynamics by explicitly keeping track of the time passed since infection or recovery are more appropriate than simple ordinary differential equations, allowing more flexibility in the definition of delay distributions and potentially reproducing more complex dynamics (Diekmann and Montijn 1982; Aron 1983; Barbarossa and Röst 2015; Diekmann et al. 2018; Okuwa et al. 2021; Yang and Nakata 2021).

To describe in a general way the process of waning and boosting of immunity, Barbarossa and Röst (2015) proposed a model where recovered individuals are structured by a simplified one-dimensional variable Inline graphic that describes the immunity level (thereby avoiding to model the complex details of the immune system response). After natural infection, a host enters the immune compartment with maximum immunity Inline graphic, then their immunity decays in time with some given rate. Immunity can be boosted upon further exposure to the pathogen. When the immune level reaches the lowest threshold Inline graphic, the individual becomes susceptible again.

In a later analysis, Barbarossa et al. (2017) focused on the special case where immunity decays at a constant rate and boosting always restores the maximal level of immunity. For this reason, it is also referred to as the ‘MAXboost’ model (Barbarossa et al. 2018). Under the assumption that the population size is constant, this model reduces to a system of two equations, for the susceptible and infected populations respectively, where the inflow into the susceptible compartment due to loss of immunity is mathematically captured by a distributed delay term. In this model, the maximal delay Inline graphic represents the maximal duration of immunity when boosting does not occur. The authors showed the existence of an endemic equilibrium that undergoes multiple stability switches depending on the model parameters, with sequences of Hopf bifurcations suggesting the emergence of branches of periodic solutions.

The linearised stability analysis of the endemic equilibrium for the MAXboost model was carried out numerically by Barbarossa et al. (2017). Here, we refine the analysis of stability switches of the endemic equilibrium when the maximum duration of immunity is varied, and fully characterise the stability changes that occur in the MAXboost model. The main difficulty lies in studying characteristic equations where the delay occurs in multiple ways. Delay systems in which the coefficients in the characteristic equation depend on the time delay Inline graphic only through an exponential term Inline graphic are easier to study, and the theory in such cases is well developed (see, for example, Kuang (1993)). One can usually explicitly compute the delay values for which stability switches occur. A systematic approach to studying characteristic equations with delay-dependent parameters has been developed by Beretta and Kuang (2002) for one constant delay, and extended to multiple delay systems by An et al. (2019). Using this method, we provide geometric and analytical criteria for stability switches with respect to the delay. In addition, this approach provides a rigorous method for finding Hopf bifurcations.

The bifurcation analysis beyond Hopf points for models with discrete and distributed delays has traditionally been limited, due to the complexity of the analytical calculations and the lack of easily accessible software tools. As an example, Taylor and Carr (2009) obtained analytical and numerical results on the delayed SIRS model without boosting of immunity by rigorously studying the small periodic oscillations emerging from a supercritical Hopf bifurcation, and the stable pulse oscillations that coexist with the stable endemic equilibrium near subcritical Hopf bifurcations. This is one of the first examples of bistability in infectious disease models with waning immunity.

In the presence of boosting of immunity, bistability has also been observed by Dafilis et al. (2012) in a SIRWS compartmental model with one intermediate waning immunity compartment. By performing a numerical bifurcation analysis, the authors showed the presence of subcritical Hopf bifurcations when varying the boosting force and the per capita mortality rate, with the emergence of regions of bistability of the endemic equilibrium with a stable limit cycle. Kojakhmetov et al. (2021) then rigorously showed existence of oscillations in the fast-slow SIRWS model proposed by Dafilis et al. (2012) using geometric singular perturbation theory. Strube et al. (2021) further extended the analyses of bistability in the SIRWS model, showing that the region of bistability is relatively small for biologically realistic parameters. Opoku-Sarkodie et al. (2022) generalised the SIRWS model by allowing different expected durations for individuals being in the fully immune compartment and being in the waning immunity compartment, from where their immunity can still be restored upon re-exposure. The modified model exhibits rich dynamics and displays additional complexity with respect to the symmetric partitioning.

In this paper, we further expand the analysis of the MAXboost model by using a recently developed delay equation importer for MatCont 7p6 for MATLAB (Liessi et al. 2025), that allows to perform the numerical bifurcation analysis of equations with discrete and distributed delays. Our analysis captures a richer dynamical behaviour than previous ones, including those from Hethcote et al. (1981), Taylor and Carr (2009) and Dafilis et al. (2012), even in the absence of boosting. In particular, we find a series of catastrophic bifurcations that originate from the switch between supercritical and subcritical Hopf bifurcations when varying the boosting force and the maximal duration of immunity, which can result in drastic changes in the epidemiological situation due to small perturbations of parameters. We find interesting bifurcations on the branches of periodic solutions, including Neimark–Sacker bifurcations and the emergence of stable tori, highlighting how waning and boosting of immunity lead to a very complex dynamical landscape. Most importantly, we identify regions of parameters that exhibit bistability, both of one equilibrum and a periodic solutions and of two distinct periodic solutions for the same parameter values. The existence of coexisting stable periodic solutions differing in amplitude and period has important consequences in public health, as perturbations due for instance to the implementation of public health interventions could push the system to a different attractor.

The paper is structured as follows. In Sect. 2, we briefly summarise the MAXboost model under consideration and formally study the stability switches of the endemic equilibrium depending on the maximal duration of immunity when not boosted. In Sect. 3, we perform a numerical bifurcation analysis with respect to the length of the immune period and the boosting force. We also focus on the special case of waning immunity but no boosting, showing in this case, too, the existence of multiple stability switches and branches of stable periodic solutions with different amplitudes and periods. Finally, we briefly comment on the impact of the expected lifetime on stability. In the last section, we discuss the results and the implications of our findings in the context of public health interventions.

The mathematical model

We consider the model studied by Barbarossa et al. (2017) for the spread of an infectious pathogen that confers temporary immunity. Let S, I and R be the fraction of susceptible, infected, and immune individuals in the population, respectively, so that Inline graphic. Let Inline graphic be the per capita natural mortality rate of individuals, equal to the total population birth rate. Let Inline graphic and Inline graphic denote respectively the per capita transmission rate and the recovery rate of infected individuals. Upon recovery, individuals are completely immune to the disease, but they re-enter the susceptible class after time Inline graphic, unless their immune system is boosted before time Inline graphic. If immune individuals enter in contact with the pathogen, their immune system can be boosted to the maximal level at a rate Inline graphic, where Inline graphic represents the boosting force. Hence, the rate at which individuals re-enter the class S at time t is given by the individuals who had maximal immunity at time Inline graphic, and their immune system has not been boosted between Inline graphic and t. Specifically, at time Inline graphic there are two cohorts of individuals who acquire maximal immunity: those who recover naturally, at total rate Inline graphic, and those whose immunity has been boosted, at rate Inline graphic. The probability that individuals in these cohorts do not die nor receive an immunity boost between Inline graphic and t is given by Inline graphic. The total inflow into S at time t is therefore given by

graphic file with name d33e495.gif

Since the population is constant, we can write Inline graphic, hence the full model is described by the two equations

graphic file with name d33e507.gif 1

We refer to Barbarossa and Röst (2015) for an equivalent formulation of the model using partial differential equations.

Note that, if Inline graphic, immune boosting following secondary exposure occurs at a lower rate than primary infection. Conversely, if Inline graphic, boosting can occur through exposures that would not induce infection in a susceptible host (Lavine et al. 2011). When Inline graphic, the model reduces to a SIRS model with no boosting of immunity. When Inline graphic, the model reduces to a SIR model with no waning of immunity.

System (1) always admits the disease-free equilibrium Inline graphic, which is globally asymptotically stable when Inline graphic, where Inline graphic is the basic reproduction number, defined by

graphic file with name d33e569.gif 2

If Inline graphic, the disease-free equilibrium is unstable and a unique endemic equilibrium Inline graphic exists, with Inline graphic and Inline graphic implicitly defined by the equation

graphic file with name d33e601.gif

The endemic equilibrium can be stable or unstable depending on parameters. Barbarossa et al. (2017) performed a numerical analysis of the stability boundaries of the endemic equilibrium varying the parameters Inline graphic and Inline graphic, with all other parameters fixed so that Inline graphic, using TRACE-DDE, a MATLAB computational tool (Breda et al. 2009). The analysis shows that the equilibrium destabilises through Hopf bifurcations. However, no information is given about the dynamical behaviour when the endemic equilibrium is unstable.

Stability switches of the endemic steady state

In this section, based on the method developed by Beretta and Kuang (2002), we study the occurrence of possible stability switches of the endemic equilibrium as a result of increasing the delay Inline graphic.

Recall from Barbarossa et al. (2017) that linearising the system (1) about the endemic equilibrium point Inline graphic, with Inline graphic, results in the characteristic equation

graphic file with name d33e665.gif

where

graphic file with name d33e672.gif 3

This can be written in the form

graphic file with name d33e679.gif

where

graphic file with name d33e685.gif

and Inline graphic as in (3). Note here the dependence of the polynomials P and Q on the delay, which appears in their coefficients not only explicitly in the term Inline graphic, but also implicitly through the equilibrium component Inline graphic. A systematic approach to study characteristic equations with delay-dependent parameters was developed by Beretta and Kuang (2002). We give here a brief summary of their technique as it applies to our problem.

We look for purely imaginary roots, Inline graphic, Inline graphic of Inline graphic. Separating the real and imaginary parts in Inline graphic results in

graphic file with name d33e748.gif 4

From the characteristic equation, Inline graphic therefore, if Inline graphic satisfies (4), then it must be a positive root of the polynomial

graphic file with name d33e771.gif 5

where

graphic file with name d33e778.gif

Since the coefficients depend on the delay, we have that Inline graphic. We find that Inline graphic solves Inline graphic if and only if Inline graphic is a root of F, which in turn can have zero, one, or two positive Inline graphic roots.

Assume that Inline graphic is the set of all time delays for which Inline graphic is a positive root of F, that is

graphic file with name d33e835.gif

For any Inline graphic, where Inline graphic is a positive root of Inline graphic, we can define the angle Inline graphic, such that Inline graphic and Inline graphic are given by the right-hand side of (4), i.e.,

graphic file with name d33e882.gif 6

Hence, for all Inline graphic we must have Inline graphic. Define the maps Inline graphic as

graphic file with name d33e907.gif

where Inline graphic is a positive solution of Inline graphic. Finally, introduce the functions

graphic file with name d33e926.gif

Then Theorem 2.2 in Beretta and Kuang (2002) states that, if Inline graphic is a positive root of Inline graphic in (5) defined for Inline graphic, and at some Inline graphic we have that

graphic file with name d33e963.gif

then a simple pair of conjugate pure imaginary roots Inline graphic of Inline graphic exists at Inline graphic that crosses the imaginary axis. The theorem also gives conditions that determine the direction of the crossing. In particular, let

graphic file with name d33e988.gif 7

Then, the pair of eigenvalues crosses the imaginary axis from left to right if Inline graphic, and from right to left if Inline graphic.

Let us return to our model. We can give explicit conditions on the coefficients of the polynomial Inline graphic in (5), as functions of Inline graphic, such that F admits one or two positive Inline graphic roots. In the next proposition, we characterise the set of time delays for which positive roots Inline graphic exist.

Proposition 1

For the dynamical system (2), the delay interval for which Inline graphic has positive Inline graphic roots is finite.

Proof

First, we specify the delay intervals for which one or two positive (distinct) roots Inline graphic of F exist. It is straightforward to see that, if Inline graphic for some Inline graphic, then F has exactly one Inline graphic root, and, when Inline graphic, then under some additional conditions F has exactly two Inline graphic distinct positive roots. For a better understanding, we plotted in Fig. 1 all possible outcomes for the number of roots. This figure divides the Inline graphic-plane according to the number of positive roots of F, and it also marks with a dashed line the boundary that separates regions where roots exist and where not. Along the dashed line, there are no admissible roots. Define the sets where positive roots of F exist by

graphic file with name d33e1125.gif

and

graphic file with name d33e1131.gif

where Inline graphic. Hence for Inline graphic, Inline graphic is not defined. It is clear that if Inline graphic, then F has only one Inline graphic root, whereas if Inline graphic, then both Inline graphic and Inline graphic exist. Note that, due to the continuity of the roots with respect to Inline graphic, Inline graphic and Inline graphic are (connected) intervals. For the remainder of this paper, let Inline graphic (or Inline graphic) and Inline graphic (or Inline graphic). We need to show that Inline graphic.

Fig. 1.

Fig. 1

The partition of the Inline graphic-plane according to the number of positive distinct roots Inline graphic of Inline graphic in (5). The dashed curve is the boundary separating the region where there is at least one admissible root (marked by II. and III.) from the region where there are no roots (marked by I.)

Consider the limit Inline graphic, which means that immunity is lifelong. In this case, the system reduces to an SIR system, and if there is demography (Inline graphic), then there is a unique endemic equilibrium when Inline graphic,

graphic file with name d33e1291.gif

In this limit, we also have that

graphic file with name d33e1297.gif 8

Since Inline graphic, there exists Inline graphic such that Inline graphic for all Inline graphic, i.e., if Inline graphic is large enough, we arrive and stay in the right half of the Inline graphic-plane in Fig. 1. Since the roots Inline graphic are continuous, this implies that either there are no positive roots for Inline graphic (in domain I.), then Inline graphic, or there are two distinct ones (in domain III.). In the second case, due to continuity, Inline graphic for Inline graphic for some Inline graphic or Inline graphic.

If Inline graphic, i.e., Inline graphic changes sign at Inline graphic, then again by continuity, this is only possible if we first cross the Inline graphic curve at some Inline graphic value, i.e., there exists a Inline graphic, such that Inline graphic. At this value of the delay, the two roots collide, yielding that Inline graphic.

If Inline graphic, i.e., Inline graphic for all Inline graphic, then in (8), Inline graphic. Since Inline graphic, it follows that Inline graphic, which implies due to the continuity of Inline graphic that there exists Inline graphic such that Inline graphic. Therefore, Inline graphic, which completes the proof.

Inline graphic

If only Inline graphic, Inline graphic is feasible, then stability switches can occur only at the roots of Inline graphic. However, if both Inline graphic and Inline graphic are feasible for Inline graphic, then switches can occur at the zeros of the following two sequences of functions

graphic file with name d33e1553.gif 9

Here the angles Inline graphic and Inline graphic are the solutions of (6) corresponding to Inline graphic and Inline graphic, respectively. Clearly, if Inline graphic, then the following monotonicity properties hold for all Inline graphic, Inline graphic,

graphic file with name d33e1606.gif 10

Remark 1

Suppose that Inline graphic is a root of Inline graphic for Inline graphic. Since

graphic file with name d33e1634.gif

it is straightforward to see that Inline graphic for all Inline graphic and Inline graphic for all Inline graphic. Then we can determine the direction of which eigenvalues cross the imaginary axis, i.e., the sign of Inline graphic in (7), only by analysing the derivative of Inline graphic and Inline graphic at Inline graphic, respectively.

In the next lemma we describe, using Fig. 1, how stability switches can occur, which will also determine the direction in which eigenvalues cross the imaginary axis.

Lemma 2

The endemic equilibrium may undergo stability changes, and eventually it becomes stable for any value of the boosting Inline graphic.

Proof

We prove this lemma in more steps, depending on the number of feasible roots Inline graphic of Inline graphic.

Case 1. Assume that Inline graphic, i.e., only one root Inline graphic is feasible for Inline graphic (or Inline graphic). We need to show that for all Inline graphic larger than the last zero of Inline graphic for some Inline graphic, all eigenvalues have passed and remain on the left half of the imaginary axis.

If Inline graphic, then from (9) it follows that Inline graphic for all Inline graphic. If Inline graphic, then it is determined by the conditions Inline graphic and Inline graphic, see also Fig. 1. Therefore,

graphic file with name d33e1816.gif

Since Inline graphic is finite, Inline graphic is also determined by the condition Inline graphic and Inline graphic. Then we have that

graphic file with name d33e1847.gif

This, together with the monotonicity property of Inline graphic in (10), implies that Inline graphic can only have an even number of sign changes for each n, so there is an even number of possible stability switches on Inline graphic. Moreover, since the equilibrium is stable at Inline graphic, the first switch is towards unstable. From Remark 1, we have that Inline graphic whenever Inline graphic, so by the monotonicity property of Inline graphic, it is straightforward to see that the last switch is at Inline graphic, the zero of Inline graphic, and that Inline graphic, which completes this part of the proof.

Case 2. Suppose Inline graphic and Inline graphic. Then the switches in the interval Inline graphic are determined by the zeros of Inline graphic. This means that as we increase Inline graphic in this interval, only Inline graphic changes sign, which does not affect the existence of Inline graphic. At Inline graphic we have Inline graphic, Inline graphic and Inline graphic changes sign as we continue to increase Inline graphic. Thus we enter region III in Fig. 1, where both Inline graphic and Inline graphic exist up to Inline graphic. Two things can happen here, either the two roots collide and then disappear, or only Inline graphic remains feasible as we further increase Inline graphic. In the first case Inline graphic, Inline graphic and Inline graphic for Inline graphic, and in the second case Inline graphic and Inline graphic.

Let us analyse the possible stability switches that can occur at the zeros of Inline graphic, Inline graphic and Inline graphic, Inline graphic, respectively. From case 1, it follows that the first switch occurs at Inline graphic, the first zero of Inline graphic and the equilibrium becomes unstable. At Inline graphic the second root Inline graphic appears and

graphic file with name d33e2124.gif

Next, we discuss the last eigenvalue crossing. If Inline graphic and Inline graphic collide (thus they are not admissible) at Inline graphic, we have that

graphic file with name d33e2149.gif 11

If this limit is positive and Inline graphic and Inline graphic have sign changes, then the last zero at Inline graphic is at the zero of Inline graphic. In this case, both Inline graphic and Inline graphic have an odd number of sign changes, so there are an even number of eigenvalue crossings in total. If the limit in (11) is negative, then Inline graphic has an even number of sign changes and Inline graphic can have none or an even number for all Inline graphic. Thus, the total number of zeros will also be even.

It remains to discuss the case where Inline graphic, that is, only the root Inline graphic is feasible for Inline graphic. On the interval Inline graphic, we can apply the arguments of case 1 to count the number of sign changes of Inline graphic.

To summarise, in case 2 the number of eigenvalue crossings is even. Then Remark 1 and the monotonicity properties in (10) prove the statement of the lemma.

Case 3. Suppose Inline graphic (or Inline graphic), i.e., the roots Inline graphic are both feasible. If Inline graphic, then Inline graphic for all Inline graphic and the monotonicity properties imply that the first switch occurs at the zero of Inline graphic. If Inline graphic, then Inline graphic and Inline graphic. Hence,

graphic file with name d33e2319.gif

and in the limit Inline graphic (11) holds, so it is easy to check that the total number of eigenvalue crossings is also even in this case, and use the same arguments as before to complete the proof of this lemma. Inline graphic

In the next section, we will use this technique to compute the stability switches for a given set of parameters inspired by pertussis, and different values of Inline graphic.

Numerical bifurcation analysis

To investigate the dynamical behaviour of the system beyond the equilibria, in this section we perform a numerical bifurcation analysis for the parameter set considered by Lavine et al. (2011) and Barbarossa et al. (2017), which is plausible with a highly infectious disease like pertussis. We take Inline graphic, Inline graphic (Inline graphic), corresponding to an average infectious period of 21 days, and per capita death rate Inline graphic (Inline graphic), corresponding to an average lifetime of 50 years. The parameter Inline graphic is then fixed through (2) (Inline graphic Inline graphic). We perform stability and bifurcation analyses varying the parameters Inline graphic and Inline graphic, which represent the maximal duration of immunity in the absence of boosting and the boosting force, respectively. Since Inline graphic, the endemic equilibrium exists for all Inline graphic and Inline graphic, with the susceptible population equal to Inline graphic at equilibrium.

The numerical continuation is performed with MatCont 7p6 running on MATLAB (Liessi et al. 2025). For the approximation of the history in the delay interval we chose a collocation degree of Inline graphic or Inline graphic, depending on the required accuracy and the other parameter values. The distributed delay is approximated with a quadrature rule on the same collocation nodes. We refer to Breda et al. (2016) for further details on the numerical approximation.

Stability of the endemic equilibrium

Figure 2 shows the computed stability regions of the endemic equilibrium in the parameter plane Inline graphic, which is consistent with the results presented by Barbarossa et al. (2017, Fig. 1). The endemic equilibrium is stable outside the outermost boundary curve, and unstable inside (shaded region). Note that, as theoretically expected, the equilibrium is always stable on the axis Inline graphic (corresponding to an SIS-type model with individuals immediately susceptible upon recovery).

Fig. 2.

Fig. 2

Left: stability of the endemic equilibrium of model (1) in the plane Inline graphic. Solid lines represent Hopf bifurcation curves, with Hopf–Hopf (HH, Inline graphic) and Generalized Hopf (GH, Inline graphic) bifurcations detected along the curves. The endemic equilibrium is unstable in the shaded area. Although not visible in the diagram due to the scaling of the axis, the lowest curves connect at a large value of Inline graphic. The vertical dashed lines correspond to the parameters chosen for the one-parameter bifurcation diagrams in the following analyses. Note that an accurate approximation near Inline graphic requires large discretisation indices and becomes computationally challenging, so we do not show it here. Right: close-up with the bifurcations numerically detected on different branches of limit cycles, delimiting their stability regions

The boundary separating the stable and unstable regions is the union of different segments of Hopf bifurcation curves corresponding to different pairs of complex eigenvalues crossing transversally the imaginary axis. The parameter values at which two different pairs of complex eigenvalues cross the imaginary axis correspond to Hopf-Hopf bifurcations (HH), and lie at the intersection of distinct Hopf curves. Moreover, generalized Hopf points (GH) are detected along each curve, corresponding to changes in the criticality of the Hopf bifurcation. We refer to Kuznetsov (1998, Chapter 8) for further details on these bifurcations.

GH points are often associated with the emergence of limit points of cycles (LPC) (Kuznetsov 1998, Sect. 8.3.3) and hence with bistability of equilibria and periodic solutions. Similarly, HH points are associated with the emergence of Neimark–Sacker bifurcations (NS) and invariant tori (Kuznetsov 1998, Sect. 8.6.3). Figure 2 therefore suggests the emergence of rich and complex dynamics. We further explore such complex dynamics by studying the one-parameter continuation of the periodic orbits emerging from Hopf and their bifurcations, fixing Inline graphic, 3.2, 2, 1, and varying the duration of immunity Inline graphic (along the dashed lines indicated in Fig. 2).

One-parameter bifurcation diagrams with respect to Inline graphic

Figure 3 shows the one-parameter bifurcation diagram with respect to Inline graphic for Inline graphic (left), and the corresponding estimated period along the branch of limit cycles (right). Four Hopf bifurcations are detected along the equilibrium curve, at approximately Inline graphic, 2.86, 3.15, and 4.59. The equilibrium is unstable between the first two points and between the last two points. A bubble of stable limit cycles exists for Inline graphic between 3.15 and 4.59 (both supercritical bifurcations), with a period between 2.2 and 2.8 years. When computing the limit cycle branch emerging from Inline graphic, the amplitude of the branch diverges quickly, and the numerical continuation stops. This branch is therefore not shown in the figure.

Fig. 3.

Fig. 3

Left: bifurcation diagram of I varying Inline graphic, for Inline graphic, including the equilibrium curve with the detected Hopf bifurcations (H, Inline graphic) and the max/min values of the branch of limit cycles. Solid red lines indicate a stable equilibrium/limit cycle, dashed lines are unstable. Right: period of the limit cycle branch (years)

Figure 4 (left) shows how the roots Inline graphic and Inline graphic of Inline graphic in (5) vary as a function of Inline graphic in their maximal interval of existence, which for this set of parameters are Inline graphic and Inline graphic, respectively. Let us analyse this with reference to Fig. 1. When Inline graphic, we are in the second quadrant of the Inline graphic-plane, so Inline graphic is the only root. As we increase Inline graphic, only Inline graphic changes sign, which does not affect the existence of Inline graphic. At Inline graphic, Inline graphic, Inline graphic and Inline graphic changes sign as we continue to increase Inline graphic. Thus we enter region III, so both Inline graphic and Inline graphic exist up to Inline graphic, where they collide and then disappear. This is an example of case 2 in the proof of Lemma 2.

Fig. 4.

Fig. 4

Positive roots Inline graphic and Inline graphic of Inline graphic in (5) for Inline graphic (left) and Inline graphic (right) as Inline graphic varies

Let us analyse the possible stability switches that can occur at the zeros of Inline graphic, Inline graphic and Inline graphic, Inline graphic, respectively. Since Inline graphic, the first switch occurs at Inline graphic, the first zero of Inline graphic, destabilising the endemic equilibrium. Since at Inline graphic, Inline graphic and Inline graphic collide and disappear, we have that

graphic file with name d33e2885.gif

This limit is positive for Inline graphic, for which Inline graphic and Inline graphic have a sign change, so both Inline graphic and Inline graphic have an odd number of zeros, and therefore together they have an even number. The last zero is at Inline graphic, the zero of Inline graphic.

As we can observe in Fig. 5, the numerical computation of the rightmost eigenvalue crossings as Inline graphic varies (bottom left panel), aligns perfectly with the computation of possible stability switches, which are the zeros of Inline graphic, Inline graphic (top left panel). The zeros were calculated using (9) on the corresponding intervals Inline graphic and Inline graphic. This also confirms Lemma 2, which implies that the endemic equilibrium will be stable for all Inline graphic.

Fig. 5.

Fig. 5

Top: graph of the stability switch functions Inline graphic for Inline graphic, where Inline graphic and 3.2, respectively. Bottom: corresponding real part of the rightmost eigenvalues along the equilibrium branch, varying Inline graphic. Black dots indicate Hopf bifurcations

To illustrate the emergence of bistability through the GH point, Fig. 6 shows the one-parameter continuation for Inline graphic. In this case, we still observe a bubble of limit cycles for Inline graphic between the Hopf points 2.11 and 5.37 (first supercritical, second subcritical). An LPC and an NS bifurcations are detected on the branch of limit cycles, and the limit cycles are stable between those bifurcations. Bistability occurs for values of Inline graphic between the Hopf and LPC bifurcations (i.e., for Inline graphic between 5.37 and 6.16), where a stable limit cycle coexists with the stable endemic equilibrium, so the asymptotic behaviour of the system depends on the initial condition.

Fig. 6.

Fig. 6

Left: bifurcation diagram of I varying Inline graphic, for Inline graphic. Solid red lines indicate stable equilibrium/limit cycles; dashed lines indicate unstable. NS and LPC labels indicate Neimark–Sacker and limit point of cycle bifurcations, respectively. The blue shading shows the interval in which a stable equilibrium coexists with a stable limit cycle, for Inline graphic between 5.37 and 6.16. Right: period along the limit cycle branch (years)

Note that, once again, the Hopf bifurcations correspond to those found analytically: in Fig. 4 (right) the roots Inline graphic and Inline graphic are plotted as functions of Inline graphic on their maximal interval of existence, i.e., Inline graphic, Inline graphic. The stability switches and rightmost eigenvalue crossings can be observed in the right panel of Fig. 5.

Figure 7 shows the emergence of a stable invariant torus through the NS bifurcation: the long-term orbits in the plane (SI) are plotted for values of Inline graphic taken on opposite sides of the NS (Inline graphic and Inline graphic). The left panel shows the coexisting stable equilibrium and limit cycle, while the right panel shows the orbit of a stable invariant torus.

Fig. 7.

Fig. 7

Left: bistability of the positive equilibrium and the stable limit cycle for Inline graphic and Inline graphic. Right: emergence of a stable torus via a Neimark–Sacker bifurcation, for Inline graphic and Inline graphic

An even more complex dynamical picture is shown in Fig. 8 for Inline graphic, with two different closed limit cycle curves connecting different pairs of Hopf bifurcations, one with larger amplitude and larger period than the other. Each branch is stable in an interval of values between an LPC and an NS bifurcation. Two regions of bistability appear: one with a stable equilibrium coexisting with a stable limit cycle, and one with two different stable limit cycles. These regions are shaded in Fig. 8. Figure 9 shows the orbits of the limit cycles in the small- and large-amplitude branches, as well as their time profiles. The figure highlights the differences in both amplitude and period. Following the LPC and NS curves for each bubble of limit cycles in the plane Inline graphic one can get some insights about regions of parameters where two stable periodic solutions coexist, or one stable periodic solution coexists with the stable endemic equilibrium. These curves are sketched in the right panel in Fig. 2.

Fig. 8.

Fig. 8

Left: bifurcation diagram of I varying Inline graphic, for Inline graphic. Solid red lines indicate stable equilibrium/limit cycles; dashed indicate unstable. Right: period of the limit cycle along the branches. The figure shows two intervals of bistability: the blue shading indicates bistability of an equilibrium and limit cycle, while the red shading indicates bistability of two limit cycles differing in amplitude and period

Fig. 9.

Fig. 9

Orbits (left) and trajectories (right) of the stable coexisting limit cycles, for Inline graphic and Inline graphic. Periods are approximately 1.41 years (blue) and 2.67 years (red)

Figure 10 shows the Inline graphic and Inline graphic curves expected from the analysis with Inline graphic, as well as the stability switch curves that predict the Hopf bifurcation points.

Fig. 10.

Fig. 10

For Inline graphic, the positive roots Inline graphic and Inline graphic of Inline graphic in (5) (left) and the graph of the stability switch functions Inline graphic for Inline graphic (right)

As Inline graphic becomes smaller, the bifurcation diagrams become more and more complicated, with several nested limit cycle bubbles emerging from longer sequences of Hopf bifurcations. Figure 11 shows the stability switch curves for Inline graphic, and the corresponding bifurcation diagram. In the left panel, we can see five different curves crossing the horizontal axis, giving rise to ten Hopf bifurcations. The last bifurcation, which corresponds to a stability switch from unstable to stable, is at approximately Inline graphic. The four rightmost bubbles of limit cycles are shown in the right panel. As before, the branch of limit cycles emerging from the smallest Hopf point is not shown, as it quickly diverges and the computation stops.

Fig. 11.

Fig. 11

Case Inline graphic. Left: stability switch functions Inline graphic. Right: bifurcation diagram, with dashed lines indicating unstable branches

The case with no boosting

When Inline graphic (no boosting) the system reduces to the delayed SIRS model

graphic file with name d33e3454.gif

Similar models with a fixed immunity period and no boosting of immunity have been considered for instance by Hethcote et al. (1981), Taylor and Carr (2009), and more recently applied to COVID-19 transmission by Pell et al. (2023).

Since the unique endemic equilibrium

graphic file with name d33e3471.gif

depends on Inline graphic explicitly, the calculation of stability switches in Sect. 2.1 becomes somewhat easier in this case. We seek zeros Inline graphic of Inline graphic in (5), where the coefficients are

graphic file with name d33e3502.gif

Since Inline graphic for all Inline graphic and all parameters in the system, F has two or no positive zeros. Hence, Inline graphic and Inline graphic are both feasible when Inline graphic, where

graphic file with name d33e3542.gif

This corresponds to case 3 in the proof of Lemma 2. With our set of parameters, Inline graphic. Since this interval is very large, we have covered only the region close to Inline graphic and Inline graphic, where Inline graphic are feasible and collide at both ends, see Fig. 12 (top panels). There are 72 possible stability switches, so in Fig. 12 (bottom panels) we show only the first and last few Inline graphic curves. The last switch is at the zero of Inline graphic at Inline graphic, Fig. 12 (bottom right).

Fig. 12.

Fig. 12

Case Inline graphic. Top row: the roots Inline graphic and Inline graphic of Inline graphic as functions of Inline graphic when Inline graphic is small, close to Inline graphic, and large, close to Inline graphic. Bottom row: the stability switches in the corresponding intervals. The last switch, when the equilibrium becomes stable, is the zero of Inline graphic at Inline graphic

Since the model has only one discrete delay, we performed the bifurcation analysis with the package DDE-BIFTOOL for MATLAB (Engelborghs et al. 2002). Figure 13 (left) shows the rightmost Hopf bifurcations and the two rightmost limit cycle bubbles. In this case we did not detect bistability, but two stable limit cycles with different amplitudes exist for parameter values that are in a relatively small interval around Inline graphic years. The right panel in Fig. 13 shows the stable orbits in the (SI) plane, for Inline graphic (large amplitude) and Inline graphic (small amplitude). The convergence to the stable limit cycles was confirmed by performing a long-time integration of the system using the built-in function dde23 for MATLAB.

Fig. 13.

Fig. 13

Case Inline graphic. Left: bifurcation diagram of I (rightmost Hopf bifurcations) obtained with DDE-BIFTOOL, showing two regions of stability on different branches of periodic orbits. Right: stable limit cycles with different amplitudes and periods, obtained via long-term time integration using dde23

Finally, we stress that, due to the large values of the delay at the stability switch when Inline graphic, the numerical analysis with MatCont becomes challenging as large discretisation indices are needed to obtain sufficient accuracy. Figure 14 compares the approximation error of the rightmost Hopf bifurcation detected by MatCont, for Inline graphic and Inline graphic, depending on the degree M of the collocation polynomial used in the approximation of the delay system in MatCont 7p6. The right panel shows that a collocation degree of the order of 150 is needed to approximate the Hopf bifurcation for Inline graphic, which occurs at approximately Inline graphic. This is much larger than the collocation degree required to approximate the Hopf bifurcations for larger Inline graphic (left panel), which is of the order of 20.

Fig. 14.

Fig. 14

Log–log plot of the approximation error of the rightmost Hopf point for Inline graphic (left) and Inline graphic (right), depending on the collocation degree M used in the approximation of the delayed state in MatCont 7p6. The error is computed with respect to the numerical value obtained with Inline graphic and Inline graphic, respectively. The computation is carried out using the default MatCont tolerance Inline graphic, explaining the error barrier

Impact of life expectancy

The previous analyses were carried out for fixed demographic parameters, and in particular for a rather short life expectancy (50 years). However, life expectancy is known to play an important role in the emergence of oscillatory dynamics: using a compartmental SIRWS model, Dafilis et al. (2012) showed that increasing life expectancy can cause sustained oscillations in the presence of waning and boosting of immunity. With this motivation, we conclude this study with a brief discussion on the sensitivity of our stability results to the life expectancy of individuals.

The left panel of Fig. 15 shows the stability and instability regions of the endemic equilibrium in the parameter plane Inline graphic (similarly as Fig. 2) when the per capita death rate is Inline graphic, corresponding to an average lifespan of approximately 75 years. While the qualitative picture remains the same, decreasing the mortality rate d enlarges the region of instability compared to Fig. 2 (left). The destabilising effect of increasing life expectancy is also evident from the right panel of Fig. 15, which shows the stability and instability regions in the plane Inline graphic, for fixed Inline graphic years and Inline graphic Inline graphic, so that Inline graphic varies with d according to (2). We observe that, as d decreases, the system undergoes a Hopf bifurcation with the emergence of stable periodic solutions. These results qualitatively agree with the analyses by Dafilis et al. (2012) (see for instance Fig. 4 in that reference).

Fig. 15.

Fig. 15

Left: stability of the endemic equilibrium of model (1) in the plane Inline graphic, with same parameters as in Fig. 2, but the per capita mortality rate now fixed at Inline graphic, corresponding to an expected lifespan of approximately 75 years. Right: stability of the endemic equilibrium in the plane Inline graphic, for fixed Inline graphic

Discussion and conclusions

In this paper, we extended the analysis of the dynamics and bifurcations of the model with waning and boosting of immunity proposed by Barbarossa et al. (2017), formulated as a system of equations with discrete and distributed delays. Bifurcation analyses for such models are scarce in the literature, due to the technicalities and complexities in the calculations. Our analysis was performed with a recently developed software release, MatCont 7p6 for MATLAB (Liessi et al. 2025).

For parameter values describing a highly infectious disease like pertussis, our analysis uncovered a much more complex dynamical picture than previous ones, including catastrophic bifurcations and parameter regions with bistability of different attractors. While bistability in waning-boosting models has been observed previously (for instance Dafilis et al. 2012 and Opoku-Sarkodie et al. 2024), our work is the first to analyse a delayed model and find evidence of bistability not only of the endemic equilibrium and a limit cycle, but also of two distinct stable limit cycles differing in amplitude and period, for the same parameter values.

Catastrophic bifurcations and bistability have practical relevance in public health, as disturbances of the system’s state or parameters by non-pharmaceutical interventions can push the system to a different basin of attraction, hence potentially changing its long-term dynamics. Pertussis transmission, for instance, is highly influenced by waning-boosting dynamics, and post-pandemic outbreaks have sparked significant concern (Kang et al. 2025).

Our work helps to better understand the role of duration of immunity and boosting force in shaping disease dynamics, further corroborating the evidence that waning-boosting infection dynamics is highly nonlinear, extremely complex, and public health interventions may have unintended consequences.

Acknowledgements

The research of FS was supported by the Engineering and Physical Sciences Research Council via the Mathematical Sciences Small Grant UKRI170: “The dynamics of waning and boosting of immunity: new modelling and numerical tools”. FS is a member of the Computational Dynamics Laboratory (CDLab, University of Udine), of INdAM research group GNCS, of UMI research group Modellistica Socio-Epidemiologica, and of JUNIPER (Joint UNIversities Pandemic and Epidemiological Research). The research of MP and GR was completed in the National Laboratory for Health Security, RRF-2.3.1-21-2022-00006. Additionally, their work was supported by the Ministry of Innovation and Technology of Hungary from the National Research, Development and Innovation Fund project no. TKP2021-NVA-09 and KKP 129877. FS is grateful to Stefan Ruschel and Jan Sieber for helpful insights on the analysis with DDE-BIFTOOL.

Data availability

No external data has been used to generate the results. The simulations are obtained using MATLAB 2023b and the free software packages MatCont version 7p6 and DDE-BIFTOOL version 3.2a.

Footnotes

Publisher’s Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Francesca Scarabel and Mónika Polner contributed equally to this work.

Contributor Information

Francesca Scarabel, Email: f.scarabel@leeds.ac.uk.

Mónika Polner, Email: polner@math.u-szeged.hu.

References

  1. An Q, Beretta E, Kuang Y, Wang C, Wang H (2019) Geometric stability switch criteria in delay differential equations with two delays and delay dependent parameters. J Differ Equ 266(11):7073–7100 [Google Scholar]
  2. Aron JL (1983) Dynamics of acquired immunity boosted by exposure to infection. Math Biosci 64(2):249–259 [Google Scholar]
  3. Breda D, Diekmann O, Gyllenberg M, Scarabel F, Vermiglio R (2016) Pseudospectral discretization of nonlinear delay equations: new prospects for numerical bifurcation analysis. SIAM J Appl Dyn Syst 15(1):1–23 [Google Scholar]
  4. Beretta E, Kuang Y (2002) Geometric stability switch criteria in delay differential systems with delay dependent parameters. SIAM J Math Anal 33(5):1144–1165 [Google Scholar]
  5. Breda D, Maset S, Vermiglio R (2009) TRACE-DDE: a tool for robust analysis and characteristic equations for delay differential equations. In: Topics in time delay systems. Springer, New York, pp 145–155
  6. Barbarossa MV, Polner M, Röst G (2017) Stability switches induced by immune system boosting in an SIRS model with discrete and distributed delays. SIAM J Appl Math 77(3):905–923 [Google Scholar]
  7. Barbarossa MV, Polner M, Röst G (2018) Temporal evolution of immunity distributions in a population with waning and boosting. Complexity 2018(1):9264743 [Google Scholar]
  8. Barbarossa MV, Röst G (2015) Immuno-epidemiology of a population structured by immune status: a mathematical study of waning immunity and immune system boosting. J Math Biol 71:1737–1770 [DOI] [PubMed] [Google Scholar]
  9. Diekmann O, Graaf W, Kretzschmar M, Teunis P (2018) Waning and boosting: on the dynamics of immune status. J Math Biol 77:2023–2048 [DOI] [PMC free article] [PubMed] [Google Scholar]
  10. Dafilis MP, Frascoli F, Wood JG, Mccaw JM (2012) The influence of increasing life expectancy on the dynamics of SIRS systems with immune boosting. The ANZIAM J 54(1–2):50–63 [Google Scholar]
  11. Diekmann O, Montijn R (1982) Prelude to Hopf bifurcation in an epidemic model: analysis of a characteristic equation associated with a nonlinear Volterra integral equation. J Math Biol 14:117–127 [DOI] [PubMed] [Google Scholar]
  12. Engelborghs K, Luzyanina T, Roose D (2002) Numerical bifurcation analysis of delay differential equations using DDE-BIFTOOL. ACM Trans Math Softw (TOMS) 28(1):1–21 [Google Scholar]
  13. Gonçalves S, Abramson G, Gomes MF (2011) Oscillations in SIRS model with distributed delays. Eur Phys J B 81:363–371 [Google Scholar]
  14. Heffernan J, Keeling MJ (2009) Implications of vaccination and waning immunity. Proc R Soc B Biol Sci 276(1664):2071–2080 [DOI] [PMC free article] [PubMed] [Google Scholar]
  15. Hethcote HW, Stech HW, Van Den Driessche P (1981) Nonlinear oscillations in epidemic models. SIAM J Appl Math 40(1):1–9 [Google Scholar]
  16. Kojakhmetov HJ, Kuehn C, Pugliese A, Sensi M (2021) A geometric analysis of the SIR, SIRS and SIRWS epidemiological models. Nonlinear Anal Real World Appl 58:103220 [Google Scholar]
  17. Kang HM, Lee T-J, Park SE, Choi S-H (2025) Pertussis in the post-COVID-19 era: resurgence, diagnosis, and management. Infect Chemother 57(1):13–30 [DOI] [PMC free article] [PubMed] [Google Scholar]
  18. Kuang Y (1993) Delay differential equations: with applications in population dynamics. Academic Press, New York [Google Scholar]
  19. Kuznetsov YA (1998) Elements of applied bifurcation theory, vol 112. Springer, Berlin [Google Scholar]
  20. Lavine JS, King AA, Bjørnstad ON (2011) Natural immune boosting in pertussis dynamics and the potential for long-term vaccine failure. Proc Natl Acad Sci 108(17):7259–7264 [DOI] [PMC free article] [PubMed] [Google Scholar]
  21. Liessi D, Santi E, Vermiglio R, Scarabel F, Meijer H (2025) New developments in MatCont: delay equation importer and Lyapunov exponents. arXiv:2504.12785
  22. Okuwa K, Inaba H, Kuniya T (2021) An age-structured epidemic model with boosting and waning of immune status. Math Biosci Eng 18(5):5707–5736 [DOI] [PubMed] [Google Scholar]
  23. Opoku-Sarkodie R, Bartha FA, Polner M, Röst G (2022) Dynamics of an SIRWS model with waning of immunity and varying immune boosting period. J Biol Dyn 16(1):596–618 [DOI] [PubMed] [Google Scholar]
  24. Opoku-Sarkodie R, Bartha FA, Polner M, Röst G (2024) Bifurcation analysis of waning-boosting epidemiological models with repeat infections and varying immunity periods. Math Comput Simul 218:624–643 [Google Scholar]
  25. Pell B, Brozak S, Phan T, Wu F, Kuang Y (2023) The emergence of a virus variant: dynamics of a competition model with cross-immunity time-delay validated by wastewater surveillance data for COVID-19. J Math Biol 86:63 [DOI] [PMC free article] [PubMed] [Google Scholar]
  26. Röst G, Tekeli T (2020) Stability and oscillations of multistage SIS models depend on the number of stages. Appl Math Comput 380:125259 [Google Scholar]
  27. Schuette MC, Hethcote HW (1999) Modeling the effects of varicella vaccination programs on the incidence of chickenpox and shingles. Bull Math Biol 61:1031–1064 [DOI] [PubMed] [Google Scholar]
  28. Strube LF, Walton M, Childs LM (2021) Role of repeat infection in the dynamics of a simple model of waning and boosting immunity. J Biol Syst 29(02):303–324 [Google Scholar]
  29. Taylor ML, Carr TW (2009) An SIR epidemic model with partial temporary immunity modeled with delay. J Math Biol 59:841–880 [DOI] [PubMed] [Google Scholar]
  30. Yang L, Nakata Y (2021) Note on the uniqueness of an endemic equilibrium of an epidemic model with boosting of immunity. J Biol Syst 29(02):291–302 [Google Scholar]

Associated Data

This section collects any data citations, data availability statements, or supplementary materials included in this article.

Data Availability Statement

No external data has been used to generate the results. The simulations are obtained using MATLAB 2023b and the free software packages MatCont version 7p6 and DDE-BIFTOOL version 3.2a.


Articles from Journal of Mathematical Biology are provided here courtesy of Springer

RESOURCES