Quantifying the effects of migration and mutation on adaptation and demography in spatially heterogeneous environments


  • F. Débarre,

    Corresponding author
    1. Université Montpellier 2, CNRS, Institut des Sciences de l'Évolution, UMR 5554 CC65, Montpellier cedex 05, France
    2. Department of Biological Sciences, University of Idaho, Moscow, USA
    3. Department of Zoology & Biodiversity Research Centre, University of British Columbia, Vancouver, BC, Canada
    • Correspondence: Florence Débarre, Department of Zoology & Biodiversity Research Centre, University of British Columbia, Vancouver, V6T 1Z4 BC, Canada. Tel.: +1-604-822-0862; fax: +1-604-822-2416; e-mail: florence.debarre@normalesup.org

    Search for more papers by this author
  • O. Ronce,

    1. Université Montpellier 2, CNRS, Institut des Sciences de l'Évolution, UMR 5554 CC65, Montpellier cedex 05, France
    Search for more papers by this author
  • S. Gandon

    1. Centre d'Écologie Fonctionnelle et Évolutive (CEFE), UMR CNRS 5175, Montpellier, France
    Search for more papers by this author

  • Data deposited at Dryad: doi:10.5061/dryad.cv507


How do mutation and gene flow influence population persistence, niche expansion and local adaptation in spatially heterogeneous environments? In this article, we analyse a demographic and evolutionary model of adaptation to an environment containing two habitats in equal frequencies, and we bridge the gap between different theoretical frameworks. Qualitatively, our model yields four qualitative types of outcomes: (i) global extinction of the population, (ii) adaptation to one habitat only, but also adaptation to both habitats with, (iii) specialized phenotypes or (iv) with generalized phenotypes, and we determine the conditions under which each equilibrium is reached. We derive new analytical approximations for the local densities and the distributions of traits in each habitat under a migration–selection–mutation balance, compute the equilibrium values of the means, variances and asymmetries of the local distributions of phenotypes, and contrast the effects of migration and mutation on the evolutionary outcome. We then check our analytical results by solving our model numerically, and also assess their robustness in the presence of demographic stochasticity. Although increased migration results in a decrease in local adaptation, mutation in our model does not influence the values of the local mean traits. Yet, both migration and mutation can have dramatic effects on population size and even lead to metapopulation extinction when selection is strong. Niche expansion, the ability for the population to adapt to both habitats, can also be prevented by small migration rates and a reduced evolutionary potential characterized by rare mutation events of small effects; however, niche expansion is otherwise the most likely outcome. Although our results are derived under the assumption of clonal reproduction, we finally show and discuss the links between our model and previous quantitative genetics models.


Over a landscape, physical factors may change, different habitats may be present and different species may be encountered. These abiotic and biotic heterogeneities result in spatially heterogeneous selection pressures. The interplay between spatially heterogeneous selection, mutation and migration is of paramount importance in evolutionary ecology, because these effects are at the core of the understanding of species geographic ranges (Gaston, 2009). Two factors are usually invoked to explain limited species ranges (Polechová et al., 2009): (i) gene flow, by which migration from regions where the population is adapted and numerous to marginal regions prevents adaptation there, because of gene swamping (Haldane, 1956; Lenormand, 2002), and (ii) a lack of genetic variance to allow for adaptation to a new niche (Hoffmann et al., 2003; Blows & Hoffmann, 2005), which can be a consequence of gene flow, but can also be due to a limited amount of mutational influx. Understanding the effects of mutation and migration on adaptation in heterogeneous environments may also have more applied importance in pathogen and pest management (Peck, 2001). Pathogens and pests are often facing heterogeneous environments where different habitats may be characterized by different levels of control agents – pesticides, herbicides, antibiotics, etc. – (Comins, 1977; Mani, 1989; Singer et al., 2006), different hosts (Koskella et al., 2011) or even different organs within the same host (Sanjuán et al., 2004). Understanding the effects of gene flow (Lenormand & Raymond, 1998) and mutation (Bull et al., 2007; Martin & Gandon, 2010) is key to predicting the evolution of drug resistance and to optimizing the efficacy of treatments.

In this article, we consider a two-habitat model with explicit demographic dynamics, a setting similar to the models studied by Meszéna et al. (1997), Day (2000) and Ronce & Kirkpatrick (2001). We study the conditions under which the whole environment can be colonized, and how migration and mutation influence the level of adaptation. Note that we use the terms ‘dispersal’ and ‘migration’ interchangeably, as is commonly done (Ronce, 2007), although, strictly speaking, we are modelling dispersal (but the use is for instance to talk about a ‘migration–selection’ balance, and not a ‘dispersal-selection’ balance). We assume that the two habitats are present in equal frequencies in the environment, and that adaptation to one or the other habitat is governed by a quantitative trait. Maladapted populations have a reduced growth rate, and cannot fill up their habitat. When maladaptation is too high, it leads to a demographical collapse, or even to global population extinction. Our model assumes that individuals reproduce asexually (or alternatively, that individuals are haploid and the trait is coded by a single locus with a continuum of possible alleles). To study this model, we have to follow both the local densities in each habitat and the distributions of phenotypes, and see how local selection, migration and mutation affect them. Borrowing tools from different frameworks (local stability analysis from adaptive dynamics (Geritz et al., 1998), moment-based approaches like in quantitative genetics (Lynch & Walsh, 1998; Bürger, 2000)), we derive analytical approximations for the densities and distributions of traits in each habitat. First, we study the limiting case where the genetic variance due to mutations is very low, and we fully characterize the equilibria of our model. Second, we extend this analysis to mutations that are more frequent and/or of larger effect, and we derive approximations for the level of adaptation under a migration–selection–mutation balance. We evaluate the accuracy of these approximations by comparing them to numerical solutions of our deterministic model. In addition, we also check the robustness of our conclusions when demographic stochasticity is allowed, by running stochastic individual-based simulations. Finally, we also show how our analysis relates to the quantitative genetics framework and to models with sexual reproduction.


Phenotypic model

We model an environment containing two different habitat types, labelled 1 and 2, present in equal frequencies, and with the same maximal density of individuals (i.e. with the same carrying capacity; see Fig. 1). Adaptation to one or the other habitat is governed by a quantitative trait z. In each habitat, there is selection towards an optimal value of the trait; without loss of generality, because it amounts to rescaling the trait z (see section A.1.3 in the Appendix for more details), we assume that the optimum value is inline image in habitat 1 and inline image in habitat 2. Locally, populations grow logistically [note that we rescaled our equations, so that the r and K parameters of the logistic equation will not appear in our formulas], but maladapted individuals suffer from an increased death rate, inline image, where g is the (scaled) strength of selection, and inline image the fitness function in habitat j. We assume that the fitness functions are symmetric, so that inline image, and we can also define a trade-off function u that links the fitness values in both habitats: inline image. We derive some results with these general fitness functions, but then use specific functions, and assume quadratic fitness effects:

