1 Introduction

The global pandemic of COVID-19 has prompted several studies of epidemic models from a dynamic systems point of view. Pandemics can be studied using simple mean-field models or compartmental models, where the entire population is divided into susceptible (S), exposed (E), infectious (I), quarantined (Q), and recovered (R) groups. More groups like hospitalized (H), vaccinated (V), etc., can be added, or groups can be removed, depending on modeling goals. These models are primarily developed based on the original SIR model due to Kermack and McKendrick [1]. Many models include other complexities like prior immunity, temporary immunity transferred at birth, vaccination history, a carrier population that never recovers [2], reinfection due to loss of immunity after recovery [3], exposed but asymptomatic populations [4], a quarantined population [5], and the influence of vital dynamics  [6].

The fidelity of such models can be improved by developing structured network models [7,8,9,10,11,12], where each node in the network is a compartmental model with different parameters. In other words, the entire population is divided into N subgroups or structures. Each such subgroup or structure can have its own S, E, I, Q, and R subpopulations. These subgroups or structures can be based on age, lifestyle, demography, geography, or other aspects. The network topology [12] can be uniform, time-varying, or random. Recently, for example, the initial spread of COVID-19 in India was explored using an age-structured SIR network model with simulated social lockdown conditions [13].

In contrast to such network models, an alternative high-dimensional approach uses reaction–diffusion [14,15,16,17] type partial differential equations (PDEs) to capture the spatial and temporal evolution of an epidemic. Such models with spatial dimensions allow solutions with concentrated pockets of infection which emerge and spread. Sometimes, PDEs with a single spatial variable are converted into integro-differential equations [15, 18].

Time delays [19] are often present in the progression of diseases due to latency and incubation times. Several researchers have studied the spread of infections like Zika, HIV, Hepatitis, and Influenza using delay differential equations [20,21,22,23,24,25]. Recently, an SEIQR [20] model with time delays was proposed to study the progression of a generic epidemic. In recent work of our own [26], we have studied the time delayed SEIQR model of [20] after neglecting loss of immunity over time, which is appropriate for a fast pandemic.

In the lumped approach of [20, 26], the infectivity or transmission rate of the disease is modeled using a single positive parameter

$$\begin{aligned} \beta ={\tilde{\beta }} m. \end{aligned}$$
(1)

In Eq. (1), \({\tilde{\beta }}\) is a characteristic of the pathogen; and m, the density of contacts, is a characteristic of the behavior of individuals.

In this paper, we address the situation where the parameter \(\beta \) is a distributed quantity over the entire population. After all, some people have greater exposure to infection than the population average (e.g., police personnel, people providing other essential services, hospital staff, as well as people less willing to cooperate with government-recommended social distancing measures). Others have less exposure than average (e.g., older people, people who cooperate more with recommended social distancing measures). Some have strong immune systems, and others have weak immune systems, which might be reflected in differing values of the underlying parameter \({{\tilde{\beta }}}\) in Eq. (1). All these people interact to various degrees in modern society, where travel and mixing are common. The details of this variation, if incorporated, will yield a richer model that can hopefully make more realistic predictions. We clarify that we do not stratify the population by age, occupation, health status, or social behavior. In our model, all these factors contribute to a final effective \(\beta \) for each person. We stratify the population according to \(\beta \) alone, because that is what affects the dynamics of infection.

We ask the following question: for a general distribution of \(\beta \) in the population, and for a reasonable model for how different sections with different \(\beta \)’s interact during the pandemic, how does the continuum solution evolve from infinitesimal initial infection all the way to final saturation?

