Skip to main content
Mathematics LibreTexts

7.4: Optimal Foraging

  • Page ID
    121121
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    \( \newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\)

    ( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\)

    \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

    \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\)

    \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)

    \( \newcommand{\Span}{\mathrm{span}}\)

    \( \newcommand{\id}{\mathrm{id}}\)

    \( \newcommand{\Span}{\mathrm{span}}\)

    \( \newcommand{\kernel}{\mathrm{null}\,}\)

    \( \newcommand{\range}{\mathrm{range}\,}\)

    \( \newcommand{\RealPart}{\mathrm{Re}}\)

    \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

    \( \newcommand{\Argument}{\mathrm{Arg}}\)

    \( \newcommand{\norm}[1]{\| #1 \|}\)

    \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)

    \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    \( \newcommand{\vectorA}[1]{\vec{#1}}      % arrow\)

    \( \newcommand{\vectorAt}[1]{\vec{\text{#1}}}      % arrow\)

    \( \newcommand{\vectorB}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vectorC}[1]{\textbf{#1}} \)

    \( \newcommand{\vectorD}[1]{\overrightarrow{#1}} \)

    \( \newcommand{\vectorDt}[1]{\overrightarrow{\text{#1}}} \)

    \( \newcommand{\vectE}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash{\mathbf {#1}}}} \)

    \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    Learning Objectives
    1. Explain the development of a simple model for an animal foraging (collecting food to gain energy) in a food patch.
    2. Interpret graphs of the rate of energy gain in various food patches, and explain the distinctions between types of food patches.
    3. Determine how long to spend foraging in a food patch in order to optimize the average rate of energy gain per unit time.

    Animals spend much of their time foraging - searching for food. Time is limited, since when the sun goes down, the risk of becoming food (to a predator) increases, and the likelihood of finding food decreases. Individuals who are most successful at finding food over that limited time have the greatest chance of surviving. It is argued by biologists that evolution tends to optimize animal behavior by selecting those that are faster, stronger, or more fit, or - in this case - most efficient at finding food.

    In this section, we investigate a model for optimal foraging. We follow the basic principles of [Stephens and Krebs, 1986] and [Charnov, 1976].

    clipboard_ed18d70167d0b8bc397d0e75be3b8b88d.png
    Figure 7.6: A bird travels daily to forage in a food patch. We want to determine how long it should stay in the patch to optimize its overall average energy gain per unit time.

    Notation. We define the following notation:

    • \(\tau=\) travel time between nest and food patch (this is considered to be time that is unavoidably wasted).
    • \(t=\) residence time in the patch (i.e. how long to spend foraging in one patch), also called foraging time,
    • \(f(t)=\) total energy gained by foraging in a patch for time \(t\).

    Energy gain in food patches. In some patches, food is ample and found quickly, while in others, it takes time and effort to obtain. The typical time needed to find food is reflected by various energy gain functions \(f(t)\) shown in Figure 7.7.

    clipboard_e438e446ec668fd2a38332acb2c7779b5.png
    Figure 7.7: Examples of various total energy gain \(f(t)\) for a given foraging time \(t\). The shapes of these functions determine how hard or easy it is to extract food from a food patch.
    Example 7.6 (Energy gain versus patch residence time)

    For each panel in Figure 7.7, explain what the graph of the total energy gain \(f(t)\) is saying about the type of food patch: how easy or hard is it to find food?

    Solution

    The types of food patches are as follows:

    1. The energy gain is linearly proportional to time spent in the patch. In this case, the patch has so much food that it is never depleted. It would make sense to stay in such a patch for as long as possible.
    2. Energy gain is independent of time spent. The animal gets the full quantity as soon as it gets to the patch.
    3. Food is gradually depleted, (the total energy gain levels off to some constant as \(t\) increases). There is "diminishing return" for staying longer, suggesting that it is best not to stay too long.
    4. The reward for staying longer in this patch increases: the net energy gain is concave up \(\left(f^{\prime \prime}(t)>0\right)\), so its slope is increasing.
    5. It takes time to begin to gain energy. After some time, the gain increases, but eventually, the patch is depleted.
    6. Staying too long in such a patch is disadvantageous, resulting in net loss of energy. It is important to leave this patch early enough to avoid that loss.
    Mastered Material Check
    1. Which of the energy gain functions in Figure \(7.7\) are strictly increasing?
    Mastered Material Check
    1. Which model(s) can you automatically dismiss as not very biologically realistic?
    Example 7.7

    Consider the hypothetical patch energy function

    \[f(t)=\frac{E_{\text {max }} t}{k+t} \quad \text { where } \quad E_{\max }, k>0 \text {, are constants. } \]

    1. Match this function to one of the panels in Figure 7.7.
    2. Interpret the meanings of the constants \(E_{\text {max }}, k\).
    Solution

    a) The function resembles Michaelis-Menten kinetics (Figure 1.8). In Figure 7.7, Panel (3) is the closest match.

    b) From Chapter 1, \(E_{\max }\) is the horizontal asymptote, corresponding to an upper bound for the total amount of energy that can be extracted from the patch. The parameter \(k\) has units of time and controls the steepness of the function. Foraging for a time \(t=k\), leads the animal to obtain half of the total available energy, since \(f(k)=E_{\max } / 2\) (Exercise 27(a)).

    Example 7.8

    We can assume that animals try to maximize the average energy gain per unit time, defined by the ratio:

    \[R(t)=\frac{\text { Total energy gained }}{\text { total time spent }}, \nonumber \]

    Write down \(R(t)\) for the assumed patch energy function Equation 7.6.

    Solution

    The ’total time spent’ is a sum of the fixed amount of time \(\tau\) traveling, and time \(t\) foraging. The ’total energy gained’ is \(f(t)\). Thus, for the patch function \(f(t)\) assumed in Equation (7.6),

    \[R(t)=\frac{f(t)}{(\tau+t)}=\frac{E_{\max } t}{(k+t)(\tau+t)} \]

    We can now state the mathematical problem:

    Find the time \(t\) that maximizes \(R(t)\)

    In finding such a \(t\) we are determining the optimal residence time.

    Example 7.9

    Use tools of calculus and curve-sketching to find and classify the critical points of \(R(t)\) in Equation (7.7).

    Solution

    We first sketch \(R(t)\), focusing on \(t>0\) for biological relevance.

    • For \(t \approx 0\), we have \(R(t) \approx\left(E_{\max } / k \tau\right) t\), which is a linearly increasing function.
    • As \(t \rightarrow \infty, R(t) \rightarrow E_{\max } t / t^{2} \rightarrow 0\), so the graph eventually decreases to zero.
    clipboard_e8b71a0d6273137360259cf5f60d9cc28.png
    Figure 7.8: In Example \(7.9\) we first compose a rough sketch of the average rate of energy gain \(R(t)\) in Equation (7.7). The graph is linear near the origin, and decays to zero at large \(t\).

    These two conclusions are shown in Figure \(7.8\) (left panel), and strongly suggest that there should be a local maximum in the range \(0<t<\infty\), as shown in the right panel of Fig 7.8. Since the function is continuous for \(t>0\), this sketch verifies that there is a local maximum for some positive \(t\) value. To find a local maximum, we compute \(R^{\prime}(t)\) using the quotient rule (Exercise 27c), and set \(R^{\prime}(t)=0\) :

    \[R^{\prime}(t)=E_{\max } \frac{k \tau-t^{2}}{(k+t)^{2}(\tau+t)^{2}}=0 \]

    This can only be satisfied if the numerator is zero, that is

    \[k \tau-t^{2}=0 \quad \Rightarrow \quad t_{1,2}=\pm \sqrt{k \tau} . \nonumber \]

    Rejecting the (irrelevant) negative root, we deduce that the critical point of the function \(R(t)\) is \(t_{c r i t}=\sqrt{k \tau}\). The sketch in Figure 7.8, verifies that this critical point is a local maximum.

    Mastered Material Check
    1. What units might be used in the function \(R(t)\) ?
    Example 7.10

    For practice, use one of the calculus tests for critical points to show that \(t_{\text {crit }}=\sqrt{k \tau}\) is a local maximum for the function \(R(t)\) in Equation (7.7).

    Solution

    \(R(t)\) is a rational function, so a second derivative is messy. Instead, we apply the first derivative test (Section 6.2), that is, we check the sign of \(R^{\prime}(t)\) on both sides of the critical point.

    • Equation (7.8) gives \(R^{\prime}(t)\). Its denominator is positive, so the sign of \(R^{\prime}(t)\) is determined by its numerator, \(\left(k \tau-t^{2}\right)\).
    • Thus, \(R^{\prime}(t)>0\) for \(t<t_{\text {crit }}\), and \(R^{\prime}(t)<0\) for \(t>t_{\text {crit }}\).

    This confirms that the function increases up to the critical point and decreases afterwards, so the critical point is a local maximum, henceforth denoted \(t_{\max }\).

    To optimize the average rate of energy gain, \(R(t)\), we found that the animal should stay in the patch for a duration of \(t=t_{\max }=\sqrt{k \tau}\).

    Example 7.11

    Determine the average rate of energy gain at this optimal patch residence time, i.e. find the maximal average rate of energy gain.

    Solution

    Computing \(R(t)\) for \(t=t_{\max }=\sqrt{k \tau}\), we find that

    \[R\left(t_{\max }\right)=\frac{E_{\max } t_{\max }}{\left(k+t_{\max }\right)\left(\tau+t_{\max }\right)}=\frac{E_{\max }}{\tau} \frac{1}{(1+\sqrt{k / \tau})^{2}} \]

    The reader is asked to fill in the steps for this calculation in Exercise 27(d).

    In Appendix G.5, we extend this example by considering a more general problem. Geometric arguments play a key role in that discussion.

    Mastered Material Check
    1. Given \(t_{\max }\) is the duration of time an animal should stay in a patch, and \(\tau\) is travelling time, explain why the constant \(k\) is also in units of time.

    This page titled 7.4: Optimal Foraging is shared under a CC BY-NC-SA 4.0 license and was authored, remixed, and/or curated by Leah Edelstein-Keshet via source content that was edited to the style and standards of the LibreTexts platform; a detailed edit history is available upon request.

    • Was this article helpful?