01 · Lesson 03
Ordinary differential equations
An ordinary differential equation, or ODE, specifies how one or more quantities change with respect to a single independent variable, usually time. It describes a rule for movement through time rather than listing the complete trajectory in advance.
Scenario: a medicine is removed from the body
A patient receives a medicine. Let \(A(t)\) be the amount in the body at time \(t\). Suppose a constant fraction of the current amount is removed per hour. More medicine present means more can be removed during the next short interval.
If \(k>0\) is the elimination-rate constant, the model is
The left side is the instantaneous change in the amount. The right side gives the rule for that change. The minus sign represents removal.
Reading a differential equation
| Expression | Meaning |
|---|---|
| \(t\) | Time, the independent variable |
| \(A(t)\) | Medicine amount, the state variable |
| \(dA/dt\) | Instantaneous change in amount per unit time |
| \(k\) | Elimination parameter with units of inverse time |
| \(-kA\) | Modelled removal rate |
If \(A\) is measured in milligrams and \(t\) in hours, then \(dA/dt\) has units milligrams per hour. Therefore \(k\) must have units per hour so that \(kA\) has matching units.
The equation is not yet one particular trajectory
The rule \(dA/dt=-kA\) applies to many possible starting amounts. An initial condition selects the trajectory relevant to the patient:
Together, the ODE and initial condition form an initial-value problem:
The differential equation gives the direction and speed of change at each admissible state. The initial condition says where the trajectory begins.
Solution and biological interpretation
The solution is
Differentiating this function returns \(-kA(t)\), so it satisfies the equation. At \(t=0\), it gives \(A_0\), so it also satisfies the initial condition.
- The amount remains positive when \(A_0>0\).
- It decreases because its derivative is negative.
- It approaches zero but does not become negative.
- A larger \(k\) produces faster elimination.
The half-life is the time required for the amount to become half its current value:
From biological flows to an ODE
A state increases through inflows and decreases through outflows:
For a population with births \(B(N)\) and deaths \(D(N)\),
If births occur at per-capita rate \(b\) and deaths at per-capita rate \(d\), then \(B(N)=bN\) and \(D(N)=dN\), giving
The parameter \(r=b-d\) is the net per-capita growth rate.
Coupled equations
Biological systems often contain interacting states. In an SIR epidemic model, infection moves people from susceptible to infectious, and recovery moves them from infectious to removed:
These equations are coupled because the rate for one compartment depends on other compartments. They must be considered together.
Adding them gives
so the total population is conserved under the stated assumptions.
Autonomous and non-autonomous equations
An autonomous ODE has the form
where time affects the state only through the current value of \(y\). A non-autonomous ODE explicitly contains time:
A seasonal transmission rate or an intervention beginning on a specified date produces a non-autonomous epidemic model.
Analytical and numerical solutions
An analytical solution is an explicit formula such as \(A(t)=A_0e^{-kt}\). Many nonlinear biological systems do not have a convenient formula. A numerical method then approximates state values at selected times.
| Representation | What it provides |
|---|---|
| Differential equation | The modelled rule for continuous change |
| Analytical solution | An exact formula when one is obtainable |
| Numerical solution | Approximate values computed on a time interval |
A numerical solver does not replace the biological model. It approximates the solution of the specified equations and initial conditions.
Conditions and limitations
- State variables, parameters and units must be defined.
- Initial conditions must belong to the biologically valid state space.
- The rate function should be sufficiently regular for a well-defined local solution; continuity alone is not always enough for uniqueness.
- Compartment models should be checked for non-negativity and conservation where appropriate.
- A continuous population model is usually an approximation when individuals occur as integer counts.
- Parameter values and functional forms are assumptions that require biological justification or estimation.
What this lesson adds
You can now distinguish an ODE from its solution, explain the role of an initial condition, construct equations from biological inflows and outflows, read coupled systems, check units and conservation, and distinguish analytical formulas from numerical approximations.