Introduction

Populations in nature consist of individuals that typically differ in size, physiology, morphology, behavior, and resource utilization (Gibert and Brassil, 2014; Schreiber and Bürger et al., 2011). This intraspecific trait variability occurs not only between populations, but also within populations and even within individuals (Albert and Grassein et al., 2011; Albert and Thuiller et al., 2010b; Bolnick and Svanbäck et al., 2002). Taking for instance plant leaves, there are differences in morphology (e.g., leaf area and thickness) (Siefert and Violle et al., 2015; Jung and Violle, 2010; Coleman and McConnaughay et al., 1994; Albert and Thuiller et al., 2010b; Albert and Thuiller et al., 2010a) nitrogen and phosphorus concentration (Siefert and Violle et al., 2015; Albert and Thuiller et al., 2010a; Albert and Thuiller et al., 2010b), or secondary metabolites (Ohmart and Stewart et al., 1985; Ali and Agrawal, 2012; Hartmann, 1996; Moore and Andrew et al., 2014). Despite the overwhelming empirical evidence of intraspecific trait variability on all mentioned scales (Herrera, 2009; Herrera, 2017; Siefert and Violle et al., 2015; Jung and Violle, 2010; Fridley and Grime, 2010), ecological theory has focused for a long time mostly on interspecific trait variability.

In recent years, however, an increasing number of empirical and theoretical studies has underlined the importance of considering intraspecific trait variability as it affects the stability (Agashe, 2009; Okuyama, 2008; Gibert and Brassil, 2014; Doebeli, 1997), diversity (Vellend, 2006; Booth and Grime, 2003; Hughes and Inouye et al., 2008), and dynamics (Raffard and Santoul et al., 2018; Doebeli, 1996; Doebeli and Jong et al., 1999) of ecosystems.

One hypothesis why intraspecific trait variability can have such effects on ecological systems is that it leads to nonlinear averaging according to Jensen’s inequality (Okuyama, 2008; Bolnick and Amarasekare et al., 2011; Ruel and Ayres, 1999; Wetzel and Kharouba et al., 2016): If we consider a function that represents a response (for instance herbivore performance) to the trait value, this function can be concave upwards (i.e., increasing slope, positive curvature) or concave downwards (i.e., decreasing slope, negative curvature). Let us assume that the distribution of traits is a peaked function characterized by its mean and variance. Jensen’s inequality (Jensen, 1906) states that the mean response calculated for this trait distribution is larger than the response associated with the mean trait value when the function is concave upwards. The opposite is true for a concave downwards function. Hence, populations with the same mean trait but with different trait variances can experience different mean responses (Bolnick and Amarasekare et al., 2011) and therefore different dynamics. Indeed, Jensen’s inequality (or Jensen’s effect) is cited in various ecological contexts, for example in the case of a nonlinear relationship between attack rates and body sizes or nutrient concentration and chemostat population growth (Bolnick and Amarasekare et al., 2011). Jensen’s inequality is also used to explain why variance in temperature elevates poikilotherm metabolic rates (concave upwards function), why variance in light regimes depresses primary production (concave downwards function), and why variance in tissue quality and secondary metabolites affects herbivore response (Ruel and Ayres, 1999). Furthermore, several authors refer to Jensen’s inequality to explain the large variability in plant traits (Herrera, 2009; Siefert and Violle et al., 2015; Coleman and McConnaughay et al., 1994; Albert and Thuiller et al., 2010a; Albert and Thuiller et al., 2010b).

In particular, Wetzel and Kharouba et al. (2016) used Jensen’s inequality to argue that plant trait variability is per se beneficial for the plant when the herbivore feeding rate is a concave downwards function of this trait. In this case, Jensen’s inequality states that the mean herbivore response is smaller when the trait values of plant leaves vary around a mean than when all leaves have this mean trait value. In a meta-study, Wetzel and Kharouba et al. (2016) indeed found that herbivore response is in the majority of cases a concave downwards function of the leaf nutrient level, but linear (Ayres and Suomela et al., 1987) or complex herbivore response functions having both concave upwards and concave downwards regions (Clancy, 1992) were also found. A reason for these divergent results may be that the curvature of the herbivore response function depends on the considered nutrient, herbivore (Ali and Agrawal, 2012), nutrient-level range (Clancy, 1992; Miles and Aspinall et al., 1982; Ohmart and Stewart et al., 1985), and the age of the herbivore individuals (Scriber and Slansky, 1981; Ohmart and Stewart et al., 1985; Montgomery, 1982; Zalucki and Clarke et al., 2002).

Performance functions for consumers over a very wide range of nutrient concentrations are typically represented by optimum curves with a maximum at intermediate nutrient levels, also known as Bertrand’s rule (Bertrand, 1912) and applicable to various micro- and macronutrients (Mertz, 1981; Raubenheimer, 2005; Zehnder and Hunter, 2009; Joern and Behmer, 1997; Fischer and Fiedler, 2000; Joern and Behmer, 1997; Boersma and Elser, 2006; Wetzel and Kharouba et al., 2016). The increasing benefits from an increased uptake of essential nutrients are clear: They accelerate for very low nutrient concentrations from a zero performance and decelerate when approaching the optimum. Depending on the segment along the concentration gradient, the function is concave up, linear or concave down. Beyond the maximum, the costs of excessive nutrient consumption may involve imbalances across different nutrients (Simpson and Raubenheimer, 1993), higher doses of associated defensive chemicals (Simpson and Raubenheimer, 2001; Tao and Berns et al., 2014), dose-dependent toxicity, and even increased mortality (Raubenheimer, 2005). For instance, when leaves with higher nutrient content are more strongly defended, this results in trade-offs between the benefit of higher nutrient content and the cost of dealing with defenses (Boersma and Elser, 2006; Raubenheimer and Simpson et al., 2009). Increased metabolic costs for excreting or storing surplus macronutrients such as carbohydrates may even limit a consumer’s total intake despite a resulting limitation of other essential nutrients (Raubenheimer, 2005; Lee and Raubenheumer et al., 2004).