display math(1)
Figure 1.

(a) The model: two symmetrical habitats connected by dispersal. (b) Exponential growth rate inline image in both habitats, with quadratic fitness functions, for different values of g (written on the right). Phenotypes with negative ρs are not viable, which is why the area below the ρ = 0 axis is shaded.

Offspring inherit their parent's trait modulo mutations. These mutations occur at rate inline image, and add an increment y to the parent's phenotype; we assume that the distribution of these mutational effects is a Gaussian μ(y), with mean 0 (there is no directional effect of mutations). This corresponds to a continuum of alleles model (Kimura, 1965). For the sake of simplicity, we additionally assume that there is a direct mapping between genotype and phenotype, that is, we ignore environmental variations. Finally, individuals disperse among habitats, at rate m, which is the same for both habitats, and is independent of genotype. Note that m is a rate, and can therefore take any positive value. Let inline image be the density distribution in habitat j, at time t, measured relative to the local carrying capacity (l ≠ j refers to the other habitat); with our assumptions, its dynamics read:

display math(2a)

The first line of eqn (2a) corresponds to logistic growth (first term in the brackets) and to selection (second term in the brackets). Note that the resulting exponential growth rate (i.e. the growth rate when the local density is close to 0), is inline image, and that ρ is not always positive. This means that maladapted populations can go extinct (as in Ronce & Kirkpatrick, 2001). We show in Fig. 1b how the strength of selection parameter g affects this exponential growth rate, when quadratic fitness functions are used. The second line of eqn (2a) corresponds to the dispersal of individuals from one habitat to the other. Finally, the third line corresponds to mutations. Note that all parameters and variables in eqn (2a) have been rescaled to reduce the number of parameters (see section A.1.3 in the Appendix).

If we assume that the variance of the mutation kernel μ is small enough, we can use a diffusion approximation for the mutation term of eqn (2a) (Kimura, 1964; Lande, 1975; Rice, 2004). We can rewrite the third line of eqn (2a), and we obtain the following:

display math(2b)

where inline image is the variance of the mutation kernel (Var(μ)) times the probability of mutation (inline image).

Numerical solutions and simulations of the full model

Numerical (deterministic) solutions of the full model (2b) are done by discreticizing the trait space in nz = 501 units, and by solving the 2*nz coupled differential equations in R (R Development Core Team, 2010) with the ode.1D function of the deSolve package (Soetaert et al., 2010). The results are presented in Fig. 2 (filled curves), and in Figs 5 and 6 (dashed curves).

Figure 2.

Typical distributions for the four qualitative outcomes, and comparison of the numerical solution of the whole model ((2b), filled distributions), and the analytical approximations (thick black curves). The distributions in the two habitats are superimposed on each subfigure; dark grey and full lines correspond to habitat 1, light grey and dashed lines to habitat 2. In all figures, inline image. In (b) and (c), m = 0.4 and g = 2 (bistability, same parameters as in Fig. 3; white cross in Fig. 4). In (d), m = 0.75 and g = 1 (black cross in Fig. 4).

Individual-based stochastic simulations are run to check whether drift changes our predictions, since the analytical model does not take it into account. Continuous time is simulated using a Gillespie algorithm (Gillespie, 1977); the simulations are also coded in R. Results are presented in Figs 5 and 6 (dots).


Model (2a) yields four qualitatively different types of outcomes, illustrated in Fig. 2. These outcomes are global population extinction (labelled 0, Fig. 2a); an asymmetric equilibrium, where the whole population is adapted to one habitat only (A, Fig. 2b); and symmetric equilibria, where the global population is either unimodal (inline image, Fig. 2d) or bimodal (inline image, Fig. 2c). We use different frameworks and sets of assumptions to further describe these equilibria and their stabilities.

Moment-based approach

Derivation of the equations

Except under some specific cases, it is not possible to analyse in general the whole model (2a) (or its diffusion equivalent (2b)). We start by rewriting model (2a) using summary variables to describe the distributions of densities in each habitat; these summary variables are, for each habitat j, the total local densities inline image, and the local mean traits inline image. Specifically, we follow the difference between the local mean trait and the local optimum, that is, inline image and inline image. We also need to define the local variances, inline image, and third central moments inline image. The details of the derivations are presented in Appendix A.2. To study the dynamics of these summary variables, however, we need to evaluate the mean fitnesses in each habitat, and these expressions depend on the distributions of traits. A Taylor expansion of the fitness functions allows us to write the mean fitnesses as a function of the fitness of the mean traits, and of the local variances:

display math(3)

Equation (3) is exact with quadratic fitness functions (see eqn (1); this is because the third and higher derivatives are null), and is valid otherwise with wide enough fitness functions (Abrams et al., 1993; Abrams, 2001) [e.g. when Gaussian fitness functions are used, for small distances between the local optima (inline image) relative to the width of the functions, which corresponds to weak trade-offs (Débarre & Gandon, 2010)]. After some algebra we obtain the following dynamics:

display math(4a)
display math(4b)

It is important to note that system (4) is still not closed: there are more variables than equations. The local variances (inline image) and third moments (inline image) are variables too, and their dynamics depend on higher moments of the distribution. Still, we can use these general equations to provide unclosed expressions for measures of local adaptation.

Characterization of the symmetric equilibrium

Using the summary variables presented in system (4), we can further characterize the symmetric equilibria inline image and inline image (Fig. 2d,c) under a selection–migration–mutation balance. Because of symmetries, system (4) is dramatically simplified: the equilibrium densities, and also the variances are the same in both patches (inline image) and so are the variances (inline image); the mean traits and the third moments are symmetrical (inline image and inline image). Even using these symmetry relations, setting inline image and inline image in system (4) does not yield explicit solutions unless the fitness functions are specified. We therefore use quadratic fitness functions (see eqn (1)), and obtain the following expressions for the local densities inline image and mean trait inline image:

display math(5a)
display math(5b)

and the differentiation among habitats at equilibrium is inline image:

display math(6)

It is important to keep in mind that expressions (5)–(6) are not closed: they depend on the local variances inline image and third moments inline image, which are themselves functions of the model's parameters m and g. In addition, the equations for the dynamics of each moment of the distribution depend on the two higher moments (the dynamics of inline image depends on v and ς, the dynamics of v will depend on ς and the fourth moment, and so on and so forth). One solution to cut this chain is to use a moment closure approximation, that is, to make some approximations on the shape of the distributions. This is commonly done in quantitative genetics models, where the distributions of breeding values are assumed to be Gaussian. However in this study, we are dealing with asexual populations, there is no reason to assume Gaussian distributions of traits in each deme for all parameters. We therefore need another kind of approximation. We are first going to neglect the variance due to mutations, so as to approximate the distributions of traits as collections of spikes; we will just need to find the localization and height of these spikes. Later on, we will relax this assumption.