In the rest of this paper, we show the following. Under a simple separable interaction model for different \(\beta \)’s, and upon neglecting loss of immunity for those who have recovered from the disease, the continuum model reduces to two nonlinear integrodifferential equations with delays, with the continuously variable \(\beta \) appearing as a parameter. However, due to a remarkable dimensional collapse, the dynamics is exactly described by a single scalar nonlinear delay differential equation without integrals, where the parameter \(\beta \) appears only through the first derivative of its moment generating function. If some required moments of the distribution are finite, then a local expansion can be easily computed for small levels of overall infection, and the correspondence with the lumped model of [20, 26] is transparent and close. If the moments are unbounded, alternative, slightly more complex, single DDE approximations can still be developed, at least in principle. In this way, both the justification for the lumped model, as well as corrections needed for variable \(\beta \), are exactly demonstrated. From a practical viewpoint, our results clarify the role of, e.g., higher versus lower variability of \(\beta \) in the population in the spread, saturation, and containment of the disease. From an academic viewpoint, our work presents a new and satisfying example of extreme model order reduction. We mention that a preprint of this article has been uploaded at [27] (https://arxiv.org/abs/2004.12405).

2 Network model

In [20, 26], a single fixed parameter \(\beta \) is used to model the whole population. Our presentation begins with a brief statement of this model. Figure 1 shows the schematic of the single-\(\beta \) SEIQR model and is adapted from [20]. The governing equations, included for completeness, are:

Fig. 1
figure 1

The SEIQR compartmental model with delays

$$\begin{aligned} {\dot{S}}(t)= & {} -\beta S(t)I(t)+\alpha R(t) \end{aligned}$$
(2)
$$\begin{aligned} {\dot{E}}(t)= & {} \beta \left[ S(t)I(t)-S(t-\sigma )I(t-\sigma )\right] \end{aligned}$$
(3)
$$\begin{aligned} {\dot{I}}(t)= & {} \beta S(t-\sigma )I(t-\sigma )-\gamma I(t)\nonumber \\&-\beta pe^{-\gamma \tau }S(t-\sigma -\tau )I(t-\sigma -\tau )\end{aligned}$$
(4)
$$\begin{aligned} {\dot{Q}}(t)= & {} \beta pe^{-\gamma \tau }S(t-\sigma -\tau )I(t-\sigma -\tau )\nonumber \\&-\beta pe^{-\gamma \tau }S(t-\sigma -\tau -\kappa )I(t-\sigma -\tau -\kappa )\nonumber \\\end{aligned}$$
(5)
$$\begin{aligned} {\dot{R}}(t)= & {} -\alpha R(t)+\gamma I(t)\nonumber \\&+ \beta pe^{-\gamma \tau } S(t-\sigma -\tau -\kappa )I(t-\sigma -\tau -\kappa )\nonumber \\ \end{aligned}$$
(6)

Here, S(t) represents healthy individuals. The infection rate constant is \(\beta \). Asymptomatic and infected individuals E(t) remain non-infectious for \(\sigma \) units of time. Later, they become infectious and are represented by I(t), but show no symptoms for another \(\tau \) units of time. When symptoms appear, these infected people are isolated or quarantined with probability p for a time \(\kappa \), and are represented by Q(t). A few asymptomatic but infectious individuals may recover on their own, at a rate \(\gamma \). The cured population R(t) after quarantine may lose immunity at a small rate \(\alpha \), but we use \(\alpha = 0\) over the time scale of a fast-spreading pandemic, like COVID-19.

Fig. 2
figure 2

A schematic representation of N interacting population groups with different infection spread rates among each group. Every connection between two groups is bidirectional and symmetric, and every group is connected to all other groups (a dense network)

In Eq. (2), the right hand side has two terms: the rate of change of the susceptible population S(t) depends on an infection rate \(\beta S(t) I(t)\) and a rate of reintroduction of susceptible people through loss of immunity modeled using \(\alpha R(t)\). When \(\beta \) varies within the population, we use a network model. Figure 2 illustrates the idea. Here, the total population is partitioned into N sub groups \(P_1\),\(P_2\),...,\(P_N\); and each group is modeled with different \(\beta _k\) ranging from \(\beta _1\) to \(\beta _N\). The primary consequence is that in the network’s equivalent of Eq. 2 for group k, the I(t) must be replaced by something that represents interaction effects from all groups. We will model this using a quantity \(\varLambda (t)\) that applies to the entire network, as explained below.

The main idea is simple. A susceptible person in group k, for any \(1 \le k \le N\), can get infected through interaction with a person in any group r, with \(1 \le r \le N\). Thus, the total infection rate of the single-\(\beta \) model, i.e., \(\beta S(t) I(t)\), is to be replaced by the sum of contributions from all groups. The contribution from one single group r is taken to be

$$\begin{aligned} F(\beta _k,\beta _r) S_k(t) I_r(t), \end{aligned}$$

for some suitable interaction coefficient \(F(\beta _k,\beta _r)\) that has to be specified as part of the mathematical model. The function \(F(\beta _k,\beta _r)\) is understood to be symmetric [28], i.e.,

$$\begin{aligned} F(x,y) = F(y,x). \end{aligned}$$

It must monotonically increase with respect to each of its arguments, i.e.,

$$\begin{aligned} \frac{\partial F(x,y)}{\partial x}> 0, \quad \frac{\partial F(x,y)}{\partial y} > 0. \end{aligned}$$

Clearly, we require

$$\begin{aligned} F(x,0)=0 \end{aligned}$$

regardless of x, because a person who meets nobody at all will not get infected. Further, it seems reasonable to assume that if a person who mixes very little meets another person who mixes very little, then the probability of infection spreading is much lower than if the second person mixes widely. Mathematically, we assume that

$$\begin{aligned}&\text{ if }\, 0 < \beta _k \ll \beta _r, \, \text{ then } \, F(\beta _k, \beta _k) \ll F(\beta _k, \beta _r) \nonumber \\&\quad \ll F(\beta _r, \beta _r). \end{aligned}$$
(7)

All the above conditions are met by the separable choice

$$\begin{aligned} F(\beta _k,\beta _r) = \sqrt{\beta _k} \sqrt{\beta _r}. \end{aligned}$$
(8)

There could be other formulas for \(F(\beta _k,\beta _r)\) satisfying the conditions mentioned above, but the separable nature of Eq. (8) makes it simple as well as appealing.

Finally, in the special case where the entire population moderates its behavior to produce a single effective \(\beta \), the net effect should ideally reduce to Eq. (2), and this is something that will turn out to be true for Eq. (8).

The above choice of \(F(\beta _k,\beta _r)\) leads us to define

$$\begin{aligned} \varLambda (t)=\sum _{r=1}^{N}\sqrt{\beta _{r}}I_{r}(t), \end{aligned}$$
(9)

and the dynamics of the network is governed by

$$\begin{aligned} {\dot{S}}_{k}(t)= & {} -\sqrt{\beta _{k}}S_{k}(t)\varLambda (t)+\alpha R_{k}(t) \end{aligned}$$
(10)
$$\begin{aligned} {\dot{E}}_{k}(t)= & {} \sqrt{\beta _{k}}\left[ S_{k}(t)\varLambda (t)-S_{k}(t-\sigma )\varLambda (t-\sigma )\right] \end{aligned}$$
(11)
$$\begin{aligned} {\dot{I}}_{k}(t)= & {} \sqrt{\beta _{k}}S_{k}(t-\sigma )\varLambda (t-\sigma )-\gamma I_k(t)\nonumber \\&-\sqrt{\beta _{k}}pe^{-\gamma \tau }S_{k}(t-\sigma -\tau )\varLambda (t-\sigma -\tau )\nonumber \\\end{aligned}$$
(12)
$$\begin{aligned} {\dot{Q}}_k(t)= & {} \sqrt{\beta _{k}} pe^{-\gamma \tau }S_k(t-\sigma -\tau )\varLambda (t-\sigma -\tau )\nonumber \\&- \sqrt{\beta _{k}}pe^{-\gamma \tau }S_k(t-\sigma -\tau -\kappa )\varLambda (t\nonumber \\&-\sigma -\tau -\kappa )\end{aligned}$$
(13)
$$\begin{aligned} {\dot{R}}_k(t)= & {} -\alpha R_k(t)+\gamma I_k(t)\nonumber \\&+\beta _{k} pe^{-\gamma \tau }S_k(t-\sigma -\tau -\kappa )\varLambda (t\nonumber \\&-\sigma -\tau -\kappa )\nonumber \\ k= & {} 1,2,...,N \end{aligned}$$
(14)

In this model, except for \(\beta _k\), all other parameters namely \(\sigma \), \(\tau \), \(\kappa \), p, \(\gamma \), and \(\alpha \) are the same for each node in the network. This assumption is motivated by the idea that, in a well-functioning society, the degree of mixing practiced by individuals varies a lot more than the time taken for an infected person to be detected and quarantined; and that the rate of self-recovery \(\gamma \) is a biological quantity independent of an individual’s social behavior. Note that we assume the loss of immunity rate, \(\alpha \), to be zero.

We observe from Eqs. (10)–(14) that if \(\alpha =0\), the states \(E_k(t)\), \(Q_k(t)\), and \(R_k(t)\) become slave variables. Only \(S_k(t)\) and \(I_k(t)\) need to be solved for. Further, we can always scale time by setting \(\sigma =1\), making \(\tau \), \(\beta _{k}\), and \(\gamma \) effectively dimensionless. Equations (10)–(14), after dropping \({\dot{E}}\), \({\dot{Q}}\) and \({\dot{R}}\) and defining

$$\begin{aligned} \nu =1+\tau \end{aligned}$$

become:

$$\begin{aligned} {\dot{S}}_{k}(t)= & {} -\sqrt{\beta _{k}}S_{k}(t)\varLambda (t) \end{aligned}$$
(15)
$$\begin{aligned} {\dot{I}}_{k}(t)= & {} \sqrt{\beta _{k}}S_{k}(t-1)\varLambda (t-1)-\gamma I_k(t)\nonumber \\&-\sqrt{\beta _{k}}pe^{-\gamma \tau }S_{k}(t-\nu )\varLambda (t-\nu )\nonumber \\ k= & {} 1,2,\ldots ,N. \end{aligned}$$
(16)

3 Initial numerical observations

We have integrated Eqs. (15) and (16) using Matlab’s built-in solver dde23 for many different initial functions or history functions, with error tolerances set to be \(10^{-7}\) or better. For ease of presenting results, we define

$$\begin{aligned} {\hat{\beta }}= & {} [\beta _{1},\beta _{2},\ldots ,\beta _{N}]^{T}, \\ {\hat{S}}(t)= & {} \left[ S_{1}(t), S_{2}(t),\ldots ,S_N(t)\right] ^{T}, \\ {\hat{I}}(t)= & {} \left[ I_{1}(t), I_{2}(t),\ldots ,I_N(t)\right] ^{T}. \end{aligned}$$

It should be noted that \(\beta _1<\beta _2<\dots <\beta _N\). The history functions for numerical integration are selected in terms of nonnegative functions \({{\hat{U}}}({{\hat{\beta }}})\) and \({{\hat{V}}}({{\hat{\beta }}})\) as

$$\begin{aligned} {\hat{S}}(t)= & {} {{\hat{U}}}({{\hat{\beta }}})-10^{-8}\left( 1+\frac{t}{\nu }\right) ,-\nu \le t\le 0, \end{aligned}$$
(17)
$$\begin{aligned} {\hat{I}}(t)= & {} {{\hat{V}}}({{\hat{\beta }}})\times 10^{-8}\left( 1+\frac{t}{\nu }\right) ,-\nu \le t\le 0. \end{aligned}$$
(18)

In the above, \({{\hat{U}}}({{\hat{\beta }}})\) was chosen to satisfy \(||{\hat{S}}(-\nu )||_{1}=1\). It is clear that \(||{\hat{I}}(-\nu )||_{1}=0\) regardless of \({{\hat{V}}}({{\hat{\beta }}})\). Such initial conditions, with small initial infection, are of interest because we wish to study whether the infection remains small or grows significantly within the population. It is clear that \({{\hat{U}}}({{\hat{\beta }}})\) plays the role of a probability density function of people’s \({{\hat{\beta }}}\)-values in the population. If \({{\hat{U}}}({{\hat{\beta }}})\) is large for small values of \({{\hat{\beta }}}\) and decays rapidly for large values of \({{\hat{\beta }}}\), then most people are in a regime of low infection rates. Conversely, if \({{\hat{U}}}({{\hat{\beta }}})\) decays slowly with increasing values of \({{\hat{\beta }}}\), then a significant proportion of the population is in a regime of high infection rates. The dynamic consequences of such different distributions will be studied using initial numerical simulations in this section, before proceeding to analytical treatment.

The net effect of the pandemic, or net damage, is taken to be

$$\begin{aligned} {\hat{D}}(t)={\hat{S}}(-\nu )-{\hat{S}}(t). \end{aligned}$$

For total percentage affected, we use

$$\begin{aligned} D(t)=||{\hat{D}}(t)||_{1}\times 100=\left[ 1-||{\hat{S}}(t)||_{1}\right] \times 100. \end{aligned}$$

For our initial numerical case study, we use \(N=500\) and select \({\hat{\beta }}\) values uniformly spaced between \(\beta _1=0\) and \(\beta _N=6\), i.e., \({\hat{\beta }}\) values are distributed within a strictly finite range. Figure 3a shows \({\hat{S}}(t)\) at three different time instants at \(t=-\nu \) (initial time), \(t=40\), and \(t=100\). Also shown is a fit of the form

$$\begin{aligned} {{\hat{S}}}(t) = {{\hat{S}}}( -\nu ) \circ e^{-f(t) \sqrt{{\hat{\beta }}}}, \end{aligned}$$
(19)

at these three instants of time. Where “\(\circ \)” denotes elementwise multiplication of two arrays. The initial conditions were

$$\begin{aligned} {\hat{U}}({\hat{\beta }})=\frac{1}{b^{a}\varGamma (a)}{\hat{\beta }}^{(a-1)}e^{\frac{-{\hat{\beta }}}{b}}, \end{aligned}$$

which matches the Gamma distribution, with \(a=5\) and \(b=0.4\) (technically, the Gamma distribution has infinite support, but for the parameters chosen it has decayed to tiny values for \({\hat{\beta }}=6\)). Also, the other initial function \({{\hat{V}}}({{\hat{\beta }}})\) was taken to be identical to \({{\hat{U}}}({{\hat{\beta }}})\) in the simulations of Fig. 3.

We emphasize that in Fig 3a, \(f(-\nu )=0\) by definition and there are only two fitted numbers: f(40) and f(100). The match is essentially perfect and shows that the evolution of all the \(S_k(t)\) together have a one-dimensional behavior. The solution at any time t is fitted, essentially perfectly, by a function of the form shown in Eq. (19).

Figure 3b shows \(-f(t)\) and the total infected population D(t) during the progression of the pandemic. Parameters used for generating the results are shown in the text boxes inside the figure.

Other simulations with different a and b in the underlying Gamma distribution are shown in subplot pairs Fig. 3c, d and Fig. 3e, f. The quality of the match remains excellent, as is shown graphically for different intermediate time instants in Fig. 3c and e, although the net percentage of people infected changes with a and b (more people are infected if typical \({\hat{\beta }}\) values in the distribution are higher).

In Fig 4, we show results for initial conditions \({\hat{U}}({\hat{\beta }})\) chosen arbitrarily on the finite interval [0, 6], without an underlying asymptotic approach to zero for large \({\hat{\beta }}\) (see figure caption). The choices for \({\hat{U}}({\hat{\beta }})\) are now polynomials on the interval [0, 6]. From Fig. 4, we observe that for several different \({\hat{U}}({\hat{\beta }})\) and \({\hat{V}}({\hat{\beta }})\) and for generic small-infection history functions [Eqs. (17) and (18)], a fit of the form given by Eq. (19) is essentially exact. In other words, the variation over \({\hat{\beta }}\) is one-dimensional, in terms of a scalar f(t). We refer to this great reduction in dimensionality, where the variation with respect to the continuous variable \({\hat{\beta }}\) is accounted for by a single scalar, as complete dimensional collapse. Numerics indicate the collapse is exact.

It remains only to extract the governing equation for the scalar f(t), and we will do this using a continuum formulation.

Fig. 3
figure 3

Simulations with different initial values \({\hat{S}}(-\nu )\). Here, a Gamma distribution is used for \({\hat{U}}({\hat{\beta }})=\frac{1}{b^{a}\varGamma (a)}{\hat{\beta }}^{(a-1)}e^{\frac{-{\hat{\beta }}}{b}}\), along with \({\hat{V}}({\hat{\beta }})={\hat{U}}({\hat{\beta }})\). Also shown is the fit of the form of Eq. (19) at different instants of time. We note that as the \(\beta \) values in the distribution get smaller on average, \(D(\infty )\) decreases

Fig. 4
figure 4

Simulations with different initial values \({\hat{S}}(-\nu )={\hat{U}}({\hat{\beta }})\). Here, finitely supported polynomials of the form \({\hat{U}}({\hat{\beta }})=r_n \cdot \left( 1+{\hat{\beta }}^n \right) ,\,0\le {\hat{\beta }} \le 6\) are considered, with \(r_n\) chosen to make the sum (or 1-norm) of \({\hat{U}}({\hat{\beta }})\) equal to 1. The distribution of initial values for \({\hat{I}}({\hat{\beta }})\) uses \({\hat{V}}({\hat{\beta }})\) that is random, initially uniformly distributed between 1 and 2, and then normalized to unit 1-norm. Also shown is the fit \({\hat{S}}(t)={\hat{S}}(-\nu )\circ e^{-f(t)\sqrt{{\hat{\beta }}}}\) at different instants of time. These results demonstrate that provided the initial infected population distribution is small, the subsequent evolution obeys a simple one-dimensional description with a scalar variable f(t)

4 Continuum model

We consider a continuum limit of Eqs. (15) and (16), as \(N\rightarrow \infty \). We replace the summation in Eq. (9) with integrals and assume \(S(\beta ,t)\) and \(I(\beta ,t)\) to be functions of \(\beta \) and t. In the continuum limit, Eqs. (15) and (16) become

$$\begin{aligned} \dot{S}(\beta ,t)= & {} - \sqrt{\beta } S(\beta ,t) \int _0^{\infty } \sqrt{\xi } I(\xi ,t) \, d \xi \end{aligned}$$
(20)
$$\begin{aligned} \dot{I}(\beta ,t)= & {} \sqrt{\beta } S(\beta ,t-1) \int _0^{\infty } \sqrt{\xi } I(\xi ,t-1) \, d \xi \nonumber \\&- \gamma I(\beta ,t) \nonumber \\&- {{\bar{p}}} \sqrt{\beta } S(\beta ,t-\nu ) \int _0^{\infty } \sqrt{\xi } I(\xi ,t-\nu ) \, d \xi ,\nonumber \\ \end{aligned}$$
(21)

where

$$\begin{aligned} {{\bar{p}}} = p e^{-\gamma \tau }. \end{aligned}$$
(22)

In the above integrals, if \(\beta \) takes only finite values (in the numerical examples above, \(\beta \) was between 0 and 6), then the upper limits of the integrals can be replaced with finite values; we write \(\infty \) as a formal upper limit. Note that Eqs. (20) and (21) represent infinitely many coupled delay differential equations, parameterized by the distributed infectivity parameter \(\beta \).

The fraction of the population that is susceptible is now understood to be

$$\begin{aligned} \int _{0}^{\infty } S(\beta ,t) \, d \beta , \end{aligned}$$

and the fraction of the presently infectious population is understood to be

$$\begin{aligned} \int _{0}^{\infty } I(\beta ,t) \, d \beta . \end{aligned}$$

At the start of the pandemic, we have initial conditions that satisfy

$$\begin{aligned} \int _{0}^{\infty } S(\beta ,0) \, d \beta \approx 1, \end{aligned}$$

and

$$\begin{aligned} \int _{0}^{\infty } I(\beta ,0) \, d \beta \ll 1, \end{aligned}$$

by which we mean a tiny initiation of infection.

Introduction of a tiny infected population can, with suitable initial distributions of S, make the pandemic grow. A society that has strong social distancing will have \(S(\beta ,0)\) decaying to zero rapidly with increasing \(\beta \) and may not see strong growth of the infection. Conversely, a society where the population has greater social mixing, i.e., \(S(\beta ,0)\) that decays slowly with increasing \(\beta \), may see an outbreak of the infection.

A point to note during numerical solution of Eqs. (20) and (21) is that \(S(\beta ,t)\) and \(I(\beta ,t)\) are nonnegative. It is in principle possible for \(I(\beta ,t)\) to start positive and become exactly zero at some instant (based on hypothetical initial functions used in the delayed variables), and it corresponds to all infected people becoming quarantined before fresh people are infected. However, such a situation corresponds to the pandemic being quenched by eliminating infection and is not of interest when either infection cannot be eliminated, or when even elimination of infection leaves the system unstable (i.e., introduction of infinitesimal infection leads to an outbreak). As seen in the numerical solutions of Figs. 3 and 4 , there are clearly also other solutions of interest where the pandemic progresses, infects a percentage of the population and reaches an eventual equilibrium with the infection not progressing further. For such solutions, the nonnegativity constraint of \(S(\beta ,t)\) and \(I(\beta ,t)\) turns out to be satisfied.

Motivated by the foregoing observations from numerical simulations, we now look for solutions of the form

$$\begin{aligned} S(\beta ,t) = \phi (\beta ) e^{-f(t) \sqrt{\beta }}, \end{aligned}$$

where \(\phi (\beta )\) can be determined from initial conditions. Substituting into Eq. (20) yields

$$\begin{aligned}&- \sqrt{\beta } \phi (\beta ) \dot{f}(t) e^{-f(t) \sqrt{\beta }} =\nonumber \\&-\sqrt{\beta } \phi (\beta ) e^{-f(t) \sqrt{\beta }} \int _0^{\infty } \sqrt{\xi } I(\xi ,t)\, d \xi . \end{aligned}$$
(23)

The integral on the right hand side is purely a function of time t: let us call it g(t). Then, we have

$$\begin{aligned} \dot{f}(t) = g(t). \end{aligned}$$
(24)

Also, Eq. (21) becomes

$$\begin{aligned} \dot{I}(\beta ,t)= & {} \sqrt{\beta } \phi (\beta ) e^{-f(t-1) \sqrt{\beta }} g(t-1) - \gamma I(\beta ,t) \nonumber \\&- {{\bar{p}}} \sqrt{\beta }\phi (\beta ) e^{-f(t-\nu ) \sqrt{\beta }} g(t-\nu ). \end{aligned}$$
(25)

We multiply both sides above by \(\sqrt{\beta }\) and integrate with respect to \(\beta \). Defining

$$\begin{aligned} H(t) = \int _0^{\infty } \beta \phi (\beta ) e^{-f(t) \sqrt{\beta }} d \beta , \end{aligned}$$
(26)

and assuming the integral and the derivative on the left hand side can be interchanged, Eq. (25) becomes

$$\begin{aligned} \dot{g}(t)= & {} H(t-1) g(t-1) - \gamma g(t)\nonumber \\&- {{\bar{p}}} H(t-\nu ) g(t-\nu ). \end{aligned}$$
(27)

Any solution of Eqs. (24) and (27), with H(t) defined by Eq. (26), corresponds to an exact solution of Eqs. (20) and (21). Differentiating Eq. (24) with respect to time and substituting for \({\dot{g}}(t)\) from Eq. (27), we obtain:

$$\begin{aligned} \ddot{f}(t)= & {} H(t-1) \dot{f}(t-1)- \gamma \dot{f}(t)\nonumber \\&- {{\bar{p}}} H(t-\nu ) \dot{f}(t-\nu ). \end{aligned}$$
(28)

Separately, multiplying both sides Eq. (26) by \(\dot{f}(t)\), we obtain

$$\begin{aligned} H(t) \dot{f}(t) = \int _0^{\infty } \beta \phi (\beta ) e^{-f(t) \sqrt{\beta }} \dot{f}(t) d \beta , \end{aligned}$$
(29)

where we notice that the right hand side is integrable with respect to time, giving

$$\begin{aligned} \int H(t) \dot{f}(t) dt= & {} - \int _0^{\infty } \sqrt{\beta } \phi (\beta ) e^{-f(t) \sqrt{\beta }} d \beta \nonumber \\&+ C, \end{aligned}$$
(30)

where C is a time-independent constant (it does not depend on \(\beta \) either, because \(\beta \) here is a dummy variable of integration). Let the integral on the right hand side of Eq. (30) be called G(f(t)), i.e.,

$$\begin{aligned} G(f(t)) =\int _0^{\infty } \sqrt{\beta } \phi (\beta ) e^{-f(t) \sqrt{\beta }} d \beta , \end{aligned}$$
(31)

where we notice that the time t within this definition is merely a parameter that determines f, and so we can also simply write

$$\begin{aligned} G(f) =\int _0^{\infty } \sqrt{\beta } \phi (\beta ) e^{-f \sqrt{\beta }} d \beta \end{aligned}$$
(32)

if it suits our purpose. Equation (28) becomes, upon one integration,

$$\begin{aligned} \dot{f}(t) = -G(f(t-1)) + {{\bar{p}}} G(f(t-\nu )) - \gamma f(t) + C_0,\nonumber \\ \end{aligned}$$
(33)

where \(C_0\) is a constant of integration and can be evaluated by setting \(f(t)=0\) when \({\dot{f}}(t)=0\) (at the time of infinitesimal initiation of infection) and is given by

$$\begin{aligned} C_0 =(1-{\bar{p}})\int _0^{\infty } \sqrt{\beta } \phi (\beta ) d \beta . \end{aligned}$$
(34)
Fig. 5
figure 5

Comparison between the continuum solution \(-f(t)\) of Eq. (33) and the discrete network solution [Eqs. (15) and (16)] with \(N=500\) fitted using \({\hat{S}}(t)={\hat{S}}(-\nu ) \circ e^{-f(t)\sqrt{{\hat{\beta }}}}\). a \({\hat{U}}({\hat{\beta }})=\frac{1}{b^{a}\varGamma (a)}{\hat{\beta }}^{(a-1)}e^{\frac{-{\hat{\beta }}}{b}}\) and \({\hat{V}}({\hat{\beta }})={\hat{U}}({\hat{\beta }})\). b \({\hat{U}}({\hat{\beta }})=r_n \cdot ( 1+{\hat{\beta }}^n),\,0\le {\hat{\beta }} \le 6\) and \({\hat{V}}({\hat{\beta }})\) randomized as in Fig. 4. The history function for Eq. (33) is taken as \(f(t)=\omega \times (1+\frac{t}{\nu })\), with \(\omega \) is adjusted to match the results from [Eqs. (15) and (16)]. Other numerical parameters are mentioned in text boxes within subplots

For many initial distribution functions \(\phi (\beta )\), G(f(t)) and \(C_0\) can be evaluated in closed form. For example, for the uniform distribution

$$\begin{aligned} \phi (\beta )=\frac{1}{B}, \quad 0\le \beta \le B, \end{aligned}$$

we have

$$\begin{aligned} G(f(t))=K(f(t))R(f(t)) \end{aligned}$$

where

$$\begin{aligned} K(f(t))= & {} -\frac{2\mathrm{e}^{-\sqrt{B}f(t)}}{B^{1/2}f(t)^{3}}, \\ R(f(t))= & {} -2\mathrm{e}^{\sqrt{B}f(t)}B^{3/2}+f(t)^{2}B^{5/2}\\&+2f(t)B^{2}+2B^{3/2}, \end{aligned}$$

and

$$\begin{aligned} C_0=(1-{\bar{p}})\frac{2\sqrt{B}}{3}. \end{aligned}$$

In this way, at least in principle (even if the integrals cannot be evaluated in closed form), Eq. (33) is a first-order scalar DDE that governs the dynamics of the continuum limit of our network. The infinite-dimensional variability with respect to the distributed parameter \(\beta \) has collapsed into a single dimension. This observation of complete dimensional collapse is one of the main contributions of the paper. Our result is independent of the distribution \(\phi (\beta )\).

Figure 5 compares the continuum solution \(-f(t)\) obtained from Eq. (33), and the finite network solution [Eqs. (15) and (16)] fitted to \({\hat{S}}(t)={\hat{S}}(-\nu )\circ e^{-f(t)\sqrt{{\hat{\beta }}}}\) for different parameter values (see figure caption for details). The results match closely. From Fig. 5, it is evident that, if the initial conditions for the infected population are all sufficiently small, the subsequent evolution does not depend very much on them. This is because the interaction term smoothes out all those initial variations, and the dimensional collapse occurs, which is the main point of the paper. In particular, see the simulation results in Fig. 5a and b. In one case, the infective population is taken to have a smooth variation with respect to \(\beta \), and in the other case, it is a random variation with respect to \(\beta \). The results are essentially the same, and the match is nearly perfect.

We now proceed to interpret G(f) in terms of the moment generating function of an underlying randomly distributed quantity,

$$\begin{aligned} \sqrt{\beta } = u, \end{aligned}$$
(35)

by defining an intermediate quantity (using an overbar to formally distinguish the two functions)

$$\begin{aligned} \phi (\beta ) = {{\bar{\phi }}}(u). \end{aligned}$$
(36)

For example, if \(\phi (\beta ) = \beta \), then we mean \({{\bar{\phi }}}(u) = u^2\).

Equation (31), written as Eq. (32), becomes

$$\begin{aligned} G(f) = 2 \int _0^{\infty } u^2 {{\bar{\phi }}}(u) e^{-f u} d u. \end{aligned}$$
(37)

Now, if we interpret \(\phi (\beta )\) as the probability density function of the random variable \(\beta \) in the population and think of \(\psi (u)\) as the probability density function of the transformed variable \(u =\sqrt{\beta }\) in the same population, then it must be true that

$$\begin{aligned} \phi (\beta ) = {{\bar{\phi }}}(u) = \frac{\psi (u)}{2u}, \end{aligned}$$
(38)

which gives

$$\begin{aligned} G(f) = \int _0^{\infty } u \psi (u) e^{-f u} d u, \end{aligned}$$
(39)

where we see that, except for a sign change in f, G(f) is the first derivative with respect to f of the moment generating function [29] of the distributed quantity \(u = \sqrt{\beta }\).

If we expand in a series for small f, we obtain

$$\begin{aligned} G(f) = m_1 - m_2 f + m_3 \frac{f^2}{2!}- m_4 \frac{f^3}{3!}+ \cdots , \end{aligned}$$
(40)

where the coefficients \(m_k\) are moments of u, given by

$$\begin{aligned} m_{k}=\intop _{0}^{\infty }u^{k}\psi (u)du, \end{aligned}$$
(41)

assuming these moments exist. In other words, \(m_1\) is the population mean of \(\sqrt{\beta }\), \(m_2\) is the population mean of \(\beta \), \(m_3\) is the population mean of \(\beta ^{3/2}\), and so on. Returning to Eq. (33) and expanding for small f, and retaining up to cubic terms (i.e., retaining up to second-order nonlinear correction terms), we have

$$\begin{aligned} \dot{f}(t)= & {} \left( -m_1+ m_2 f(t-1) - m_3 \frac{f(t-1)^2}{2!}\right. \nonumber \\&\left. + m_4 \frac{f(t-1)^3}{3!}\right) \nonumber \\&+ {{\bar{p}}} \left( m_1- m_2 f(t-\nu ) + m_3 \frac{f(t-\nu )^2}{2!}\right. \nonumber \\&\left. - m_4 \frac{f(t-\nu )^3}{3!} \right) \nonumber \\&- \gamma f(t) +C_0. \end{aligned}$$
(42)

In Eq. (42), if we are interested in an outbreak that starts from an infinitesimal infection, such that \(f=0\) when \(\dot{f} = 0\), then the constant

$$\begin{aligned} C_0=m_1(1-{{\bar{p}}}), \end{aligned}$$

consistent with Eq. (34), leaving

$$\begin{aligned} \dot{f}(t)= & {} \left( m_2 f(t-1) - m_3 \frac{f(t-1)^2}{2!}\right. \nonumber \\&\left. + m_4 \frac{f(t-1)^3}{3!}\right) \nonumber \\&+ {{\bar{p}}} \left( - m_2 f(t-\nu ) + m_3 \frac{f(t-\nu )^2}{2!}\right. \nonumber \\&\left. - m_4 \frac{f(t-\nu )^3}{3!} \right) \nonumber \\&- \gamma f(t). \end{aligned}$$
(43)

Linearizing Eq. (43) for small f, we obtain

$$\begin{aligned} \dot{f}(t)= m_2 f(t-1) -{{\bar{p}}} m_2 f(t-\nu )- \gamma f(t). \end{aligned}$$
(44)

Substituting \(f(t)=e^{st}\), we find

$$\begin{aligned} s=m_2e^{-s}-m_2{\bar{p}}e^{-\nu s}-\gamma \end{aligned}$$
(45)

This characteristic equation matches one studied in [20, 26], and the stability condition is known to be [recall Eq. (22)]

$$\begin{aligned} R_0=m_2\frac{(1-{\bar{p}})}{\gamma }<1. \end{aligned}$$
(46)

In fact, since \(m_2\) is the second moment of \(\sqrt{\beta }\), i.e., the population average of \(\beta \), this validates the use of an average value in the lumped model [Eqs. (2)–(6], studied in [20, 26]. Since our continuum model allows a general distribution for \(\beta \), we can consider the specific case of a Dirac delta function (i.e., \(\beta \) is not random)

$$\begin{aligned} \psi (u)=\delta \left( u-\sqrt{\beta _{0}}\right) . \end{aligned}$$
(47)

Equation (39) yields

$$\begin{aligned} G(f) = \sqrt{\beta _0}\, e^{-f \sqrt{\beta _0}}. \end{aligned}$$
(48)

Equation (33) becomes (inserting \(C_0\) to match initial conditions of \(f=0\) when \(\dot{f} = 0\))

$$\begin{aligned} \dot{f}(t)= & {} -\sqrt{\beta _0}\, e^{-f(t-1) \sqrt{\beta _0}} + {{\bar{p}}} \sqrt{\beta _0}\, e^{-f(t-\nu ) \sqrt{\beta _0}} \cdots \\&- \gamma f(t) + \sqrt{\beta _0}(1 -{{\bar{p}}}). \end{aligned}$$

Setting \(f(t) = \sqrt{\beta _0}P(t)\), we obtain

$$\begin{aligned} \dot{P}(t) = {{\bar{p}}} e^{-\beta _0 P(t-\nu ) } - e^{-\beta _0 P(t-1)} - \gamma P(t) + 1 - {{\bar{p}}},\nonumber \\ \end{aligned}$$
(49)

which exactly matches Eq. (15) of [26].

Further, even for variable \(\beta \), the correpondence between Eqs. (33) and (49) actually holds up to second order. If the expansion for small f in Eq. (43) is truncated at second order, i.e., we retain only the second and third moments of u, then it is easy to show that a simple scaling of f makes that equation match the second-order expansion of Eq. (49). The implication is that, for relatively small outbreaks, the dynamics under distributed \(\beta \) (i) depends on the expected values of \(\beta \) and \(\beta ^{3/2}\), and (ii) is the same, up to a linear scaling, as the dynamics with a single fixed \(\beta \) as studied in [26]. For larger outbreaks, higher moments of the distribution of \(\beta \) begin to play a role, and the match with Eq. (49) deteriorates.

Fig. 6
figure 6

An example with unbounded moment \(m_3\) (see Eq. (50)). a \(R_0\) on the horizontal axis governs stability. Each circle, labeled “numerical,” represents the saturation value observed in a numerical solution based on integration of Eq. (33) combined with Eq. (39). At every time step, the integral in Eq. (39) is evaluated numerically for the truncated domain \(0< u < 1000\). The continuous line labeled “analytical” is from Eq. (33) with Eq. (51) used directly. b Comparison of time responses \(-f(t)\), with “numerical” and “analytical” implying the same as in (a). The initial function used was \(f(t)=1\times 10^{-9}+1\times 10^{-9}\left( 1+\frac{t}{\nu }\right) ,\,t\le 0\)

Finally, we close with an example where the required moments in Eq. (43) do not all exist. Let the probability density function of \(\beta \) be

$$\begin{aligned} \phi (\beta ) = \frac{3 \cdot a^{3/2}}{2(a+\beta )^{5/2}}, \quad a>0, \end{aligned}$$
(50)

for which, in Eq. (43), \(m_2 = 2a\) and \(m_3 = \infty \). This distribution has a long tail. The integral G(f) for \(f>0\) [recall Eq. (40)] can be found (using Maple) in terms of special functions, and the first few terms of an asymptotic series for small \(f>0\) is as shown below:

$$\begin{aligned}&G(f) = \sqrt{a} - 2af \nonumber \\&\qquad \qquad - \frac{3a^{3/2}f^2}{2} \left( \gamma _E -\frac{1}{6} - \ln 2 + \frac{\ln a}{2} + \ln f \right) \nonumber \\&\qquad \qquad + \frac{4a^2 f^3}{3}\nonumber \\&\qquad \qquad + \frac{5a^{5/2}f^4}{16} \left( \gamma _E -\frac{21}{20} - \ln 2\right. \nonumber \\&\qquad \qquad \left. + \frac{\ln a}{2} + \ln f \right) + \cdots \end{aligned}$$
(51)

where \(\gamma _E = 0.57721566\cdots \) is Euler’s constant, also called the Euler–Mascheroni constant. The series has an \(f^2 \ln f\) term, reflecting the unbounded third moment of u. Equation (51) can be used in a numerical solution of the DDE in Eq. (33) with Eq. (34), provided the outbreak is not too big. For comparison, straightforward solution of the governing equations can be tried with direct numerical integration of Eq. (33) combined with Eq. (39) truncated at some suitably large value of u (we used \(u=1000\)). Some such solutions are shown in Fig. 6. The match is essentially perfect, which indicates that finiteness of moments of u, and hence the moments of \(\beta \) are not needed for the underlying DDE to have useful solutions.

5 Discussion and conclusions

In this paper, we have considered the extension of a compartmental model for an epidemic or pandemic to a network model, structured on the infectivity parameter \(\beta \) rather than background factors like age or occupation. We have considered a simple interaction model between susceptible individuals with different infectivity parameters \(\beta _k\) and \(\beta _r\) and examined the case where the effective interaction parameter between these groups is monotonic in each parameter, symmetric, and separable. Under reasonable qualitative requirements, we settled on an interaction term of the form \(\sqrt{\beta _k \beta _r}\). With this interaction, the continuum limit of the network model yielded a pair of delayed integrodifferential equations parameterized by \(\beta \). However, numerical solutions also suggested a remarkable dimensional collapse in the underlying dynamics, such that the entire variation due to the continuously distributed \(\beta \) could be captured using a single function of time. The dynamics in terms of this function, f(t), turned out to be given by a single first-order nonlinear DDE. We have referred to this dramatic simplification as complete dimensional collapse.

We are aware of similar dimensional collapse for the Fokker–Planck equation for a plasma in an ion trap (a parametrically forced system without delays): see [30] and references therein. However, we are not aware of such collapse being previously noted for any models within mathematical epidemiology.

The DDE governing the new variable f(t) has strong connections with the lumped-model DDE where \(\beta \) is assumed to be a single constant for the entire population. When the first few moments of the underlying parameter \(u = \sqrt{\beta }\) in the population are finite, a direct correspondence up to second order can be established with the single-\(\beta \) equation. Even if the required moments are not finite, the DDE remains well posed, although its small-f behavior may be more complicated.

There are interesting social implications that emerge from our model. For example, in the finite-moments case, even if \(\beta \) is distributed such that a small proportion of the population has rather high \(\beta \) values, there is no immediate catastrophic growth because that subpopulation, being small, tends to interact mostly with other parts of the population whose \(\beta \) values are smaller. Even in a population where some people engage in behavior corresponding to high \(\beta \) (i.e., not obeying social distancing), low-\(\beta \) behavior from other members of the population can help to both limit the pandemic and provide differential benefits based on adopted risk levels. Satisfyingly, the criterion for unstable growth from small initial infection is governed solely by the population average of \(\beta \), although the final saturation value of the infection depends on higher moments. In particular, for a small outbreak due to weak instability under infinitesimal initiation, the saturation value is essentially determined by the population averages of \(\beta \) and \(\beta ^{3/2}\), or of \(u^2\) and \(u^3\), respectively.

Future work with such continuum models may incorporate additional features for greater realism, including non-separable interaction terms, behavior modification by the population as the outbreak progresses, new approximate solutions for various special cases including cases with unbounded moments of u, and direct comparisons of model predictions with national or international data.