Exponential Growth and Decay
When a quantity changes at a rate proportional to its own size, it grows or decays exponentially. This lesson proves that is the only solution of , then applies it to populations, radioactive decay, Newton's law of cooling and continuously compounded interest, which turns out to be a limit.
For a first look at exponential models see Exponential and Logarithmic Functions and What a Differential Equation Is.
The law of natural growth
The law of natural growth () or decay () is the differential equation
The relative growth rate is the constant . A population of bacteria with unlimited food, the amount of an undecayed isotope, and money earning continuous interest all follow it.
Theorem: the only solutions are
Theorem. The solutions of on an interval are exactly the functions , and .
Proof. First, works: by the chain rule, . Now let be any solution and consider . By the product rule,
A function with zero derivative on an interval is constant (a consequence of the Mean Value Theorem, proved in The Mean Value Theorem). So , i.e. . Setting gives . ∎
The trick of multiplying by is the integrating factor idea that solves all first-order linear equations later in Linear Equations.
Population growth
Given two measurements, fit with logarithms: if and , then . The doubling time is .
import math
y0, y5 = 1200, 3400 # colony size at hour 0 and hour 5
k = math.log(y5 / y0) / 5
T2 = math.log(2) / k
print(f"k = {k:.5f} per hour, doubling time = {T2:.3f} h")
for t in [0, 5, 10, 24]:
print(f"t = {t:2d} h: y = {y0 * math.exp(k * t):12.1f}")
t_million = math.log(1_000_000 / y0) / k
print(f"reaches one million at t = {t_million:.2f} h")k = 0.20829 per hour, doubling time = 3.328 h
t = 0 h: y = 1200.0
t = 5 h: y = 3400.0
t = 10 h: y = 9633.3
t = 24 h: y = 177914.0
reaches one million at t = 32.29 h
Real populations eventually feel limits of food and space, which the logistic model in Models for Population Growth captures. Exponential growth is the early-time approximation.
Radioactive decay and half-life
For decay, with . The half-life satisfies , so and
Carbon dating inverts this: measure the fraction of carbon-14 remaining, then , with years.
Newton's law of cooling
An object at temperature in a room at constant temperature cools at a rate proportional to the temperature difference:
Substitute . Then , so by the theorem and
import sympy as sp
t, k = sp.symbols('t k', real=True)
Ts, T0 = 21, 90 # room 21 °C, tea poured at 90 °C
T = Ts + (T0 - Ts) * sp.exp(k * t)
k_val = sp.solve(sp.Eq(T.subs(t, 10), 60), k)[0] # 60 °C after 10 min
print("k = ln(13/23)/10 ≈", round(float(k_val), 6), " check:", sp.simplify(k_val - sp.log(sp.Rational(13, 23)) / 10) == 0)
T_fit = T.subs(k, k_val)
print("T(20) ≈", round(float(T_fit.subs(t, 20)), 3))
t50 = sp.solve(sp.Eq(T_fit, 50), t)[0]
print("drinkable (50 °C) at t ≈", round(float(t50), 3), "min")
# check the ODE symbolically
print("ODE holds:", sp.simplify(sp.diff(T, t) - k * (T - Ts)) == 0)k = ln(13/23)/10 ≈ -0.057054 check: True
T(20) ≈ 43.043
drinkable (50 °C) at t ≈ 15.193 min
ODE holds: True
Continuous compounding as a limit
Invest at annual rate , compounded times a year. After years you have . As , this tends to , because
Proof sketch. Take logs: with . Since is the difference quotient of at 1, it tends to . So the log tends to , and by continuity of the expression tends to . ∎
And solves : continuous compounding is exactly natural growth.
import math
A0, r, t = 1000, 0.05, 10
for n in [1, 4, 12, 365, 10**6]:
print(f"n = {n:>7}: {A0 * (1 + r / n) ** (n * t):.4f}")
print(f"continuous: {A0 * math.exp(r * t):.4f}")n = 1: 1628.8946
n = 4: 1643.6195
n = 12: 1647.0095
n = 365: 1648.6648
n = 1000000: 1648.7212
continuous: 1648.7213
In software
- Exponential backoff in network retries waits : discrete exponential growth with doubling "time" one retry.
- Exponential moving averages () forget old data by a factor per step, a discrete decay with half-life samples. Adam's moment estimates in ML are EMAs.
- Learning-rate schedules often use .
- Game timers and smoothing: frame-rate independent damping uses
value *= exp(−k·dt)rather thanvalue *= 0.9, precisely so the decay follows regardless of frame time. - Finance code computes continuous-compounding discount factors everywhere.
Note: The rule of 70: , because .
Exercises
Exercise 1: Half-life
An isotope has a half-life of 8 days. What fraction remains after 20 days?
Answer
, about 17.7 %.
Solution
Exercise 2: Fit a growth rate
A population grows from 500 to 800 in 3 years under natural growth. Find and the doubling time.
Answer
per year; doubling time years.
Solution
Exercise 3: Cooling
A metal part at 200 °C is placed in 25 °C air and is at 125 °C after 4 minutes. When does it reach 50 °C?
Answer
About 13.9 minutes.
Solution
import math
print(round(4 * math.log(7) / math.log(7 / 4), 4))13.9089
Exercise 4: Uniqueness with a constant term
Show that every solution of () is .
Answer
Shift by the equilibrium : satisfies , so .
Solution
Newton's law of cooling is the case .
Test yourself
Which function solves with ?
A quantity's doubling time is 6 hours. What is ?
In the uniqueness proof, why is constant?
- Because is positive
- Because is decreasing
- Because on an interval
- Because