Adaptive dynamics approach

In this section, we assume that evolution proceeds gradually, because mutations are rare and of weak effect. Rare mutations means that a mutation is fixed or goes extinct before a new one appears in the population; weak effect means that the traits of the mutants are close to the resident's traits, so that we can use weak selection approximations – but we will relax this assumption later on. Evolution therefore proceeds as a series of competitive replacements. The local distributions are approximated as collections of spikes (instead of smooth curves like Gaussians), and adaptive dynamics (Geritz et al., 1998) is an optimization method (Abrams, 2001) to find the equilibrium localization in trait space of these spikes, which are also called evolutionary stable strategies (ESS). This method also allows us to determine whether selection at the scale of the whole environment is, or not, disruptive.

Gradual evolution in monomorphic populations

Using eqn (2a), we can write the dynamics of rare mutants with a trait inline image, trying to invade a population containing only individuals with trait inline image (the resident population), having reached its ecological equilibrium, so that the density of the resident population in habitat j is inline image:

display math(7)

These mutants can invade when their fitness gradient (whose expression with general fitness functions is given in eqn (B.1) in the Appendix) is positive.

Singular strategies

Singular strategies, that is, potential ESS, that is, localization of the spikes in the local distributions, are values of inline image at which the fitness gradient is equal to zero.

Intermediate strategy inline image

As the two habitats are present in equal frequencies, the intermediate trait inline image is always a singular strategy (since inline image and inline image).

Other singular strategies

For some parameter values, there are other roots of the selection gradient besides inline image; however, there is no general simple analytical expression for them, even when explicit, quadratic fitness functions are used. When they exist, the other roots, inline image, correspond to the asymmetric equilibrium (A) (see Fig. 2b); they are found numerically in the general case. In the specific case, where the migration rate m is low, and selection is strong enough (in particular g > 1), and with quadratic fitness functions, it is possible to find approximations of inline image (see Appendix B.1.3):

display math(8)

The higher the migration rate m and the weaker the strength of selection g, the closer inline image is to the intermediate strategy 1/2. The accuracy of this approximation is evaluated in Fig. 6a–b (dotted grey lines): the prediction is accurate at low migration rate m, as expected.

Stability of the intermediate strategy inline image

It is possible to investigate the stability of the singular strategy inline image without specifying the fitness functions, which generalizes the results of Meszéna et al. (1997). First, the equilibrium density associated with the intermediate strategy inline image is

display math(9a)

which, with quadratic fitness functions, reads

display math(9b)

This means that a population fixed for the strategy inline image goes extinct if g > 4; this is because the exponential growth rate of the intermediate strategy inline image becomes negative when g > 4, see Fig. 1b.

Using standard adaptive dynamics techniques (Geritz et al., 1998), we find that gradual evolution leads to the intermediate strategy inline image when (Eshel, 1983):

display math(10)

This is the condition for convergence stability (CS). Note that this condition is implicit, because it requires the evaluation of the equilibrium density inline image, which will depend on the chosen fitness functions. Qualitatively, however, we know that the second term of the right-hand side of (10) is positive. If condition (10) is not fulfilled, then inline image is a repellor, and gradual evolution leads the resident trait away from it; this is for instance the case in Fig. 3. An explicit analytical expression exists for (10), when quadratic fitness functions are used, but it is too long to be written here, and is instead plotted in Fig. 4 (thick grey line). Note also that this corresponds to a local stability condition, derived assuming mutations of weak effects.

Figure 3.

Basin of attraction of the different equilibria, with migration m = 0.4 and strength of selection g = 2 (quadratic fitness functions). In the black area, pairs of individuals with traits inline image and inline image cannot coexist. The white dot inline image represents the intermediate strategy inline image, which is a repellor here; the grey dots are the symmetric, polymorphic (inline image), and asymmetric monomorphic (A) equilibria. The arrows show the direction of evolution: the symmetric equilibria inline image are attained if for a given resident strategy inline image, there is a mutant strategy inline image such that the (inline image, inline image) point is in the white area.

Figure 4.

Qualitative evolutionary outcomes, depending on the migration rate m and the strength of selection g, with quadratic fitness functions. The crosses show the parameters used in Fig. 2: white cross for (b) and (c); black cross for (d); same labelling of the different types of equilibria as in Fig. 2. The full black boundary (population persistence) is derived from eqn (9b) (when 2 m > g) and eqn (15b) (otherwise). The thick grey boundary (convergence stability of inline image under gradual evolution) is given by (10). The dashed black boundary (invadability of inline image) corresponds to g = 2m (from (11) and (15a)).

A population with strategy inline image resists invasion from any other (close) mutant when

display math(11)

First, note that, whichever the chosen fitness functions, evolutionary stability implies convergence stability (if condition (11) is fulfiled, then (10) is too); this means that there are no ‘Garden of Eden’ strategies (Hofbauer & Sigmund, 1990), where an evolutionary stable strategy cannot be reached by gradual evolution. Second, whether inline image is evolutionary stable or not, that is, whether global selection is stabilizing or disruptive, depends only on the concavity of the trade-off curve at inline image, relative to −2g/m. Condition (11) means that the intermediate strategy inline image can only be evolutionary stable if the trade-off is concave enough (i.e. weak, which corresponds to a convex fitness set sensu Levins, 1962) at inline image. In this case, the higher the migration rate m, and the weaker the strength of selection g, the more stable the intermediate strategy inline image. A convex (i.e. strong) trade-off, however, always leads to disruptive selection, and turns inline image into a branching point. Condition (11) is plotted as a black dashed line in Fig. 4, where quadratic fitness functions are used.

Adaptive dynamics analyses often stop at this point, but it is possible to investigate further what happens when selection is disruptive, that is, when condition (11) is not satisfied.

Evolution in polymorphic populations

When selection is disruptive, the resident population becomes polymorphic, and is now composed of individuals with traits inline image and inline image. Because of symmetries in the model, we have inline image, and the corresponding densities are equal: inline image, l ≠ j. The invasion dynamics of a rare mutant with trait inline image read (the equation is similar when the mutant is close to the other resident strategy inline image):

display math(12)

and the corresponding selection gradient is given in the Appendix, eqn (B.5).

Singular strategies

The ESS strategies inline image and inline image at the polymorphic evolutionary equilibrium are strategies at which the selection gradient vanishes. With general fitness functions, the condition for strategies inline image and inline image to be singular is given in eqn (B.6) in the Appendix. With quadratic fitness functions, this yields

display math(13)

The lower the migration rate m and the higher the strength of selection g, the closer these strategies are to the local optima 0 and 1. The local relative abundances in habitat 1 associated with these strategies are (switch − and + for relative abundances in habitat 2):

display math(14)

