Homogenization techniques for population dynamics in strongly heterogeneous landscapes

ABSTRACT An important problem in spatial ecology is to understand how population-scale patterns emerge from individual-level birth, death, and movement processes. These processes, which depend on local landscape characteristics, vary spatially and may exhibit sharp transitions through behavioural responses to habitat edges, leading to discontinuous population densities. Such systems can be modelled using reaction–diffusion equations with interface conditions that capture local behaviour at patch boundaries. In this work we develop a novel homogenization technique to approximate the large-scale dynamics of the system. We illustrate our approach, which also generalizes to multiple species, with an example of logistic growth within a periodic environment. We find that population persistence and the large-scale population carrying capacity is influenced by patch residence times that depend on patch preference, as well as movement rates in adjacent patches. The forms of the homogenized coefficients yield key theoretical insights into how large-scale dynamics arise from the small-scale features.


Introduction
Spatial ecology aims to explain observed spatial distribution patterns of populations and to predict their response to landscape alterations. Population-level patterns emerge from individual-level processes of movement, reproduction, and death. Such processes are influenced by local landscape features as individuals adjust their behaviour to their surroundings. Movement decisions in particular determine the extent to which local conditions affect individuals. For example, predation risk for many songbirds is higher in open fields than in dense forest cover. Accordingly, many birds tend to avoid open areas, or move through quickly [19]. A fundamental problem in theoretical ecology then is to determine the extent to which individual processes on smaller scales affect population responses on larger scales. In this paper, we present a homogenization approach to the multiscale problem of how individual behavioural responses to sharp transitions in landscape features, such as forest edges, affect population-dynamical outcomes. CONTACT  We cast the spatial-temporal dynamics of a population in a reaction-diffusion model of the form ∂ τ ρ(y, τ ) = ∂ 2 y [D(y)ρ(y, τ )] + ε 2 f (y, ρ), ( 1 ) where ρ(y, τ ) denotes the density of the population at time τ and location y ∈ R. Growth and death dynamics are modelled by a function f that may depend on spatial location. Movement is modelled by 'ecological diffusion', whereby D(y) denotes the motility of individuals [24]. This formulation assumes that while individuals adjust the probability of moving, they do not bias their movement in any direction. Models of the form (1) have been used extensively in ecological modelling [5,10,12,22]. A typical assumption for mathematical analysis is that the coefficient functions depend smoothly on the spatial variable [15,27]. Many natural landscapes exhibit edges or interfaces with sharp transitions between different landscape features, for example between forest and grassland, or lake and shore. Many human landscape alterations create similarly sharp edges, for example at a road or a subdivision. There is a wealth of empirical studies on how individuals direct their movement to avoid or cross such edges [8,20,21]. Several authors proposed approaches for how to include interfaces and individual behaviour at interfaces into reaction-diffusion equations [1,3,12,16,23]. We follow the work by [12].
We take a landscape-ecology point of view and consider the environment to consist of patches, i.e. areas that are relatively homogeneous within but substantially different from their immediate surroundings. Accordingly, motility and population growth are spatially constant within a patch but different from outside that patch. We partition a one-dimensional landscape into intervals ('patches') (y i−1 , y i ), i ∈ Z, and have a diffusion equation on each interval. Equation (1) then turns into a system of the form We need to define matching conditions that link the densities and population fluxes between adjacent patches. Conservation of individuals requires that the flux be continuous across an interface, i.e.
Here, y + i and y − i denote right-and left-sided limits at y i . A careful derivation of interface conditions from a random walk model reveals that the density across an interface is, in general, not continuous [16]. Rather, we use the condition [12] where α + i (α − i ) is the probability that an individual at interface y i moves to the right (left) such that α + i ∈ [0, 1], and α − i = 1 − α + i . The formal study of systems of the form (2) with conditions (3) and (4) is still in its infancy, but some qualitative results about the stability of the linear system and minimal travelling wave speeds are known, assuming that the system shows a particular translational symmetry [12,13].
A powerful tool to study the dynamics of model (1) is multi-scale analysis and homogenization. If one assumes that the coefficient functions vary on a small scale only, one can separate scales and introduce a small-scale variable. Applying the method of multiple scales leads to a suite of equations that are solved sequentially, and the leading order solution often provides a very good approximation to the solution of the original problem [9,15,17]. The classical results on homogenization techniques require that the solution be continuous. For example, Othmer [15] applied the method of homogenization to a model of Fickian diffusion assuming continuous population density. There are very few recent papers that deal with ecological diffusion with discontinuous densities [7,14], and these analyses are restricted to the special case of no habitat preference (α + i = α − i ). Other authors incorporated the more general interface conditions (3)-(4), but then proceeded to scale density and space in Equations (2)-(4) to obtain continuous densities so that the classical techniques apply [13]. This approach is unsatisfactory and does not generalize, for example to multispecies models.
In this work, we develop the theory to homogenize equations of the form (2) with the general interface conditions (3)-(4). We treat the special case of a periodic environment consisting of two types of alternating patches, but the theory carries over to other periodic settings. More specifically, we assume the interval (y i−1 , y i ) will represent a patch of type 1 (type 2), whenever i is odd (even). All patches of type 1 have width y 1 , and all patches of type 2 have width y 2 . We set the motility coefficients and growth functions to be The probabilities that individuals at interfaces move to the right or left may be defined similarly, by setting α ± i equal to α ± 1 when i is odd or α ± 2 when i is even. However, we assume that the probability that an individual moves towards a patch of type 1 (or type 2) is independent of whether that patch is to the right or to the left of the interface. Thus, α − 1 = α + 2 = α, and α + 1 = α − 2 = 1 − α, and to simplify notation at the interfaces, we set for k = (α/(1 − α))(D 2 /D 1 ). Then Equation (4) becomes We present the formal derivation of the homogenization limit for this system in the next section. In Section 3, we compare the homogenization approximation with numerical simulations of the full spatial model. We discuss ecological insights from our approach as well as future directions and application in the final section.

