DIFFERENTIAL EQUATIONS 10

Modelling with ODEs

An ODE model turns assumptions about how a system changes into mathematical equations.

The main idea

A mathematical model begins with quantities that change.

We identify those quantities, describe the processes that increase or decrease them, and translate those processes into rates of change.

\[ \boxed{ \text{assumptions} \rightarrow \text{rates of change} \rightarrow \text{ODEs} \rightarrow \text{solutions} } \]

1. Choose the state variables

A state variable describes part of the system at time \(t\).

For example,

\[ P(t) \]

might represent a population.

In an epidemic model,

\[ S(t),\qquad I(t),\qquad R(t) \]

might represent susceptible, infectious and recovered populations.

2. Identify what changes each variable

For every state variable, ask:

\[ \boxed{ \text{What increases it?} } \] \[ \boxed{ \text{What decreases it?} } \]

The differential equation is built from these gains and losses.

3. Basic balance principle

A useful modelling structure is

\[ \boxed{ \text{rate of change} = \text{rate in} - \text{rate out} } \]

This principle appears in population models, epidemic models, chemical systems and many other applications.

4. Example: simple population growth

Suppose the population is \(P(t)\).

Assume its growth rate is proportional to its current size:

\[ \frac{dP}{dt}\propto P. \]

Introduce a proportionality constant \(r\):

\[ \boxed{ \frac{dP}{dt}=rP } \]

If \(r>0\), this produces exponential growth.

5. Add the initial population

Suppose

\[ P(0)=P_0. \]

Then the model is the initial value problem

\[ \frac{dP}{dt}=rP, \qquad P(0)=P_0. \]

Its solution is

\[ \boxed{ P(t)=P_0e^{rt} } \]

6. Assumptions matter

The equation

\[ P'=rP \]

contains an important modelling assumption: the per-capita growth rate remains constant.

This may be reasonable for a short period, but not when resources become limited.

The mathematics follows from the assumptions, so unrealistic assumptions can produce unrealistic predictions.

7. Logistic growth

To include limited resources, we can use

\[ \boxed{ \frac{dP}{dt} = rP\left(1-\frac{P}{K}\right) } \]

where \(K\) is the carrying capacity.

When \(P\) is small compared with \(K\),

\[ 1-\frac{P}{K}\approx1, \]

so growth is approximately exponential.

8. What happens near the carrying capacity?

As

\[ P\to K, \]

we have

\[ 1-\frac{P}{K}\to0. \]

Therefore,

\[ \frac{dP}{dt}\to0. \]

So growth slows as the population approaches \(K\).

9. Compartment models

Sometimes a population is divided into groups called compartments.

For an epidemic,

\[ S(t) = \text{susceptible}, \] \[ I(t) = \text{infectious}, \] \[ R(t) = \text{recovered}. \]

Individuals move between these compartments.

10. Flow diagram

SIR compartment flow diagram Individuals move from susceptible to infectious through infection, then from infectious to recovered through recovery. S I R infection recovery

11. Build the infection rate

Suppose infection occurs through contact between susceptible and infectious individuals.

A common modelling rate is

\[ \beta\frac{SI}{N}. \]

Here

\[ \frac{I}{N} \]

represents the infectious proportion of the population, and \(\beta\) controls the effective contact and transmission rate.

12. Susceptible equation

Susceptible individuals leave \(S\) when they become infected.

Therefore,

\[ \boxed{ \frac{dS}{dt} = -\beta\frac{SI}{N} } \]

The negative sign indicates a loss from the susceptible compartment.

13. Infectious equation

The infectious compartment gains individuals through infection.

Suppose infectious individuals recover at rate

\[ \gamma I. \]

Then

\[ \boxed{ \frac{dI}{dt} = \beta\frac{SI}{N} - \gamma I } \]

So

\[ \text{change in infectious} = \text{new infections} - \text{recoveries}. \]

14. Recovered equation

Recovered individuals are produced by the recovery process.

Therefore,

\[ \boxed{ \frac{dR}{dt} = \gamma I } \]

15. The full SIR model

\[ \boxed{ \frac{dS}{dt} = -\beta\frac{SI}{N} } \] \[ \boxed{ \frac{dI}{dt} = \beta\frac{SI}{N} - \gamma I } \] \[ \boxed{ \frac{dR}{dt} = \gamma I } \]

This system follows directly from the movement of individuals between compartments.

16. Conservation of population

Add the three equations:

\[ \frac{dS}{dt} + \frac{dI}{dt} + \frac{dR}{dt} = 0. \]

Therefore,

\[ \frac{d}{dt}(S+I+R)=0. \]

So

\[ \boxed{ S(t)+I(t)+R(t)=N } \]

for a closed population of constant size.

17. Parameters

Parameters are fixed quantities that control the behaviour of the model.

For example,

\[ \beta \]

controls transmission, while

\[ \gamma \]

controls recovery.

Changing parameter values can change the entire trajectory of the system.

18. State variables and parameters are different

A state variable changes with time:

\[ S(t),\quad I(t),\quad R(t). \]

A parameter is normally treated as fixed within a model run:

\[ \beta,\quad\gamma. \]
\[ \boxed{ \text{state variable} = \text{quantity that evolves} } \] \[ \boxed{ \text{parameter} = \text{value controlling that evolution} } \]

19. Initial conditions

The model also needs a starting state:

\[ S(0)=S_0, \] \[ I(0)=I_0, \] \[ R(0)=R_0. \]

The same ODEs can produce different trajectories from different initial conditions.

20. Solving the model

Some ODE models can be solved analytically.

Others, such as many nonlinear compartment systems, are usually solved numerically.

For example, Euler's method or more accurate ODE solvers can approximate

\[ S(t),\qquad I(t),\qquad R(t) \]

through time.

21. Model output is not the same as reality

An ODE solution gives the behaviour implied by the model assumptions and parameter values.

It does not guarantee that the real system will behave exactly the same way.

\[ \boxed{ \text{model prediction} = \text{consequence of assumptions} } \]

This is why model assumptions, parameter estimation and validation are important.

22. Deterministic interpretation

An ordinary deterministic ODE model assigns one trajectory to a specified initial state and parameter set.

For example,

\[ S_0,\ I_0,\ R_0,\ \beta,\ \gamma \]

determine one SIR trajectory.

The model does not represent random variation between different possible epidemic realisations.

23. Why this matters later

Real systems may contain random events and uncertainty.

This motivates stochastic models, where the state itself can become random.

\[ \boxed{ \text{deterministic ODEs} \longrightarrow \text{stochastic processes} } \]

But stochastic models are easier to understand once the deterministic rate structure is clear.

24. A general modelling workflow

\[ \boxed{ 1.\; \text{Define the problem} } \] \[ \boxed{ 2.\; \text{Choose the state variables} } \] \[ \boxed{ 3.\; \text{State the assumptions} } \] \[ \boxed{ 4.\; \text{Identify gains and losses} } \] \[ \boxed{ 5.\; \text{Write the ODEs} } \] \[ \boxed{ 6.\; \text{Choose parameters and initial conditions} } \] \[ \boxed{ 7.\; \text{Solve analytically or numerically} } \] \[ \boxed{ 8.\; \text{Interpret and validate the results} } \]

25. The central idea

ODE modelling translates verbal assumptions into rates of change.

\[ \boxed{ \text{process} \rightarrow \text{rate} \rightarrow \text{differential equation} \rightarrow \text{trajectory} } \]

This connection between mechanism and mathematical change is what makes differential equations powerful modelling tools.