When evolution proceeds gradually, that is, when mutations are rare and of weak effect, the polymorphic equilibrium (13) can only be reached from an initially monomorphic population if inline image is stable by convergence, that is, if (10) holds and if the population is viable (light grey area in Fig. 4). However, the polymorphic equilibrium (13) is stable for a much larger range of parameters values. With quadratic fitness functions, the polymorphic equilibrium inline image is actually stable, whenever:

display math(15a)


display math(15b)

Condition (15a) means that selection is disruptive; it corresponds to condition (11) with quadratic functions, and is plotted as a black dashed line in Fig. 4. Condition (15b) corresponds to the condition for whole population persistence, and delimits the black area in Fig. 4. Note that condition (15b) always holds when g ≤ 4. Fig. 4 shows that, in addition to the light grey area, the equilibrium inline image can also be reached for stronger selection g, in the dark grey area, if mutations have large phenotypic effects (i.e. are not infinitesimal). This means that the polymorphic equilibrium can be reached for a wider range of parameter values. This effect of the size of mutations is illustrated in Fig. 3, for a specific combination of m (migration rate) and g (strength of selection) parameters. Fig. 3 shows the combinations of inline image couples of traits which can coexist: it corresponds to the superimposition of a pairwise invasion plot, PIP, and its reciprocal. Monomorphic populations are on the highlighted diagonal. If evolution proceeds gradually, from a monomorphic population, then it leads away from the intermediate strategy inline image to one of the two monomorphic singular strategies (dots labelled A, localized at the other roots of the selection gradient, and corresponding to the asymmetric equilibrium approximated in eqn (8)). However, if mutations are large, or if the population is initially polymorphic, then evolution leads to the dimorphic strategies labelled inline image in Fig. 3, whose values are given in system (13): this is the symmetric bimodal equilibrium. Hence, whether the outcome is an asymmetric (A) or symmetric bimodal (inline image) equilibrium depends on the initial state of the population, and on whether mutations are constrained.

Summary variables

Going back to the whole model (2a), the assumptions associated with adaptive dynamics amount to assuming that the mutation rate inline image is very low, which is equivalent to inline image in eqn (2b). The equilibrium distributions of traits are approximated as one (inline image and A equilibria) or two (inline image) spikes–and for the inline image equilibrium system (14) gives us the relative heights of the spikes. Note that this is not equivalent to neglecting standing genetic variance altogether, since there is a non null variance in the trait distribution at a bimodal equilibrium inline image. Since we know the distributions, we can compute summary variables to bridge the gaps with the moment-based approach. Table 1 summarizes these variables; it is important to note that all expressions are compatible with the results given in section 3.1.2, and also that this time these expressions are closed, that is, do not depend on other variables. The expressions in Table 1 will be described in more detail in the next section, when deriving more general expressions.

Table 1. Summary variables at the symmetric equilibria, for low mutational variance, with quadratic fitness functions
Equilibrium inline image inline image
Conditions for viabilityg ≤ 4 inline image
Conditions for stabilityg ≤ 2mg > 2m
Mean trait inline image1/2 inline image
Differentiation inline image0 inline image
Local total density inline image inline image inline image
Local variance inline image0 inline image
Local third central moment inline image0 inline image

With adaptive dynamics methods, we analysed our model assuming that mutations are rare. Now, what happens with more frequent mutations?

Merging both methods

We will now add mutational variance to the equilibrium solutions derived under the adaptive dynamics model. This can be done numerically by finding solutions to model (2b) (see the filled curves in Fig. 2). The aim of this section is to find analytical approximations of these solutions. To this end, we will assume that each local distribution of traits is composed of one or two Gaussian distributions, each centred at the singular strategies derived under adaptive dynamics (Meszéna et al., 2005), and with a variance which we will approximate as follows. We will assume that the variance around the singular strategies (the former spikes) is the same as the genetic variance in a population at a mutation–selection balance. We therefore first have to derive this variance inline image (‘μs’ like mutation–selection). We use a diffusion approximation for mutation (see (2b)). Note also that from now on we focus on quadratic fitness functions.

Mutation–selection equilibrium

In a single population, the equilibrium distribution of traits inline image at a mutation–selection equilibrium is found by solving the following differential equation:

display math(16)

A Gaussian distribution of mean 0 and variance inline image is a solution of (16), and we find:

display math(17)

(Kimura, 1965; Bürger et al., 1989). Equation (17) tells us that the variance at mutation–selection equilibrium in a single population under stabilizing selection, with a quadratic fitness function, is the square root of the mutational variance inline image scaled by the strength of selection g. Note that we obtain this formula because we assume ‘incremental’ mutations, as in a continuum-of-alleles model (see the third line of eqn (2a)), as opposed to mutations which totally change the value of an allele, as is assumed under the House of Cards model (Turelli, 1984).

When the mean of the distribution inline image is not at the local optimum θ, which will occur under a migration–selection balance (i.e. when there is directional selection Brodie et al., 1995), then inline image should be skewed, and therefore not Gaussian. However as a first approximation, we will neglect this skew for the unimodal distributions, and assume that the sub-distributions around the ESS spikes are Gaussian. Note that this does not mean that we generally neglect the skew of the distributions.

Mutation–migration–selection equilibrium

When the population is unimodal

At the symmetric unimodal equilibrium inline image, we assume that the distribution of traits is the same in both habitats: a Gaussian distribution centered around inline image, with variance inline image:

display math(18)

This distribution is compared to the actual distribution obtained with the diffusion approximation in Fig. 2d: the black thick curves are our analytical approximation, while the filled curves are the deterministic numerical solutions of model (2b). Taking this mutational variance into account, the local density now reads:

display math(19)

So the condition for whole population persistence, at the symmetric unimodal equilibrium (i.e. when g < 2m) is now:

display math(20)

The critical variance inline image only depends on g, because the mean of the distribution of traits at the symmetric unimodal equilibrium, inline image, is independent of the migration rate m. By making intermediate values unviable (see Fig. 1b), stronger local selection (higher g) compromizes global persistence.

At the asymmetric equilibrium A, the distributions of traits are assumed to be the same in both habitats, that is, Gaussians of mean inline image and of variance inline image (given in eqn (17)). The value of inline image is obtained using the approximation presented in eqn (8), or by numerically finding roots of the selection gradient; the height of the distributions is then found by solving for inline image (eqn (14), with one trait only). The result is compared to the full model in Fig. 2b.

When the population is bimodal

At the symmetric bimodal equilibrium inline image, we now assume that the local distributions are weighted sums of Gaussian distributions, centred around the peaks found under adaptive dynamics (inline image and inline image, see eqn (13)), and with variance inline image (given in (17)). The weights are the relative abundances of individuals with each strategy, that is, the height of the spikes inline image and inline image given in eqn (14). We then have the following distribution of traits in habitat 1:

display math(21)