Multiple scales analysis and homogenization
It is useful to introduce fast-(small-) and slow-(large-) scale temporal and spatial variables. Models of spatio-temporal dynamics may be formulated at the fast scale (Equation (1)), accounting for variation in movement behaviour and population dynamics arising from local environmental heterogeneity. The fast-scale models can then be 'scaled-up' to obtain a model in terms of the slow-scale variables. To this end, the fast-scale spatial and temporal variables are y and τ , and we introduce the corresponding slow-scale variables x and t. We impose the parabolic scaling x = εy and t = ε 2 τ , where ε 1 is a small, dimensionless parameter that describes the separation between the fast and slow scales.
At the fast scale, the spatio-temporal dynamics are given by Equation (1). The scale of the environmental heterogeneity is determined by y 1 and y 2 , both of which are assumed to be small (O(ε)). The reaction term is scaled by ε 2 , reflecting the assumption that growth dynamics are very slow when we are 'zoomed-in' on the fast scale. Lastly, we consider the diffusion coefficient to vary only with respect to the small scale.
The goal of homogenization is to obtain an approximate model that describes the slowscale behaviour of the system by appropriately averaging the variation in the movement and growth parameters over the fast scale. The coefficients of the resulting homogenized model are constant or only vary at the slow scale [9,15,17]. Consequently, the homogenized model is much easier to analyse analytically or numerically, and often leads to important theoretical insights about the relationship between local individual movement behaviours and variation in growth rates and large-scale population-dynamical outcomes.
Proceeding formally, we assume that ρ depends explicitly on both spatial scales x and y and on the slow temporal scale t. Treating x and y as independent induces a change in derivative, ∂ x → ε −1 ∂ y + ∂ x . If we assume that the motilities and the growth parameters vary only at the fast scale, then in terms of the slow-scale variables, the model (2) and interface conditions (3), (7) become with and for i ∈ Z. Coefficients and growth functions are given by (5), (6).
In the analysis that follows, we assume that y 1 = y 2 = y. On the other hand, if the patch widths differ, then the system (2), (3), (7), expressed in terms of the fast-scale variables, may be rescaled to obtain a fast-scale system with both patch widths equal to y 1 . To demonstrate this, we set y 0 = 0, and we focus on the single period (− y 2 , y 1 ], which includes the patch to the right (type 1) and to the left (type 2) of 0. The results are then extended periodically throughout R. We introduce the rescaled spatial variable ξ and set ξ = y, for y ∈ (0, y 1 ) and ξ = ( y 1 / y 2 )y, for y ∈ (− y 2 , 0). We also set ω(ξ , t) = ρ(y, t) for ξ ∈ (0, y 1 ), and ω(ξ , t) = ( y 2 / y 1 )ρ(y, t) for ξ ∈ (− y 1 , 0). Then the system (2), (3), (7), becomes for ξ ∈ (0, y 1 ) or for ξ ∈ (− y 1 , 0), with interface conditions and Here, the coefficients and growth functions are given bỹ wherek = ( y 1 / y 2 )k. Scaling up the system in (11)- (13), and treating ξ and ζ = εξ as independent, results in a system of the form (8)- (10). Thus, in our analysis below (Section 2.1) we assume equal patch widths, however we give results in Section 2.2 for the more general case of two different patch lengths.

