{'fraction_non_alphanumeric': 0.04260097808368049, 'fraction_numerical': 0.02001449012859989, 'mean_word_length': 4.1807262831941445, 'pattern_counts': {'":': 0, '<': 42, '<?xml version=': 0, '>': 84, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 14, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Backward bifurcation and oscillations in a nested immuno-eco-epidemiological model

ABSTRACT This paper introduces a novel partial differential equation immuno-eco-epidemiological model of competition in which one species is affected by a disease while another can compete with it directly and by lowering the first species' immune response to the infection, a mode of competition termed stress-induced competition. When the disease is chronic, and the within-host dynamics are rapid, we reduce the partial differential equation model (PDE) to a three-dimensional ordinary differential equation (ODE) model. The ODE model exhibits backward bifurcation and sustained oscillations caused by the stress-induced competition. Furthermore, the ODE model, although not a special case of the PDE model, is useful for detecting backward bifurcation and oscillations in the PDE model. Backward bifurcation related to stress-induced competition allows the second species to persist for values of its invasion number below one. Furthermore, stress-induced competition leads to destabilization of the coexistence equilibrium and sustained oscillations in the PDE model. We suggest that complex systems such as this one may be studied by appropriately designed simple ODE models.


Introduction
Traditional epidemiology focuses on between-host transmission dynamics in single host populations [1], where hosts are categorized into discrete states (e.g. susceptible, infected, and recovered and resistant, as in classic SIR models). In recent years, epidemiological theory and practice have been enriched in several ways. One is increasing recognition that infectious disease processes occur over multiple nested scales of biological organization [4,26]. Infection of a susceptible host by a pathogen is akin to a 'patch' being colonized in a metapopulation [13,14], and within individual hosts there can be substantial dynamics, as the pathogen waxes and wanes in response both to its exploitation of host resources and to the host's mounting labile defences against infection. Hosts are coupled by between-host transmission, which reflects the pathogen load sustained within individual infected hosts, among many other factors. Multi-scale models that allow for closed-form computation of threshold conditions are now widespread in infectious disease research [7,25]. There is a wide variety of modelling frameworks coupling different types of dynamical models on the within-host and between-host scales [25]. We refer to these as immuno-epidemiological models. The nested framework introduced by Gilchrist and Sasaki [10] links an ODE within-host model, structured by time-since-infection, to a between-host model, structured by chronological time and time-since-infection. The linkage is achieved by expressing the between-host rates, such as transmission rate or disease-induced mortality rate as functions of the within-host dependent variables. In this respect, the linkage is unidirectional -the between-host model depends on the withinhost model but not vice versa. Making the within-host model depend on the between-host variables (e.g. species abundances) has rarely been explored, and there are many challenges in making this linkage [9]. In some specific biological scenarios, linkage in this direction can be accomplished in a relatively natural way. For instance, the within-host model has been previously linked to the pathogen in the environment for some environmentally driven diseases [8,38]. When the within-host model depends on between-host variables, and vice versa, the linkage is called bidirectional. Infectious disease models with bidirectional linkage have to date been entirely ODE models; that is, both the within-host and the between-host model are ODE models with chronological time being the only independent variable.
Most frameworks that model infectious diseases in humans or in other species include only species that are infected by or transmit the pathogens [20,22]. However, most natural populations are subject to community interactions such as interspecific competition and predation [19]. Community interactions and particularly their effects on infectious diseases have been subjects of growing attention from scientists (see reviews in [12,18,27]). These community interactions can drive infectious disease processes in multiple ways [5,18]. For instance, many pathogens can be transmitted not only between individuals of a focal species, but also between these individuals and those of other species. There is now a substantial body of literature generalizing SIR and related models to multiple host species (e.g. [16,29]), and multiple parasitic agents [5,15,18,31]. Also, predators can alter infectious disease dynamics directly by changing mortality rates of infected and susceptible hosts, and indirectly by altering the recruitment rate of susceptible hosts [17]. Predation and the presence of alternative hosts can alter infectious dynamics in often complex ways (e.g. [34]). From a dynamical perspective, including ecological interactions in disease models (eco-epidemiological models) has been found to cause oscillations [37] and even chaos [21,35]. Most eco-epidemiological models are based on classical Lotka-Volterra models that include intraspecific and interspecific interference competition.
Within-host infectious disease dynamics and community interactions can themselves be intertwined in various subtle ways, because such interactions can alter internal host states. Resource availability for hosts can affect the growth potential of pathogen populations within hosts [11,32,33], as well as the ability of hosts to defend themselves against infections [30]. It is well known in the medical profession that nutrition is an important dimension of immune responses, with malnutrition magnifying the susceptibility of humans to infection [6]. This provides one causal avenue by which the community context of a host could alter within-host pathogen dynamics. A competitor that reduces the food supply of a focal host species might not only directly alter per capita growth rates, but also indirectly diminish the ability of an infected host to effectively mount an immune response to an invasive pathogen. Competitors that exert interference (e.g. via aggression or allelopathy) on a focal species can also increase stress, which is known to hamper immune responses [28]. Such competitive effects are likely to be increasing functions of the density of the competing species.
In this paper, we combine nested immuno-epidemiological models with Lotka-Volterra-type eco-epidemiological models of competition to understand the interplay between the ecological interactions and within-host pathogen dynamics. Such a union of immuno-and eco-epidemiology was first proposed in [3]. Here we go a step further and allow the within-host immune responses in a species subject to a pathogen to be affected by the population density of a competing species. We term this mode of competition 'stress-induced' competition. The dependence of the within-host system on a between-host variable makes the nested model bidirectionally linked, although our linking mechanism is different from the one used in environmentally driven diseases. This type of interaction and bidirectional linkage was first examined in [2]. Here we generalize the model and examine more complex properties of the model than considered in [2]. Consistent with what has been found in other bidirectionally linked models, we observe backward bifurcation occurring in the invasion number of the second species, allowing this species to persist together with susceptible and infected individuals of the first species, even when the second species' invasion number is below one. Furthermore, we find oscillations that we believe are the first example of oscillations occurring in a nested eco-epidemiological model. This paper is structured as follows. We introduce the PDE immuno-eco-epidemiological model in the next section. In Section 3, we reduce the PDE model to a simple 3D immunoeco-epidemiological ODE model and we investigate the system in this simple context. In Section 4, we investigate the equilibria of the full PDE model and we show that the PDE model exhibits backward bifurcation. In Section 5, we study the stability of equilibria of the PDE model and we show oscillations concurrent with coexistence of the pathogen, host, and non-host species. Section 6 summarizes our results.

The model
Immuno-epidemiological models link a within-host pathogen model to a between-host population-level model. These models are usually formulated for human diseases, but in the context of diseases of natural populations, where organisms experience a wide range of ecological interactions, these models are called immuno-eco-epidemiological models. In this section, we introduce an immuno-eco-epidemiological model with a new mode of competition. Typically in nested immuno-epidemiological models, the within-host model is an ODE model and does not depend on the between-host dependent variables or chronological time [25]. Here, however, we introduce a novel model with two competing species, one of which (species 1 or the host) is affected by a pathogen, while the other (species 2 or the competitor) is not. Species 2 not only directly competes with species 1, but also reduces its ability to mount an immune response to the infectious disease. This necessitates casting the within-host model in PDE form. So our model includes a mixture of distinct modalities of competitive interactions -both direct competition (as in the classic Lotka-Volterra model), and competition via suppression of immune defences in the host species.
We begin by first introducing the within-host model.

The within-host model
A model for a pathogen with density V(τ , t) within a host that is controlled by immune cells with density z(τ , t), where τ is the time-since-infection and t is chronological time, is given by The system has the following initial and boundary conditions: where V 0 > 0 is the pathogen density and z 0 > 0 is the immune cell density at the time of infection. Normally, φ(τ ) and ψ(τ ) would be given non-negative functions; however, for this system, they are defined as follows: φ(τ ) =V(τ ) and ψ(τ ) =ẑ(τ ), whereV andẑ are solutions of the following ODEs: with V(0) = V 0 and z(0) = z 0 . These equations have no effect unless there are hosts that become infected at t < 0 and are still infected at t = 0. If so, their internal dynamics are assumed to be those resulting from N 2 being fixed at its initial value (t = 0) (otherwise, we would need N 2 for t < 0).
In this system, in the absence of immune cells, the pathogen will grow logistically; r v is the intrinsic growth rate of the pathogen and q is the reciprocal of its carrying capacity, a is the attack rate of immune cells, and μ is the death rate of immune cells. The first term of the second equation in Equation (1) is the immune cell activation rate, which saturates with increasing V, with b 2 being the reciprocal of the half-saturation value of V. In the population model (detailed below), there are two competing species; the pathogen affects species 1, and its maximum immune activation rate b 0 /D can be reduced by increasing the density of species 2, which is N 2 . Parameter p is set to 1 to include the effect of N 2 on the immune response of species 1 or set to 0 to exclude this effect. The parameters and variables of the within-host model are summarized in Table 1.
This within-host model is a PDE extension of the within-host model used in [2] if q = 1/K v and b 2 = 0. To develop a simple ODE model for the within-host system, the approach in [2] was to assume that the impact of N 2 does not change during the entire within-host infection and it is fixed at present time. We dispose of this assumption here and use a more realistic model where the time-since-infection τ and chronological time t progress simultaneously. Carrying capacity of the pathogen Attack rate of immune cells μ Death rate of immune cells b 2 Reciprocal of the half-saturation level of V b 0 /D Maximum activation rate of the immune response N 2 (t) Population numbers of species 2 p Controls whether the impact of species 2 slows species 1's immune response We assume r v > 0, since if this is not true the pathogen can never increase, and b 0 > 0, as otherwise the immune cells can never increase. Also, the immune system has no effect on the pathogen if a = 0, so we assume a > 0. Parameter b 2 is non-negative; if positive, immune activation saturates at high V. The other parameters (q, μ and D) can be either 0 or positive (but D cannot be 0 if N 2 is 0 or if p is 0). For chronic infection, μ must be greater than 0, but this model with μ = 0 can be used for acute infection with permanent immunity.

The between-host model
There are many ways to splice epidemiological models with species interaction models. As a step towards greater realism, we will explore models in which the within-host model is embedded in a classic two-species Lotka-Volterra competition model with the pathogen specialized to one species [see Equations (4)]. We will address several questions. How does pathogen reproduction rate alter prior coexistence/dominance relationships between the species? If competition is expressed via weakening of the immune response (as above), how does this alter equilibrial prevalence, conditions for disease spread, and potentially unstable dynamics? Our goal is to study the interplay of within-host pathogen and immune dynamics and basic ecological interactions. The species that can be infected, species 1, is structured by time-since-infection and its immune status is tracked. The resulting novel immuno-eco-epidemiological model can be used to study how competition influences the interaction of the pathogen with the immune system and how this within-host dynamic interaction in turn affects the population dynamics of the two species.
To introduce the model (see Table 2 for parameters and variables), let N i (t) be the total number of individuals in species i (i = 1,2) at time t. Species 1 can be infected by a pathogen and can contain susceptible hosts S(t), recovered hosts R(t), and infected hosts structured by time-since-infection τ ; i(τ , t) is the density of infected hosts at time t that were infected τ time units previously. The total population of species 1 is Competition coefficient giving effect of species j on species i Table 3. Summary of linking functions.
Version Figure 7 3 Figure 6 Changes in these variables are described by the equations This model has initial conditions We assume that S 0 and N 0 2 are positive and ϕ(τ ), R 0 ≥ 0. Further, we assume that all hosts reproduce and all offspring are born susceptible (i.e. no vertical transmission). The per capita growth rate of each species is described by a logistic function where r i is the intrinsic per capita growth rate and K i the density of species i at which the growth rate is 0 in the absence of the other species. There is a component of density-independent intrinsic per capita death rates, represented as a constant, m i (r i , K i , m i > 0). Each species can reduce the growth rate of the other, with α ij (both non-negative) giving the reduction of the growth rate of species i due to an individual of species j relative to the reduction caused by an individual of species i (so α 11 = α 22 = 1). The rate of infection of each susceptible host (per infected host) is β(τ ), and the disease-induced mortality rate is α(τ ), both of which are increasing functions of V (and could also depend on z). We use the functions in Table 3.
For the model with recovery, γ (τ ) is the rate at which infected hosts recover, which should be an increasing function of z and a decreasing function of V, such as assumed as in [36]: where 0 is a small constant. The transmission rate β(τ ) and the disease-induced death rate α(τ ) and recovery rate γ (τ ) potentially depend implicitly on N 2 and on t. Although we will be suppressing this dependence below, it should always be kept in mind as they provide mechanistic pathways by which a competing species could alter infectious disease dynamics in a focal host species.
In Section 3, we assume that the within-host dynamics are fast enough that V and z follow their within-host equilibria, and β and α are functions only of t. For equilibria of the between-host system, such as those in Figure 6, there is no dependence on t so β and α are functions of τ only. For the chronic infection case (next section), μ > 0 and infected hosts do not recover, so κ = 0 (also R = 0). If μ = 0, there is recovery, so κ > 0.

Chronic infection with fast internal dynamics
To understand better the impact of species 2 on the immune system of species 1, we consider model (1)-(4) in the case for which there is no recovery and the disease is chronic (which requires μ > 0, in which case the within-host system goes to a stable equilibrium with the pathogen present for constant N 2 ). We assume that the dynamics of the pathogen with the immune system are sufficiently rapid so that they can be assumed to always be at their equilibrium. To simplify matters and gain more insight, we will also assume a linear dependence of the transmission rate and disease-induced mortality on pathogen density: where V * (t) is the equilibrium pathogen density if N 2 were fixed at N 2 (t). Note that this is the within-host equilibrium. The between-host model need not be at equilibrium, and N 2 (t) can vary with time, in which case V * (t) and therefore β and α vary with time. V * (t) approximates the solution to Equation (1) if N 2 (t) changes slowly relative to the time it takes for the equations to reach the within-host equilibrium (so we can neglect the derivatives with respect to t). Furthermore, we assume b 2 = 0. In this case V Then system (4) becomes the following ODE model: Model (5) is a new type of eco-epidemiological model in which the competitor (species 2) affects the host (species 1) not only through competition for resources but also by affecting the disease transmission and disease-induced death rates, both of which increase with N 2 as shown above. Setting p = 0 eliminates this effect, and makes Equation (5) a classical eco-epidemiological model. Therefore, comparing Equation (5) with p = 0 and with p = 1 allows us to compare this novel model to the corresponding classical model. To simplify the notation, we can define β 0 = cμ/b 0 and α 0 = ημ/b 0 . We note that species 2 both facilitates pathogen spread in species 1, via boosting β, and hampers it, by increasing α. (5) System (5) has the extinction equilibrium E 0 = (0, 0, 0), which always exists. Next, we have the species-2-only equilibrium E 2 = (0, 0,N 2 ),

Equilibria of model
Define the reproduction numbers of species i in the absence of disease as Assume R 1 > 1 and R 2 > 1. Then the system has another disease-free equilibrium: the no-disease coexistence equilibrium E 12 = (N 1 , 0,N 2 ), wherē Proposition 3.2: Assume R 1 > 1 and R 2 > 1. Equilibrium E 12 exists if and only if one of the following two sets of inequalities are satisfied: Note that the first set of inequalities implies 1 − α 12 α 21 > 0. Similarly, the second set of inequalities implies 1 − α 12 α 21 < 0. In the former case, in the absence of the infectious disease, given that coexistence is feasible, the equilibrium is locally stable (the coexistence scenario of classical Lotka-Volterra competition). In the latter case, the equilibrium (if feasible) is unstable, corresponding to a priority effect in the classical Lotka-Volterra competition. Another equilibrium, E * , has species 1 with the disease but without species 2. To show the existence of equilibrium E * , we define the reproduction number of the disease in the absence of the competitor:

Proposition 3.3:
Assume R 1 > 1 and R 0 > 1. Then the system (5) has a unique equilibrium E * = (S * , I * , 0). This is not hard to demonstrate. We set N * 2 = 0 in the equilibrial equations and solve for S and I.
is the unique positive solution of the equation: This equation rewritten as a quadratic equation in N 1 has a positive leading term and a negative constant term, and therefore, a unique positive solution. To see that S * < N * 1 so that I * > 0, we notice that the condition R 0 > 1 implies S * <N 1 . Using this inequality, it is not hard to see that the solution of the above equation occurs in the interval (S * , K 1 ). Finally, there is the coexistence equilibrium E * * . In principle, there are two ways in which coexistence equilibria can be reached in this model. One is that the pathogen may invade the state with coexistence of the two species without disease (if the equilibrium E 12 exists). This process requires that R 00 > 1, where is the reproduction number of the disease in the presence of the competitor. The second way a coexistence equilibrium may be reached is by species 2 invading species 1 with disease equilibrium E * . This is regulated by the species 2 invasion numberR 2 , defined as: For the coexistence equilibrium, we use the explicit dependence of α(N 2 ) and β(N 2 ) on N 2 .

Proposition 3.4:
The coexistence equilibrium E * * = (S * * , I * * , N * * 2 ) of system (5) exists if R 00 > 1 orR 2 > 1 and it is unique if p = 0 and 1 − α 12 α 21 > 0. Proof: For system (5) at the coexistence equilibrium, we can solve the second equation for S * * in terms of N 2 Note that the number of susceptible hosts at equilibrium is a decreasing function of N 2 for p > 0. If p = 0 species 2 does not affect species 1's immune system, and the number of susceptibles will be unaffected by species 2. From the last equation of (5), we express N * * 1 in terms of N 2 : This gives I * * can be monotonically decreasing or have a hump-shaped form where it is increasing for small N 2 and decreasing for large N 2 if p = 1. In contrast, if p = 0, I * * is a strictly decreasing function of species 2 numbers. Thus, species 2, through its impact on species 1's immune response, can indirectly increase the prevalence of the disease in species 1. With p = 0, the only species interaction is competition, so species 2 tends to decrease the numbers of species 1. If this decrease is enough, it could prevent the pathogen from persisting. But if the infectious disease can persist, the number of infected at equilibrium is reduced since the number of susceptibles is fixed by the second equation in Equation (5). If p = 1, in contrast, there is the additional interaction through the effect on species 1's immune system, which causes β and α to increase. This can tend to make it easier for the infection to persist and also to increase the number of infected. So with p = 1, there are contrasting effects of N 2 , and the net effect can be in either direction. Increasing N 2 increases I * * at low N 2 if m 1 p/(β 0 D 2 ) > 1/α 21 ; the left side measures the effect of N 2 due to the effect on the immune system while the right measures the direct competitive effect, and if the inequality is true the former effect outweighs the latter. We illustrate this situation in the dynamical behaviour of the model. Figure 1 shows that increasing species 2's reproductive rate r 2 causes an increase in species 2 equilibrial numbers and can increase the prevalence of the disease I(t) in species 1. In this case, it furthermore increases the proportion of infected of species 1 I(t)/N 1 (t). This effect in part is due to the impact species 2 has on the immune response of species 1. In most eco-epidemiological models, typically the negative ecological interaction decreases the prevalence in the focal species (as it does in the model above with p = 0); however, there are exceptions where increase may occur [17]. To see the existence and the multiplicity of the coexistence equilibria, we add the first two equations in Equation (5) at equilibrium, and replace N * * 1 and I * * with the expressions above. Thus, we arrive at the following equation for N 2 : For r 2 = 2 the equilibrial numbers of species 2 N 2 (t) are higher than the equilibrium number of species 2 for r 2 = 0.1. Moreover, the equilibrial prevalence I(t) for species 1 is also higher.
This equation is a quadratic equation in N 2 so it has at most two positive solutions.
Case 1: Equilibrium E 12 exists, α 12 α 21 < 1; R 1 > 1 and R 2 > 1. If N 2 is set to beN 2 , then the left-hand side is zero, while the right-hand side is negative. If N 2 is set to beN 2 , then the left-hand side is zero, while the right-hand side is positive if and only if R 00 > 1. Thus, if R 00 > 1 the equation has a unique positive root in the interval [N 2 ,N 2 ]. Because this root occurs for a positive value of the left-hand side, the right-hand side evaluated at this root is also positive. Thus I * * > 0 and this gives a coexistence equilibrium. Equation (11) can have another positive root outside that interval. However, at that root the left-hand side and the right-hand side are both negative. Hence, such a root does not give a positive coexistence equilibrium. If R 00 < 1 the equation may have zero or two positive roots. We show an example of two positive roots obtained through backward bifurcation in Figure 2. One can be stable, the other unstable (as in the example of Figure 2). Case 2: Equilibrium E 12 exists, α 12 α 21 > 1; R 1 > 1 and R 2 > 1. In this case similar arguments suggest that if R 00 > 1 the equation has a unique positive root in the interval [N 2 ,N 2 ] and a unique positive root outside of the interval. I * * > 0 for the root outside the interval and I * * < 0 for the root inside the interval. Hence again there is a unique positive root. If R 00 < 1 the equation may have zero or two positive roots. We show in Figure 3 that there are parameter values for which two roots are possible so that each root gives a positive coexistence equilibrium. Simulations suggest that both positive equilibria in this case are unstable. For the example shown in Figure 3, both equilibria are unstable and starting from either, the system approaches an equilibrium with species 1 and the pathogen (so N 2 = 0 and S, I > 0, in a stable equilibrium). Note that both equilibria are at values of N 1 and N 2 for which species 1 would eliminate species 2 without the disease; starting from higher N 2 , species 1 can be eliminated. In other cases, one of the equilibria is locally stable, while the other one is unstable. An example of this situation is given by the following parameter set: With this parameter set, the locally stable equilibrium is S * = 11.29516, I * = 0.028373, N * 2 = 3.078433, while the unstable equilibrium is S * = 12.34955, I * = 0.128962, N * 2 = 1.692455. Depending on the initial conditions, the system approaches either the stable equilibrium, or the equilibrium with species 1 only (without disease). Case 3: The equilibria here bifurcate from E * and that bifurcation is governed byR 2 . IfR 2 > 1, then there exists a unique positive solution. First notice that Notice that if N 2 =N 2 , then the left-hand side in Equation (11) is zero and the right-hand side is negative. Thus, LHS > RHS. We will show that at N 2 = 0, the LHS < RHS and they are both positive. Thus, a unique intersection occurs in the first quadrant which gives a unique positive coexistence equilibrium. To see the inequality at zero, we start with the equation for N * 1 : Next, we divide by N * 1 : Using inequality (12), we have Thus, we obtain the following inequality: Multiplying both sides byN 2 /α 21 and rewriting we obtain LHS < RHS at N 2 = 0. The left side of the inequality above is positive for R 1 > 1, so the LHS and RHS of Equation (11) are positive. This completes the proof in this case. In the casê R 2 < 1, we may have zero or two solutions. The two solutions occur through backward bifurcation. We exhibit such an example in Figure 4   (5) Model (5) is an ODE model so the local stability of equilibria is determined by examining the eigenvalues of the Jacobian. The following proposition gives the stability of E 0 and is not hard to establish.

Proposition 3.6:
Assume R 1 > 1. Then, equilibrium E 1 is locally asymptotically stable if and only if the following two inequalities hold: Similarly, we can obtain the stability of equilibrium E 2 . The Jacobian evaluated at the equilibrium has the eigenvalues λ 1 = r 1 (1 − α 12N2 /K 1 ) − m 1 , λ 2 = −(μ + α(N 2 )) and λ 3 = −(r 2 /K 2 )N 2 . The following proposition gives the stability of E 2 . Proposition 3.7: Assume R 2 > 1. If then the species 2 equilibrium E 2 is locally asymptotically stable. If the above inequality is reversed, then the species 2 equilibrium is unstable.
The stability of E 12 resembles the stability in the classical Lotka-Volterra model (with an additional condition related to invasion of infected). The following proposition gives the stability of E 12 . Proposition 3.8: Assume E 12 exists. Then, E 12 is locally asymptotically stable if and only if R 00 < 1 and 1 − α 12 α 21 > 0.
The stability of the species 1 disease equilibrium is given by the following proposition: Proposition 3.9: Assume R 1 > 1 and R 0 > 1. Then equilibrium E * is locally asymptotically stable if and only ifR 2 < 1.
This result is also not hard to establish. The Jacobian has an eigenvalue λ 1 = r 2 (1 − α 21 N * 1 /K 2 ) − m 2 which is negative only ifR 2 < 1. The remaining two eigenvalues are eigenvalues of a 2x2 matrix that has negative trace and positive determinant (see the Proof of Theorem 3.10). Consequently, they have negative real parts. This implies that when species 1 is alone with the pathogen, and the pathogen can persist, then they settle to a stable equilibrium without persistent oscillations.
Next we turn to the stability of the coexistence equilibria. First we show that without the impact of species 2 on the immune system of species 1, the coexistence equilibrium is locally asymptotically stable. Proof: If p = 0 system (5) becomes Computing the Jacobian of the system, we obtain where Thus, b 11 > 0 and b 12 > 0. The two are positive since from the equilibrium equation for N 1 we have: The characteristic equation is given by where Clearly a 2 > 0 and if 1 − α 12 α 21 > 0, then a 1 > 0 (since b 11 > r 1 N 1 /K 1 ). To see that a 0 > 0, we observe Finally, we check the stability condition a 2 a 1 − a 0 > 0 Since must be positive at equilibrium if 1 − α 12 α 21 > 0, because this makes the first term of the last expression positive, while the second term is positive at equilibrium (this follows from the equilibrium equations). Using this condition in Equation (21) proves that a 2 a 1 − a 0 > 0, which completes the proof in the case p = 0. For p = 0, we illustrate a case giving oscillations in Figure 5. Although this figure was initiated far from the equilibrium, the same final state is reached starting very close to the equilibrium, and it can be shown that the Jacobian (with p = 1) has eigenvalues with positive real parts, so the equilibrium is locally unstable. For these parameters, in the absence of the disease, species 1 out-competes and eliminates species 2, but the presence of the disease in species 1 reduces N 1 to a level at which species 2 can invade. So, Figure 5 shows periods of very low I during which S increases and N 2 decreases due to the superior competitive ability of species 1. However, eventually S gets high enough to cause a disease outbreak, which leads to a decrease in N 1 to a level that allows N 2 to increase again. As N 2 increases, so does the parasite load in infected hosts, increasing the infection rate and infected death rate, decreasing S and ultimately I, which reaches a very low level again, and the cycle repeats. The effect of species 2 on species 1's immunity causes positive feedback when N 2 is increasing, because this increase accelerates the decline in N 1 due to infection (without this effect, S, I and N 2 reach a stable equilibrium) Figure 5 assumed that β and α were linear functions of V * . If instead they were both assumed to be saturating functions of V * , then the oscillations in Figure 5 tend to be reduced as the amount of saturation increases. This is not surprising, since if values of V * are such that both β and α are completely saturated, then β and α are constant and the system reduces to that of (5) with p = 0, which does not oscillate. We performed simulations with the parameters of Figure 5 but with saturating functions for β(V * ) and α(V * ) (each of the linear functions above was divided by 1 + uV * ). Oscillations were still present with modest amounts of saturation (up to u = 4, at which saturation reduced the values of β and α to about half their linear values). If only α saturated, then very little saturation (u = 1) stabilized the dynamics, while if only β saturated, the system still oscillated at u = 8 (but saturation in this case also decreased N * 2 and therefore V * ). Saturation with differing strengths (stronger for β) could give oscillations with greater amounts of saturation (e.g. u = 8 for α and u = 16 for β) than equal saturation or saturation of only one function. Likewise, the backward bifurcation of Figure 2 occurred up to moderate amounts of saturation (about u = 0.003 with equal saturation, which reduced each function to 30% of its linear value at the positive stable equilibrium), but was not present for greater degrees of equal saturation. In this case, with saturation of only one function, backward bifurcation persisted for much greater saturation of α (higher than u = 0.05, which reduced α to less than 5% of its linear value at the positive stable equilibrium) than of β (only up to about u = 0.001). In this case, saturation of α allowed bifurcation for higher saturation of β, but not the reverse.
A summary of equilibria and their stability for system (5) is given in Table 4.

Equilibria of the full model
In this section, we investigate the equilibria of the more complex model (1)-(4). Equilibria are time-independent solutions. They solve the system: Note that this is the between-host equilibrium (in contrast to the within-host equilibrium of the previous section). At this equilibrium, the values of N 2 , S, R and number of infected hosts are assumed constant (independent of t). However, susceptible hosts are constantly becoming infected (balanced by death and recovery of infected hosts), and the values of V and z within infected hosts are given by Equation (1) assuming N 2 fixed at its equilibrium. This gives the first two equations, which are now ODEs in terms of time-since-infection τ .
In system above, we assume V 0 > 0 and z 0 > 0. This assumption is equivalent to the assumption that the within-host equations describe the dynamics, given an infection. Thus, the equilibrial values of V and z are positive, independently whether there are infected individuals in the population. In reality, V 0 is undefined if I = 0 and V 0 > 0 if I > 0 but to simplify matters we will always assume that V 0 > 0.
System (22)   Assume R 1 > 1 and R 2 > 1. Then the system has another disease-free equilibrium: the no-disease coexistence equilibrium E 12 = (V(τ ),z(τ ),N 1 , 0, 0,N 2 ), whereV(τ ),z(τ ) are solutions of the within-host equations with N 2 =N 2 andN 1 andN 2 are defined in Equation (6). Equilibrium E 12 exists under the conditions specified in Proposition 3.2. Now, we turn to the existence of the endemic equilibria (those including the disease). First, we consider the endemic equilibrium without species 2 E * = (V * (τ ), z * (τ ), S * , i * (τ ), R * , 0), where V * (τ ) and z * (τ ) are the solutions of the first two differential equations in Equation (22) for N 2 = 0 [other quantities in this section with an asterisk are evaluated at N 2 = 0, V = V * (τ ) and z = z * (τ )]. We define the probability of remaining in the infected class τ units after infection as The solution of the third differential equation in system (22) is given by: i * (τ ) = i * (0)π * (τ ). Substituting this form in the equation for i(0), we obtain S * . From the equation for the recovered individuals, we have Expressing i * (0) from the equation for the total population size of species 1 N * Substituting i * (0) into the fifth equation of system (22), we obtain the following equation for N * 1 : We define the reproduction number, under the assumption that R 1 > 1, as follows: Direct integration implies that m 1 ( * + * ) < 1.
Finally, we consider the coexistence equilibrium E * * = (V * * (τ ), z * * (τ ), S * * , i * * (τ ), R * * , N * * 2 ), where V * * (τ ) and z * * (τ ) are the solutions of the first two differential equations in Equation (22) for N 2 = N * * 2 [other quantities in this section with two asterisks are evaluated at N 2 = N * * 2 , V = V * * (τ ) and z = z * * (τ )]. We define the reproduction number of the disease, where the disease-free population consists of both competitors . From the last equation in Equation (22), we express N * * 2 in terms of N * * 1 : We have and π(τ ), , and i * * (0) are defined as in the previous section. However, we note that S * * = S * as S * is computed at N 2 = 0, while S * * is computed at the yet unknown N * * 2 . The same is true for R * * , , and i * * (0). Note also that β(τ ) = β(τ , N * * 2 ) and γ (τ ) = γ (τ , N * * 2 ). Thus, from the first equation in Equation (22), we obtain the following equation for N 1 : We subtract m 1 N * * 1 from both sides of that equation and obtain the equation Since S * * is a function of N * * 2 , it varies with N * * 1 as well; hence, S * * (N * * 1 ) is the value of S * * computed for the specified value of N * * 1 (using the equation above for N * * 2 as a function of N * * 1 ; similarly for and ). Thus, Equations (28) and (29) can be put in terms of N * * 1 only.
The following proposition specifies conditions for the existence of equilibrium E * * .
where in the last equation we use the equation for the equilibrium N * 1 . In that equation S * = S(N 2 /α 21 ). We assume that In other words, we assume that S is a decreasing function of N 2 and since N 2 is a decreasing function of N 1 , S is an increasing function of N 1 . This may or may not be true, depending on the assumptions for α(τ ). Continuing from the above, we have Hence, there exists N * * 1 ∈ (0, N * 1 ) which satisfies equation p 1 (N 1 ) = p 2 (N 1 ). We still need to show that N * * 1 > S * * . First, we notice that sinceN 2 < 0 and 1 − α 12 α 21 > 0 we havê which always holds becauseN 1 >N 2 /α 21 and 1 − α 12 α 21 > 0. Assume now thatN 1 < 0 andN 2 > 0. If 1 − α 12 α 21 > 0, p 1 (N 1 ) is negative for all N 1 > 0, so even if a solution N * * 1 exists, it satisfies N * * 1 < S * * . Hence, there is no viable solution.
. Hence, there exists N * * 2 that solves the equation. Also since p 2 (N * * 1 ) > 0, then p 2 (N * * 1 ) > 0 which implies that N * * 1 > S * * . Proposition 4.3 establishes conditions for the existence of coexistence equilibria but does not address their uniqueness. Indeed, the coexistence equilibrium does not have to be unique or exist only under the specified conditions. We find that there exist backward bifurcation and multiple coexistence equilibria with respect to species 2 invasion numberR 2 .
Building a specific example of backward bifurcation in model (1)-(4) is not a trivial task as the right-hand side of equation (28) is a very implicit function of N 2 . Methods for finding backward bifurcations in age-structured models are scarce (but see [24]). We took a different approach here. We used an appropriately designed simple ODE model (see Section 3), found first the backward bifurcation in that model and then using the same parameters and adjusting the initial conditions of the within-host model, we obtained the backward bifurcation in Figure 6. The backward bifurcation in Figure 6 is a solution of the following modification of Equation (28), derived from rewriting Equation (28) in terms of N 2 rather than N 1 We note that the backward bifurcation in Figure 6 is a lot deeper that the one obtained in the ODE case, suggesting that this phenomenon is enhanced by the age structure.

Stability of equilibria of the full system
In this section, we investigate the local stability of equilibria in the above section. Stability analysis helps determine which equilibria are biologically significant (mathematically stable or unstable through Hopf bifurcation) and under what conditions on the parameters. We linearize the equations in Equations (1)-(4) around a generic equilibrium E = . The corresponding perturbations are denoted, respectively, by u, w, s, y, r, and n 2 , while n 1 is the total perturbation of species 1. The generic system of perturbations for the within-host model takes the form: The generic form for the perturbation for the between-host model takes the form: We begin by looking at the stability of the within-host equations, given that species 2 is at equilibrium. There are four potential equilibrial values for species 2: N 2 = 0, N 2 =N 2 , N 2 =N 2 and N 2 = N * * 2 . We will not consider the stability of the last equilibrium as it is very complicated. In the remaining cases n 2 = 0. The stability of the within-host system with the other three equilibrium values of N 2 is given by the stability of the following system where Proposition 5.1: The within-host system (33) is locally asymptotically stable in the sense that if the principal eigenvalue of the epidemiological system has negative real part.
We continue here with the stability of the equilibria of the full system. We start by looking at stability of the extinction equilibrium E 0 . We have the following proposition. Proposition 5.2: If R 1 < 1 and R 2 < 1, then the extinction equilibrium E 0 is locally asymptotically stable. If either inequality is reversed, then the extinction equilibrium is unstable.
Proof: The within-host system is given by Equation (33) with N * 2 = 0 and it is stable by Proposition 5.1. We next investigate the conditions for stability arising from the betweenhost model: Solving the equation for y(τ ), we obtain y(τ ) = 0. The eigenvalues of system (35) are λ 1 = r 1 − m 1 , λ 2 = −m 1 , λ 3 = r 2 − m 2 , which are negative if R 1 and R 2 < 1.
Next, we look at global extinction results.

Proof:
The rate of change of species 1 satisfies the following differential inequality: If R 1 < 1, r 1 < m 1 so if both signs are equal signs, N 1 exponentially drops to 0; inequalities make the drop faster. Similarly, one can show the same for species 2.
Remark 5.4: From the above proposition, it follows that if R 1 < 1 and R 2 < 1, then the extinction equilibrium is globally stable.
Next, we investigate the stability of the equilibrium E 2 .
Proposition 5.5: Assume R 2 > 1. If then the species 2 equilibrium E 2 is locally asymptotically stable. If the above inequality is reversed, then the species 2 equilibrium is unstable.
Next, we investigate the equilibrium of species 1 alone with no disease, E 1 .
Proposition 5.6: Assume R 1 > 1. Then, equilibrium E 1 is locally asymptotically stable if and only if the following two inequalities hold: Proof: System (32) takes the form: Solving the differential equation, we have Substituting this into the expression for y(0), we obtain the following characteristic equation: Let G(λ) denote the right-hand side of the above equation. If R 0 > 1, then since G(0) = R 0 we have that G(0) > 1. Furthermore, for real λ G(λ) monotonically decreases and → 0 as λ → ∞. Hence, the equation G(λ) = 1 has a unique real positive root λ * > 0 and the equilibrium E 1 is unstable (infected increase when rare). If R 0 < 1, then G(0) < 1, so the equation above has no real non-negative solution. To satisfy the equation, G(λ) must be real, so if λ = ξ 1 + iξ 2 and ξ 1 ≥ 0, e −λτ in the equation can be replaced by e −ξ 1 τ cos(ξ 2 τ ), in which case Hence, the equality G(λ) = 1 does not have any roots with non-negative real parts. The stability of E 1 in this case depends on the remaining eigenvalues. The remaining eigenvalues are: λ 1 = −m 1 , λ 2 = r 2 (1 − α 21N1 /K 2 ) − m 2 and λ 3 = −r 1 (N 1 /K 1 ). The second inequality in the statement of the theorem gives λ 2 < 0. This completes the proof.
Next, we consider the stability of the coexistence equilibrium E 12 . The following proposition gives this result. Proposition 5.7: Assume E 12 exists. Then, E 12 is locally asymptotically stable if and only if R 00 < 1 and

Proof:
The system for the perturbations of the E 12 equilibrium becomes Using the equilibrium equations this simplifies to: To find the eigenvalues, we first solve the differential equation giving and substitute that into the initial condition. Canceling y(0), this leads to the characteristic equation.
The right side with λ = 0 is R 00 . Using the same steps as in the previous proposition, we obtain that if R 00 > 1 equilibrium E 10 is unstable, while if R 00 < 1, the stability of E 12 depends on the remaining eigenvalues. These are λ 1 = −m 1 , and the eigenvalues of the matrix Since Tr(J) < 0 and Det J = (1 − α 12 α 21 )(r 1 /K 1 )N 1 (r 2 /K 2 )N 2 , the equilibrium is locally asymptotically stable if 1 − α 12 α 21 > 0 which is satisfied under the conditions of the proposition. The other E 12 equilibrium for which this inequality is not satisfied is unstable. This completes the proof. Now, we turn to the stability of the endemic equilibria. We first begin with E * . The stability of E * depends on the species 2 invasion number at the equilibrium of species 1: where N * 1 is the unique solution of Equation (26). The conditions for stability of E * are given by the following proposition, where σ = r 1 (1 − 2N * 1 /K 1 ). Proposition 5.8: Assume R 1 > 1 and R 0 > 1. The species 1 endemic equilibrium E * is unstable ifR 2 > 1. IfR 2 < 1, the species 1 endemic equilibrium E * satisfies: • if γ (τ ) = 0 and m 1 > σ > 0, then E * is locally asymptotically stable; • if α(τ ) = 0 and σ < m 1 , then E * is locally asymptotically stable.

Proof:
The proof is relegated to Appendix 1.

Proof:
The proof is relegated to Appendix 2.
Motivated by the oscillations of the simple ODE immuno-eco-epidemiological model in Section 3, we searched for oscillations in model (1)- (4). The presence of oscillations in the ODE model does not imply oscillations in the PDE model as the ODE model is not a special case of the PDE model. In single-scale time-since-infection structured models, the endemic equilibrium is usually destabilized by choosing a simple step function as the transmission rate. This cannot be done with multi-scale models where the transmission rate comes from the solution of the within-host model and is not arbitrary. Hence, in multi-scale models, a stabilization of the population-level equilibrium may occur [23]. If stabilization does not occur, showing loss of stability and oscillations is not a trivial task. The complexity of the characteristic equation and the implicit dependence on within-host parameters obstruct analysis for finding parameter values that give roots with positive real parts. We approached the problem numerically, and obtained oscillations for some parameter combinations such as those in Figure 7, although there is no guarantee that these are indeed sustained oscillations. To obtain the oscillations, we use α (or η) as a bifurcation parameter. Increasing α leads to oscillations. We were also able to produce oscillations in the case in which γ (τ ) = 0 and α 12 = 0 but p = 0, suggesting that the effect of species 2 on species 1's immunity plays the main role in the destabilization. The parameters that produce the oscillations in Figure 7 also give instability in the corresponding ODE model considered in Section 3. However, if m 1 is increased to 0.035, the ODE model is stable while the full model is unstable. The full model introduces a delay in the increase in V (and therefore β and α) relative to the ODE model, which tends to destabilize the system.

Discussion
Understanding infectious disease ecology increasingly involves on one hand linking processes at different scales (in particular, within-host pathogen dynamics, and between-host transmission), and on the other embedding infectious disease processes in a broader community context, where species compete and are embedded in a wide range of food web interactions. In this article, we introduce a novel nested time-since-infection ecoepidemiological model of competition with a within-host model including an immune response in disease-affected species 1. Species 2 competes not only directly for resources with species 1 but also by affecting negatively species 1's immune response to the infection. We term this mode of competition stress-induced competition. The model involves bidirectional linkage of the within-host and between-host systems. This necessitates casting the within-host model in PDE form. We also present a related ODE model. We find that stress-induced competition is capable of producing backward bifurcation with respect to the species 2 invasion number. Backward bifurcation of competitor invasion allows the competitor to persist alongside species 1 for values of its invasion number below one. In the age-structured case (the PDE model), we find that the backward bifurcation is very pronounced, allowing species 2 to persist alongside species 1 for values of its invasion number very close to zero. In the case of this backward bifurcation, two coexistence equilibria of species 1 and species 2 exist, and one equilibrium in which species 2 is not present. If species 2's invasion number is below one, species 2 may persist only in the case in which its initial numbers are sufficiently large.
Furthermore, we find that in the PDE case, the coexistence equilibrium of species 1 and species 2 may become destabilized and we sometimes observed numerically sustained oscillations. We show that the coexistence equilibrium is locally stable in the absence of disease-induced mortality or in the absence of recovery and competition (both interspecific and stress-induced) of species 2 with species 1. This destabilization occurs as a result of the disease-induced mortality and stress-induced competition of species 2 with species 1. Hence, the interplay of competition and pathogen dynamics can generate large-magnitude oscillations, when neither process on its own leads to instability (see Figure 5 and 7 for examples).
The age-structured immuno-eco-epidemiological model exhibits significant mathematical complexity. There can be alternative equilibria, with all species present at each equilibrium, for instance. In producing examples of the backward bifurcations and oscillations in the PDE model, we were guided by an appropriately designed three-dimensional ODE immuno-eco-epidemiological model, obtained under the assumption that the disease is chronic and within-host dynamics are fast. This simple ODE model is not a special case of the PDE model but exhibits both the backward bifurcation in the invasion number of species 2 and the oscillations we found in the PDE model. We surmise that specially designed simple ODE models may be used to study these types of complex systems and derive conclusions about their behavior.
Using the ODE model, we further observe that stress-induced competition leads to a lower number of susceptible individuals at equilibrium when the population of species 2 increases. In contrast, in the absence of stress-induced competition, species 2 numbers do not affect the number of susceptibles in the population of species 1. A more surprising result is that although single-scale eco-epidemiological models generally suggest that competition (and predation) lead to lower disease prevalence in the focal species, we find that stress-induced competition may increase the prevalence in species 1 when the population of species 2 is small. This occurs in a chronic disease without recovery. So stress-induced competition can enhance disease prevalence in a focal host species.
The interplay between within-host immune dynamics and ecological interactions is just beginning to be studied. There are many interesting questions yet to be addressed. Our observation that the dynamics of complex nested immuno-eco-epidemiological models can sometimes be obtained by a simple, related ODE model opens the door for further investigations and analysis. Our PDE and respective ODE models could be extended, for instance, so that the pathogen infects both hosts. This can add an immune dimension to apparent competition interactions and could lead to complex feedbacks. For instance, if species 2 weakens the immune response in species 1, and boosts disease prevalence in the latter, this could 'spill back' to boost disease levels in species 2. Another interesting avenue is to examine how the within-host immune dynamics affect predator-prey interactions. Two types of scenarios may be considered here: one with disease in the prey and the other with disease in the predator. Predation can alter immune responses, directly and negatively because prey experience stress or spend less time feeding, or indirectly because lower prey numbers boost resources available per prey, increasing resource acquisition rates and permitting stronger immune responses to infection. Coupling such responses with predator-prey and host-pathogen dynamics could potentially lead to complex dynamics. Likewise, also, immune responses in predators to their own pathogens may depend on how rapidly they can feed and garner resources to use in mounting such responses. We suggest that examining such effects of interspecific interactions on within-host pathogen dynamics, with consequent impacts on among-host disease transmission, provides a rich avenue for future theoretical and empirical investigations. (A1) The first eigenvalue is λ 1 = r 2 (1 − α 21 N * 1 /K 2 ) − m 2 < 0 if and only ifR 2 < 1. Hence ifR 2 > 1, equilibrium E * is unstable. IfR 2 < 1 the stability of E * depends on the eigenvalues of the remaining system: where σ = r 1 (1 − 2N * 1 /K 1 ) and B = ∞ 0 β(τ )i * (τ ) dτ . Case 1: First, we assume that the disease leads to no recovery, that is γ (τ ) = 0. Assume also 0 < σ < m 1 .
Solving Substituting s into the initial condition and canceling y(0), we obtain the following characteristic equation for λ: Denote by L(λ) the left-hand side of the equation above and by H(λ), the right-hand side. Next, we show that if σ < m 1 the characteristic equation (A7) does not have a real positive root. In this case, both sides of Equation (A7) are defined for all real and positive λ, and, This last inequality follows from the fact that On the other hand, Now, we show that if γ (τ ) = 0 and 0 < σ < m 1 , then E * is locally asymptotically stable. This result is analogous to the result in [2]. Since the characteristic equation cannot have real non-negative roots, we then show that the characteristic equation (A7) cannot have purely imaginary roots. To see that, we take λ = ηi. Then Equating the real and the imaginary parts, we have the following system: (A11)