The trait distribution in the other habitat is obtained by exchanging the inline image and inline image weights. This approximation is compared to the numerical solution of the full model in Fig. 2c. Note that the solution presented in eqn (21) is approximate, and is meant to be accurate only with low inline image (even though it can be seen in Fig. 5 that the approximation is still surprisingly precise for higher inline image).

Figure 5.

The effect of inline image (mutation rate times variance of the mutation kernel; note the log scale) on summary variables. Full curves: analytical approximation (see eqns (25) for (a), (25) for (b), (23) for (c) and (25) for (d)); dashed lines: numerical solution of model (2b); dots: mean ± sd of the outcome of stochastic individual-based simulations (at time inline image). Initial state of the population: asymmetric (gray), symmetric (black). Parameters: g = 3.5 (strong selection) and m = 1; for the stochastic simulations: K = 1000 individuals at most in each deme, 25 replicates for each combination of parameters.

Using eqn (21), we can recalculate the summary variables of the distribution. The mean of this distribution is

display math(22)

This is the same mean trait as found with adaptive dynamics (see Table 1). Ticks for the mean traits inline image and inline image are shown on the top of distributions plotted in Fig. 2c, and the accuracy of the result is evaluated in Fig. 5b (full line). However, adding mutational variance increases the equilibrium local genetic variance:

display math(23)

With our approximation, we find that the equilibrium local variances at the symmetric bimodal equilibrium inline image are the variances at the mutation–selection equilibrium inline image plus the variance at the migration–selection equilibrium assuming rare mutations (the second term of eqn (23) is also in Table 1). In particular, eqn (23) tells us that the equilibrium local variances are highest for intermediate migration rates (m = g/4), as can be seen on Fig. 6c.

Figure 6.

Evolutionary and demographic outcomes: comparing, for different values of the migration rate m, analytical approximations (full lines and dotted grey line [low migration approximation]), the outcome of deterministic numerical evaluations of the whole model (dashed lines), and the outcome of stochastic individual based simulations (dots: mean ± sd at time t = 5000, 25 replicates for each point), when the initial state of the population is asymmetric (gray) or symmetric (black). Parameters: g = 2, inline image; carrying capacity K = 200 individuals at most in each deme for the individual-based simulations. In the deterministic model, the population is at a symmetric polymorphic equilibrium inline image when m < 1, and switches to the monomorphic equilibrium inline image when m > 1.

The third central moment inline image remains (see Table 1):

display math(24)

The third central moment inline image is highest for a smaller value of the migration rate m (the maximum is reached for m = g/6), as can be seen on Fig. 6d. The local densities read as follows:

display math(25)

so that, in particular, the condition for global persistence becomes as follows:

display math(26a)


display math(26b)

The critical variance inline image decreases with both g and m. Stronger selection g makes intermediate phenotypes less viable. Lower migration rates m favour more specialized types, closer to the local optima in each habitat, and therefore favour population persistence.

Checking the accuracy of the approximations

The accuracy of our approximations when mutations are not infinitesimal (i.e. the results derived in the previous section) is evaluated in Figs 5 and 6. Our analytical predictions for the summary variables (population densities inline image, mean traits (distance to local optimum) inline image, variances inline image, and absolute value of the third moments inline image; full curves) are compared to the results obtained by integrating numerically model (2b) (dashed curves, behind the full curves when the analytical approximation matches the full model, and therefore sometimes not visible). The fit is very good when inline image is small enough, as expected, because our analytical approximations were derived assuming relatively small mutational effects (nonzero, but still small inline image). For very high inline image, that is, very frequent mutations and/or mutations of large effect, our approximations remain surprisingly rather accurate (see Fig. 5 and compare our approximations [full lines] to solutions of the deterministic model [dashed lines]); note however that, compared to deterministic solutions, our approximations slightly overestimate the genetic variance (Fig. 5c), overlook the effect of high inline image on the asymmetry of the distributions of traits (Fig. 5d), and as a consequence, underestimate the equilibrium population size for very high inline image (Fig. 5a). We also check the robustness of these predictions when stochasticity is taken into account; the dots in Figs 5 and 6 are the average summary variables obtained after running individual-based stochastic simulations. In the stochastic simulations, the population sometimes ends up at a symmetric bimodal equilibrium, starting from an asymmetric initial state (grey dots), while it may remain trapped at an asymmetric equilibrium in the deterministic version of the model; this illustrates the fact that the asymmetric equilibria are only locally stable, while the symmetric equilibria are globally stable. Adding stochasticity in the simulations did not substantially influence neither the final population densities nor the mean traits (the simulation dots are on the deterministic curves in subfigures (a) and (b) of Figs 5 and 6), but because of drift, the variances and asymmetry were lower in the stochastic individual-based simulations than predicted with a deterministic model (subfigures (c) and (d) of Figs 5 and 6) (Bürger et al., 1989; Bürger & Lande, 1994).


In this article, we study the interplay of demographical and evolutionary dynamics in a spatially heterogeneous environment with two habitats in equal frequencies. Four qualitatively different types of outcomes are possible (summarized in Fig. 2): whole population extinction (labelled 0); adaptation to one habitat only (A), leaving the other almost empty; adaptation to both habitats, with specialized (inline image) or generalist (inline image) phenotypes. Which of these equilibria is reached depends on the migration rate, m, and the strength of selection g, but also on the rate and variance of mutations inline image. Quantitatively, we derive analytical approximations for the distributions of phenotypes under a migration–selection–mutation balance; this allows us, in particular, to derive analytical expressions of local densities, and mean, variance and asymmetry of the distributions of phenotypes in each habitat.

Conditions for population persistence

The conditions for global population persistence are the conditions for not reaching the (0) outcome of global population extinction (see conditions in eqn (20) when g < 2m and (26) otherwise). We show that whole population extinction is possible when selection is strong and when migration and/or mutation rates are high.

Migration load

High migration rates favour a generalist strategy inline image, which is intermediate between the two local optimum traits, and therefore adapted to global, averaged conditions. If the intensity of selection, g, is very high – high meaning g > 4 with quadratic fitness functions – the generalist strategy may not be viable in either habitat: it has a negative exponential growth rate in both habitats (see Fig. 1b, dashed curve), which results in global population extinction (see the dark grey area, labelled 0, in Fig. 4). Note that this outcome is possible because our fitness functions allow for negative exponential growth rates, a situation often neglected in other models (e.g. Meszéna et al. (1997), where the exponential growth rate inline image when inline image, with their notations; and while Ronce & Kirkpatrick (2001) did allow for negative exponential growth rates, they analysed their model assuming a fixed variance of the distribution of traits). High migration rates and strong selection make the environment globally unsuitable, while individuals could survive under lower migration rates.

Mutation load

