Competitive exclusion in a two-species model
Nullclines, eigenvectors and the geometry of ecological competition
Two populations can each sustain themselves in isolation and still fail to coexist stably when they compete for the same resource. I explored that distinction through a coupled model of baboons and dassies, working from the equations to fixed points, local flow and a phase-plane interpretation.
The model has four equilibria. Two represent single-species survival, one represents extinction, and one represents coexistence. The coexistence equilibrium turns out to be a saddle. That changes the question from “where can both populations remain constant?” to “which initial conditions lead towards each long-term outcome?”
Starting with the model
I studied
\[ \dot B=B(2-B-D),\qquad \dot D=D(3-2B-D), \tag{1}\]
where \(B\) and \(D\) measure the populations in thousands.
Removing the dassies gives
\[ \dot B=2B-B^2=B(2-B). \]
The nonzero equilibrium is \(B=2\), corresponding to 2,000 baboons. Similarly, in the absence of baboons,
\[ \dot D=3D-D^2=D(3-D), \]
so the nonzero equilibrium is \(D=3\), or 3,000 dassies.
The coupled model adds the competition terms \(-BD\) and \(-2BD\). In the chosen equations, the cross-effect on dassie growth is twice the cross-effect on baboon growth. The intrinsic growth coefficients are also different: \(2\) for baboons and \(3\) for dassies. These choices set up a model in which one species grows faster in isolation while the other has the stronger competitive effect. They are assumptions of the exercise, not estimates from field data.
Equilibria from the nullclines
Setting both derivatives to zero gives
\[ B=0\quad\text{or}\quad 2-B-D=0, \]
and
\[ D=0\quad\text{or}\quad 3-2B-D=0. \]
The intersections are
\[ (B^*,D^*)=(0,0),\quad(0,3),\quad(2,0),\quad(1,1). \]
For the interior equilibrium, I solved
\[ 2-B-D=0,\qquad3-2B-D=0, \]
which gives \(B=D=1\).
The nontrivial nullclines are the straight lines
\[ D=2-B,\qquad D=3-2B. \]
They identify where the corresponding population temporarily stops increasing or decreasing. Their intersection locates coexistence, but it does not yet tell me whether coexistence is stable.
Linearising the dynamics
Writing the right-hand sides as \(f(B,D)\) and \(g(B,D)\) gives the Jacobian
\[ J(B,D)= \begin{pmatrix} 2-2B-D&-B\\ -2D&3-2B-2D \end{pmatrix}. \tag{2}\]
I evaluated its trace \(\tau\), determinant \(\Delta\) and eigenvalues at each equilibrium.
| Equilibrium | \(\tau\) | \(\Delta\) | Eigenvalues | Classification |
|---|---|---|---|---|
| \((0,0)\) | \(5\) | \(6\) | \(2,3\) | Unstable node |
| \((0,3)\) | \(-4\) | \(3\) | \(-1,-3\) | Stable node |
| \((2,0)\) | \(-3\) | \(2\) | \(-2,-1\) | Stable node |
| \((1,1)\) | \(-2\) | \(-1\) | \(-1+\sqrt2,-1-\sqrt2\) | Saddle |
Extinction and the two single-species states
At the origin,
\[ J(0,0)=\begin{pmatrix}2&0\\0&3\end{pmatrix}. \]
Both eigenvalues are positive, with eigenvectors \((1,0)^T\) and \((0,1)^T\). Small positive populations move away from extinction.
At the dassie-only equilibrium,
\[ J(0,3)=\begin{pmatrix}-1&0\\-6&-3\end{pmatrix}, \]
with the eigenpairs
\[ \lambda_1=-1,\quad v^{(1)}=(1,-3)^T, \qquad \lambda_2=-3,\quad v^{(2)}=(0,1)^T. \]
At the baboon-only equilibrium,
\[ J(2,0)=\begin{pmatrix}-2&-2\\0&-1\end{pmatrix}, \]
with
\[ \lambda_1=-2,\quad v^{(1)}=(1,0)^T, \qquad \lambda_2=-1,\quad v^{(2)}=(-2,1)^T. \]
Both single-species equilibria attract nearby trajectories in the model.
Why coexistence is different
At \((1,1)\),
\[ J(1,1)=\begin{pmatrix}-1&-1\\-2&-1\end{pmatrix}. \]
Its determinant is negative, so the eigenvalues have opposite signs. More explicitly,
\[ \lambda_+=-1+\sqrt2,\qquad v_+=(1,-\sqrt2)^T, \]
\[ \lambda_-=-1-\sqrt2,\qquad v_-=(1,\sqrt2)^T. \]
The negative eigenvalue gives a locally attracting direction and the positive eigenvalue a repelling one. A coexistence equilibrium therefore exists, but nearby trajectories do not generally remain close to it.
From local flow to a phase portrait
I first plotted short vector-field arrows around each fixed point. This made the classifications visible: arrows leave the origin, approach the two single-species equilibria, and approach or leave the coexistence point along different directions.
The larger phase portrait combines the nullclines and equilibria with a schematic of the flow. The dashed lines mark the saddle’s eigendirections.
The saddle’s stable manifold separates the two outcomes. On the manifold, trajectories can approach coexistence. On either side, one population tends to zero while the other tends to its single-species carrying capacity.
Computational construction
In MATLAB, I plotted the equilibria, sampled the local vector field and drew the phase portrait.
Local vector-field sampling
The local-flow code normalises the arrows to show direction rather than magnitude.
B = [0, 0, 2, 1];
D = [0, 3, 0, 1];
figure('Color','w'); hold on; grid on;
xlabel('B (Baboons, in units of 1000s)','Color','k');
ylabel('D (Dassies, in units of 1000s)','Color','k');
title('Local Trajectories for Ecological System','Color','k');
plot(B, D, 'ko', 'MarkerFaceColor','r', 'MarkerSize',8);
text(0.1, 0.1, '(0,0)', 'FontSize',12);
text(0.1, 3.1, '(0,3)', 'FontSize',12);
text(2.1, 0.1, '(2,0)', 'FontSize',12);
text(1.1, 1.1, '(1,1)', 'FontSize',12);
xlim([0 3]); ylim([0 4]);
f = @(b,d) b.*(2-b-d);
g = @(b,d) d.*(3-2.*b-d);
for i = 1:length(B)
[bGrid,dGrid] = meshgrid(linspace(B(i)-0.3,B(i)+0.3,7), ...
linspace(D(i)-0.3,D(i)+0.3,7));
u = f(bGrid,dGrid);
v = g(bGrid,dGrid);
L = sqrt(u.^2 + v.^2);
u = u ./ L;
v = v ./ L;
quiver(bGrid,dGrid,u,v,0.6,'b', ...
'LineWidth',1.5,'MaxHeadSize',2);
end
hold off;Nullclines and saddle directions
The phase portrait uses the nullclines and the saddle’s eigendirections.
Bx = [0 3]; Dy = [0 4];
b = linspace(Bx(1), Bx(2), 400);
% Plotting Nullclines
d_null1 = 3 - 2*b;
d_null2 = 2 - b;
% Stable and unstable manifolds
d_stable = 1 + sqrt(2)*(b - 1);
d_unstable = 1 - sqrt(2)*(b - 1);The fixed-point plot marks the four equilibria.
B = [0, 0, 2, 1]; D = [0, 3, 0, 1];
figure('Color','w');
plot(B,D,'ko','MarkerFaceColor','r','MarkerSize',8);
xlabel('B (Baboons, in units of 1000s)');
ylabel('D (Dassies, in units of 1000s)');
title('Fixed Points in the (B,D) Plane');
grid on;
text(0.1,0.1,'(0,0)','FontSize',12);
text(0.1,3.1,'(0,3)','FontSize',12);
text(2.1,0.1,'(2,0)','FontSize',12);
text(1.1,1.1,'(1,1)','FontSize',12);
xlim([0,3]); ylim([0,4]);What I took from the analysis
The useful distinction was between the existence of an equilibrium and its stability. Solving two algebraic equations found the coexistence point; the eigenvalues showed why it was not a stable outcome for nearby initial populations.
The report’s final interpretation uses the position of an initial condition relative to a separatrix to distinguish the two outcomes. That is a more geometric way to think about the model than comparing the population numbers alone. It also connects the local calculation at a saddle to the larger question of which stable state a trajectory approaches.
Reference used in the report
B. D. Hahn and D. T. Valentine, Essential MATLAB for Engineers and Scientists, 7th ed., Academic Press, 2019.
Originally completed as part of MAM2042S · Non-linear Dynamics, University of Cape Town, 2025.