Math Insight

The dynamics of competition, equal competition

Math 2241, Spring 2023
Name:
ID #:
Due date: Feb. 22, 2023, 11:59 p.m.
Table/group #:
Group members:
Total points: 1
  1. Two species which compete for the same resources may be modeled by the 2D system of differential equations \begin{align*} \diff{a}{t} & = 2 a \left(1-\frac{a+b}{ 1000 }\right)\\ \diff{b}{t} & = b \left(1-\frac{a+b}{ 2000 }\right) \end{align*} with initial conditions $a(0)=a_0$ and $b(0)=b_0$, where $a$ and $b$ are the population sizes of the two species. In this case, species $a$ grows at a rate double that of species $b$ but has only half the carrying capacity. As a first step to determining equilibria, we will calculate the two nullclines, one corresponding to each variable. A nullcline consists of the points $(a,b)$ where one of the variables is not changing, i.e., along which one of the derivatives is zero.
    1. To calculate the $a$-nullcline, set the expression for $\diff{a}{t}$ equal to zero. Write down the equation for the $a$-nullcline.

      Since this equation is the product of two factors equally zero, we can simplify the nullcline into two equations by setting each factor to zero separately. The equations for the two pieces of the nullcline are:

      or

      (If you would like to step through intermediate steps leading to this answer, see the below optional section.)

      Optional steps intermediate steps (Show)
    2. Each of the two equations is an equation for the variables $a$ and $b$ (even though one of the equations does not actually depend on $b$). Therefore, the solution to each equation will be a curve in the $(a,b)$ phase plane. (Actually lines in this case.) Plot the graphs to the two equations using the blue thick lines on the following phase plane. Together, the two lines consist of the $a$-nullcline, the points where the rate of change of $a$ is zero.
      Instructions for using the applet to plot the $a$-nullcline (Show)
      Feedback from applet
      Step 1: nullclines:
      Step 2: equilibria:
      Step 2: number of equilibria:
      Step 3: vector directions in regions:
      Step 3: vector locations in regions:
      Step 4: vector directions on nullclines:
      Step 4: vector locations on nullclines:
      Step 5: initial condition:
      Step 5: solution trajectory end point:
      Step 5: solution trajectory follows vector field:
    3. Repeat the procedure to find the $b$-nullcline. Set the expression for $\diff{b}{t}$ equal to zero. Factor the expression to get two different equations, each of which determines a line in the $(a,b)$ phase plane.

      or
      .

      Together, those two lines are the $b$-nullcline, the points where there rate of change of $b$ is zero. Plot the $b$-nullcline on the above phase plane using the thin dashed green lines.

      Instructions for using the applet to plot the $b$-nullcline (Show)
      Want full credit on this question? (Show)

  2. An equilibrium of a dynamical system is a solution that is constant in time. Since the competition model is a two-dimensional system with two state variables, we require that both $a(t)$ and $b(t)$ must not change at an equilibrium. An equilibrium is a combination $(a,b)$ of the population sizes $a$ and $b$ of each species where both $\diff{a}{t}=0$ and $\diff{b}{t}=0$.

    In the above phase plane, an equilibrium will be a point $(a,b)$ specifying the constant population size of each species. Since $\diff{a}{t}=0$ at that point, the equilibrium must be on the $a$-nullcline. Since $\diff{b}{t}=0$ at that point, the equilibrium must also be on the $b$-nullcline. Therefore, equilibria are the points where the $a$-nullcline and the $b$-nullcline intersect.

    1. Find the equilibria by looking for the intersections of the $a$-nullcline with the $b$-nullcline. (Make sure the equilibria are on lines of both colors.) Draw points at the location of the equilibria on the graph above. In the applet, set step to 2 and increase $n_e$ to reveal points for the equilibria. Drag those points to the locations of the equilibria.
    2. Estimate the values of the equilibria on the graph above. Remember, each equilibrium is a point on the $(a,b)$ plane, so to specify an equilibrium, one needs to specify the value of both $a$ and $b$.

      Equilibria:

      Separate multiple answers by commas. For example, if the two equilibria are $(a,b)=(1,2)$ and $(a,b)=(3,4)$ enter: (1,2), (3,4).

  3. To make it easy to refer to the rates of change, $\diff{a}{t}$ and $\diff{b}{t}$, as functions of the population sizes $a$ and $b$, let's rewrite the dynamical system as \begin{align*} \diff{a}{t} &= f(a,b)\\ \diff{b}{t} &= g(a,b) \end{align*} where we define the two functions of $a$ and $b$: \begin{align*} f(a,b) &= 2 a \left(1-\frac{a+b}{1000}\right)\\ g(a,b) &= b \left(1-\frac{a+b}{2000}\right). \end{align*}

    1. A solution to the dynamical system will give us the population sizes $a(t)$ and $b(t)$ as a function of time. We can view this solution, also called a trajectory of the system, as a point $(a(t),b(t))$ that moves through the phase plane as time $t$ evolves. For a one-dimensional system, we calculated whether the trajectory moved left or right on the phase line. For this two-dimensional system, we want to calculate which direction the trajectory moves in the phase plane.
      Reasoning how the derivatives determine the direction of the trajectory (optional) (Show)

      The direction of movement of the trajectory $(a(t),b(t))$, at the moment it passes through the point $(a,b)$ (for some two numbers $a$ and $b$) depends on the values of $\diff{a}{t}=f(a,b)$ and $\diff{b}{t}=g(a,b)$. We can make the following general observations. (See above optional section for the reasoning. Remember, $a$ is the horizontal direction and $b$ is the vertical direction.)

      1. If $f(a,b)$ is positive and $g(a,b)$ is positive, the trajectory $(a(t),b(t))$ must, at the moment it passes through the point $(a,b)$, be moving
        .
      2. If $f(a,b)$ is negative and $g(a,b)$ is positive, the trajectory $(a(t),b(t))$ must, at the moment it passes through the point $(a,b)$, be moving
        .
      3. If $f(a,b)$ is negative and $g(a,b)$ is negative, the trajectory $(a(t),b(t))$ must, at the moment it passes through the point $(a,b)$, be moving
        .
      4. If $f(a,b)$ is positive and $g(a,b)$ is negative, the trajectory $(a(t),b(t))$ must, at the moment it passes through the point $(a,b)$, be moving
        .
    2. The only place where the sign of $\diff{a}{t}$ can change is where $\diff{a}{t}=$
      , i.e, at the
      . Similarly, the only place where the sign of $\diff{b}{t}$ can change sign is at the
      . Therefore, the only places where the general direction (e.g., upward and to the right) of the solution trajectory $(a(t),b(t))$ can change is at
      .

      The biologically plausible portion of the phase plane is the upper right quadrant where $a \ge 0$ and $b \ge 0$ (as negative population sizes don't make sense). For the nullcline you drew above, the nullclines divide the biologically plausible quadrant of the phase plane into how many regions?
      Within each of those regions, we know $\diff{a}{t} \ne 0$ and $\diff{b}{t} \ne 0$, so the general trajectory direction cannot change. If we are concerned only with the general direction (such as upward and to the right), simply need to determine the signs of $\diff{a}{t}$ and $\diff{b}{t}$) in each region. Then, we can represent that direction by drawing a direction vector. For example, if both $\diff{a}{t}$ and $\diff{b}{t}$ are positive in a region, draw a vector anywhere in that region pointing
      .

      There are a number of approaches you can use to figure out the directions, i.e., the signs of the derivatives. Feel free to use an approach that makes sense to you.

      For example, since you know the sign of $\diff{a}{t}$ can change only at the $a$-nullcline, you can first determine in which regions $\diff{a}{t}$ is positive and in which regions $\diff{a}{t}$ is negative. Then, repeat that process with the $b$-nullcline and to determine the signs $\diff{b}{t}$. Once you have figured out the signs of both derivatives, you can draw the appropriate arrow in each region.

      Another approach is to directly compute sample values of $\diff{a}{t}$ and $\diff{b}{t}$ in each region. Simply choose a point $(a,b)$ in a region, calculate the signs of $f(a,b)$ and $g(a,b)$, and draw the appropriate direction vector. If you like, you can follow the step-by-step directions of the following optional section to do just that.

      Once you determine the direction vectors, draw a representative arrow in each of the regions of the phase plane. The exact location or direction of each vector doesn't matter, only the region and the general direction of the vector. In the applet, increase the step slider to 3, moves the vectors so that there is one in each region, and change their directions to match your calculations.

      Step-by-step procedure to directly compute the directions in each region (optional) (Show)

  4. Next, let's draw what happens to the vector field (the vectors representing the direction of movement) when we are exactly on the nullclines.

    When the point $(a,b)$ is on the $a$-nullcline, then $f(a,b)=$
    . Therefore, can any trajectory passing through the point $(a,b)$ be moving either left or right?
    Instead, the trajectory must be moving directly
    . How do we determine which of those two directions is correct? We must look at the sign of $g(a,b)$. If $g(a,b)$ is positive, then $\diff{b}{t} \gt 0$ while $\diff{a}{t}=0$, so the trajectory most cross the point $(a,b)$ on the $a$-nullcline moving
    . If, on the other hand, $g(a,b)$ is negative, the trajectory must be moving
    .

    Along the $a$-nullcline, determining whether trajectories move straight up or straight down depends on the sign of $\diff{b}{t}$. Where can the sign of $\diff{b}{t}$ change? Only at the
    . Therefore, to determine the direction vectors along the $a$-nullcline, one needs to only look separately at each piece of the $a$-nullcline that is divided by the $b$-nullcline. Along each piece of the nullcline, determine the sign of $\diff{b}{t}=g(a,b)$ and draw and upward or downward arrow accordingly.

    Similarly, along the $b$-nullcline, since $\diff{b}{t}=$
    , trajectories must cross the $b$-nullcline moving either
    . If $f(a,b)$ is positive, then any trajectory crossing the point $(a,b)$ on the $b$-nullcline must move straight
    . If $f(a,b)$ is negative, the trajectory must move straight
    . Since the switch between positive and negative $f(a,b)$ can occur only at the
    , we just need to look at each piece of the $b$-nullcline that is divided by the $a$-nullcline, drawing etiher a leftward or rightward arrow, according to the sign of $\diff{a}{t}$.

    Just as with the direction vectors in the different phase plane regions, there are multiple methods for determining the correct direction vectors to draw on the nullcline. You simply must determine the sign of $\diff{b}{t}$ on each segment of the $a$-nullcline and the sign of $\diff{a}{t}$ on each segment of the $b$-nullcline. You may have done this already in the previous question. You can also directly compute $g(a,b)$ at points along the $a$-nullcline and directly compute $f(a,b)$ at points along the $b$-nullcline. If you like, you can follow the below optional section for a step-by-step procedure of doing these calculations. (It may also help you gain more intuition on how the nullclines work.)

    Once you have determined the directions that trajectories must cross each nullcline segment, draw corresponding direction vectors at representative points on the nullclines. You need only consider those segments in the biologically plausible quadrant of the phase plane (with $a \ge 0$ and $b \ge 0$). Change the step slider to 4 on the applet, move the vectors to different nullcline segments, and point them in the correct directions. (The applet has you draw at least one vector on each line comprising the nullclines, even if the direction is the same as the neighboring line.)

    Step-by-step procedure to directly compute the directions along the nullclines (optional) (Show)

  5. With the guidance of the representative arrows in the phase plane (the “vector field”), we can estimate the solution to the competition dynamical system for the initial condition $(a_0,b_0)=(400,100).$
    1. Imagine that one started with $a(0)=400$ of species $a$ and $b(0)=100$ of species $b$. Locate the point $(a,b)=(400,100)$ in the above phase plane and draw a point at this location. (In the applet, move the step slider to 5 and move the large green point that appears to the initial condition.)

      In the region containing this point, what is the general direction of movement of $(a(t),b(t))$?

      Draw a short curve starting at the point moving in that direction. This short curve is the beginning of the trajectory $(a(t),b(t))$ with initial condition $(a,b)=(400,100)$. (In the applet, move the small cyan point connected to the green point so that the first line segment points in the correct direction.)

    2. If $(a(t),b(t))$ continues to move in that direction, it should run into the $a$-nullcline, i.e., the branch where $a+b=1000$. When $(a(t),b(t))$ hits this part of the $a$-nullcline, what direction must it move?
      Continue the curve you started drawing from $(a,b)=(400,100)$. As the curve approaches the $a$-nullcline, it should move more steeply
      so that, at the point it hits the $a$-nullcline, it is moving vertically
      .

      Note that the direction of the trajectory when crossing the nullcline must match the direction of the arrow you drew on that branch of the nullcline.

    3. Once the point $(a(t),b(t))$ crosses the $a$-nullcline, it is in a new region. In this region, what direction is it moving?
      Draw the curve a little past the $a$-nullcline, curving it in this direction.
    4. Now the point $(a(t),b(t))$ is in a region bounded below by the $a$-nullcline and bounded on the right by the $b$-nullcline. Given the direction of the arrows on the $b$-nullcline, can it cross the $b$-nullcline?
      Given the direction of the arrows on the $a$-nullcline, can it cross the $a$-nullcline?
      The only option is for the curve to go to the equilibrium at the intersection of the nullclines. Finish drawing the curve, ending it at the equilibrium.
    5. What is the value of the equilibrium? $(a,b)=$
      Given that the solution approaches that equilibrium for large time, what will be the longterm population sizes of species $a$ and $b$ if we start with the initial conditions of 400 of species $a$ and 100 of species $b$? After a long time $a(t)$ will head to
      and $b(t)$ will head toward
      . Who won the competition?
    6. You sketched the solution curve $(a(t),b(t))$ (often called the solution trajectory) in the phase plane. We can also sketch the solution versus time. When following the curve, what happens to the population size $a(t)$ of species a? It starts at $a(0)=400$. Does it always increase, increase then decrease, always decrease, or decrease then increase? The populations size of species $a$
      . Eventually the population sizes approaches the value
      . On the first axes, below, sketch a curve that is consistent with this information.

      What about population $b(t)$? It starts at $b(0)=100$. How does $b(t)$ evolve? Does it always increase, increase then decrease, always decrease, or decrease then increase? The population size of species $b$
      and eventually approaches the value
      . On the second axes, below, sketch a curve that is consistent with this information.

      Feedback from applet
      correct shapes:
      final values:
      initial conditions:

  6. Verify these results by simulating the dynamical system in R. First, download the R script run_competition.R and execute it in an R command shell. (One way to execute the file is to enter source("run_competition.R") when you are in the directory where you saved the file.) Once you run the script file once, it will define the function run_competition, which you can use to simulation the competition model. (We assume that you already have the R package deSolve installed on your computer.)

    The script automatically plots the results of the simulation versus time. It also plots the trajectory on the phase plane with nullclines. For example, to simulate the model with parameters $r_1=0.6$, $r_2=0.8$, $K_1=650$, $K_2=500$ and the initial condition $(a,b) = (100,600)$, enter the command:
    results=run_competition(r1=0.6, r2=0.8, K1=650, K2=500, p10=100,p20=600) (In the figures, population $a$ is shown as $p_1$ and population $b$ as $p_2$.)

    If you run the simulation with the above parameters, you can test yourself on how well you understand the phase plane by running it with different initial conditions. (Ideally, you should try to predict the results from the phase plane before running the simulation.)