Homogenization
Since ε is small, we assume a series solution of the form where each ρ j (x, y, t), for j = 0, 1, . . ., is a bounded function of y. The analysis that follows applies to a large class of growth functions f i that satisfy Assuming equal patch widths, we proceed by substituting the ansatz (17) into the model and interface conditions (8)- (10), equating terms with the same powers of ε, and solving the resulting equations iteratively. We seek the leading order solution, ρ 0 .

Order ε −2
The equations at the largest order, O(ε −2 ) are with interface conditions and To solve (19) and find ρ 0 we define D(y) = D i for y ∈ (y i−1 , y i ) and investigate the integral of (19) where y ∈ (y j−1 , y j ) for some j ∈ Z. According to (19), the integrand in each term on the right side of (22) must vanish at all values of s. Applying this fact and integrating, we obtain Here, we have assumed, without loss of generality, that j > 0. Applying the continuous-flux interface condition from Equation (20) causes the series on the right side of (23) to telescope, collapsing down to and, thus, Next, in order to apply the discontinuous-density interface condition (21) we define and let h(y) = h i for y ∈ (y i−1 , y i ). We then consider the integral Integrating each term on the right side, we obtain Equations (26) and (21) imply that the series telescopes. Thus, Alternatively, we can multiply (25) by h(y) and integrate, to obtain The integral on the right side can be rewritten as which can be simplified to yield where (y) is defined by for y ∈ (y i−1 , y i ). Note that for all y we have 0 < (y) < y. Substituting (32) into (30), and applying (29), we obtain The first term on the right-hand side of this equation is O(y), so that ρ 0 (x, y, t) will only remain bounded as y → ∞ if ∂ y ρ 0 (x, y + 0 , t) = 0. This condition implies the following simple form for ρ 0 : where g(x, t) = ρ 0 (x, y + 0 , t) is independent of y. So it remains to find g(x, t), and we do this by studying the order ε −1 and ε 0 equations.

Order
with interface conditions and Since h(y) is constant over each patch (y i−1 , y i ), Equation (35) implies that ∂ y ρ 0 = 0 on each patch. Consequently, Equation (36) becomes Following our approach for finding ρ 0 we consider the integral of (39) where y ∈ (y j−1 , y j ). Equation (39) implies that each of these integrals vanishes. Thus, integrating and assuming, without loss of generality, that j ≥ 0, we obtain Consequently, (41) can be rewritten as In this form we can now apply the continuous-flux interface condition (37), and the series telescopes, yielding Similar to the approach used to obtain Equation (29), we can use the discontinuous-density interface condition (38) to show that Alternatively, we can multiply (43) by h(y) and integrate to obtain Applying (32) and (35) to this equation yields Equating (46) and (44) gives Note that the first and second terms on the right-hand side are each O(y) and unbounded as y → ∞. Consequently, they must balance each other so that ρ 1 remains bounded as y → ∞. Correspondingly, we require Evaluating the limit, we find that Substituting this relationship into (47) and simplifying, gives where and are both independent of y, as required.