Large mutation rates may also lead to extinction, but for a different reason. More frequent mutations, or mutations of larger effect (i.e. greater inline image) inflate the variance of the phenotypic distribution. This creates a mutation load where many genotypes are far from their local optimum, which decreases the mean fitness of the population. Beyond a critical value of inline image (inline image when g < 2m, eqn (20) and inline image otherwise, (26a)), the drop in fitness is so large that the population cannot persist. Again, this phenomenon occurs because, in our model, high maladaptation may result in negative exponential growth rates. Fig. 5a illustrates the effect of more frequent mutations and/or mutations of larger effect (both resulting in a higher inline image) on population persistence.

This effect of inline image is akin to the effect of high mutation rates on the viability of some microbes. Our results may thus be relevant in the context of lethal mutagenesis, a promising new antiviral therapy in which viruses are driven to extinction by chemically increasing their genomic mutation rate (Freistadt et al., 2004; Bull et al., 2007; Martin & Gandon, 2010). Previous attempts to model this phenomenon always considered the infected host to be a homogeneous environment. While Steinmeyer & Wilke (2009) explicitly took into account some within-host heterogeneity, by allowing the rate of lethal mutations to vary between compartments, they focused on viral population dynamics and did not include the possibility for the virus to adapt to intrinsic differences between compartments. There is, however, some evidence that the individual host is a structured environment, where subpopulations of virus may differentiate in different tissues (Sanjuán et al., 2004). This differentiation may be driven by the balance between heterogeneous selective pressures, migration and mutation. Our model accounts for the interplay between these three different forces (but note that we assume that the compartments are present in equal frequencies, with symmetrical migration rates between them), and the critical values of inline image we derive may help to examine the influence the effects of various parameters on the feasibility of lethal mutagenesis.

Conditions for niche expansion

Niche expansion occurs when a population initially adapted to only one habitat expands its range and colonizes both habitats; with our notations, it occurs when the final state is a symmetric (inline image or inline image) equilibrium. Our analysis shows that niche expansion depends on whether mutations are constrained or not. If mutations are constrained, that is, if the variance of the mutation kernel is small or mutations are infrequent (infinitesimally small inline image), niche expansion only occurs when the strength of selection is weak and when the migration rate is high, that is, right of the full grey curve in Fig. 4; otherwise, the population remains at an asymmetric equilibrium A, and cannot efficiently colonize the other habitat. However, if the mutations are not constrained, that is, if arbitrarily large mutational steps are possible, niche expansion always ultimately occurs, provided the population is viable.

Classically, dispersal is viewed as a force that can have diverse effects on niche expansion. On the one hand, dispersal contributes to gene flow, and could potentially prevent niche expansion due to gene swamping, yielding what Ronce & Kirkpatrick (2001) coined a migrational meltdown. On the other hand, dispersal brings new individuals in the unoccupied patch, and therefore allows for colonization and subsequent evolution (Gomulkiewicz et al., 1999). In addition, dispersal contributes to the increase in local genetic variances, and therefore leads to more available variance for adaptation. Effects of dispersal on niche expansion in source-sink models vary widely with both the details of the life cycle and the genetic architecture of traits involved in local adaptation (see Holt & Barfield, 2011, for a recent review). In our asexual / one locus model, where the two habitats are present in equal frequencies, we see that niche expansion is only ultimately prevented when (i) selection (g) is strong and migration (m) is high, so that the global population is not viable (0 zone in Fig. 4), and (ii) migration is weak and mutations are rare and of small effect only. Otherwise (when the global population is viable and mutations are not infinitesimally small or rare), migration has mainly a positive demographic effect for niche expansion. Yet, it has a negative impact on the pattern of local adaptation.

Local adaptation

A classical way to measure adaptation in heterogeneous environments is to do transplant experiments. Local adaptation is often defined as the average mean ‘local’ fitness minus the average mean fitness ‘foreign’ (Kawecki & Ebert, 2004; Nuismer & Gandon, 2008; Blanquart et al., 2012):

display math(27)

In our model, with quadratic fitness functions, the level of local adaptation at the symmetric equilibrium defined as in eqn (27) is given by the product of the intensity of selection g and the equilibrium divergence in local mean traits inline image:

display math(28)

The simplicity of eqn (28) should remind the reader that this result is valid under specific assumptions; in particular, the two habitats are assumed to be present in equal frequencies, and fitness functions are assumed to be quadratic, or at least wide enough (i.e. weak enough trade-off) for Taylor expansions like in eqn (3) to be valid approximations. Although these assumptions are common, partly because they make models analytically tractable and therefore help to gain some analytical insights (see e.g. Hendry et al., 2001; Ronce & Kirkpatrick, 2001, and this article), they correspond to limiting cases. Switching from perfectly symmetrical (c = 1/2) to nonsymmetrical (c ≠ 1/2) environments may quantitatively, but also sometimes qualitatively affect the evolutionary outcomes.

After these words of caution, eqn (28) gives some insights on the factors moulding the level of local adaptation. We recover the direct effect of migration, which decreases local adaptation by selecting for more generalist strategies, that are therefore less specialized and less locally adapted.

Because of the symmetry of the environment, eqn (28) hides the fact that migration and mutation also affect higher moments of the local distributions of traits in each habitat, and in particular their variances (2nd moments) and asymmetries (3rd moments, proportional to the skew): these effects are illustrated on panels (c) and (d) of Figs 5 and 6. Importantly, our analysis emphasizes that the equilibrium value of each moment of the local distributions of traits depends on higher moments; for instance, the mean traits at equilibrium, inline image, depend in particular on the asymmetry inline image of the local distribution of traits (see eqn (5b)). This asymmetry inline image is not a parameter – and neither is the local variance inline image – both affect and are affected by the value of inline image.

Our approximations suggest, and numerical simulations confirm that mutation, which in this model is assumed to be unbiased (the mean of the mutation kernel is zero) has almost no effect on the mean traits inline image (see Fig. 5b). This confirms that although migration and mutation may have similar demographic consequences — which are the migrational and mutational loads, resulting in a drop in population densities (panels (a) in Figs 5 and 6) — these two evolutionary forces have different effects on the evolutionary outcome, that is, on the local mean traits inline image: while gene flow limits local adaptation, mutations do not influence the values of the local mean traits (see eqns (22) and (28)).

Links with previous quantitative genetics models

Equations (4a) and (6) may have a taste of déjà vu for readers familiar with quantitative genetics models. To see this, compare for instance the moment-based eqns (4a) to system (2a) in Ronce & Kirkpatrick (2001), or solution (6) to eqn (7) in Hendry et al. (2001). Coincidence? We think not. The effects of selection, migration and mutation on the distributions of phenotypes which are described in eqn (2a) are the same in sexual models. With sexual reproduction however, reproduction also affects the distributions of phenotypes. Deriving expressions for traits coded by multiple loci, and with sexual reproduction (i.e. taking into account the effect of recombination), is much more challenging in the general case; usually, some additional simplifying assumptions are made.

Linkage equilibrium

