Skip to main content
This material has been adapted from material by Fergus Cooper and others from the "Essential Mathematics" module at the Doctoral Training Centre, University of Oxford.

This material has been adapted from material by Fergus Cooper and others from the "Essential Mathematics" module at the Doctoral Training Centre, University of Oxford.

Creative Commons License
This course material was developed as part of UNIVERSE-HPC, which is funded through the SPF ExCALIBUR programme under grant number EP/W035731/1

This course material was developed as part of UNIVERSE-HPC, which is funded through the SPF ExCALIBUR programme under grant number EP/W035731/1

Creative Commons License

Systems of differential equations 2


YouTube lecture recording from October 2020

A recording of this lecture from October 2020; the material has changed a little since.
Youtube lecture thumbnail

Why simplify systems?

In lecture 14 we solved systems of first order, linear differential equations in two dimensions exactly, with three methods, and diagonalisation extends to systems of any size.
Most models in biology are nonlinear, often with many variables and many parameters, and we usually can't solve them by hand. In this lecture we look at two things we can still do:
  1. Simplify a system, so that it has fewer parameters (by rescaling) or fewer equations (by conservation, or the quasi-steady state approximation).
  2. Draw its phase plane, which shows how its solutions behave without solving it, using nullclines to find its fixed points.
In lecture 16 we use eigenvalues to decide whether those fixed points are stable.

System simplification: rescaling

Rescaling tells us which combinations of the parameters really matter. This predator-prey model is in dimensional terms and contains 5 parameters:
dNdT=rN(1−NK)−bNP,dPdT=ebNP−mP.\begin{aligned} \frac{dN}{dT} &= rN\left(1-\frac{N}{K}\right) - bNP,\\ \frac{dP}{dT} &= ebNP - mP. \end{aligned}
  • rr: prey intrinsic growth rate
  • KK: prey carrying capacity (bound to logistic growth)
  • bb: predation rate
  • ee: conversion efficiency
  • mm: per capita predator mortality rate
We substitute
N=θn,P=ϕp,T=τt,N=\theta n, \qquad P=\phi p, \qquad T=\tau t,
where θ\theta, ϕ\phi and τ\tau are constants: typical values of NN, PP and TT, which we are free to choose. The new variables nn, pp and tt are nondimensional: they have no units. For example, if NN and θ\theta are both numbers of prey per km2^2, then n=N/θn = N/\theta is a plain number, such as 0.50.5 for half the typical population. In the same way, if TT and τ\tau are both in days, then t=T/τt = T/\tau counts time in units of τ\tau. Note that, when we are rescaling time, by the chain rule
ddT=ddtdtdT=1τddt.\frac{d}{dT} = \frac{d}{dt}\frac{dt}{dT} = \frac{1}{\tau} \frac{d}{dt}.
Substituting into the original system gives
θτdndt=θrn(1−θnK)−bθϕnp,ϕτdpdt=ebθϕnp−mϕp.\begin{aligned} \frac{\theta}{\tau}\frac{dn}{dt} &= \theta rn\left(1-\frac{\theta n}{K}\right) - b\theta\phi np,\\ \frac{\phi}{\tau}\frac{dp}{dt} &= eb\theta\phi np - m\phi p. \end{aligned}
Then we divide the first equation by θ/τ\theta/\tau and the second by ϕ/τ\phi/\tau:
dndt=τ(rn(1−θnK)−bϕnp),dpdt=τ(ebθnp−mp).\begin{aligned} \frac{dn}{dt} &= \tau\left( rn\left(1-\frac{\theta n}{K}\right) - b\phi np\right),\\ \frac{dp}{dt} &= \tau\left( eb\theta np - mp\right). \end{aligned}
Now we choose the scales. Choosing θ=K\theta=K will remove the parameter KK from the equations:
dndt=τ(rn(1−n)−bϕnp),dpdt=τ(ebKnp−mp).\begin{aligned} \frac{dn}{dt} &= \tau\left( rn(1-n) - b\phi np\right),\\ \frac{dp}{dt} &= \tau\left( ebK np - mp\right). \end{aligned}
Choosing τ=1/m\tau = 1/m (or τ=1/r\tau = 1/r) will remove a further parameter:
dndt=rmn(1−n)−bϕmnp,dpdt=ebKmnp−p.\begin{aligned} \frac{dn}{dt} &= \frac{r}{m}n(1-n) - \frac{b\phi}{m}np,\\ \frac{dp}{dt} &= \frac{ebK}{m}np - p. \end{aligned}
Finally, ϕ=m/b\phi=m/b gives the two parameter system
n˙=rmn(1−n)−np,p˙=ebKmnp−p,\begin{aligned} \dot{n} &= \frac{r}{m}n(1-n) - np,\\ \dot{p} &= \frac{ebK}{m}np - p, \end{aligned}
where n˙\dot{n} is short for dn/dtdn/dt, and p˙\dot{p} for dp/dtdp/dt. We have shifted the groups of parameters to only two places. We could make it more obvious that there are only two "tuning dials", v1=r/mv_1 = r/m and v2=ebK/mv_2 = ebK/m, by writing it as
n˙=v1n(1−n)−np,p˙=p(v2n−1).\begin{aligned} \dot{n} &= v_1 n(1-n) - np,\\ \dot{p} &= p(v_2 n - 1). \end{aligned}
Any choice of the five original parameters behaves like one of these: only v1v_1 and v2v_2 change the shape of the solutions. For example, with v1=1v_1 = 1 and v2=2v_2 = 2, starting from n=0.9n = 0.9 and p=0.1p = 0.1, the prey and predators oscillate as they settle to the fixed point n=1/v2n = 1/v_2, p=v1(1−1/v2)p = v_1(1 - 1/v_2):
The prey n and predators p against time, with v1 = 1 and v2 = 2: damped oscillations settling to n = p = 1/2
If v2<1v_2 < 1 instead, the predators die out, and the prey settle at n=1n = 1.