A fact not considered in the studies mentioned above is that herbivores are able to adaptively respond to changes in their environment, such as the plant nutrient-level distribution, via their mobility and foraging behavior. In fact, herbivore preference is one important way to respond to trait distribution in the resource (Via, 1986; Herrera, 2009). It can appear in different forms: Herbivores can have feeding preference for leaves on which they perform best. This requires mobility to reach appropriate leaves (Mody, 2007; Lubchenco, 1978). Different species can have different types of feeding preferences: For example, generalized stick insects (Phasmatodea) prefer older leaves, while specialized species prefer younger leaves within the same food plant (Blüthgen and Metzner, 2007). A third preference pattern is found in specialized lasiocampid caterpillars that move between host plant individuals to achieve a balanced diet (Mody, 2007). Herbivores can also show oviposition preference for leaves on which their offspring perform best (Soto and Goenaga et al., 2012; Tilmon, 2008; Gripenberg abd Mayhew et al., 2010), even though this preference is often imperfect: There can occur mismatches between oviposition preference and offspring performance (Valladares and Lawton, 1991; Gripenberg abd Mayhew et al., 2010; Hufnagel and Schilmiller et al., 2017), for instance be due to limited discrimination capability of parents (Barbosa and Hines et al., 2009) or to avoidance of larval competition (Scheirs and Bruyn et al., 2000; Scheirs and De Bruyn, 2002).

Up to now, theoretical models for adaptive feeding behavior focus on consumers that choose among several prey or resource species: Such models have shown that adaptive behavior can promote the coexistence of competing consumers (Kr̆ivan, 2003) as well as of competing prey or resources (Kr̆ivan and Eisner, 2003), but can also prevent coexistence (Feng and Liu et al., 2009). Furthermore, adaptive behavior was shown to affect the link–species relationship (Matsuda and Namba, 1997; Matsuda and hori et al., 1994; Matsuda and Hori et al., 1996) and to promote the persistence of species (Van Baalen and Kr̆ivan et al., 2001) and the stability of food webs (Genkai-Kato and Yamamura, 1999; Genkai-Kato and Yamamura, 2000; Kondoh, 2006; Uchida and Drossel et al., 2007; Valdovinos and Ramos-Jiliberto et al., 2010; Heckmann and Drossel et al., 2012).

However, less is known about the impact of herbivore preference on an intraspecific (or even intra-individual) level, although several empirical studies find that preference occurs on this level (Whitham, 1980; Mody, 2007; Gutbrodt and Dorn et al., 2012; Rausher, 1979; Herrera, 2009; Herrera, 2017). In particular, it has not been explored so far how herbivore preference affects the impact of intraspecific plant trait variability on herbivore fitness.

In this paper, we want to fill this gap. We propose a plant–herbivore model that includes plant nutrient-level variability and herbivore preference and is valid for intra-individual and inter-individual nutrient-level variability as well as for feeding and oviposition preference. Based on the study of Wetzel and Kharouba et al. (2016), we investigate how plant nutrient-level variability affects the performance of the herbivore population depending on the curvature of the herbivore response function. We couple herbivore preference with corresponding costs for finding appropriate leaves (Tilmon, 2008).

In order to distill the effect of intraspecific trait variability per se, we focus on one trait, namely the nutrient level in the plant leaves, and neglect possible correlated variations in secondary metabolites. For the same reason, we only model the herbivore population and neglect higher trophic levels. Furthermore, we assume that the plant population is sufficiently large that it can be considered as constant over the time span covered by the model.

We show that herbivore preference crucially affects the predictions of Wetzel and Kharouba et al. (2016) that are based on Jensen’s inequality. More precisely, we find that when a herbivore population has a strong preference, it benefits from large plant trait variability irrespective of the curvature of the response function. In addition to computer simulations, we show this also analytically. Furthermore, we show that the optimal extent of herbivore preference is larger when the performance function is concave upwards than when it is concave downwards.

Model

Our model is a phenomenological model that evaluates herbivore fitness based on its biomass increase during a season, which in turn depends on the distribution of the nutrient level and on herbivore preference. We consider insect herbivores feeding on a plant population whose leaves show a distribution p(n) of the nutrient level n. The model does not include interspecific interactions or intraspecific density dependence, in contrast to the study by Whitham (1980). It thus describes situations where there is abundant consumable plant material, that allows exponential growth. However, part of the effects of competition could be accounted for by adjusting the herbivore performance and preference functions, and factors external to the model can be presumed to limit overall growth. By focusing on nutrient concentration as the only trait, we make an unrealistic simplification. Nutrients represent a trait that is costly and has a positive effect on consumers. We do not include mechanical (e.g., leaf thickness, hairs, thorns) or chemical defenses which will require different model approaches. Nutrients and defenses always occur together and may face various trade-offs. Nevertheless, studying the consumer’s response to nutrients is a meaningful first step that provides valuable insights.

The model also ignores details of the search and growth dynamics during the season and changes in the nutrient distribution p(n), as neither is relevant for the overall message.

Herbivore fitness

