Case Study 2 — Pharmacokinetics: How the Chain Rule Sets Your Dose
Field: Pharmacology / medicine Calculus used: Derivative of $e^x$ (Section 7.7), chain rule (Section 7.6), product and difference rules, solving $f'(t) = 0$ Forward reference: Chapter 19 (the differential equation $\frac{dC}{dt} = -kC$ solved fully)
The Question Behind Every Prescription
Take an ibuprofen tablet for a headache. Within minutes the drug is in your bloodstream; within hours it is gone. The label says "every 4 to 6 hours, not to exceed..." — and behind that ordinary instruction sits a calculation that decides whether the drug works, does nothing, or harms you. Too little and the concentration never reaches the therapeutic level where pain relief begins. Too much and it climbs into the toxic range. The entire discipline of pharmacokinetics — what the body does to a drug — is the study of the concentration curve $C(t)$, and that curve is governed by the derivatives of this chapter.
The governing principle is beautifully simple. Your liver and kidneys clear a drug at a rate proportional to how much is present: the more drug in the blood, the faster it is removed. In the language of Chapter 6, the rate of change of concentration is proportional to the concentration itself:
$$\frac{dC}{dt} = -k\,C, \qquad C(0) = C_0,$$
where $k > 0$ is the elimination rate constant and $C_0$ is the concentration right after the dose is absorbed. This is a differential equation — an equation relating a function to its own derivative — and we will solve such equations systematically in Chapter 19. But you can check its solution right now, using only Section 7.7 and the chain rule.
The Self-Replicating Exponential
The solution is the exponential decay function
$$C(t) = C_0\,e^{-kt}.$$
Why does it work? Differentiate it. The outer function is $e^u$ with derivative $e^u$ (Section 7.7); the inner function is $u = -kt$ with derivative $-k$. The chain rule multiplies them:
$$\frac{dC}{dt} = \frac{d}{dt}\Big(C_0\,e^{-kt}\Big) = C_0\,e^{-kt}\cdot(-k) = -k\,\big(C_0 e^{-kt}\big) = -k\,C(t).$$
The derivative reproduces $-k$ times the original function — exactly the differential equation we needed to satisfy. This is the defining magic of $e^x$: because it is its own derivative, $e^{kt}$ is the only kind of function whose rate of change is proportional to itself. Radioactive decay, capacitor discharge, cooling coffee, and drug clearance all share this single mathematical form for precisely this reason. The chain rule is what lets us verify it in one line.
A note on what "proportional rate" buys us. The same self-proportionality is why a drug's half-life is constant — independent of dose. Whether you start at 400 mg or 4 mg, the time to fall to half is identical, because the fractional rate $\frac{1}{C}\frac{dC}{dt} = -k$ never changes. No other family of functions has this property.
Worked Example: Dosing Ibuprofen
Ibuprofen has an elimination half-life of about 2 hours. The half-life $t_{1/2}$ is the time for concentration to halve, so it is fixed by $k$ through
$$C_0\,e^{-k\,t_{1/2}} = \tfrac12 C_0 \;\;\Longrightarrow\;\; e^{-k\,t_{1/2}} = \tfrac12 \;\;\Longrightarrow\;\; k = \frac{\ln 2}{t_{1/2}} = \frac{\ln 2}{2} \approx 0.347 \ \text{hr}^{-1}.$$
Take a 400 mg dose, fully absorbed, in a blood volume that makes the initial concentration $C_0 = 400$ (in convenient units). Then $C(t) = 400\,e^{-0.347 t}$, and we can read off the curve:
| Time $t$ (hr) | $C(t) = 400\,e^{-0.347t}$ | Note |
|---|---|---|
| 0 | 400 | dose absorbed |
| 1 | 283 | |
| 2 | 200 | one half-life |
| 4 | 100 | two half-lives |
| 6 | 50 | three half-lives |
How fast is the drug leaving at the two-hour mark? The derivative gives the instantaneous clearance rate:
$$C'(2) = -k\,C(2) = -0.347 \times 200 \approx -69 \ \text{units/hr}.$$
The negative sign says concentration is falling, and its magnitude — about 69 units per hour — is the body's clearance rate at that instant. Suppose the drug stops relieving pain once concentration drops below 50 units. The time to that threshold solves $400\,e^{-0.347 t} = 50$:
$$e^{-0.347t} = \tfrac{1}{8} \;\Longrightarrow\; -0.347\,t = \ln\tfrac18 = -\ln 8 \;\Longrightarrow\; t = \frac{\ln 8}{0.347} = \frac{3\ln 2}{0.347} \approx 6 \ \text{hr}.$$
There is the "every 6 hours" on the label, derived from first principles: the dosing interval is set so the next dose lands just as the previous one fades below the therapeutic level. The calculus of $e^{-kt}$ wrote the instructions on the bottle.
A Richer Model: Absorption and Elimination
Real tablets do not appear in the bloodstream instantly — the drug must first be absorbed from the gut, which itself takes time. The standard one-compartment model with first-order absorption captures both processes as a difference of two exponentials (the Bateman function):
$$C(t) = A\Big(e^{-k\,t} - e^{-k_a\,t}\Big),$$
where $k$ is the elimination constant (as before) and $k_a > k$ is the faster absorption constant. At $t = 0$ both exponentials equal $1$, so $C(0) = 0$ — the drug starts in the gut, not the blood. Concentration then rises as absorption dominates, peaks, and falls as elimination takes over. Finding that peak is an optimization problem, and it is solved by the differentiation rules of this chapter.
Differentiate term by term, applying the chain rule to each exponential (inner derivatives $-k$ and $-k_a$):
$$C'(t) = A\Big(-k\,e^{-kt} - (-k_a)\,e^{-k_a t}\Big) = A\Big(k_a\,e^{-k_a t} - k\,e^{-kt}\Big).$$
The peak — the moment of maximum concentration, called $t_{\max}$ — occurs where $C'(t) = 0$:
$$k_a\,e^{-k_a t} = k\,e^{-kt} \;\Longrightarrow\; \frac{k_a}{k} = \frac{e^{-kt}}{e^{-k_a t}} = e^{(k_a - k)t} \;\Longrightarrow\; t_{\max} = \frac{\ln(k_a/k)}{k_a - k}.$$
The algebra used only the laws of exponents and the natural log — but the derivative that set up the equation came from the chain rule. With an elimination half-life of 4 hours ($k = \ln 2/4 \approx 0.173$) and absorption constant $k_a = 1.5$, the peak lands at
$$t_{\max} = \frac{\ln(1.5/0.173)}{1.5 - 0.173} = \frac{\ln(8.66)}{1.327} \approx 1.63 \ \text{hr}.$$
So the drug reaches maximum effect about an hour and a half after swallowing — the kind of number a clinician needs to time a second dose or counsel a patient. Every step of that prediction is differentiation from Chapter 7.
# Drug concentration: simple decay and the absorption (Bateman) model.
import numpy as np
import sympy as sp
# --- verify the decay model solves C' = -k C ---
t, k, C0 = sp.symbols('t k C0', positive=True)
C = C0 * sp.exp(-k * t)
print("decay: C'(t) =", sp.diff(C, t), " = -k*C ->", sp.simplify(sp.diff(C, t) + k*C) == 0)
# --- find the peak time of the absorption model ---
A, ka = sp.symbols('A k_a', positive=True)
Cabs = A * (sp.exp(-k*t) - sp.exp(-ka*t))
Cprime = sp.diff(Cabs, t)
tmax = sp.solve(sp.Eq(Cprime, 0), t)[0]
print("absorption peak t_max =", sp.simplify(tmax)) # ln(k_a/k)/(k_a - k)
# --- numbers: elimination half-life 4 h, k_a = 1.5 ---
kv, kav = float(sp.log(2)/4), 1.5
print(f"t_max = {np.log(kav/kv)/(kav-kv):.3f} hr") # 1.627 hr
# Output:
# decay: C'(t) = -C0*k*exp(-k*t) = -k*C -> True
# absorption peak t_max = log(k_a/k)/(k_a - k)
# t_max = 1.627 hr
Repeated Dosing and the Steady State
A single dose is rarely the point — patients take a drug repeatedly, and the question becomes whether it accumulates to a stable, safe level. Suppose you dose every $\tau$ hours. By the time the next dose arrives, a fraction $e^{-k\tau}$ of the previous one remains. For ibuprofen ($k = 0.347$) dosed every $\tau = 6$ hours, the leftover fraction is $e^{-0.347\times 6} = e^{-2.08} \approx 0.125$ — only an eighth survives, so the drug barely accumulates and the accumulation factor $\frac{1}{1 - e^{-k\tau}} \approx 1.14$ is close to 1. A drug with a long half-life relative to its dosing interval would accumulate much more — which is exactly why such drugs are dosed less often, or why a loading dose is used. The arithmetic that keeps accumulation in the safe range is, again, the exponential clearance law differentiated and summed.
Why $e^x$ Sits at the Center of Medicine
Three properties from Section 7.7 explain why the exponential appears in every pharmacokinetics textbook:
- $e^x$ is its own derivative. This is what makes $e^{-kt}$ the unique solution to $\frac{dC}{dt} = -kC$ — the model of any process cleared at a rate proportional to its amount.
- Constant half-life. Because the fractional rate $-k$ is fixed, the time to halve is independent of dose — the single fact that makes dosing schedules predictable.
- Linearity of the rules. Combinations of exponentials (absorption + elimination, multi-compartment models) differentiate term by term, so even elaborate models stay tractable with the rules of this chapter.
Carbon-14 dating, capacitor discharge, Newton's law of cooling, and radioactive decay all run on the same equation $\frac{dy}{dt} = -ky$ for the same reason. Master $\frac{d}{dt}e^{-kt} = -k\,e^{-kt}$ and you have the key to all of them.
Connections to Other Chapters
- Derivative of $e^x$ (Section 7.7): the self-replicating property at the model's core.
- Chain rule (Section 7.6): turns $e^{-kt}$ into $-k\,e^{-kt}$ and powers the peak calculation.
- Optimization / $f'(t)=0$ (Chapters 9–10): finding $t_{\max}$ is a derivative-equals-zero problem, previewed here.
- Differential equations (Chapter 19): where $\frac{dC}{dt} = -kC$ is solved rather than merely verified, and multi-compartment models are developed.
Discussion Questions
- A drug's half-life is the same whether the starting concentration is 400 mg or 4 mg. Explain from the derivative why this is a special feature of exponential decay — and why a process with $\frac{dC}{dt} = -k$ (constant, not proportional) would behave completely differently.
- In the absorption model, what happens to $t_{\max}$ as $k_a$ grows very large (instantaneous absorption)? Take the limit of $\frac{\ln(k_a/k)}{k_a - k}$ and interpret the result physically.
- The function $f(t) = e^{-t^2}$ (a bell-curve shape) is not exponential decay. Its derivative is $-2t\,e^{-t^2}$, which is not $-k f(t)$. Why does this mean $f$ does not satisfy $\frac{df}{dt} = -kf$, and what real process has the $e^{-t^2}$ shape instead?
- Why does a drug with a long half-life need either less frequent dosing or a loading dose? Frame your answer using the accumulation factor $\frac{1}{1 - e^{-k\tau}}$.
- Two patients metabolize a drug at different rates ($k$ values differing by 50%). How does the dosing-interval calculation change? Why is this the basis for personalized dosing?
Your Turn — Mini-Project
Open a numpy/matplotlib notebook and:
- Plot $C(t) = 400\,e^{-0.347 t}$ over $[0, 12]$ hours and mark the 50-unit therapeutic threshold. Read off when a second dose is due.
- Plot the absorption model $C(t) = A(e^{-kt} - e^{-k_a t})$ with $k = \ln 2/4$, $k_a = 1.5$, and confirm numerically that the peak sits at $t_{\max} \approx 1.63$ hr by checking where your computed $C'(t)$ crosses zero.
- Simulate repeated dosing: give a dose every 6 hours and add the surviving exponential tails. Watch the concentration approach a steady oscillation. Compare the steady-state peak to the accumulation factor $\frac{1}{1 - e^{-k\tau}}$.
Annotated Further Reading
- Rowland, M., & Tozer, T. N. (2011). Clinical Pharmacokinetics and Pharmacodynamics (4th ed.). Lippincott. The standard reference; Chapters 1–3 build exactly the one-compartment exponential model used here.
- Strogatz, S. (2019). Infinite Powers. Houghton Mifflin. A general-audience tour of why exponential change pervades nature, with the self-derivative of $e^x$ as a recurring hero.
- Maor, E. (1994). e: The Story of a Number. Princeton University Press. The history of $e$ — from compound interest to continuous decay — and why its self-replicating derivative makes it the natural base of every growth-and-decay model.
The exponential $e^{-kt}$ is the natural shape of anything cleared at a rate proportional to itself. Because $e^x$ is its own derivative, the chain rule turns the dosing of a tablet, the dating of a fossil, and the discharge of a capacitor into one short calculation. The label on a pill bottle is calculus, quietly applied.