For instance, some quantitative genetics models (see for instance the derivation in Barton, 1999, continuum of alleles model) assume that all loci coding for the trait are at linkage equilibrium (i.e. are statistically independent), and that there are no epistatic interactions for the value of the trait (i.e. the effects of all loci are additive). At each locus, the distributions of alleles follow eqn (2a); the trait value of an individual is obtained by summing the allelic values at all loci. Under such assumptions, Barton (1999)'s eqn (2a) for the change in the mean phenotypic value is equivalent to our eqn 4(b). Although the biology is different (clonal vs. sexual reproduction), with the continuum-of-alleles derivation and the assumption of linkage equilibrium, the equations used to model sexual reproduction are the same as the ones used to model clonal reproduction.

Gaussian distributions and fixed variances

Many quantitative genetics models further make the simplifying assumptions that the distributions of phenotypes are Gaussian (therefore, symmetric, so that the third moments ς are zero), but even that the genetic variance is constant (so that v is not a variable anymore but becomes a parameter). In our asexual model, such assumptions are obviously problematic – but they can also be problematic with sexual reproduction (as underlined for instance by Tufto, 2000; Lopez et al., 2008; Yeaman & Guillaume, 2009; Huisman & Tufto, 2012). In particular, assuming fixed variances (as in Kirkpatrick & Barton, 1997; Ronce & Kirkpatrick, 2001) may artificially constrain the potential for adaptation, while adaptation will be easier with nonfixed variances, as noted for instance by Barton (1999, 2001) for models of evolution on gradually changing environments (models of clines). In addition, local distributions of phenotypes are also likely not to be Gaussian under a migration–selection balance, even with sexual reproduction (Yeaman & Guillaume, 2009; Huisman & Tufto, 2012). Using genetically explicit simulations, Yeaman & Guillaume (2009) showed that neglecting the asymmetry (skew) of the distributions led to an underestimation of the equilibrium divergence (inline image) among habitats. Their conclusion is confirmed by our formula (6). Also, like Yeaman & Guillaume (2009), we find that the skew is highest at intermediate migration rates (see eqn (24) and Fig. 6d).

Additive loci of equal effect

Other models assume that the quantitative trait is coded by a large number of loci, each with two alleles (+/−), all loci contributing additively to the phenotype (no epistasis or dominance effects), and of fixed, and often also equal effects. Under this diallelic architecture, less skew is generated than under a continuum-of-alleles model (Yeaman & Guillaume, 2009). Recently, however, Yeaman & Whitlock (2011) examined the evolution of the genetic architecture of adaptation in heterogeneous environments. In their simulations, the effect sizes of each locus could evolve, and they found that adaptation under a migration–selection balance resulted in concentrated architectures with a few linked loci of large effect (instead of many loci of small effect), a situation – ploidy aside – close to the one-locus with continuum-of-alleles architecture used in this article.

Finally, taking into account linkage disequilibrium, spatially heterogeneous selection, and explicit population dynamics in a single analytical model is particularly challenging but constitutes an interesting perspective to this study.

Other limits and perspectives

As we wanted to link our model to previous studies, in particular those by Meszéna et al. (1997) and Ronce & Kirkpatrick (2001), and because this made our model analytically tractable, we focused on a specific scenario, where environmental heterogeneity is represented by two habitats in equal frequencies. Assumptions of symmetry are common in models. As mentioned earlier, our predictions on local adaptation are likely to change with asymmetric environments. In particular, asymmetry allows for gene swamping (Nagylaki, 1975; Lenormand, 2002), making niche expansion more difficult (see Holt & Barfield, 2011, for a recent review). In addition, although we derived as many results as we could with general fitness functions, our illustrations are done with quadratic fitness functions like in Ronce & Kirkpatrick (2001); such functions correspond to weak trade-offs in fitness in both habitats (i.e. convex fitness sets). Our figures would differ if stronger trade-offs were used, because such trade-offs make the bimodal equilibrium inline image less easily attainable by gradual evolution (see e.g. Levins, 1962; Kisdi, 2001; Ravigné et al., 2009, in non-demographical models).

As Ronce & Kirkpatrick (2001) and Meszéna et al. (1997), we focused on a continuous time model, where density regulation and migration are decoupled. In discrete time models, the order of events in the life-cycle matters, by making selection more or less frequency-dependent, and may critically affect evolutionary outcomes (Via & Lande, 1985; Ravigné et al., 2004; Débarre & Gandon, 2011).


To conclude, this study is an attempt to bridge some gaps between different theoretical approaches. We borrowed and combined tools from different frameworks: formulations with partial differential equations for clonal inheritance (Doebeli, 2011; Sasaki & Dieckmann, 2011) (equation (2a)) and diffusion approximations (Kimura, 1964) (eqn (2b)); quantitative genetics (Lynch & Walsh, 1998) and moment-based approaches (Bürger, 1991, 2000) adaptive dynamics (Geritz et al., 1998) for our derivations with rare mutations; and we finally combined them all. This generalist approach allowed us to reach a better understanding of the demography and evolution of populations in heterogeneous environments.


We thank S.P. Otto, R. Aguilée, S. Yeaman, F. Guillaume, M. Kirkpatrick, N. Barton and five anonymous reviewers for comments and discussions on previous versions of this study, and R. FitzJohn for his expeRtise.

FD acknowledges funding from the French ministry of research, from an NSF grant DMS 0540392, and from UBC's Biodiversity Research Centre (NSERC CREATE Training Program in Biodiversity Research); OR and SG acknowledge financial support from CNRS, the Agence Nationale de la Recherche, ‘6th extinction’ program, through the project EVORANGE (ANR-09-PEXT-011), ANR grant 07 JCJC 0129 EPICE and ERC Starting Grant 243054 EVOLEPID. The stochastic simulations were initially run on the ISEM cluster, then on the Zoology cluster at UBC. This is publication ISEM 2013-011 of the Institut des Sciences de l'Evolution.

Appendix A: General model, with demography

A.1. Continuum of alleles model

In this section, we first derive a more complete model, and then show how to reduce the number of parameters, by rescaling the different variables, which will yield model (2a). All parameters and variables before scaling are written in capital letters.

A.1.1. The environment

We consider an environment containing two habitat types, present in equal frequencies. Both habitats can host the same maximal density of individuals – they have the same carrying capacities, and they are linked by dispersal, which occurs at rate M. To each habitat corresponds an optimum trait value inline image, and selection is locally stabilizing towards this optimum.

A.1.2. Local dynamics

We derive our model under the assumption of clonal reproduction. We consider continuously growing populations with overlapping generations. The fitness of an individual depends on its adaptation to local conditions, governed by a quantitative trait Z, and on the intensity of competition with the other inhabitants of its patch. This competition is frequency-independent: it only depends on the local density, but not on the phenotype of the individuals that are present – hence, locally adapted populations grow logistically (with an exponential growth parameter R and a carrying capacity K). We assume that maladapted individuals suffer from an increased mortality, scaled by a parameter G; this additional mortality is greater when the individual's phenotype Z is away from the local optimum inline image. We first use general functions inline image to describe this additional mortality due to maladaptation, and then illustrate our results with specific functions.