The central quantity to be evaluated is herbivore population fitness, since it is a direct indicator of herbivore population growth. The mean fitness \(\overline{W}_H\) of a herbivore population is defined as the mean number of offspring per herbivore individual reaching reproductive age. Denoting the distribution of herbivore individuals on leaves with nutrient level n as \(\Phi (n)\) and the fitness of a herbivore individual feeding on a leaf with nutrient level n as \(W_H(n)\), the mean population fitness can be expressed as

$$\begin{aligned} \overline{W}_H = \int _0^{n_{\text {max}}}\, \mathrm {d}n\, \Phi (n) W_H(n) \,, \end{aligned}$$
(1)

with \(n\in [0, n_{\text {max}}]\). Note that the nutrient level n can also be understood as a mean when herbivores consume multiple leaves from hatching to pupation. The fitness \(W_H(n)\) of a herbivore individual feeding on a leaf with nutrient n depends on the growth of the herbivore on this leaf, which we will express in terms of a performance function f(n). We define the performance function f(n) as the weight gain of a herbivore individual feeding on a leaf with nutrient level n from hatching to pupation. The different types of performance functions used in our study will be specified further below. If we assume that the number of offspring that reach reproductive age is proportional to this weight gain, the fitness \(W_H(n)\) of a herbivore individual feeding on a leaf with nutrient level n is given by

$$\begin{aligned} W_H(n) = \lambda _H f(n) \end{aligned}$$
(2)

with \(\lambda _H\) being the number of offspring per unit of weight gain.

Distribution of herbivore individuals on leaves

The distribution \(\Phi (n)\) of herbivore individuals on leaves with nutrient level n depends on the one hand on the nutrient-level distribution p(n), and on the other hand on a preference function \(\Phi _p(n)\) that quantifies the extent of preference for leaves with nutrient level n. Since we assume that intraspecific competition for food is negligible, the distribution is obtained by multiplying the preference function with the leaf abundance and normalizing the result, leading to

$$\begin{aligned} \Phi (n) = \frac{1}{\int _0^{n_{\text {max}}} \, \mathrm {d}n \, \Phi _p(n) p(n)}\Phi _p(n) p(n) = \Gamma \Phi _p(n) p(n)\,. \end{aligned}$$
(3)

Nutrient distribution

For the nutrient level distribution p(n) among leaves, we assume a Gaussian distribution with a mean in the middle of the considered nutrient-level interval \(n \in [0, n_{\text {max}}]\), i.e., at \(\bar{n} = n_{\text {max}}/2\). This is motivated by the fact that continuous traits often show a Gaussian distribution (Meglioli and Villagra et al., 2016) or are assumed to be Gaussian distributed (Kattge and Knorr et al., 2009; Barber and Kiers et al., 2013). If the distribution is different, for instance lognormal, the logarithm of the trait is Gaussian distributed and should be chosen as variable n.

The variance \(V_S\) of this distribution determines the degree of heterogeneity of the nutrient distribution. We introduce the trait variability parameter

$$\begin{aligned} S = \frac{V_S}{1+V_S}\,, \end{aligned}$$
(4)

such that \(S = 1\) represents a uniform distribution over the considered nutrient-level interval, i.e., that all nutrient levels in the considered range appear with equal frequency. A variability parameter \(S = 0\) represents a delta distribution, meaning that all leaves of all plant individuals have the nutrient level \(n = \bar{n}\). Fig. 1(c) shows the nutrient distribution p(n) for different plant trait variability parameters S.

The total amount of nutrients being available for the herbivore population is kept constant in our investigation, so that a change in trait variability S arise solely from a redistribution of nutrients between the leaves.

Preference function

The preference function \(\Phi _p(n)\) can be interpreted as the probability that an adult herbivore lays eggs on a leaf with a nutrient level n when encountering it. We model this function via a Gaussian distribution with its mean at the performance maximum of the herbivore population and a variance \(V_p\) that is smaller when the preference is stronger. Since preference is a quantitative trait, a Gaussian distribution is the natural distribution to choose; for other distributions, we do not expect a qualitative change of our results. We define the preference parameter

$$\begin{aligned} \tau = \frac{1}{1+V_p}\,, \end{aligned}$$
(5)

such that \(\tau = 0\) stands for no, and \(\tau = 1\) for full preference. In the latter case, preference function is a delta distribution which describes the unrealistic extreme case that only those leaves are used for oviposition on which the herbivore population reaches its performance maximum. Fig. 1(e) and (f) shows the preference function \(\Phi _p(n)\) for different preferences \(\tau\) for the case that the performance maximum occurs at maximum nutrient level (e) or at intermediate nutrient level (f). Instead of oviposition preference, the preference function can also indicate a feeding preference. In this case, the preference function \(\Phi _p(n)\) describes the probability that a herbivore feeds on a leaf with nutrient level n when encountering it. Note that the preference function is a population average, such that diverging preferences of herbivore individuals or an incapability to discriminate leaf traits properly lead to a low population preference \(\tau\). Furthermore, fewer herbivore individuals feed on high-quality leaves when these become rare (i.e., with decreasing plant trait variability parameter) S, even when the value of \(\tau\) (i.e., the degree of preference) is not changed, since less herbivore individuals encounter these high-quality leaves (cp. Fig. 1(g)).

Preference comes with a cost for finding appropriate leaves. We take this cost into account in form of a mass loss of the herbivore population. Other types of costs for finding leaves, for instance an increased loss to predation or the laying of less eggs, would also lead to reduced offspring production and therefore to a similar expression for the reduction of mean fitness.

