Quotient Rule
The quotient rule differentiates a ratio of two functions. Ratios are everywhere in epidemiology — prevalence proportions, hazard ratios, and the logistic curve are all quotients whose rates of change we often need. Frequency-dependent transmission and prevalence are ratios of quantities that all change over time, so differentiating such a per-capita rate calls for the quotient rule.
The rule
Order matters in the numerator: it is “derivative of top times bottom, minus top times derivative of bottom,” all over the bottom squared.
Intuition
Write the quotient as a product and apply the product and chain rules:
So the quotient rule is not a new idea — it is the product rule in disguise.
Worked example: the logistic-type ratio
Let and , so and :
The derivative is always positive, so increases toward its saturating limit of — the same “diminishing returns” shape as a saturating incidence or dose-response curve. At the slope is .
Computing it
R
# Symbolic
D(expression(x / (1 + x)), "x")
# 1/(1 + x) - x/(1 + x)^2 == 1/(1+x)^2
# Numeric check at x = 1
library(numDeriv)
grad(function(x) x / (1 + x), 1) # 0.25
Python
import sympy as sp
x = sp.symbols("x")
sp.simplify(sp.diff(x / (1 + x), x)) # 1/(x + 1)**2
# Numeric check at x = 1
h = 1e-6
f = lambda x: x / (1 + x)
(f(1 + h) - f(1 - h)) / (2 * h) # ~0.25
Julia
using Symbolics
@variables x
simplify(Symbolics.derivative(x / (1 + x), x)) # (1 + x)^-2
using ForwardDiff
ForwardDiff.derivative(x -> x / (1 + x), 1.0) # 0.25
Why it matters for statistics
Proportions, rates, and probabilities are ratios, and models like logistic regression are built from them. Differentiating these quotients is how we obtain the score functions and delta-method standard errors for estimated proportions and odds.