System simplification: conservation

Consider a chemical system where a product is formed from a substrate via an intermediate complex involving an enzyme.
S+E⇌k−1k1C→k2P+ES + E \overset{k_1}{\underset{k_{-1}}\rightleftharpoons} C \overset{k_2}\rightarrow P + E
By mass action (lecture 11), this system can be written as a system of 4 ODEs for s,e,c,ps, e, c, p, which describe the concentrations of S,E,CS, E, C and PP:
s˙=−k1se+k−1c,e˙=−k1se+k−1c+k2c,c˙=k1se−k−1c−k2c,p˙=k2c.\begin{aligned} \dot{s} &= -k_1 se + k_{-1}c, \\ \dot{e} &= -k_1 se + k_{-1}c + k_{2}c,\\ \dot{c} &= k_1 se - k_{-1}c - k_{2}c, \\ \dot{p} &= k_{2}c. \end{aligned}
However, the enzyme is recycled: it is used in the complex and then released. Adding the equations for ee and cc, every term cancels:
e˙+c˙=0.\dot{e} + \dot{c} = 0.
This means that e+c=etote + c = e_{\text{tot}}, where etote_{\text{tot}} is constant (the total amount of enzyme, free or in the complex).
Making the substitution e=etot−ce = e_{\text{tot}} - c to eliminate ee, we arrive at the 3 ODE system:
s˙=−k1s(etot−c)+k−1c,c˙=k1s(etot−c)−k−1c−k2c,p˙=k2c.\begin{aligned} \dot{s} &= -k_1 s(e_{\text{tot}} - c) + k_{-1}c, \\ \dot{c} &= k_1 s(e_{\text{tot}} - c) - k_{-1}c - k_{2}c,\\ \dot{p} &= k_{2}c. \end{aligned}

System simplification: quasi-steady state

In the previous example it may be known that the rate of conversion to complex (from k1k_1 and k−1k_{-1}) is much faster than the degradation of complex into product (rate k2k_2).
If this is the case, then we can assume that the concentration of CC quickly arrives at some level c∗c^* (a quasi-steady state), and then moves very slowly.
Solving for c˙=0\dot{c}=0:
c˙=k1s(etot−c)−k−1c−k2c=0,  ⟹  c∗=k1etotsk−1+k2+k1s,\begin{aligned} \dot{c} &= k_1 s(e_{\text{tot}} - c) - k_{-1}c - k_{2}c = 0, \\ \implies c^*&=\frac{k_1 e_{\text{tot}} s}{k_{-1} + k_2 + k_1 s}, \end{aligned}
which is not a steady state: it moves slowly with ss.
Substituting this quasi-steady state into the remaining equations gives an approximate system of 2 ODEs:
s˙=−k1k2etotsk−1+k2+k1s,p˙=k1k2etotsk−1+k2+k1s.\begin{aligned} \dot{s} &= -\frac{k_1 k_2 e_{\text{tot}} s}{ k_{-1} + k_2 + k_1 s}, \\ \dot{p} &= \frac{k_1 k_2 e_{\text{tot}} s}{ k_{-1} + k_2 + k_1 s}. \end{aligned}
Dividing the top and bottom by k1k_1, the rate of the reaction is
p˙=Vmax⁡ sKm+s,whereVmax⁡=k2etotandKm=k−1+k2k1.\dot{p} = \frac{V_{\max}\, s}{K_m + s}, \qquad\text{where}\qquad V_{\max} = k_2 e_{\text{tot}} \quad\text{and}\quad K_m = \frac{k_{-1} + k_2}{k_1}.
This is the Michaelis-Menten equation from lectures 1 and 9. So, the quasi-steady state approximation explains where it comes from, and what its two constants mean: Vmax⁡V_{\max} is the rate when every enzyme is in a complex, and KmK_m is the concentration of substrate at which the rate is half of Vmax⁡V_{\max}.
This means that we have used conservation and quasi-steady state to go from a 4-dimensional system (s,e,c,p)(s,e,c,p) to a two-dimensional approximation which captures some of the behaviour.