Since we want to explore the effect of this cost, we describe the relative mass loss of the herbivore population by a function that allows us to interpolate between 0 and 1 in different ways by changing the parameters of this function. In this way, we can make sure that unrealistic extreme cases of the preference function, such as a delta distribution, do not lead to survival of the herbivore population. We thus define the relative mass loss due to preference as

$$\begin{aligned} \beta (\tau ) = \frac{\mu }{\mu + (V_p)^k} = \frac{\mu \tau ^k}{\mu \tau ^k + (1-\tau )^k}\,, \end{aligned}$$
(6)

where larger \(\mu\) means that the cost of preference is larger, and large k means that the costs are mainly incurred when preference is large. Fig. 5 in Appendix shows the factor \(1-\beta (\tau )\) by which mass is decreased due to preference for different values for \(\mu\) and k.

Including this cost changes the expression Eq. (1) for the mean fitness of the population to

$$\begin{aligned} \overline{W}_H & = \left(1-\beta (\tau )\right)\int _0^{n_{\text {max}}}\, \mathrm {d}n\, \Phi (n) W_H(n)\nonumber \\ & \overset{(3)}{=} \Gamma \left(1-\beta (\tau )\right)\int _0^{n_{\text {max}}}\, \mathrm {d}n\, \Phi _p(n) p(n) W_H(n)\,, \end{aligned}$$
(7)

where \(\Gamma\) normalizes again the distribution \(\Phi (n)\) of herbivore individuals on leaves with nutrient n to 1. Fig. 1(g)-(j) shows the distribution \(\Phi (n)\) of herbivore individuals on leaves with nutrient content n for varying plant trait variability parameter S and varying preference \(\tau\), respectively.

Performance function

Wetzel and Kharouba et al. (2016) argued that the curvature of the herbivore performance function determines whether a herbivore benefits or suffers from plant trait variability. In order to test this idea, we will use performance functions with different shape. These performance functions are shown in Fig. 1(a) and (b). On the one hand, we choose monotonically increasing functions with different curvature; on the other hand, we choose parabolic functions with the maximum at an intermediate nutrient level. Since the nutrient-level distribution in our model is a Gaussian function around a mean nutrient level, a monotonically increasing performance function means that the range of nutrient concentrations present in the plant is below the value that is optimal for the herbivore, i.e., the best leaves are rare and leaves of intermediate quality are most common. When, however, the range of nutrient concentrations of the plant is that of maximum herbivore performance, the performance function should have its maximum at intermediate nutrient level in our model.

The latter unimodal curves are assumed in many studies focusing on variation in single macro- or micronutrients over a broad range of concentration levels, including direct or indirect costs of nutrient excess at high doses (Mertz, 1981; Raubenheimer, 2005; Zehnder and Hunter, 2009; Joern and Behmer, 1998; Wetzel and Kharouba et al., 2016). However, monotonically increasing performance functions are similarly realistic and informative depending on the segment of the concentration levels chosen, or for specific definitions of nutrient levels (e.g., as a measure of proximity to a consumer’s optimal nutritional target, (see Simpson and Raubenheimer, 1993)). Note that trade-offs with defenses or among competing nutrients may not be pronounced or may be disregarded when trying to understand nutrient variability alone.

The performance curves are parametrized such that the mean performance is the same in all cases, so that the resulting mean fitness values are of the same order of magnitude.

Fig. 1
figure 1

Illustration of the different functions occurring in our model. (a) The three types of monotonically increasing herbivore performance functions: \(f_{\text {pos}}(n) =0.12 n^3\), \(f_{\text {lin}}(n) = 6n\), \(f_{\text {neg}}(n) = \frac{300}{10-\ln (11)}\frac{n}{n+1}\). (b) Two performance functions that have their maximum at an intermediate nutrient level: \(f_{\text {opt,1}} = \frac{9}{5}n\left( 10-n\right)\), \(f_{\text {opt,2}} = \max (0, \frac{225}{112}\left( 14n-24-n^2\right) )\). (c), (d) Change of the nutrient distribution p(n) with plant trait variability parameter S (low S means low nutrient-level variability, high S high variability; cp. Eq. (4)). (e), (f) Preference function \(\Phi _p(n)\) for different strengths of preference \(\tau\) (cp. Eq. (5)) for the case that performance is best at high nutrient concentrations (c) and at intermediate nutrient concentrations (d). (g), (h) Distribution \(\Phi (n)\) of herbivore individuals on leaves with nutrient level n (cp. Eq. (3)) for different trait variability parameters S (cp. Eq. (4)) and a herbivore preference \(\tau = 0.25\) (cp. Eq. (5)) for the two situations that performance is best for high or intermediate nutrient concentrations. This is the (normalized) product of the orange curve in (e), (f) with the three different curves in (c), (d). (i), (j) Distribution \(\Phi (n)\) of herbivore individuals on leaves with nutrient level n (cp. Eq. (3)) for different herbivore preferences \(\tau\) (cp. Eq. (5)) and a trait variability parameter \(S = 0.25\) (cp. Eq. (4)) for the two situations that performance is best for high or intermediate nutrient concentrations. This is the (normalized) product of the orange curve in (c), (d) with the three different curves in (e), (f)

Choice of parameter values

We chose the nutrient level range to be \(n \in [0,10]\), such that the mean nutrient level is \(\bar{n} = 5\). By choosing appropriate units for the nutrient level, every nutrient level interval can be mapped onto this one. As we want to investigate whether nutrient-level variability is per se beneficial or disadvantageous for the herbivore population, we keep the mean nutrient-level constant and just alter the plant trait variability parameter S, i.e., the variance of the nutrient-level distribution.

