0%

Ordinary differential equation models

Ordinary differential equation (ODE)  models describe how system components change continuously over time. What makes them ordinary is that they only consider change with respect to one variable, usually time, in contrast to other types of differential equations which can describe changes across multiple variables (e.g. time and space). Just like in difference equation models, the components in ODE models take continuous numerical values — but now, time itself is treated as continuous, not broken into steps.

You can think of ODEs as a natural extension of difference equations. In a difference equation model, the update rule is typically:


  x(t + Δt) = x(t) + f(x(t) ) · Δt

This tells us how to compute the next value of a component based on its current value and the rate of change during a time interval Δt.

If we rearrange this equation by subtracting the current value from both sides and dividing by Δt, we get:


  (x(t + Δt) – x(t)) / Δt = f(x(t))

This resembles how we calculate the slope of a curve between two time points separated by the interval Δt.

Now, imagine shrinking Δt to be very very small—mathematicians call this limit infinitesimal and denote it as dt. The difference in x, now also very small, is written as dx. In this limit, the difference becomes a derivative, written as:

This is an ordinary differential equation. It doesn’t tell us the value of x directly; instead, it describes the rate at which x changes at each moment in time. The left-hand side (dx/dt) is the instantaneous rate of change, and the right-hand side (f(x(t))) encodes the biological mechanisms (such as synthesis, degradation, or binding) that drive these changes in an equation. Similar to the difference equations, the change in each component is determined by the balance between production and consumption — what’s being made and what’s being used up. 

But how do we get from this description of change to actual values of the model components at any point in time?

That’s where solving the differential equation comes in. In rare cases, we can find an analytical solution — an equation like x(t) = x(0)⋅ e−kt that gives the value at any time t. But for most differential equations that describe biological systems, such analytical solutions do not exist.  Instead, we rely on numerical solvers – computer algorithms that do a lot of computations under the hood to provide you with a value for your model component for whatever time point you ask them for. The result is a trajectory of each component over time — what we typically think of as a simulation. For this to work, the solver also needs the value of each model component at the beginning of the simulation — this is called the initial condition.