Case Study 2 — Designing a Drug Schedule with a Differential Equation
Field: Pharmacokinetics and clinical pharmacology Calculus used: the exponential-decay master equation (§19.3), the first-order linear equation and integrating factor (§19.4), and the same conservation-of-mass bookkeeping as the mixing tank (§19.4)
When a physician writes "$500$ mg every $8$ hours," that schedule is not folklore — it is the solution of a differential equation, evaluated until it produces a drug concentration that is high enough to work and low enough to be safe. The branch of medicine that does this arithmetic is pharmacokinetics, and at its heart sits one of the simplest models in this chapter: the body as a single stirred tank, with the drug flowing in from the dose and draining out through the liver and kidneys. The same conservation law that governed the salt tank of §19.4 governs the bloodstream. This case study follows one drug from a single injection to a steady maintenance schedule, building the model one ODE at a time.
The one-compartment model
Picture the bloodstream and the tissues it equilibrates with as a single well-mixed compartment of effective volume of distribution $V$. Let $A(t)$ be the amount of drug in the body (in milligrams) and $C(t) = A(t)/V$ its concentration (in mg/L). The body clears the drug at a rate proportional to how much is present — each molecule has a fixed probability per unit time of being filtered out — so
$$\frac{dA}{dt} = -k\,A,$$
the exponential-decay master equation of §19.3, with $k$ the elimination rate constant. Its solution after an instantaneous intravenous injection (a bolus) of dose $D$ at $t = 0$ is
$$A(t) = D\,e^{-kt}, \qquad C(t) = \frac{D}{V}\,e^{-kt}.$$
Clinicians never quote $k$ directly; they quote the half-life $t_{1/2}$, the time for the concentration to halve, which §19.3 gives as
$$t_{1/2} = \frac{\ln 2}{k}.$$
Take a concrete drug with $t_{1/2} = 4$ hr and $V = 35$ L. Then $k = \ln 2 / 4 \approx 0.173\ \text{hr}^{-1}$. A single $500$ mg bolus produces an initial concentration $C_0 = 500/35 \approx 14.3$ mg/L, which falls to $7.1$ mg/L after one half-life ($4$ hr), $3.6$ mg/L after two ($8$ hr), and so on. After about four to five half-lives — roughly a day — the drug is essentially gone. That is fine for a one-time treatment, but most drugs must be kept inside a therapeutic window for days. A single bolus cannot do that; we need to keep adding drug.
Continuous infusion: a linear equation with a steady state
The cleanest way to maintain a concentration is a constant intravenous drip delivering drug at a fixed rate $R_0$ (mg/hr). Now the amount obeys inflow minus outflow, exactly the mixing-tank logic of §19.4:
$$\frac{dA}{dt} = R_0 - k\,A.$$
This is no longer separable in a friendly way — it is a first-order linear equation, $A' + kA = R_0$, and it yields to the integrating factor $\mu = e^{\int k\,dt} = e^{kt}$ of §19.4. Multiplying through,
$$\frac{d}{dt}\big(e^{kt}A\big) = R_0\,e^{kt} \;\Longrightarrow\; e^{kt}A = \frac{R_0}{k}e^{kt} + C,$$
and with $A(0) = 0$ (no drug before the drip starts) the constant is $C = -R_0/k$, giving
$$A(t) = \frac{R_0}{k}\Big(1 - e^{-kt}\Big), \qquad C(t) = \frac{R_0}{kV}\Big(1 - e^{-kt}\Big).$$
This is the same shape as the salt tank filling from pure water in §19.4 — an exponential rise to a plateau. As $t \to \infty$ the concentration approaches the steady state
$$C_{ss} = \frac{R_0}{kV},$$
the value at which inflow exactly balances clearance. Notice the structure: the steady state is set by the infusion rate and the clearance $kV$, while the approach to it is governed by the same half-life as elimination. A useful clinical rule falls straight out: since $C(t)/C_{ss} = 1 - e^{-kt}$, reaching $93.75\%$ of steady state takes $1 - e^{-kt} = 0.9375$, i.e. $e^{-kt} = 1/16$, i.e. $kt = \ln 16 = 4\ln 2$ — exactly four half-lives. For our drug that is $16$ hours. This is why an antibiotic drip does not reach full effect immediately, and why clinicians sometimes prepend a loading dose (a bolus of size $V\,C_{ss}$) to jump straight to the target rather than waiting four half-lives for the drip to climb there.
Repeated oral doses: accumulation and the schedule
Most drugs are taken as pills, not drips — a sequence of boluses at a fixed dosing interval $\tau$. Between doses the concentration decays exponentially by $e^{-kt}$; at each dose it jumps up by $D/V$. The mathematics is the discrete cousin of the infusion model, and it produces the phenomenon every prescriber must understand: accumulation.
Track the concentration just after each dose. After dose $1$ it is $C_1 = D/V$. By the time dose $2$ arrives, the first dose has decayed to $(D/V)e^{-k\tau}$, and the new dose adds $D/V$ on top, so $C_2 = \frac{D}{V}(1 + e^{-k\tau})$. Continue, and the post-dose peaks form a geometric series:
$$C_n^{\text{peak}} = \frac{D}{V}\big(1 + e^{-k\tau} + e^{-2k\tau} + \cdots + e^{-(n-1)k\tau}\big) \xrightarrow[n\to\infty]{} \frac{D}{V}\cdot\frac{1}{1 - e^{-k\tau}}.$$
The limiting accumulation factor $1/(1 - e^{-k\tau})$ depends only on how the dosing interval compares to the half-life. Dose our $t_{1/2} = 4$ hr drug every $\tau = 8$ hr — that is two half-lives apart, so $e^{-k\tau} = e^{-2\ln 2} = \tfrac14$ — and the accumulation factor is
$$\frac{1}{1 - 1/4} = \frac{4}{3} \approx 1.33.$$
The steady-state peak is only $33\%$ higher than a single dose: dosing at two half-lives gives modest, safe accumulation. Halve the interval to $\tau = 4$ hr (one half-life, $e^{-k\tau} = 1/2$) and the factor jumps to $1/(1 - 1/2) = 2$: the body now holds twice a single dose at peak, a meaningfully higher exposure. Shorten the interval further and the factor grows without bound — the route to toxic accumulation. The schedule "$500$ mg every $8$ hours" is, quite literally, a choice of $\tau$ relative to $t_{1/2}$ that places the steady-state trough and peak inside the therapeutic window.
# Single bolus vs. repeated oral dosing for a t_1/2 = 4 hr drug.
import numpy as np
V, t_half = 35.0, 4.0
k = np.log(2) / t_half # ≈ 0.1733 /hr
D, tau = 500.0, 8.0 # 500 mg every 8 hr (tau = 2 half-lives)
acc = 1.0 / (1 - np.exp(-k*tau)) # accumulation factor = 1/(1 - 1/4) = 4/3
print("Single-dose peak (mg/L):", round(D/V, 2)) # ≈ 14.29
print("Accumulation factor:", round(acc, 3)) # ≈ 1.333
print("Steady-state peak (mg/L):", round(D/V*acc, 2)) # ≈ 19.05
print("Steady-state trough (mg/L):", round(D/V*acc*np.exp(-k*tau), 2)) # ≈ 4.76
The printed values are computed by hand from the formulas above: peak $\approx 14.29 \times \tfrac43 \approx 19.05$ mg/L, and the trough one interval later is the peak times $e^{-k\tau} = \tfrac14$, namely $\approx 4.76$ mg/L. A clinician reads those two numbers against the drug's known efficacy and toxicity thresholds and either accepts the schedule or adjusts $D$ and $\tau$.
Why the model is more than arithmetic
Every refinement of real pharmacokinetics is a richer ODE built on this skeleton. Two-compartment models add a peripheral tissue compartment that exchanges drug with the blood — a coupled linear system, like the SIR compartments of §19.9 but linear and therefore solvable in closed form by eigenvalue methods. Nonlinear (Michaelis–Menten) elimination, used for drugs like phenytoin and alcohol, replaces $-kA$ with a saturating term $-V_{\max}A/(K_m + A)$, producing a separable but nonlinear equation whose finite-dose clearance time recalls the finite-time behavior flagged in §19.3. In each case the modelling discipline is identical to this chapter's: write down inflow minus outflow, recognize whether the result is separable or linear, solve, and read the steady state off the structure.
Discussion Questions
- Show that reaching $50\%$, $75\%$, and $87.5\%$ of the infusion steady state takes exactly one, two, and three half-lives. Why does this make the half-life, not the rate constant $k$, the natural clinical quantity?
- A loading dose is a bolus chosen to put the concentration immediately at $C_{ss}$. Using $C_{ss} = R_0/(kV)$ and the bolus relation $C_0 = D/V$, derive the loading dose $D = R_0/k$ and interpret it in terms of half-lives of infusion "saved."
- Explain why dosing at one half-life ($\tau = t_{1/2}$) doubles the steady-state peak relative to a single dose, while dosing at two half-lives raises it only by a third. What does this say about the safety margin of a once-daily versus a thrice-daily schedule for the same total daily dose?
- The one-compartment model assumes instantaneous, uniform mixing. For which drugs or tissues is that assumption worst, and how does a two-compartment model repair it?
- Michaelis–Menten elimination saturates at high concentration. Sketch how the decay curve $A(t)$ differs from a pure exponential when a large dose overwhelms the clearance enzymes, and connect this to the finite-time effects discussed in §19.3.
A Short Annotated Reading List
- Rowland, M., & Tozer, T. N. (2010). Clinical Pharmacokinetics and Pharmacodynamics (4th ed.). Lippincott. The standard text; Chapters 3–5 develop exactly the one- and two-compartment ODE models used here, with clinical dosing tables.
- Gibaldi, M., & Perrier, D. (1982). Pharmacokinetics (2nd ed.). Marcel Dekker. The classic mathematical treatment — compartment models written as linear ODE systems and solved with integrating factors and Laplace transforms.
- Bauer, L. A. (2014). Applied Clinical Pharmacokinetics (3rd ed.). McGraw-Hill. Practical and worked-example heavy; shows the loading-dose and accumulation calculations of this case study in real prescribing decisions.
- Holford, N. H. G., & Sheiner, L. B. (1981). "Understanding the dose–effect relationship." Clin. Pharmacokinet. 6, 429–453. A readable bridge from the kinetics ODE to the pharmacodynamics of effect — where the concentration curve meets the therapeutic window.
The salt tank of §19.4 and the drug schedule of this case study are the same differential equation wearing different clothes — inflow minus proportional outflow, relaxing exponentially toward a steady state. Recognizing that one equation across chemistry, medicine, and ecology is exactly the field-agnostic power this chapter set out to teach.