For the cost of preference, Eq. (6), we choose the parameters \(\mu = 1\) and \(k = 2\), such that the costs for a moderate level of preference remain moderate, but become considerable for high preference. In order to find an appropriate value for the number of offspring per unit of growth, \(\lambda _H\), we choose the forest tent caterpillars (Malacosoma disstria) as model species. Malacosoma disstria has a typical mass gain until pupation of 300 mg and produces around 300 eggs with a survival rate of 1/100 resulting in a number of offspring reaching the reproductive age per growth unit of \(\lambda _H = 0.01 {{1}\over {\text {mg}}}\) (Hemming and Lindroth, 1999). Furthermore, we normalize the mean performance of all functions to 300 mg, i.e., \(\int _0^{n_{\text {max}}} f(n)\, \mathrm {d}n = 300\). The Discussion section makes clear that the general results depend only on the general features of the model, but not on the detailed choice of parameter values. Nevertheless, we present in Appendix a robustness study, where we vary several features of the model.

Results

We divide our investigation into two parts. In a first step, we analyze the herbivore fitness (cp. Eq. (7)) in dependence of the trait variability parameter S (cp. Eq. (4)) and the shape of the performance function without herbivore preference, i.e., for \(\tau = 0\) (cp. Eq. (5)). These results can be compared to previous studies (Wetzel and Kharouba et al., 2016; Ruel and Ayres, 1999; Bolnick and Amarasekare et al., 2011) and will serve as a reference for the second part of our investigations. In the second step, we investigate the effect of herbivore preference, \(\tau > 0\), on these results, and we will show that herbivore preference modifies the conclusions and assumptions in (Wetzel and Kharouba et al., 2016; Ruel and Ayres, 1999; Bolnick and Amarasekare et al., 2011).

The effect of plant trait variability on herbivore fitness in absence of herbivore preference

We first consider the situation that the herbivore population shows no preference, i.e., \(\tau = 0\) and therefore the mass-loss factor \(\beta (\tau ) = 0\), see (6). Hence, the preference function \(\Phi _p(n)\) is a uniform distribution such that the distribution of herbivore individuals on leaves with nutrient level n is \(\Phi (n) = \Gamma p(n)\) (cp. Eq. (3)) and the expression for the mean fitness (cp. Eq. (7) and Eq. (2)) simplifies to

$$\begin{aligned} \overline{W}_H = \Gamma \lambda _H \int _0^{n_{\text {max}}}\, \mathrm {d}n\, p(n)f(n)\,. \end{aligned}$$
(8)

Herbivore fitness for the case \(\tau =0\) is shown in Fig. 2 along the left edge of the five subfigures. One can see that the curvature of the performance function determines whether the herbivore population benefits or suffers from high nutrient-level variability (i.e., high S). The result is as expected: In the case of a concave upwards performance function the herbivore population is fitter (i.e., the color indicating fitness becomes darker) when nutrient-level variability is larger, while the opposite is true in the three cases of a concave downwards performance functions. For the linear performance function \(f_{\text {lin}}\), the trait variability parameter S has no influence on herbivore population fitness.

These results can be understood using Jensen’s inequality (Jensen, 1906), which states that a concave upwards function of the mean value of a set of points \(x_i\) is less or equal to the mean value of the concave upwards function of these points, i.e., \(f\left( \sum _{i=1}^n \lambda _i x_i\right) \le \sum _{i=1}^n \lambda _i f(x_i)\) with a concave upwards function f and \(\sum _{i=1}^n \lambda _i = 1\) with \(\lambda _i \ge 0\,\,\, \forall i \in [1,n]\). The opposite is true for a concave downwards function, and for a linear function f both values are the same. Consequently, we can deduce that \(\int f(n) p(n) \,\mathrm {d}n \gtreqqless \int f(n) \delta (n-\bar{n}) \,\mathrm {d}n= f(\bar{n})\), depending on the curvature of f, whenever \(S>0\), which means that the nutrient distribution has a nonzero width (cp. Eq. (4)). The difference between the two sides of the inequality becomes larger when the curvature of f is larger in the relevant range of n values, as can be seen in Fig. 2, where the color change along the \(\tau =0\) axis is largest in (a) and (d).

For further understanding, we reconstruct these results analytically. Additionally, the calculation will act as a basis for the following part, where we investigate the impact of preference on these results. We calculate the mean fitness (cp. Eq. (8)) as a function of the trait variability parameter S (cp. Eq. (4)) when the herbivore has no preference (i.e., \(\tau = 0\)). In order to do this, we approximate the performance functions by a polynomial in n, the curvature of which depends on a parameter c, i.e.,

$$\begin{aligned} f(n) = an+c n^2\,, \end{aligned}$$
(9)

with the curvature parameter c and \(a\ge 0\). The performance function is concave upwards when \(c>0\), linear when \(c=0\), and concave downwards when \(c<0\). Both performance functions \(f_{\text {pos}}\) and \(f_{\text {neg}}\) (cp. Fig. 1(a)) can be transformed to the performance function defined above with \(c>0\) and \(c< 0\), respectively, by using a Taylor expansion around the mean nutrient level \(\bar{n}\), appropriately choosing the parameter a, and neglecting constant terms since they have no qualitative impact on the fitness landscape. Starting with Eq. (8), we find

