Math Insight

The logistic growth model

Math 2241, Spring 2016
Name:
ID #:
Due date:
Table/group #:
Group members:
  1. Let $p(t)$ be the population size of a herd of elk in a forest, which can sustain at most a population of $K$ elk. The variable $t$ denotes time in years. We model the dynamics of the elk population with a logistic growth equation \begin{align*} \diff{p}{t} &= rp\left(1-\frac{p}{K}\right)\\ p(0) &= p_0 \end{align*} where $r$ is the low-density growth rate of the population, which specifies how fast the population would grow when the population size is small. The growth rate slows down as the population size gets closer to $K$, which is called the carrying capacity. The quantity $p_0$ is called the initial condition, as it specifies the population size that we start with.

    We will explore how to use the program R to simulate the dynamics of the elk population. We assume that you already have R and the R package deSolve installed on your computer.

    1. Download the R script run_logistic.R and execute it in an R command shell. (One way to execute the file is to enter source("run_logistic.R") when you are in the directory where you saved the file.) Once you have run the script file, it will have defined the function run_logistic, which will simulate the above logistic model.

      To check if it worked, simulate the logistic model with parameters $r=0.1$ and $K=5000$. Simulate it starting with many different initial conditions $p_0 \ge 0$, including some smaller and larger than $5000$. For example, to simulate it with initial condition $p_0=100$, run the commands

      results = run_logistic(r=0.1, K=5000, p0=100)
      plot(results)

      which save the results to the variable results and then plot a graph of the population size versus time. (See comments at beginning of script for more details on how to run it as well as how to look at the output results.)

      You should find that for most initial conditions $p_0 \ge 0$, the population size approaches the same value for large $t$. (Depending on the initial condition you choose, you may need to increase tmax beyond 100 to see the value, for example, by adding tmax=400 to your call of run_logistic.)

      Summarize your results.
      As long as $p_0 >$
      , the population size approaches
      .
      If we start with $p_0=$
      , then the population size stays at
      .
      The latter result makes sense because
      .

      The former result, though, might make you wonder. If you start with a population that contains one-tenth of one elk, i.e., with $p_0=0.1$, what does the logistic model predict should happen to the elk population?

      (Although we might be uncomfortable with the results when starting with $p_0=0.1$, in general, don't worry about having fractions of elks, such as 102.3 elk. Allowing fractional population sizes just makes the math easier.)

    2. If $r=0.1$ and $K=5000$, and the initial population size is $p_0=100$, how long does it take for the population to reach $p(t)=4000$ elk?
      years. (Your answer should be within 1 year of the correct answer; examine the output of the simulation to determine correct time. If needed, you can specify a value of nt in your call of run_logistic to increase the number of points where it displays the results.)

      If you increase $r$ to 0.2, how long does it take for the population to reach 4000 elk?
      years.

      If you leave $r$ at $0.1$ but increase $K$ to 10000 and start with $p_0=200$, how long does it take for the population to reach 8000 elk?
      years.

  2. The equilibria of a differential equation, $\diff{x}{t} = f(x)$, are constant solutions, $x(t)=$ a constant. Since the derivative $\diff{x}{t}$ is the rate of change of $x(t)$, we need $\diff{x}{t}$ to be zero at an equilibrium. Hence, to find an equilibrium, we set $\diff{x}{t}$ to zero and solve for $x$, i.e., we set $f(x)=0$ and solve for $x$.

    We'll find equilibria for the logistic model, only we'll use $p$ rather than $x$.

    1. To find the equilibria of the logistic growth model with $r=0.1$ and $K=5000$, i.e., $$\diff{p}{t} = 0.1 p \left(1 - \frac{p}{5000}\right),$$ we set $\diff{p}{t}=0$, i.e., we set
      $= 0$.

      The above equation for the equilibria should be a product of three factors set equal to zero. One of them should be 0.1. Divide both sides of the equation by 0.1 so that you have the product of just two factors equal to zero.
      $= 0$.

      Since a product of two factors is zero, you know one of those two factors must be zero, i.e.,

      $=0$ or
      $=0$.

      We therefore have two equilibria $p=$
      . (Enter in increasing order, separated by commas.)

      We often denote these equilibria by $p_{e}$. We could rewrite your above answer to state that the equilibria are $$p_{e} = _.$$

    2. Simulate the logistic equation $\diff{p}{t} = 0.1 p \left(1 - \frac{p}{5000}\right)$ in R using the program run_logistic with initial condition $p_0$ set to each of the equilibrium values you calculated above. For either of the initial conditions, the plot of $p(t)$ versus time $t$ looks like
      , which means that the solution was
      .
    3. The two equilibria, however, have quite different properties. Let's start with the second equilibrium, the larger one, which is $p_e = $
      . Simulate the logistic model with initial conditions slightly smaller and slightly larger than this second equilibrium. What does the solution do?

      If whenever you start at nearby initial conditions, the solution moves toward an equilibrium, we say the equilibrium is stable. If when starting at some nearby initial conditions, the solution moves away from the equilibrium, we say the equilibrium is unstable. The larger equilibrium of the logistic model is
      .

    4. The first equilbrium, $p_e=$
      , though, has different properties. Simulate the logistic model with initial conditions slightly larger than the smaller equilibrium. What does the solution do?
      (You can also simulate it with initial conditions smaller than the smaller equilibrium, but you'll probably get an error message. If you set tmax to something small like tmax=20 it should work. The problem is that the solution blows up all the way to $-\infty$, i.e., has a vertical asymptote, and the computer can't compute the solution.)

      The smaller equilibrium of the logistic model is
      .

    5. We can repeat the procedure to find the equilibria of the logistic growth model with general parameters $r$ and $K$, i.e., $$\diff{p}{t} =r p \left(1 - \frac{p}{K}\right).$$ To find the equilibria, we set $\diff{p}{t}=0$, i.e., we set
      $= 0$.

      The above equation for the equilibria should be a product of three factors set equal to zero. Since we assume $r \ne 0$, you can divide both sides of the equation by $r$ so that you have the product of just two factors equal to zero.
      $= 0$.

      Since a product of two factors is zero, you know one of those two factors must be zero, i.e.,

      $=0$ or
      $=0$.

      We therefore have two equilibria $p_{eq}=$
      . (Enter in increasing order, separated by commas. The carrying capacity $K$ is a positive number.)

      Since we can't simulate the equation in R with general parameters $r$ and $K$, we can't use simulations to determine stability (though you could get a pretty good guess by simulating for many different values of $r$ and $K$). Instead, we need to determine stability analytically just from the equations.

  3. To determine the stability of an equilibrium $x_e$ of the differential equation $\diff{x}{t} = f(x)$, the stability theorem says we have to look at the derivative of $f(x)$ evaluated at the equilibrium. If $f'(x_e)<0$, then the equilibrium is stable. If $f'(x_e)>0$, the equilibrium is unstable.

    We'll calculate the stability of the equilibria of the logistic model, where the state variable is $p$.

    1. As with the previous problem, we start with the logistic growth model with $r=0.1$ and $K=5000$, i.e., $$\diff{p}{t} = 0.1 p \left(1 - \frac{p}{5000}\right).$$ The equilibria are $p_e= $
      (enter in increasing order, separated by commas).

      To apply the stability theorem, we must calculate the derivative of what function $f(p)$?
      $f(p) = $

      Calculate the derivative of that function.
      $f'(p) = $

      Evaluate the function at the equilibria to determine their stability.
      For the first equilibrium $f'(p_e) = f'($
      $)= $

      Since $f'(p_e)$

      , the equilibrium $p_e=$
      is
      .

      For the second equilibrium $f'(p_e) = f'($
      $)= $

      Since $f'(p_e)$

      , the equilibrium $p_e=$
      is
      .

    2. Now we can calculate the stability of the equilibria of the logistic equation even with general parameters $r$ and $K$. Both $r$ and $K$ are positive numbers. $$\diff{p}{t} =r p \left(1 - \frac{p}{K}\right).$$ The equilibria are $p_e=$
      . (Enter in increasing order, separated by commas.)

      To apply the stability theorem, we must calculate the derivative of what function $f(p)$?
      $f(p) = $

      Calculate the derivative of that function.
      $f'(p) = $

      Evaluate the function at the equilibria to determine their stability.
      For the first equilibrium $f'(p_e) = f'($
      $)= $

      Since $f'(p_e)$

      , the equilibrium $p_e=$
      is
      .

      For the second equilibrium $f'(p_e) = f'($
      $)= $

      Since $f'(p_e)$

      , the equilibrium $p_e=$
      is
      .