Phase planes and nullclines

With two variables xx and yy, we can draw the phase plane: the (x,y)(x, y) plane, with an arrow at each point showing the direction of (x˙,y˙)(\dot{x}, \dot{y}). Each solution follows a path through it, as in the figures in lecture 14.
A system of nonlinear ODEs may have more than one fixed point (or may have none). Finding fixed points in two-dimensional systems is aided by nullclines. An xx-nullcline is a line where x˙=0\dot{x}=0, and a yy-nullcline is a line where y˙=0\dot{y}=0. (These are straight lines in the linear case.) At a fixed point x˙=y˙=0\dot{x} = \dot{y} = 0, so the fixed points are where an xx-nullcline crosses a yy-nullcline.
For example, take the system
x˙=x(1−x)−xy,y˙=2y(1−y2)−3xy.\begin{aligned} \dot{x} &= x(1-x) -xy,\\ \dot{y} &= 2y\left(1-\frac{y}{2}\right) - 3xy. \end{aligned}
Factorising,
x˙=x(1−x−y),y˙=y(2−y−3x).\begin{aligned} \dot{x} &= x(1-x-y),\\ \dot{y} &= y(2-y-3x). \end{aligned}
So the xx-nullclines are x=0x=0 and y=1−xy = 1-x, and the yy-nullclines are y=0y=0 and y=2−3xy = 2-3x. The fixed points are where one of each kind cross:
  • x=0x = 0 and y=0y = 0 cross at (0,0)(0, 0)
  • x=0x = 0 and y=2−3xy = 2 - 3x cross at (0,2)(0, 2)
  • y=1−xy = 1 - x and y=0y = 0 cross at (1,0)(1, 0)
  • y=1−xy = 1 - x and y=2−3xy = 2 - 3x cross at (1/2,1/2)(1/2, 1/2)
Note that (0,1)(0, 1), where the two xx-nullclines meet, is not a fixed point: there x˙=0\dot{x} = 0, but y˙=1≠0\dot{y} = 1 \neq 0.
The nullclines of the system, with the four fixed points where an x-nullcline crosses a y-nullcline
On an xx-nullcline x˙=0\dot{x} = 0, so the arrows there point straight up or down: they can only cross the xx-nullclines vertically, and in the same way the yy-nullclines horizontally. Between the nullclines, the signs of x˙\dot{x} and y˙\dot{y} do not change, so the arrows point in roughly the same direction throughout each region. By following the arrows we can sketch the behaviour of solutions (green lines, from the green dots):
The phase plane of the system: the direction field, the nullclines, the fixed points, and solutions from seven starting points
Almost every solution that starts with xx and yy both positive ends up at (1,0)(1, 0) or (0,2)(0, 2). In lecture 16 we will see why, from the eigenvalues at each fixed point.

Python code to plot the phase plane

The function streamplot draws the paths of the solutions through a grid of arrows. We add the nullclines on top, and solutions from chosen starting points, found with solve_ivp:
import numpy as np from matplotlib import pyplot as plt from scipy.integrate import solve_ivp def f(t, X): x, y = X return [x * (1 - x) - x * y, 2 * y * (1 - y / 2) - 3 * x * y] # the direction field, as streamlines x, y = np.meshgrid(np.linspace(0, 1.1, 23), np.linspace(0, 2.1, 22)) dx, dy = f(0, [x, y]) plt.streamplot(x, y, dx, dy, color='lightgray') # the nullclines xs = np.linspace(0, 1.1, 100) plt.plot(xs, 1 - xs, color='C0', label='x-nullclines') plt.axvline(0, color='C0') plt.plot(xs, 2 - 3 * xs, color='C1', label='y-nullclines') plt.axhline(0, color='C1') # solutions from a few starting points starts = [(1.05, 1.0), (0.9, 1.3), (0.7, 1.6), (0.5, 1.8), (0.5, 0.2), (0.32, 0.2), (0.1, 0.2)] for start in starts: sol = solve_ivp(f, (0, 40), start, t_eval=np.linspace(0, 40, 400)) plt.plot(sol.y[0], sol.y[1], color='green') plt.plot(*start, 'go') plt.xlim(0, 1.1) plt.ylim(0, 2.1) plt.xlabel('x') plt.ylabel('y') plt.legend()