The fitness functions take values between 0 and 1 for the phenotypic values of interest, and are twice differentiable. We further assume that they are symmetric, and are such that

display math(A.1)

and we can define a trade-off function, U, linking fitnesses in the two habitats:

display math(A.2)

Due to symmetry, we have

display math(A.3)

where inline image is the phenotype intermediate between the two optima:

display math(A.4)

We ignore environmental effects in this study, by assuming that all individuals with the same genotype express the same phenotype.

Finally, mutations occur at rate inline image and add an increment Y to the allelic effect Z; the distribution of these mutational effects is M(Y), and is assumed to be symmetric: there is no preferential direction of the mutations.

Let inline image be the density of individuals with trait Z in habitat j, at time T; with our assumptions, its dynamics read as follows:

display math(A.5)

A.1.3. Rescaling

With appropriate changes of variables, it is possible to reduce the number of parameters in eqn (A.5). We first scale time relative to the maximum growth rate, and the local densities relative to the carrying capacity:

display math(A.6)

and we define the compound parameters

display math(A.7)

We can then rewrite eqn (A.5):

display math(A.8)

The value of the trait Z depends on the chosen units; we can measure the traits relative to the local optima

display math(A.9)

and define the new scaled optima

display math(A.10)

and the new fitness functions, so that for all traits z,

display math

– which, with quadratic fitness function, gives

display math(A.11)

we can then rewrite eqn (A.5):

display math(A.12)

which is eqn (2a) in the main text. We still have the same symmetries for the fitness functions:

display math(A.13)

and we also can define a trade-off function, u, linking fitnesses in the two habitats:

display math(A.14)

such that

display math(A.15)

A.2. Summarizing the distribution

Equation (A.12) shows how the densities of each type z change under the action of selection and dispersal, but cannot be used as such to obtain analytical predictions. As classically done in quantitative genetics studies, we will derive summary variables: the total density in each habitat, inline image, the mean trait value in each habitat, inline image, and the genetic variance in each habitat inline image (which is equivalent to the phenotypic variance as there is no environmental variation in our model).

A.2.1. Definitions

The total density in habitat j is

display math(A.16)

The proportion of individuals with trait z in habitat j is

display math(A.17)

The mean trait in habitat j is

display math(A.18)

The genetic variance in habitat j is

display math(A.19)

We will also use the following relations between central moments, moments and cumulants:

display math(A.20a)
display math(A.20b)
display math(A.20c)

where inline image and inline image are the third central moment and the fourth cumulant, respectively, of the distribution in habitat j.

A.2.2. One additional assumption

We will assume that the local distributions are such that traits are close to the local mean trait values inline image, so that we can Taylor-expand the functions inline image:

display math(A.21)

Using the above expansion (A.21), we can rewrite the local mean fitness as functions of the fitnesses of the mean traits:

display math(A.22)

A.2.3. Total density in habitat j

With definition (A.16), the dynamics of the total density in habitat j is the following:

display math(A.23)

Equation (A.23) is exact; now, we use the Taylor expansion presented in eqn (A.21), and we obtain the following:

display math(A.24)

A.2.4. Mean trait in habitat j

We first have to write the dynamics of the proportion of individuals with phenotype z in habitat j, inline image:

display math

Its dynamics read

display math(A.25)
display math(A.26)

which is exact (and the first term, corresponding to selection, is classic); now using the Taylor expansion from eqn (A.21), we obtain the following:

display math(A.27)

and using a diffusion approximation for mutations (Kimura, 1964; Rice, 2004), we obtain the following:

display math(A.28)

Now, using (A.27) we can focus on the dynamics of inline image:

display math

(the first term, corresponding to local selection, is the Price equation Price, 1970); now using the Taylor expansion from eqn (A.21), we have, after reorganizing terms, and using relations between moments,

display math(A.29)

Note that mutations do not appear in this expression, because they do not change the mean trait, as they are isotropic.

A.2.5. Genetic variance in habitat j

Let us now derive the dynamics of the genetic variance inline image:

display math(A.30)

After rearrangement we obtain the following equation:

display math(A.31)

where inline image is the mutational variance (the increase per time unit in trait variance due to mutation), that is the probability of mutation times the variance of the distribution of mutational effects μ(z).

We derived eqns (A.23)–(A.31) assuming that the individuals in the population reproduce clonally, and that the adaptation trait was controlled by a single polyallelic locus. We obtain the same equations as other authors who assumed sexual reproduction: compare our eqns (A.29) eqns (A.29) and (A.31) to eqns (2a) and (3) in Barton (1999), or our eqns (A.29) and (A.31) to system (2) in Ronce & Krikpatrick (2001). Note that if the phenotype is determined by multiple loci instead of only one, we have to take into account the effective number of loci, ν (see Barton, 1999), in the dynamics of the variance, and to assume linkage equilibrium (so that all loci are independent) – but the equations for the total density and for the mean trait remain the same (Barton, 1999).

Appendix B: Adaptive dynamics analysis of the demographic model

This section summarizes the results found by doing an adaptive dynamics analysis. The calculations are done with Mathematica, and the file is available on Dryad doi: 10.5061/dryad.cv507.

B.1 Invasion fitness and selection gradient

We consider a resident population with trait inline image at equilibrium; its densities inline image and inline image are such that

display math

The dynamics of a rare mutant with trait inline image read:

display math

The selection gradient inline image reads as follows:

display math(B.1)

with inline image.

We can see that this selection gradient vanishes at the intermediate strategy inline image, because inline image and inline image.

B.1.1. Convergence stability of the intermediate strategy

The intermediate strategy inline image can be reached by gradual evolution, when

display math(B.2)
B.1.2. Invadability of the intermediate strategy

The intermediate strategy inline image cannot be invaded by any other strategy, when

display math(B.3)
B.1.3. Other singular strategies

It is not possible, in the general case, to find analytical solutions of ∂λ(z) = 0 (eqn (B.1)). However, with quadratic fitness functions, when the migration rate m is low enough, and the strength of selection g high enough, the local densities of the resident population can be approximated as inline image and inline image, with inline image close to 0. The selection gradient becomes

display math(B.4)

Neglecting dispersal terms m of order 3 and higher, and under the condition g > 1, we find an approximate solution inline image of ∂λ(z) = 0, which reads as follows:

display math

This solution corresponds to the adaptation to habitat 1, and there is a miror solution inline image for adaptation to habitat 2 only.

B.2 Characterization of the polymorphic equilibrium

Using the symmetries described in the main text, the selection gradient inline image reads

display math(B.5)

The strategies inline image and inline image are singular if

display math(B.6)