Order ε 0
The population dynamics vary on the slow time scale and so first appear in the O(ε 0 ) equations given by with interface conditions and Following the procedure in the previous two sections we consider the integral Applying the continuous-flux interface condition (54), the series on the right-hand side telescopes, yielding Alternatively, note that rearranging Equation (53) gives for y ∈ (y i−1 , y i ), i ∈ Z. By substituting in the expressions for ρ 0 and ρ 1 (Equations (35) and (50)) and integrating (58), we obtain The integral in the first term on the right-hand side of (59) is The second integral is The third integral is The fourth integral is Substituting Equations (60)-(63) into (59), applying Equation (57), and simplifying yields, We multiply this equation by h(y) and integrate Similar to the approach used to obtain Equations (29) and (44), we can apply the discontinuous-density interface condition (55) to the integral on the left-hand side of Equation (65), yielding Since ρ 2 is bounded, (66) implies that the left-hand side of Equation (65) is O(1) as y → ∞.
There are unbounded O(y) and O(y 2 ) terms on the right-hand side of Equation (65) that must balance each other as y → ∞. In particular, the first integral on the right-hand side is O(y 2 ), whereas the other integrals are O(y). Consequently, the coefficient of the O(y 2 ) term, which is independent of y, must vanish. Accordingly, we require We can express a 2 in terms of g by combining Equations (49) and (52) from Section 2.1.2 to give Substituting the expression for a 2 into Equation (67) and simplifying, yields the reactiondiffusion equation for g where the homogenized diffusion coefficient is The solution, g(x, t), of Equation (69) gives our main result, the slow-scale variation in the leading order solution ρ 0 (x, y, t). Variation at the fast scale is recovered by dividing the slowly varying solution by h(y), as in Equation (35).

Different patch widths
We also easily recover the slow-scale variation (g) in the leading order solution when the two patch types have different widths. Suppose the width for the type 1 patches is y 1 = l 1 , and the width of the type 2 patches is y 2 = l 2 . After transforming the system into one with equal patch widths as in (11)-(13), scaling up, then homogenizing, we obtain the homogenized diffusion equation The homogenized diffusion coefficient is Note that D h is not symmetric in l 1 and l 2 due to the spatial scaling. The leading order solution for the rescaled system (11)- (13) is where,h(ξ ) =h i for ξ ∈ (ξ i−1 , ξ i ), and Note that although we have expressed the coefficients in terms of the original movement parameters and growth functions, the diffusion Equation (71) models large-scale dispersal and growth of the rescaled (equal patch width) system. Thus, the leading order solution must be rescaled to return to the original variables.

An example with logistic growth
To illustrate the accuracy and insights that can be gained from the homogenization results we consider the example that the growth functions are logistic The homogenized model (71) becomes a constant coefficient reaction-diffusion equation with a logistic reaction term where the intrinsic growth rate and the intraspecific competition coefficients for the homogenized equation arẽ