$$\begin{aligned} \overline{W}_H= & {} \lambda _H\Gamma \int _0^{n_{\text {max}}}\, \mathrm {d}n\, e^{-\frac{(n-\bar{n})^2}{2 V_S}} \left( an+c n^2 \right) \nonumber \\= & {} \lambda _H\Gamma \int _{-\bar{n}}^{\bar{n}}\, \mathrm {d}x\, e^{-bx^2} \left( a(x+\bar{n}) + c (x+\bar{n})^2 \right) \nonumber \\= & {} \lambda _H \left( \underbrace{a \bar{n}+ 2c\bar{n}^2 }_{W_0}+ cI\right) \,, \end{aligned}$$
(10)

where we substituted \(b = \frac{1}{2V_S}\), \(x = n-\bar{n}\), and \(I=\Gamma \int _{-\bar{n}}^{\bar{n}}x^2e^{-bx^2}dx\). Remember that \(\Gamma ^{-1} =\int _{-\bar{n}}^{\bar{n}}e^{-bx^2}dx\) is the normalization factor. For \(b=\infty\), which is equivalent to \(V_S=0\), we have \(\bar{W}_H =W_0\), which means that \(W_0\) is the mean herbivore fitness when all plant leaves have the trait value \(\bar{n}\). As we want to know how an increase of \(V_S\) changes the mean herbivore fitness, we can focus on the case of small \(V_S\), where the integration limits can be moved to \(\pm \infty\), since the nutrient distribution is very close to 0 at the boundaries of the integration interval. This approximation is consistent with the Taylor expansion of the performance function, which is a good approximation only if relevant interval of n values is small. The integral can be executed for instance by integration by parts, giving \(I=1/2b\). By inserting \(b = \frac{1-S}{2S}\) (cp. Eq. (4)) we find a particularly instructive form of the result,

$$\begin{aligned} \overline{W}_H = \lambda _H\left( W_0 + \frac{c}{2b}\right) = \lambda _H\left( W_0 + \frac{cS}{1-S}\right) \,, \end{aligned}$$
(11)

This result shows that the curvature parameter c determines whether the mean fitness increases or decreases with increasing \(V_S\), i.e., with decreasing b. This increases for positive c and decreases for negative c, as it must be according to Jensen’s inequality. This holds also for larger \(V_S\), since \(dI/db < 0\) also for finite integration limits. The result (11) also shows why mean herbivore fitness does not depend on the nutrient-level variability when considering a linear performance function \(f_{\text {lin}}\) (i.e., \(c=0\)). This calculation applies also for performance functions that do not increase monotonically, as the performance function for negative c becomes a concave downwards parabola over the considered range of nutrient concentrations when |c| is sufficiently large.

The effect of herbivore preference

As a second step, we now take herbivore preference into account. Fig. 2 shows the mean herbivore population fitness \(\overline{W}_H\) (cp. Eq. (1)) displayed in color code as a function of the herbivore preference \(\tau\) (cp. Eq. (5)) and the trait variability parameter S (cp. Eq. (4)) using the five different performance functions shown in Fig. 1(a) and (b).

Fig. 2
figure 2

Herbivore fitness (i.e., mean number of offspring per herbivore individual reaching reproductive age; cp. Eq. (7)) displayed in color code in dependence of the plant trait variability parameter S (cp. Eq. (4)) and herbivore preference \(\tau\) (cp. Eq. (5)) for the five different performance functions shown in Fig. 1(a) and (b). The performance functions are shown in the small insets

When herbivores have a preference for leaves on which they perform better, the curvature of the performance function is not the only factor determining whether the herbivore population benefits or suffers from large plant nutrient-level variability. The mean herbivore fitness increases with increasing trait variability parameter S for all possible preferences \(\tau \in (0,1)\) when the performance function is concave upwards \(f_{\text {pos}}\) (cp. Fig. 2(a)), as can be seen from the change from lighter to darker color with increasing S. For the linear performance function, herbivore fitness becomes dependent on plant trait variability as soon as there is a nonzero preference, see Fig. 2(b). Just as for the concave upwards performance function, herbivore fitness then increases with plant trait variability.

For the three concave downwards performance functions, herbivore fitness decreases with increasing plant trait variability for small preference values \(\tau\), as for the case \(\tau =0\). However, when the preference becomes stronger, this trend can be reversed. It is reversed for the monotonically increasing performance function (cp. Fig. 2(c)) as well as for the second of the two peaked performance function (cp. Fig. 2(e)). This means that preference for leaves on which performance is better can undo the disadvantage that herbivores experience when plant traits are distributed more broadly. However, when the performance maximum coincides with the maximum of the nutrient distribution, an increased plant trait variability always reduces herbivore fitness, irrespective of the extent of preference (cp. Fig. 2(d)).

The preference value \(\tau\) at which herbivore fitness has its maximum value in the different graphs is largest for the concave upwards performance function and much smaller for the concave downward ones. This means that the benefit for the herbivore of having a preference is largest when its performance function is concave upwards. This must be due to the fact that the performance gain due to preference is largest in this case, so that it can override the cost of having a preference.

Furthermore, Fig. 2 shows interesting trends with S of the fitness maximum at a given S: Of course, if there is no plant trait variability herbivore fitness is largest in the absence of preference. Therefore, the darkest color along the \(S=0\) axis occurs at \(\tau =0\). The fitness maximum at a given value of S is found by following the horizontal line for this S value and finding the \(\tau\) range with the darkest color. For the concave upwards and linear performance functions, the preference value that maximizes fitness increases with S when S is small and decreases again with S when S is large. This decrease for large S must be due to the fact that already a small increase in preference leads to a substantial fitness increase when plant trait variability is large. In this situation, the benefit of increasing \(\tau\) further is not large and is compensated by the costs of preference. These trends can be seen even more clearly in Fig. 4(c) in Appendix. The other subfigures of this figure show additionally how a change of the parameters that determine the cost of preference affects these trends.

