# Math Insight

### The dynamics of competition

Elementary dynamical systems
Name:
ID #:
Due date:
Table/group #:
Group members:
Total points: 3
1. Feedback from applet
vectors:
As a warm up, practice drawing vectors.

Plot each of the following vectors on the axes to the right. Draw an arrow starting at the origin that extends horizontally an amount equal to the first entry and vertically an amount equal to the second entry.

$\left ( 1, \quad 2\right )$, $\left ( 1, \quad - \frac{1}{2}\right )$, $\left ( -1, \quad 1\right )$, $\left ( 0, \quad 1\right )$, $\left ( \frac{3}{2}, \quad 0\right )$, $\left ( 0, \quad - \frac{1}{2}\right )$, $\left ( -2, \quad 0\right )$, $\left ( -2, \quad - \frac{3}{2}\right )$

2. 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.
$=0$
2. Ignoring the factor of 2 (if you didn't drop it already from the above equation), the above equation should be the product of two factors equal to zero. If this product is zero, one of those factors must be zero. Write down the equations for those factors being zero, entering the simplest one first.

$= 0$ or
$=0$

You can simplify the second factor by adding a term to both sides and multiplying by 1000. Therefore, the equations for the $a$-nullcline are:

$= 0$ or
$=1000$

3. Each of the two equations is an equation for the variables $a$ and $b$ (even though one of the equations will 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 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.
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:
4. 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. Write the simplest of these two equations first:

$=0$ or
$= 2000$.

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. Use a different color or shading to clearly distinguish which two lines are the $a$-nullcline and which are the $b$-nullcline.

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 $f(a,b) = 2 a (1-(a+b)/1000)$ and $g(a,b)= b (1-(a+b)/2000)$.

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.

The rates of change $\diff{a}{t}$ and $\diff{b}{t}$ control the direction $(a(t),b(t))$. In the above phase plane, $a$ is the
direction, so $\diff{a}{t}$ controls whether the point $(a(t),b(t))$ moves
. If, at a particular time $t$, $\diff{a}{t}$ is positive, $a(t)$ is
; the point $(a(t),b(t))$ must moving in a
direction at that moment $t$. If, on the other hand, $\diff{a}{t}$ were negative, $a(t)$ would be moving
.

The sign of $\diff{b}{t}$ will control if $(a(t),b(t))$ is moving
since $b$ is the
axis in the above phase plane.

Putting this together, we can conclude:

1. if $\diff{a}{t}$ is positive and $\diff{b}{t}$ is positive, the trajectory $(a(t),b(t))$ must, at that moment, be moving
.
2. if $\diff{a}{t}$ is negative and $\diff{b}{t}$ is positive, the trajectory $(a(t),b(t))$ must, at that moment, be moving
.
3. if $\diff{a}{t}$ is negative and $\diff{b}{t}$ is negative, the trajectory $(a(t),b(t))$ must, at that moment, be moving
.
4. if $\diff{a}{t}$ is positive and $\diff{b}{t}$ is negative, the trajectory $(a(t),b(t))$ must, at that moment, be moving
.
2. Imagine that at some time $t$, the population sizes were $a(t)=300$ and $b(t)=400$. This means that the state of the system would be the point $(a(t),b(t))=(300,400)$ on the phase plane. Given those values of the state variables calculate $\diff{a}{t}$ and $\diff{b}{t}$. To do so, we just plug in the values of $a$ and $b$ into the functions $f(a,b)$ and $g(a,b)$, above, that give $\diff{a}{t}$ and $\diff{b}{t}$.

$\diff{a}{t} = f(300,400) =$

$\diff{b}{t} = g(300,400) =$

Therefore, at any moment when $(a(t),b(t)) = (300,400)$, the trajectory $(a(t),b(t))$ must be moving
. Draw a vector in the above phase plane with tail at $(300,400)$ pointing in the proper direction. (We don't care about the exact direction; it just needs to be pointing correctly upward or downward and correctly leftward or rightward.)

3. The point $(a,b)=(300,400)$ is in the lower left corner of the phase plane, above the $b$-nullcline branch $b=0$, to the right of the $a$-nullcline branch $a=0$, and below the $a$-nullcline branch $a+b=1000$. Pick another point $(a,b)$ that is in that same region. In other words, both $a$ and $b$ must be positive, and $a+b$ must be less than 1000. For that point $(a,b)$, calculate $\diff{a}{t}=f(a,b)$ and $\diff{b}{t}=g(a,b)$. For that value of $(a,b)$, $\diff{a}{t}$ is
and $\diff{b}{t}$ is
. Therefore, a trajectory that moves through your chosen point must be moving
.

In fact, since $\diff{a}{t}$ is zero only at the $a$-nullcline, the sign of $\diff{a}{t}$ cannot change except when we cross the $a$-nullcline. Since $\diff{b}{t}$ is zero only at the $b$-nullcline, the sign of $\diff{b}{t}$ cannot change except when we cross the $b$-nullcline. Everywhere in this lower left region bounded by the nullclines, $\diff{a}{t}$ must be
and $\diff{b}{t}$ must be
and all trajectories must move
.

4. Next consider a point $(a,b)$ between the $a+b=1000$ branch of the $a$-nullcline and the $a+b=2000$ branch of the $b$-nullcline (and with positive values of $a$ and $b$). Let's pick $(a,b)=(700,600)$, but you'd get the same sign of $\diff{a}{t}$ and $\diff{b}{t}$ for any point $(a,b)$ with $1000 \lt a+b \lt 2000$ (and positive values of $a$ and $b$). At this point $\diff{a}{t} =f(700,600) =$
and $\diff{b}{t} = g(700,600)=$
. Since $\diff{a}{t}$ is
and $\diff{b}{t}$ is
, a trajectory moving through the point $(a,b)=(700,600)$ must be moving
. You should get the same conclusion for any other point in the same region.

On the above phase plane, draw a vector in the region between $a+b=1000$ and $a+b=2000$ (and positive values of $a$ and $b$) pointing in the appropriate direction.

5. Lastly, consider the upper right region, where $a+b > 2000$ (and $a$ and $b$ are positive). Pick a point $(a,b)$ in the region, calculate $\diff{a}{t}=f(a,b)$ and $\diff{b}{t}=g(a,b)$. You should find that $\diff{a}{t}$ is
and $\diff{b}{t}$ is
. Therefore, in that third region, trajectories should move
. Draw a vector in that region pointing the correct direction.

4. 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.
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).

5. Next, let's draw what happens to the vector field (the vectors representing the direction of movement) when we are exactly on the nullclines.
1. Calculate $f(800,200) =$
This means that, if at time $t$, species $a$ population size is $a(t)=800$ and species $b$ population size is $b(t)=200$, then the rate of change in population $a$ is $\diff{a}{t}=$
. At that particular moment, the population size is of species $a$ is
.

On the other hand, if $a(t)=800$ and $b(t)=200$, what is the rate of change in population $b$? $\diff{b}{t}=g(800,200) =$
. At that particular moment, the population size of species $b$ is
.

Notice that the point $(800, 200)$ is on the $a$ nullcline and it is not on the $b$-nullcline. This means you didn't need to calculate $\diff{a}{t}$ but could know immediate that it was
. On the other hand, you could know immediately $\diff{b}{t}$ was not zero.

What you cannot see directly from the nullclines is whether $b$ is increasing or $b$ is decreasing at the point $(800,200)$. So, you didn't waste your time calculating $g(800,200)$. To understand the behavior of the population size $a(t)$ and $b(t)$ at $(a,b)=(800,200)$, though, all we really care about is the sign of $g(800,200)$ so that we could conclude that $b$ is
.

When $(a(t),b(t))=(800,200)$ what direction is the point $(a(t),b(t))$ moving in the phase plane? Since the point is on the $a$-nullcline, $a(t)$ is not changing; $(a(t),b(t))$ cannot move
. Instead, it can only move
. Since $\diff{b}{t}$ is
, the direction the point $(a(t),b(t))$ must be moving is
. To represent this fact, draw a vector pointing
at the point $(800,200)$ on the above phase plane.

2. Pick another point $(a,b)$ on the same branch of the $a$-nullcline. The values of $a$ and $b$ don't matter, as long as $a+b=1000$ and both $a$ and $b$ are positive. Calculate $f(a,b)$ and $g(a,b)$. For that point $(a,b)$, $\diff{a}{t}=f(a,b) =$
and $\diff{b}{t}=g(a,b)$ is
. The population size $a(t)$ is
and the population size $b(t)$ is
. When the solution $(a(t),b(t))$ of the dynamical system passes through the point $(a,b)$ that you chose, the solution $(a(t),b(t))$ must be moving
.

3. Another branch of the $a$-nullcline is the line $a=0$. We know if we plug $a=0$ into the expression for $\diff{a}{t}$, i.e., into the function $f(a,b)$, we get $f(0,b)=$
. What happens if we plug $a=0$ into the expression for $\diff{b}{t}$, i.e., input $g(a,b)$? Calculate an expression for $g(0,b)$, which will still be in terms of $b$. $g(0,b) =$
.

Let's try a couple values of $b$. First try $b=1900$: $g(0,1900) =$
. Since this value is
, $b(t)$ must be
. Since we already calculated that $\diff{a}{t}=$
, we know that the trajectory at $(a,b)=(0,1900)$ must move
.

For the second value, let's increase $b$ slightly to $b=2100$: $g(0,2100) =$
. Since this value is
, $b(t)$ must be
. The trajectory at $(a,b)=(0,2100)$ switched to moving
.

What happened when we moved from $b=1900$ to $b=2100$? We are working on the $a$-nullcline, and, when moving from $b=1900$ to $b=2100$ on the $a$-nullcline, we crossed the
, i.e., the curve where $\diff{b}{t}=0$. Only when crossing that curve, can the sign of $\diff{b}{t}$ switch.

You can also read the fact that $\diff{b}{t}$ switches sign this directly from your expression for $\diff{b}{t}$. Along the $a=0$ branch of the $a$-nullcline, $\diff{b}{t}=g(0,b)$, which you calculated above. This expression is
for $0 \lt b \lt$
and becomes
for $b \gt$
.

To document the fact that $a$ is not changing and $b$ is either increasing or decreasing, draw a vector
on the part of the $a$-nullcline where $a=0$ and $0 \lt b \lt 2000$. Draw a vector pointing
on the $a$-nullcline where $a=0$ and $b \gt 2000$.

4. There is one more branch of the $a$-nullcline, the line $a+b=1000$. Since it is the $a$-nullcline, we immediately know that trajectories that cross it can only move
, as $a$ is not changing. As long as $a>0$ and $b>0$, this branch of the $a$-nullcline does not cross the $b$-nullcline. Therefore, the sign of $\diff{b}{t}$ cannot change and we need only test a single point to determine the direction. Pick a point $(a,b)$ with $a+b=1000$ (and positive values of $a$ and $b$). At that point $\diff{a}{t}=$
and $\diff{b}{t}$ is
. To represent this information draw a vector on that branch of the nullcline pointing
.
5. Repeat this process for the $b$-nullcline. Since $\diff{b}{t}=0$ for points on the $b$-nullcline, there can be no vertical movement along the $b$-nullcline. Instead, any trajectory $(a(t),b(t))$ must cross on the $b$-nullcline moving
. This horizontal movement can change from leftward to rightward movement only at the
. The $b=0$ branch of the $b$-nullcline is cut into two pieces by the $a$-nullcline (we don't care about negative values of $a$ or $b$). So, you need to test two points, one on each side, to determine the sign of $\diff{a}{t}$. The $a+b=2000$ branch of the $b$ nullcline has only one piece that we care about, so just test one point there. Draw three arrows at the locations you tested to show the direction of movement at the different pieces of the $b$-nullcline.

6. 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 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)$.
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$
down to zero. 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 approaches the value 2000. On the second axes, below, sketch a curve that is consistent with this information.