Numerical comparisons of the travelling wave profile
In order to explore the accuracy of our approach we compare the travelling wave solutions of the original non-homogenized equations (2,3,7) to the leading order approximation given by the homogenization (Equations (71), (73), (74)). An implicit numerical scheme which is second order in time and space is used to solve the equations numerically. Full details of the numerical scheme are provided in the Appendix. Figure 1 illustrates the travelling wave solution of the reaction-diffusion problem with logistic growth, demonstrating the excellent agreement (see insert) between the leading order approximation and the original non-homogenized solution. The homogenization theory uses the assumption that spatial variation occurs on a small scale and the reactions occur on a slow scale. While the former is true in our simulations (l 1 + l 2 D i ), the later was relaxed (λ i = μ i = 1), but still resulted in an accurate leading order approximation. To examine if the assumption of small-scale spatial variation can also be relaxed we considered only motility (setting f i = 0) and varied patch lengths. Specifically, we fixed l 1 = 0.1 and varied l 2 . The homogenization continues to be very accurate even when patch widths are large ( Figure 2). When l 2 = 1.9 the spatial scale is order one, but we observed a maximum absolute error of 0.25 (less than 10%) (see Figure 2(e)). The error was maximal at the edges of non-preferred patches (type 1 (2) if α < 0.5 (α > 0.5)), but was low in the rest of the domain, with the average error across space being 0.05 (Figure 2(f)). The leading order approximation remains accurate, despite the spatial variation being on the same order as dispersal, a finding supported by previous work in the literature [6,11].
The accuracy of the leading order approximation is affected by patch preference (α) (see (Figure 2 (e,f) and compare (a,b) to (c,d)). We can understand this result by examining the solution profiles. In Figure 2 (a,b), where there is greater preference for patch 2 (α = 0.25), the population is quick to move through the landscape when compared to Figure 2 (c,d) where preference is for patch 1 (α = 0.75). The difference in speeds is due to l 2 l 1 . With l 2 l 1 , most of the landscape is of type 2, so when preference is for patch 1 the population movement is slower, the population get 'stuck' in small type 1 patches. Once in patch 1 the population has a tendency to stay there and as this patch is small the population cannot travel far. The result of this patch 1 preference is a slower travelling wave and a shallower gradient in population density at the wave front (Figure 2(d)). In contrast, when preference is high for type 2 patches the population moves faster. Although the population now tends to get 'stuck' in the large type 2 patches, the larger patch size means the population can still move, generating a faster travelling wave with a steeper gradient in population density at the wave front (Figure 2 (b)). The difference in gradients observed in these travelling wave solutions affects the accuracy of the leading order solution, it is more accurate when the spatial gradient in density is small. The leading order approximation captures the average density on each patch, and so when the spatial variation within a patch is small (small gradient in density, large α) the spatial average is a closer approximation to the within patch density and hence the leading order approximation is more accurate (see Figure 2 (e,f)).

Asymptotic spread rate
The homogenized equation (76) is the Fisher-KPP equation and so admits travelling wave solutions when˜ > 0. The asymptotic speed of these travelling wave solutions in Figure 2. The effect of varying l 2 on the accuracy of the leading order approximation of the travelling wave profile. In plots (a-d) l 2 = 1.9 and the numerical non-homogenized solution ρ (black) and leading order approximation ρ 0 (red) are plotted as a function of the scaled spatial variable ξ (left column) and the unscaled spatial variable x (right column). The first row corresponds to the case where α = 0.25 andthere is greater preference for patch 2. The second row corresponds to the case where α = 0.75 and there is greater preference for patch 1. Finally, plot (e) shows the maximum absolute error (max ξ |ρ − ρ 0 |) as l 2 is varied. Plot (f) shows the averaged absolute error across rescaled space ξ . In all cases we ignore population dynamics with f 1 = f 2 = 0 and D 1 = D 2 = 1 and l 1 = 0.1. We use a Gaussian initial condition and compare solutions at t = 3.
ζ -t-coordinates isc * = 2 ˜ D h , which is given bỹ Since a single period has length 2l 1 in the ξ coordinate, and length l 1 + l 2 in the y coordinate, the asymptotic speed in x-t-coordinates will be c * =c * (l 1 + l 2 )/(2l 1 ), or This result, which matches the asymptotic speed obtained by [12], may be used to approximate the asymptotic speed of periodic travelling wave solutions of the original system (2), (3), (7) in x-t-coordinates. In y-τ -coordinates, the asymptotic speed will be smaller by a factor of ε as a result of the parabolic scaling. We compare the asymptotic wave speed prediction with the numerically solved speed obtained from the original non-homogenized system (Equations (2), (3), (7)) (see Figure 3). In this example we have chosen l 1 = l 2 = 1 as well as the intraspecific competition coefficients μ i = 1. The asymptotic wave speed prediction has good agreement with the numerically obtained speed. When λ i = 1 the wave speed is maximized when there is no patch preference (α = 0.5, i.e. k = 1). Lowering λ 2 , such that growth in patch 2 is lower than in patch 1, we find that wave speed is maximized when α > 0.5 corresponding to preference for patch 1 over patch 2. This result is expected as the lower λ 2 reduces spread rate in patch 2 and so increased preference for patch 1, where spread rate is higher, can increase the overall wave speed compared to the case of no patch preference (α = 0.5). However, increasing α too much leads to an eventual decrease in wave speed. A high patch 1 preference reduces entry into patch 2 and hence slowing entry into the next consecutive patch of type 1, ultimately leading to a slower travelling wave solution. As expected, this is in line with findings by [12] who found similar results for the case of linear growth in patch 1 and linear death in patch 2.

Equilibrium densities
In addition to looking at the travelling wave solutions we can also gain ecological insight into the effect of spatial heterogeneity on the equilibrium densities. We can rewrite the reaction term in the homogenized equation (71) allowing us to compute the carrying capacity for the homogenized model The homogenized equation then admits a non-zero spatially homogeneous equilibrium, g(ζ , t) =K hom , which is positive whenever˜ is positive. At this equilibrium, the leading order solution to the rescaled problem varies periodically, with period 2l 1 in the ξ -coordinate, or l 1 + l 2 in the x-coordinate. In x-t-coordinates, the leading order solution ρ 0 has constant valueK hom in each patch of type 1 and constant valueK hom /k in each patch of type 2 (see Figure 1). Each patch type (i = 1,2) has its own type-specific carrying capacity This is the equilibrium value that would be obtained if the population was spreading through a spatially uniform environment with patch i conditions. At equilibrium, the leading order solution obtains constant values on patches that generally do not match the patch-specific carrying capacities (K hom = K 1 andK hom /k = K 2 ). However, there are some interesting and surprising relationships between these values. We assume without loss of generality that patch 1 has a higher patch-specific intrinsic growth rate than patch 2 (λ 1 > λ 2 ). We also assume that the intrinsic growth rate for the homogenized model is positive (˜ > 0), so that the spatially uniform equilibrium is positive and stable (K hom > 0). A necessary (but not sufficient) condition for this to occur is λ 1 > 0.
Under these assumptions, we can use Equation (81) to derive relationships between the equilibrium densities (K hom andK hom /k) and the patch-specific carrying capacities (K 1 and K 2 ). We consider two cases, λ 1 > λ 2 > 0 and λ 1 > 0 > λ 2 . In the first case,K hom is always between K 1 and kK 2 . This relationship is most interesting when K 1 < kK 2 , especially if K 1 > K 2 . When this is true, the presence of patches of type 2 drives the equilibrium density in patches of type 1 above K 1 , and the presence of patches of type 1 drives the equilibrium density in patch 2 below K 2 , even though patches of type 1 have a higher patchspecific carrying capacity than patches of type 2. If K 1 > K 2 , then the condition K 1 < kK 2 requires k to be relatively large. Recall that where α is the probability that an individual at an interface moves towards the patch of type 1. Thus, k becomes larger as the probability of moving into patch type 1 at an interface increases, or as the motility in patch type 2 (type 1) increases (decreases). The latter increases (decreases) the rate at which individuals in patches of type 2 (type 1) reach the interfaces, and the former determines which patch they enter when they get there. Thus equilibrium densities are strongly influenced by patch-specific carrying capacities as well as the interaction between movement characteristics within the patches and at the interfaces. It is also possible that the equilibrium density in patches of type 2 will be higher than in patches of type 1 in the case that λ 1 > λ 2 > 0, even if K 1 > K 2 . In fact, this will occur whenever k < 1, which reflects a tendency to move into patches of type 2 even though the patch-specific intrinsic growth rate and carrying capacity is lower in those patches. In the case that λ 1 > 0 > λ 2 , it is still possible to obtain positive equilibrium densities in patches of type 2, even though the intrinsic growth rate is negative in these patches. If λ 1 > 0 > λ 2 , then only patches of type 1 have positive patch-specific carrying capacities, and it is always the case that the equilibrium density in patches of type 1 will be lower than K 1 .

Persistence condition
The homogenized model (76) also suggests a very simple approximate persistence condition,˜ > 0, or, equivalently This condition is always satisfied when both patch-specific intrinsic growth rates are positive, and it is never satisfied when both are negative. Thus, we explore the more interesting case when λ 1 > 0 > λ 2 . First, we note that although the approximate persistence condition (83) is derived easily from the homogenized model (76), it may also be derived as an approximation to the exact persistence boundary obtained by [12]. Using our notation, their exact persistence boundary reads k tan l 1 2 Since, l 1 and l 2 are small (O(ε)), we approximate the tangent and hyperbolic tangent using Maclaurin series (tan(x) = x + O(x 3 ) and tanh(x) = x + O(x 3 )), yielding k l 1 2 Simplifying, we obtain which is the same persistence boundary as (83). Though the persistence condition (83) is approximate, it is valid for small patch widths, and it is much simpler than the exact condition (84). It also readily yields important theoretical insights. The approximate persistence condition suggests that invasion will occur whenever a weighted average of the patch-specific intrinsic growth rates is positive. The corresponding weights, l 1 and l 2 /k have an appealingly simple biological interpretation. In the original model (2), (3), (7), 1 and 1/k give the residence indices within patches of types 1 and 2, respectively. The residence index is proportional to the equilibrium population density and inversely proportional to motility [24]. Scaling the residence indices by the corresponding patch extent (l i in the x direction, and unit extent in the perpendicular direction) gives the residence times [18] for the two patch types, which are equal to the weights l 1 and l 2 /k. The residence time for a patch type is proportional to the amount of time that individuals will spend in that patch type at equilibrium. Thus, we may interpret the persistence condition (83) to say that the intrinsic rate of growth in patches of type 1 multiplied by the relative amount of time spent in those patches at equilibrium must exceed the intrinsic rate of decline within patches of type 2 multiplied by the relative amount of time spent in those patches at equilibrium.

Discussion
The dynamics of populations on large spatial and temporal scales are of great interest in theoretical ecology, for example in conservation and invasion biology. Empirical work, however, typically considers individual behaviour on small spatial and temporal scales. Understanding how processes on a small scale impact patterns on larger scales is a fundamental challenge in ecology. Reaction-diffusion equations are a natural framework to study such questions since they allow the inclusion of individual-level movement rules into equations for population densities [4]. These equations have provided many important insights into processes in spatial ecology, but typically assume that population densities are continuous. Recent work on modelling individual movement behaviour at sharp habitat edges expanded the framework of reaction-diffusion equations to include aspects such as habitat preference, for which many empirical studies exist, see [12] and references therein. It turns out that not only the coefficient functions but also the population density is discontinuous at interfaces [12,16]. Our work here contributes to the understanding of this relatively novel aspect of reaction-diffusion equations.
Homogenization methods have a long and distinguished history in the qualitative analysis of reaction-diffusion equations [2,9,17]. If the coefficient functions in a reaction-diffusion equation vary on a small spatial scale, then an appropriate average over that small scale yields a reaction-diffusion equation with constant coefficients on a larger scale as a zero-order approximation. While this asymptotic result holds in the limit as the small scale goes to zero, the resulting large-scale equation provides a surprisingly good approximation far from the small-scale limit. However, the known homogenization methods either assume continuous density functions [15], are restricted to the special case of no habitat preference at patch interfaces [7], or rely on spatial rescaling to make the population density continuous [13]. The main result of our work is the development of corresponding techniques for general interface conditions that do not depend on rescaling. As a result, the techniques developed here are applicable to a broader range of models, including multispecies systems. It turns out that while the limiting equations have a simple form that is similar to the case of continuous densities [15], the arguments, and calculations that lead to them are quite a bit more involved than in that case.
While a number of qualitative results are available, a rigorous analytical investigation of the type of reaction-diffusion equations with discontinuity conditions at interfaces is still in its infancy. But the discontinuities of the density is not only an analytical challenge. Numerical schemes to resolve the discontinuities need to be developed along with corresponding convergence and error estimates. We used a second-order finite difference scheme to match densities and fluxes across an interface and applied a spatially implicit, temporally explicit fractional step method known as Strang-splitting [26]. We found an excellent agreement of the homogenized solution to the numerical solution of the exact equations.
The simple form of the homogenized equation enables us to obtain analytical results that cannot be easily obtained from the non-homogenized equation directly. As an example of this, the persistence condition for the logistic example demonstrates that patch residence time plays a key role in determining population persistence and we are able to directly relate patch residence time to the small-scale characteristics of individual movement at and near the patch interfaces. In particular, if at a patch interface the probability of moving into patch 1 is high then the patch 2 residence time will be low unless motility in patch 2 is much lower than patch 1 or the size of patch 2 is much larger than patch 1. Hence, we can see how the small-scale processes trade off against one another to give landscape-scale behaviour.
Probably the most surprising ecological result from our numerical examples is that the carrying capacity of the homogenized equation can be higher than the highest carrying capacity in the small-scale equation. While the equilibrium population density in the homogenized model cannot exceed the homogenized carrying capacity, the density on the small-scale model can and does, as we see in the numerical simulations (see Figure 1). The mechanism behind this 'overshooting' of the carrying capacity is the preference of individuals for these patches. The carrying capacities in the two patch types are K i = λ i /μ i . In dimensional terms, the carrying capacity of the homogenized model is given by The numerator of this expression is a weighted average of the growth rates with weights l 1 and l 2 /k, and as we saw in Section 3.3, these weights are, respectively, the patch 1 and 2 residence times. The denominator of K hom is an average of the modified intraspecific competition coefficients μ 1 and μ 2 /k also with the same weights. In Section 3.3 we noted that 1 and 1/k in these modified competition coefficients are proportional to the equilibrium patch 1 and 2 densities. Thus, we can regard μ 1 and μ 2 /k as scaled competition coefficients, scaled by patch density. The factor k = (αD 2 )/((1 − α)D 1 ) that appears in the various weights incorporates the movement rates in the patches adjacent to the interface as well as movement preference (see Equation (82)). In other words, the small-scale characteristics of individual movement at and near an interface enters the population growth function on the large scale through the homogenization procedure. A similar phenomenon was implicitly observed but not discussed in a model with Allee effect, where the homogenization required a prior scaling to obtain continuous population densities [13]. The method presented here is much more general. In particular, it is applicable to models of two or more interacting populations. It will be particularly interesting and ecologically important to study how the small-scale movement characteristics of the various populations enter and modify the population growth functions on the large scale. This question is the subject of future work.

A.1 Numerical algorithm
To solve the non-homogenized reaction-diffusion problem (Equations (2), (3), (7)) we use a fractional step method, which involves treating the PDE as a sequence of disjoint operations. If we let D denote the diffusion operator and R denote the reaction operator, then we can obtain a numerical scheme that is second order accurate in time and space using the fractional step method Strangsplitting [25,26]. Let u n be the solution of the PDE at time t n then we can obtain u n+1 , a numerical approximation of the solution at time t n+1 = t n + t, as follows: Thus we apply half a time step of diffusion (D( t/2)) followed by a full time step of reaction (R( t)) and then another half a time step of diffusion. As the diffusion and reaction steps in this method are now independent we can choose secondorder accurate numerical schemes for approximating D and R. For the diffusion step we use Crank-Nicolson, and for the reaction step we use fourth order Runge-Kutta. When applying the Crank-Nicolson step we have the additional complication of the interface conditions at each patch boundary. To ensure the whole scheme remains second-order accurate we use second-order forward or backward difference to approximate the derivatives in the interface conditions (Equations (3), (7)). As density may be discontinuous across the interface, we need to introduce two nodes at an interface location. One of these nodes (j) corresponds to the interface on the right-hand side of the patch to the left of the interface, and the other node (j+1) corresponds to the interface on the left-hand side of the patch to the right of the interface. Thus if we consider an interface with a patch of type 1 (type 2) located to the right (left) then at each time step n the interface conditions (3), and (7) are expressed as u n j+1 = ku n j , ( A 1 ) D 1 (−3u n j+1 + 4u n j+2 − u n j+3 ) 2 x = D 2 (3u n j + 4u n j−1 + u n j−2 ) 2 x , ( where u n j is the value of the solution at time t n at grid point j and x is the spatial step. In the numerical simulations presented in the paper we chose t = 1 × 10 −4 and x = 1 × 10 −3 .