In contrast, the fitness-maximizing preference value increases with S for all three concave downwards performance functions. This means that the herbivore can compensate best for increased plant trait variability by increasing its strength of preference. Nevertheless, the maximum fitness that the herbivore can achieve in this way decreases with increasing plant trait variability.

Analytic calculations with preference

In the previous section, we found that herbivore populations benefit from large nutrient-level variability irrespective of the curvature of the performance function when having considerable preference for leaves with high nutrient level. In order to understand this result and to demonstrate that this finding is generic, we calculate the mean fitness \(\overline{W}_H\) (cp. Eq. (1)) under the assumption that the nutrient-level distribution is narrow. In this case, the preference function \(\Phi _p(n)\) can be Taylor expanded, and for a small preference value \(\tau\) we have

$$\begin{aligned} \Phi _p(n) = \alpha (\tau n +1)\,, \end{aligned}$$
(12)

where \(\alpha\) is a scaling factor. As in the previous section, we use the performance function \(f(n) =an+c n^2\), with the curvature parameter c. We find

$$\begin{aligned} \overline{W}_H= & {} \underbrace{ \lambda _H \alpha }_{q}\Gamma (1-\beta ) \int _0^{n_{\text {max}}}\, \mathrm {d}n\, e^{-\frac{(n-\bar{n})^2}{2 V_S}} \left( an+c n^2 \right) (\tau n +1) \nonumber \\= & {} q\Gamma (1-\beta ) \int _{-\bar{n}}^{\bar{n}}\, \mathrm {d}x\, e^{-bx^2} \left( a(x+\bar{n})+c (x+\bar{n})^2 \right) \left( \tau \left( x+\bar{n}\right) +1\right) \nonumber \\= & {} q(1-\beta ) \left( W_0(\tau \bar{n}+1) + \left( c+ \tau (a+3c\bar{n})\right) I \right) \,, \end{aligned}$$
(13)

where we again defined \(b = \frac{1}{2V_S}\), \(x = n-\bar{n}\), and \(I=\Gamma \int _{-\bar{n}}^{\bar{n}}x^2e^{-bx^2}dx\). The mass loss due to preference \(\beta\) must be proportional to the preference \(\tau\) for small \(\tau\), i.e., \(\beta = \gamma \tau\). Hence, by keeping the leading terms in c and \(\tau\) and simplifying again the integral by sending the integration limits to \(\pm \infty\) so that \(I \rightarrow 1/2b = S/(1-S)\), we obtain

$$\begin{aligned} \overline{W}_H= & {} q\left( W_0(\tau (\bar{n} - \gamma )+1) + (c+ \tau a)I\right) \nonumber \\\simeq & {} q\left( W_0(\tau (\bar{n} - \gamma )+1) + \frac{(c+ \tau a)S}{1-S}\right) \, . \end{aligned}$$
(14)

Consequently, as soon as the herbivore population exhibits some preference (\(\tau > 0\)), the mean fitness \(\overline{W}_H\) increases with increasing nutrient-level variability (i.e., increasing S or decreasing b) when the performance function is linear (i.e., \(c=0\)). This means that the herbivore population benefits from large nutrient-level variability. Furthermore, when we consider a concave downwards performance function \(f_{\text {neg}}\) (i.e., \(c<0\)), the mean fitness increases with increasing variability (i.e., increasing S or decreasing b) when \(|c|< \tau a\). Hence, when \(|c|= \tau a\), herbivore fitness is independent of the trait variability parameter S. This corresponds to the observations from computer simulations shown in the previous section. Again, the result is still valid when the integration limits are finite since \(dI/db < 0\).

Discussion

In the present paper, we proposed a plant–herbivore model that includes herbivore preference and plant nutrient-level variability, and we investigated the impact of these features on herbivore fitness depending on the curvature of the herbivore performance function. Since our model is generic and includes the relevant features in a general and plausible form, it is valid for intra- and inter-individual nutrient-level variability as well as for oviposition preference and feeding preference in the larval stage. The trait variability in our model describes spatial (and not temporal) variation of the nutrient concentration, although several factors that influence nutrient content, such as leaf age, position and exposition to light vary in time as well as in space (Blüthgen and Metzner, 2007; Coley and Barone, 1996). If the nutrient concentration changed considerably during the ontogeny of a herbivore individual, a time-integrated version of our model would be appropriate.

In the context of our modelling framework, we neglected intra- or interspecific competition among herbivores. For most herbivorous insects, this assumption is realistic under many circumstances, given that their biomass and consumption is very small compared to a large amount of plant material except for a few species or outbreaks. Consistent with the ”green world hypothesis“ (Hairston and Smith et al., 1960; Slobodkin and Smith et al., 1967), this suggests that herbivore populations are regulated by predators, plant defenses, or unfavorable weather rather than competition for food. Despite their importance, the present model also neglects these density-limiting factors. Therefore, it only applies to situations where density-limiting factors affect all individuals in the same way, regardless of their specific characteristics. In an accompanying paper (Thiel and Gaschler et al., 2020), we include variation in defenses and predation pressure.