Summary

  1. Rescaling to dimensionless quantities shows which combinations of parameters matter, and can reduce their number.
  2. Conservation (e.g. a total amount of enzyme) can remove an equation.
  3. The quasi-steady state approximation removes an equation that relaxes quickly, e.g. giving the Michaelis-Menten equation.
  4. Nullclines are a powerful way of finding fixed points, and of sketching the phase plane.

Introductory problems

Tip

For more practice, an AI tool can write new problems like the ones below. Ask it for problems of the same type and difficulty, or for problems set in your own field. For example, you could ask it to "write five chemistry problems on fixed points and rescaling, at the level of these ones". Work them on paper first, then ask the tool to check your answers and to explain any step you are unsure of.

Introductory problems 1

Find the fixed points of the following linear systems:
  1. x˙=x+3y,y˙=−6x+5y;\dot{x} = x+3y, \qquad \dot{y}=-6x+5y;
  2. x˙=x+3y+4,y˙=−6x+5y−1;\dot{x} = x+3y+4, \qquad \dot{y}=-6x+5y-1;
  3. x˙=x+3y+1,y˙=−6x+5y.\dot{x} = x+3y+1, \qquad \dot{y}=-6x+5y.

Introductory problems 2

Find the fixed points of the following nonlinear systems:
  1. x˙=−4y+2xy−8y˙=4y2−x2;\dot{x} = -4y+2xy-8 \qquad \dot{y}=4y^2-x^2;
  2. x˙=y−x2+2,y˙=2(x2−y2).\dot{x} = y-x^2+2, \qquad \dot{y}=2(x^2-y^2).

Main problems

Main problems 1

Consider the chemical reaction network:
⟶k0A⇌k−1k1B⟶k2\overset{k_0}\longrightarrow A \overset{k_1}{\underset{k_{-1}}\rightleftharpoons} B \overset{k_2}\longrightarrow
  1. Write down the system of two linear ODEs which describe the evolution of the concentrations of A and B in this system under the law of mass action.
  2. Find the ratio of concentrations of A and B for which this system is in steady state: that is the concentrations do not change over time.

Main problems 2

Consider the reversible enzyme reaction:
S+E⇌k−1k1C⇌k−2k2P+ES + E \overset{k_1}{\underset{k_{-1}}\rightleftharpoons} C \overset{k_2}{\underset{k_{-2}}\rightleftharpoons} P + E
Verify the Haldane relation, which states that when the reaction is in equilibrium,
ps=k1k2k−1k−2,\frac{p}{s} = \frac{k_1 k_2}{k_{-1}k_{-2}},
where pp and ss are the concentrations of PP and SS, respectively.

Main problems 3

The population of a host, H(t)H(t), and a parasite, P(t)P(t), are described approximately by the equations:
dHdT=(a−bP)H,dPdT=(c−kPH)P,H>0,\frac{dH}{dT}=(a-bP)H,\qquad \frac{dP}{dT}=\left(c-\frac{kP}{H}\right)P, \qquad H>0,
where a,b,c,ka,b,c,k are positive constants.
By a suitable change of scales show that these equations may be put in the simpler form
y˙=(1−x)y,x˙=αx(1−xy),\dot{y} = (1-x)y, \qquad \dot{x}=\alpha x\left(1-\frac{x}{y}\right),
where α=c/a\alpha=c/a.
Sketch the phase flow across the following lines:
  1. y=xy=x;
  2. x=0x=0;
  3. y=0y=0;
  4. x=1x=1;
  5. y=βxy=\beta x, for β\beta greater than and less than 1.

Main problems 4

Consider a lake with some fish attractive to anglers. We wish to model the fish-angler interaction under the following assumptions:
  • the fish population grows logistically in the absence of fishing;
  • the presence of anglers depresses the fish growth rate at a rate jointly proportional to the size of the fish and angler populations;
  • anglers are attracted to the lake at a rate directly proportional to the number of fish in the lake;
  • anglers are discouraged from the lake at a rate directly proportional to the number of anglers already there.
  1. Write down a mathematical model for this situation, clearly defining your terms.
  2. Use a suitable scaling to show that a non-dimensionalised version of the model is
    x˙=rx(1−x)−xy,y˙=βx−y\dot{x} = rx(1 - x) - xy,\qquad \dot{y} = \beta x - y

Main problems 5

Consider the reaction chain
S⟶k1I⟶k2PS \overset{k_1}{\longrightarrow} I \overset{k_2}{\longrightarrow} P
in which a substrate is converted to a product through a short-lived intermediate.
  1. Write down the system of three ODEs for ss, ii and pp under the law of mass action.
  2. Show that s+i+ps + i + p is constant, and use this to eliminate pp.
  3. Suppose the second step is much faster than the first (k2≫k1k_2 \gg k_1). Use a quasi-steady state for ii to find i∗i^* in terms of ss, and hence an approximate equation for dp/dtdp/dt.
  4. Explain why the rate at which PP is made depends only on k1k_1 in this approximation.