In the case of no herbivore preference (\(\tau = 0\)), we found that the fitness of the herbivore population decreases with increasing plant nutrient-level variability when the herbivore performance function is concave downwards (i.e., decreasing slope, negative curvature), but increases in the case of a concave upwards performance function (i.e., increasing slope, positive curvature). Indeed, this can be shown by a simple analytic calculation. So far, our findings agree with other authors who attribute this effect to Jensen’s inequality (Wetzel and Kharouba et al., 2016; Bolnick and Amarasekare et al., 2011; Ruel and Ayres, 1999).

This calculation shows also that two conditions must be satisfied for the conclusion to be valid: The effect of plant trait variability must be considered at constant mean trait value and the plant trait distribution must be peaked around this mean. These two conditions are satisfied by our model. When mean nutrient concentrations change in addition to the variance, this leads to additional effects (Wetzel and Thaler, 2018).

The straightforward conclusion by Wetzel and Kharouba et al. (2016) and Ruel and Ayres (1999) becomes less convincing when herbivore preference is taken into account. We found that herbivore populations benefit from high nutrient-level variability irrespective of the curvature of the performance function when having a suitable extent of preference for leaves on which their performance is high. The intuitive explanation for these findings is that a herbivore having a sufficiently strong preference can obtain more leaves with higher nutrient level when variability is larger, leading to a fitness increase as long as the cost for preference is not too high. Indeed, this type of herbivore preference is often observed (Via, 1986; Herrera, 2009; Herrera, 2017; Tabashnik and Whellock et al., 1981; Travers-Martin and Müller, 2008; Despres and David et al., 2007; Rausher, 1979; Leyva and Clancy et al., 2003; Lubchenco, 1978; Mody, 2007).

The only exception to these findings is the case where the performance function has a local maximum that coincides with the mean nutrient level, see Fig. 2(d). In this case herbivore fitness decreases with increasing nutrient-level variability irrespective of the extent of preference.

We tested the robustness of our results under changes of the preference mean in order to mirror the case that herbivores cannot assess perfectly leaf quality. We found qualitatively the same results as long as herbivores prefer high-quality leaves (i.e., leaves where herbivore performance is high).

All this means that the relation between the curvature of the herbivore performance function and the effect of nutrient-level variability on herbivore fitness is more complex than previously thought. It requires a closer look at herbivore preference, the effect of which depends on (i) the cost for finding appropriate leaves (s. Fig. 4 in Appendix), (ii) the sign and magnitude of the curvature of the performance function in the relevant trait range (s. Fig. 3 in Appendix), and (iii) the plant nutrient-level variability.

Indeed, empirical studies support these dependencies: They find that more specialized species have a stronger preference for leaves on which their performance is high than more generalized species (Gripenberg abd Mayhew et al., 2010; Tilmon, 2008; Soto and Goenaga et al., 2012). In our model, herbivores that can grow well only on a relatively small nutrient-level interval (because the performance function is concave upwards, or because its curvature is large) are the ones with the larger optimum preference because they benefit most from preference. Some studies find furthermore that the preference to lay eggs on leaves where the offspring performs well is stronger when high-quality resources are rare (Tilmon, 2008), in agreement with our finding that optimal herbivore preference increases with decreasing plant nutrient-level variability when the performance function is concave upwards or linear as long as variability is not too low (which would probably be unrealistic anyway). Additionally, some studies show that herbivores that perform best on the most frequent leaves (i.e., that have a peaked performance function) benefit less from showing preferences than those that perform best on rare leaves (i.e., that have a monotonically increasing performance function) (Tilmon, 2008). This is in agreement with the trends observed in our model.

Our results do not necessarily imply that plant trait variability is a disadvantage for the plant when herbivores can exploit this variability by showing preference for high-nutrient leaves. Plant trait variability may benefit the plant population for reasons independent of the herbivore. For example, Kotowska and Cahill et al. (2010) found that plant genetic diversity increases both plant and herbivore survival and biomass. Furthermore, the increase in plant biomass and survival was found in both the presence and absence of herbivory, whereby the percentage increase was lower in the presence of the herbivore (Kotowska and Cahill et al., 2010). Hence, genetic diversity is beneficial for a plant population for other reasons than herbivory. Due to non-additive effects, the productivity in genetic mixtures is not predictable by the productivity of the corresponding monocultures (i.e., each consisting of a genotype used in the genetic mixtures) (Kotowska and Cahill et al., 2010). For instance, different resource uptake strategies may decrease intraspecific competition in genetic mixtures (Kotowska and Cahill et al., 2010; Crutsinger and Collines et al., 2006).

Additionally, the plant population may benefit from large intraspecific plant trait variability in spite of herbivore preference when different herbivores have preference for different associated traits for instance due to differing specialization strategies (generalist vs. specialist) (Gutbrodt and Dorn et al., 2012) or as a response to drought and associated changes in secondary defense compounds (Gutbrodt and Mody et al. , 2011). In this case the mean preference of these herbivores is low.

To summarize, our study yields conditions for the validity of the hypothesis by Wetzel and Kharouba et al. (2016) that the large plant nutrient-level variability found in nature leads to decreased herbivory since herbivore performance functions typically have a concave downwards curvature. We showed that this is true when the herbivore population has low preference for high-nutrient leaves, when cost for preference is high, or when herbivores perform best on the most frequent leaves. However, when herbivore preference is strong, nutrient-level variability may not per se lead to decreased herbivory. As discussed above, this, however, does not necessarily imply that large nutrient-level variability is a disadvantage for the plant. In order to investigate this issue, a different approach is needed that considers coevolution of plant nutrient-level variability and herbivore preference, and the complex interaction with co-varying traits such as defenses or trade-offs between single macro- and micronutrients.