Instant PDF download, name-and-email checkout. Complete bundle: every Economics, Statistics and Mathematics book
Mathematics guide, Unit 7, step 25 of 33Previous stepNext step

Step 25: Exponential and Logistic Models and Euler's Method

SyllabusAP 7.8, BC 7.5, 7.9 · IB HL 5.18
In 30 seconds
  • “Rate proportional to size” is \( \dfrac{dy}{dt} = ky \), whose solution is always \( y = y_0e^{kt} \). The doubling time (or half-life) is \( \dfrac{\ln 2}{|k|} \).
  • \( \dfrac{dy}{dt} = -k(y-E) \) with \( k > 0 \) means exponential decay towards an equilibrium \( E \): \( y = E + (y_0-E)e^{-kt} \). Cooling drinks, mixing tanks and market prices all follow it.
  • Logistic growth \( \dfrac{dP}{dt} = kP\left(1-\dfrac{P}{L}\right) \) levels off at the carrying capacity \( L \), and grows fastest when \( P = \tfrac{L}{2} \). Euler’s method steps along tangent lines: \( y_{n+1} = y_n + h\,f(x_n, y_n) \). In AP, both are BC only.
  • Exam point: “for what value of \( P \) is the growth fastest?” needs no solving: the answer is \( \tfrac{L}{2} \). “When?” needs the formula for \( P(t) \).
Video lesson coming soonA short animated lesson for this step will appear here.

Exponential growth and decay

The simplest and most important differential equation says that a quantity changes at a rate proportional to its own size: \( \dfrac{dy}{dt} = ky \). Separate the variables (as in Step 24): \( \ln|y| = kt + C \), so \( y = Ae^{kt} \), and putting \( t = 0 \) shows that \( A \) is the starting value \( y_0 \).

\[ \frac{dy}{dt} = ky \quad\Longleftrightarrow\quad y = y_0e^{kt} \]

For \( k > 0 \) the doubling time is \( \dfrac{\ln 2}{k} \); for \( k < 0 \) the half-life is \( \dfrac{\ln 2}{|k|} \).

Why must the answer be exponential? “Rate proportional to size” means every unit of \( y \) produces new \( y \) at the same rate, whatever the total. So in each unit of time \( y \) is multiplied by the same factor, \( e^{k} \), and repeated multiplication by a fixed factor is exactly what an exponential does. It also explains why the doubling time does not depend on where you start: every interval of the same length multiplies \( y \) by the same amount. With \( k > 0 \) you get growth; with \( k < 0 \), decay.

Worked example

A bacterial culture grows at a rate proportional to its size. It has 500 cells at the start and 1500 after 4 hours. Find the growth constant and the time at which the culture reaches 10,000 cells.

Step 1\( N = 500e^{kt} \). At \( t = 4 \): \( 500e^{4k} = 1500 \), so \( e^{4k} = 3 \) and \( k = \tfrac{1}{4}\ln 3 \approx 0.275 \) per hour.
Step 2Set \( N = 10{,}000 \): \( e^{kt} = 20 \), so \( t = \dfrac{\ln 20}{k} = \dfrac{4\ln 20}{\ln 3} \).
Step 3Evaluate: \( t \approx 10.9 \) hours.

You never need \( k \) as a decimal. Keeping \( e^{4k} = 3 \) exact avoids rounding errors, and many exam answers are expected in exact form such as \( \tfrac{4\ln 20}{\ln 3} \).

An economics example: continuous compounding and the rule of 70. A balance earning interest at rate \( r \) compounded continuously satisfies \( \dfrac{dA}{dt} = rA \), so \( A = A_0e^{rt} \). At 4%, $2000 grows to \( 2000e^{0.4} \), about $2983.65, in ten years. The doubling time is \( \dfrac{\ln 2}{r} \approx \dfrac{0.693}{r} \). With the rate written as a percentage, that is about \( 69.3 \div \) (rate in %); round 69.3 up to 70 and you have the economist’s rule of 70: doubling time \( \approx 70 \div \) (growth rate in %). An economy growing at 3.5% a year doubles its output in about 20 years; the exact value is \( \tfrac{\ln 2}{0.035} \approx 19.8 \) years.

Decay towards an equilibrium: cooling, mixing and prices

A cup of coffee cools quickly when it is much hotter than the room, and slowly as it nears room temperature. Newton’s law of cooling says the rate is proportional to the difference: \( \dfrac{dT}{dt} = -k(T-A) \), where \( A \) is the room temperature and \( k > 0 \). Put \( u = T-A \), the amount by which the drink is hotter than the room. Since \( A \) is constant, \( \dfrac{du}{dt} = -ku \), so \( u \) decays exponentially and

\[ \frac{dy}{dt} = -k(y-E) \quad\Longrightarrow\quad y = E + (y_0-E)e^{-kt}. \]

The quantity approaches the equilibrium \( E \) but never reaches it. Any equation of this shape behaves the same way, whatever \( y \) measures.

Key termStable equilibrium: a constant solution \( y = E \) that nearby solutions approach as \( t \to \infty \). For \( \dfrac{dy}{dt} = -k(y-E) \) with \( k > 0 \), every solution tends to \( E \), from above or below.
Worked example

Soup at \( 85\,^\circ\mathrm{C} \) is left in a room at \( 25\,^\circ\mathrm{C} \). After 5 minutes it is at \( 65\,^\circ\mathrm{C} \). How long does it take to cool to \( 35\,^\circ\mathrm{C} \)?

Step 1\( T = 25 + 60e^{-kt} \). At \( t = 5 \): \( 60e^{-5k} = 40 \), so \( e^{-5k} = \tfrac{2}{3} \) and \( k = \tfrac{1}{5}\ln\tfrac{3}{2} \).
Step 2For \( T = 35 \): \( 60e^{-kt} = 10 \), so \( e^{-kt} = \tfrac{1}{6} \) and \( t = \dfrac{\ln 6}{k} = \dfrac{5\ln 6}{\ln 1.5} \).
Step 3Evaluate: \( t \approx 22.1 \) minutes.

The excess temperature fell from 60 to 40 degrees in the first 5 minutes, a factor of \( \tfrac{2}{3} \). It keeps falling by that factor every 5 minutes, so the cooling slows down as the soup approaches room temperature.

Mixing problems give the same equation. Salt flows into a well-stirred tank and the mixture flows out, so \( \dfrac{dS}{dt} = \text{rate in}-\text{rate out} \), with rate out \( = \dfrac{S}{\text{volume}} \times \text{outflow rate} \). Q4 below works one through.

An economics example: a price that adjusts to equilibrium. When demand exceeds supply, buyers bid the price up; when supply exceeds demand, sellers cut it. A simple model makes the rate of change of price proportional to the excess demand: \( \dfrac{dP}{dt} = k\big(D(P)-S(P)\big) \). Take demand \( D = 120-3P \), supply \( S = 20 + 2P \) and \( k = 0.04 \). Then \( D-S = 100-5P \) and

\[ \frac{dP}{dt} = 0.04(100-5P) = -0.2(P-20) \]

This is the cooling equation again, with equilibrium 20, so \( P = 20 + (P_0-20)e^{-0.2t} \).

The equilibrium price, where \( D = S \), is $20. Starting from $30, the gap of $10 shrinks by the same factor each period; 90% of it has closed when \( e^{-0.2t} = 0.1 \), at \( t = \tfrac{\ln 10}{0.2} \approx 11.5 \) periods. The price converges because excess demand falls as the price rises, which holds whenever demand slopes down and supply slopes up.

Price adjustment: dP/dt = −0.2(P − 20)
P₀ = $30P₀ = $12
51015202551015202530350t (periods)P ($)90% of gap closed (t ≈ 11.5)equilibrium P* = $20
Figure 1: from above or below, the price decays exponentially towards the equilibrium of $20 and never crosses it. The gap shrinks by the same factor, about 0.82, every period.

Logistic growth (AP BC)

Exponential growth cannot last for ever. Fish in a lake run short of food; a new product runs out of people who have not yet bought it. The logistic model adds a brake that tightens as \( P \) approaches a ceiling \( L \):

\[ \frac{dP}{dt} = kP\left(1-\frac{P}{L}\right), \qquad k > 0,\ L > 0. \]

When \( P \) is small the bracket is close to 1 and growth is almost exponential. As \( P \) approaches \( L \) the bracket shrinks to 0 and growth stops. The equilibrium solutions are \( P = 0 \) and \( P = L \). If \( 0 < P_0 < L \), \( P \) increases towards \( L \); if \( P_0 > L \), it decreases towards \( L \).

Key termCarrying capacity: the value \( L \) in \( \dfrac{dP}{dt} = kP\left(1-\dfrac{P}{L}\right) \). Every solution with \( P_0 > 0 \) satisfies \( \displaystyle\lim_{t \to \infty} P(t) = L \).

Why is growth fastest at exactly half the carrying capacity? As a function of \( P \), the rate \( kP-\dfrac{k}{L}P^2 \) is a downward parabola with roots \( P = 0 \) and \( P = L \). Its vertex is midway between the roots, at \( P = \tfrac{L}{2} \), where the rate is \( k \cdot \tfrac{L}{2} \cdot \tfrac{1}{2} = \tfrac{kL}{4} \). On the graph of \( P \) against \( t \), that is the point of inflection: concave up below \( \tfrac{L}{2} \), concave down above it.

When you do need \( P(t) \), separate and use partial fractions (Step 23). The result is always

\[ P = \frac{L}{1 + Ae^{-kt}}, \qquad A = \frac{L-P_0}{P_0}. \]
Worked example

A deer population satisfies \( \dfrac{dP}{dt} = 0.4P\left(1-\dfrac{P}{2000}\right) \), with \( t \) in years and \( P(0) = 200 \). (a) Find \( \displaystyle\lim_{t \to \infty} P \). (b) For what value of \( P \) is the population growing fastest, and at what rate? (c) Find \( P \) in terms of \( t \), and the time at which the growth is fastest.

Step 1(a) \( 0 < 200 < 2000 \), so \( P \to L = 2000 \).
Step 2(b) At \( P = \tfrac{L}{2} = 1000 \), where the rate is \( 0.4 \times 1000 \times \tfrac{1}{2} = 200 \) deer per year (which is \( \tfrac{kL}{4} \)).
Step 3(c) \( A = \dfrac{2000-200}{200} = 9 \), so \( P = \dfrac{2000}{1 + 9e^{-0.4t}} \).
Step 4\( P = 1000 \) when \( 9e^{-0.4t} = 1 \): \( t = \dfrac{\ln 9}{0.4} \approx 5.49 \) years.

Parts (a) and (b) needed no solving at all. That is typical: most logistic marks come from reading the equation.

Logistic growth: dP/dt = 0.4P(1 − P/2000)
P₀ = 200P₀ = 2600
24681012141650010001500200025000t (years)Pinflection (5.49, 1000): fastest growthL = 2000L/2 = 1000
Figure 2: from P₀ = 200 the curve is concave up until P = L/2 = 1000 and concave down after it. From P₀ = 2600, above the carrying capacity, the population falls towards 2000.
Common mistakeReading \( k \) and \( L \) off an equation that is not in standard form. \( \dfrac{dP}{dt} = 0.003P(400-P) \) has \( L = 400 \), but \( k \) is not 0.003. Factor out the 400: \( 0.003 \times 400 \times P\left(1-\dfrac{P}{400}\right) = 1.2P\left(1-\dfrac{P}{400}\right) \). So \( k = 1.2 \), and the greatest rate is \( \tfrac{kL}{4} = 120 \) per unit time.

An economics example: how new products spread. Let \( p \) be the proportion of households that own a new product. New buyers come mainly from contact between owners and non-owners, so a natural model is \( \dfrac{dp}{dt} = kp(1-p) \): logistic with \( L = 1 \). This is the S-shaped adoption curve economists fit to new technologies. With \( k = 0.6 \) per year and \( p(0) = 0.02 \), \( A = 49 \) and \( p = \dfrac{1}{1 + 49e^{-0.6t}} \). Half of all households own the product at \( t = \tfrac{\ln 49}{0.6} \approx 6.5 \) years, and that is when adoption is fastest, at \( \tfrac{k}{4} = 0.15 \): 15 percentage points a year.

Exam tipSyllabus scope matters here. In AP, logistic models (topic 7.9) and Euler’s method (7.5) are BC only; exponential models (7.8) are on both AB and BC. Cambridge 9709 Paper 3 has no Euler’s method, but a logistic equation can appear as an ordinary separable equation to solve with partial fractions. In IB, all of this is HL (AHL 5.18), which also includes Euler’s method and the two methods in the last section.

Euler’s method (AP BC and IB HL)

A slope field suggests a way to compute a solution: start at the given point, walk a short distance along the segment there, read the gradient at the new point, and repeat. This is Euler’s method. Each step is a short piece of a tangent line, the linear approximation from Step 16.

For \( \dfrac{dy}{dx} = f(x, y) \) with \( y(x_0) = y_0 \) and step size \( h \):

\[ x_{n+1} = x_n + h, \qquad y_{n+1} = y_n + h\,f(x_n, y_n). \]

Over a short step the gradient hardly changes, so rise \( \approx \) gradient \( \times \) run. The only approximation is using the gradient at the start of each step for the whole step. That also tells you the direction of the error: on a concave-up solution the tangent lies below the curve, so every step falls short and Euler underestimates. On a concave-down solution it overestimates.

Worked example

Use Euler’s method with step \( h = 0.25 \) to estimate \( y(1) \) for \( \dfrac{dy}{dx} = x + y \), \( y(0) = 1 \). The exact solution is \( y = 2e^{x}-x-1 \). Is your estimate too large or too small?

Step 1Build a table, one row per step:
\( n \)\( x_n \)\( y_n \)\( f = x_n + y_n \)\( y_{n+1} = y_n + 0.25f \)
00111.25
10.251.251.51.625
20.51.6252.1252.15625
30.752.156252.906252.8828125
Step 2So \( y(1) \approx 2.883 \). The exact value is \( 2e-2 \approx 3.437 \).
Step 3\( \dfrac{d^2y}{dx^2} = 1 + \dfrac{dy}{dx} = 1 + x + y \), which is positive along the solution, so the curve is concave up and Euler underestimates.

The error is about 0.554. With \( h = 0.5 \) it is about 0.937, and with \( h = 0.125 \) about 0.305: halving the step roughly halves the error, so accuracy costs proportionally more steps.

Euler’s method, h = 0.25, for dy/dx = x + y
exact: y = 2eˣ − x − 1Euler steps
00.250.50.7511.2511.522.533.5xyexact 3.437Euler 2.883
Figure 3: each Euler step follows the tangent direction at its starting point. The solution is concave up, so every step lands below the curve and the errors build up.

Euler’s method is compound interest. Apply it to \( \dfrac{dA}{dt} = rA \) with step \( h = \tfrac{1}{n} \) of a year. Each step gives \( A_{\text{new}} = A\left(1 + \tfrac{r}{n}\right) \): exactly one period of interest compounded \( n \) times a year. As \( n \to \infty \) the Euler estimate \( A_0\left(1 + \tfrac{r}{n}\right)^{nt} \) tends to the exact \( A_0e^{rt} \), the continuous-compounding limit.

Two more methods for IB HL

IB HL (AHL 5.18) adds two techniques for equations that are not separable. Neither is in AP Calculus or Cambridge 9709.

A homogeneous equation has the form \( \dfrac{dy}{dx} = f\!\left(\dfrac{y}{x}\right) \). Substitute \( y = vx \), so \( \dfrac{dy}{dx} = v + x\dfrac{dv}{dx} \), and the equation becomes separable in \( v \) and \( x \). For example, \( \dfrac{dy}{dx} = \dfrac{x^2 + y^2}{xy} = \dfrac{1}{v} + v \) gives \( x\dfrac{dv}{dx} = \dfrac{1}{v} \), so \( \tfrac{1}{2}v^2 = \ln x + C \) and \( y^2 = 2x^2\ln x + 2Cx^2 \).

A linear equation has the form \( \dfrac{dy}{dx} + P(x)\,y = Q(x) \). Multiply through by the integrating factor \( I = e^{\int P(x)\,dx} \). Because \( I’ = PI \), the left side becomes \( I\dfrac{dy}{dx} + I’y = \dfrac{d}{dx}(Iy) \), the product rule read backwards, and you can integrate directly.

Worked example

Solve \( \dfrac{dy}{dx} + \dfrac{y}{x} = 3x \) for \( x > 0 \), given \( y(1) = 2 \).

Step 1\( P = \dfrac{1}{x} \), so \( I = e^{\ln x} = x \).
Step 2Multiply through: \( x\dfrac{dy}{dx} + y = 3x^2 \), that is \( \dfrac{d}{dx}(xy) = 3x^2 \).
Step 3Integrate: \( xy = x^3 + C \), so \( y = x^2 + \dfrac{C}{x} \).
Step 4\( y(1) = 2 \): \( 1 + C = 2 \), so \( C = 1 \).

The solution is \( y = x^2 + \dfrac{1}{x} \). Notice that the constant is divided by \( I \) too: writing \( y = x^2 + C \) is a classic slip.

Practise: 6 questions

Try each one on paper first, then check the worked answer.

EasyQ1. A drug in the bloodstream satisfies \( \dfrac{dm}{dt} = -0.1m \), with \( m \) in mg and \( t \) in hours, and \( m(0) = 60 \). Find the half-life and the amount left after 10 hours. Show worked answer
\( m = 60e^{-0.1t} \).
Half-life: \( e^{-0.1t} = \tfrac{1}{2} \), so \( t = \dfrac{\ln 2}{0.1} \approx 6.93 \) hours.
After 10 hours: \( m = 60e^{-1} \approx 22.1 \) mg.
EasyQ2. For \( \dfrac{dP}{dt} = 0.8P\left(1-\dfrac{P}{600}\right) \) with \( P(0) = 50 \), find \( \displaystyle\lim_{t \to \infty} P \), the value of \( P \) at which \( P \) grows fastest, and that greatest rate. Show worked answer
\( 0 < 50 < 600 \), so \( P \to 600 \).
Fastest growth at \( P = \tfrac{600}{2} = 300 \).
Greatest rate: \( 0.8 \times 300 \times \left(1-\tfrac{300}{600}\right) = 120 \), which is \( \tfrac{kL}{4} = \tfrac{0.8 \times 600}{4} \).
MediumQ3. Use Euler’s method with two steps of size 0.5 to estimate \( y(2) \) for \( \dfrac{dy}{dx} = 2x-y \), \( y(1) = 3 \). Show worked answer
Step 1: at \( (1, 3) \), \( f = 2-3 = -1 \), so \( y(1.5) \approx 3 + 0.5(-1) = 2.5 \).
Step 2: at \( (1.5, 2.5) \), \( f = 3-2.5 = 0.5 \), so \( y(2) \approx 2.5 + 0.5(0.5) = 2.75 \).
Estimate: \( y(2) \approx 2.75 \).
MediumQ4. A tank holds 200 litres of pure water. Brine with 0.1 kg of salt per litre flows in at 4 litres per minute, and the well-mixed solution flows out at the same rate. Find the salt \( S \) kg after \( t \) minutes, and when it reaches 15 kg. Show worked answer
Rate in \( = 0.1 \times 4 = 0.4 \) kg/min. Rate out \( = \dfrac{S}{200} \times 4 = \dfrac{S}{50} \) kg/min.
\( \dfrac{dS}{dt} = 0.4-\dfrac{S}{50} = -\dfrac{1}{50}(S-20) \), with \( S(0) = 0 \).
So \( S = 20 + (0-20)e^{-t/50} = 20\left(1-e^{-t/50}\right) \).
\( S = 15 \): \( e^{-t/50} = \tfrac{1}{4} \), so \( t = 50\ln 4 \approx 69.3 \) minutes.
MediumQ5. (IB HL) Use an integrating factor to solve \( \dfrac{dy}{dx}-2y = e^{x} \), given \( y(0) = 0 \). Show worked answer
\( P = -2 \), so \( I = e^{-2x} \).
\( \dfrac{d}{dx}\left(ye^{-2x}\right) = e^{x}e^{-2x} = e^{-x} \).
Integrate: \( ye^{-2x} = -e^{-x} + C \), so \( y = -e^{x} + Ce^{2x} \).
\( y(0) = 0 \): \( -1 + C = 0 \), \( C = 1 \). So \( y = e^{2x}-e^{x} \).
ExamQ6. (AP BC style) The number of subscribers \( S \), in thousands, to a new streaming service satisfies \( \dfrac{dS}{dt} = 0.5S\left(1-\dfrac{S}{10}\right) \), where \( t \) is in months and \( S(0) = 2 \). (a) Find \( \displaystyle\lim_{t \to \infty} S(t) \). [1] (b) For what value of \( S \) is the number of subscribers growing fastest? Justify your answer. [2] (c) Is the graph of \( S \) concave up or concave down at \( t = 0 \)? Justify. [2] (d) Find \( S(t) \). [4] Show worked answer
(a) Logistic with \( L = 10 \) and \( 0 < 2 < 10 \), so \( S \to 10 \) thousand. [B1]
(b) \( \dfrac{dS}{dt} = 0.5S-0.05S^2 \) is a downward parabola in \( S \) with roots 0 and 10, [M1] so it is greatest at its vertex, \( S = 5 \) thousand. [A1]
(c) \( \dfrac{d^2S}{dt^2} = \left(0.5-0.1S\right)\dfrac{dS}{dt} \). [M1]
At \( S = 2 \): \( \dfrac{dS}{dt} = 0.5 \times 2 \times 0.8 = 0.8 \) and \( \dfrac{d^2S}{dt^2} = 0.3 \times 0.8 = 0.24 > 0 \): concave up. [A1]
(d) Separate: \( \displaystyle\int \frac{10}{S(10-S)}\,dS = \int 0.5\,dt \), and \( \dfrac{10}{S(10-S)} = \dfrac{1}{S} + \dfrac{1}{10-S} \). [M1]
\( \ln S-\ln(10-S) = 0.5t + C \). [A1]
At \( t = 0 \): \( C = \ln\tfrac{2}{8} = -\ln 4 \), so \( \dfrac{S}{10-S} = \tfrac{1}{4}e^{0.5t} \). [M1]
Rearrange: \( S = \dfrac{10}{1 + 4e^{-0.5t}} \). [A1]
Total: 9 marks.

Check yourself

1. What is the doubling time for \( \dfrac{dy}{dt} = 0.05y \)?

\( e^{0.05t} = 2 \) gives \( t = \dfrac{\ln 2}{0.05} \approx 13.9 \). The rule of 70 gives \( 70 \div 5 = 14 \), which agrees.

2. For \( \dfrac{dP}{dt} = 2P\left(1-\dfrac{P}{50}\right) \) with \( P(0) = 70 \), what happens to \( P \)?

Above the carrying capacity the bracket is negative, so \( \dfrac{dP}{dt} < 0 \). The solution falls but cannot cross the equilibrium \( P = 50 \), so it tends to 50.

3. One step of Euler’s method with \( h = 0.1 \) for \( \dfrac{dy}{dx} = y \), \( y(0) = 1 \), gives which estimate of \( y(0.1) \)?

\( y_1 = 1 + 0.1 \times 1 = 1.1 \). The exact value is \( e^{0.1} \approx 1.105 \); Euler is slightly low because \( e^{x} \) is concave up.

Your score: 0 out of 3

The short version

  • \( \dfrac{dy}{dt} = ky \) gives \( y = y_0e^{kt} \); doubling time or half-life \( \dfrac{\ln 2}{|k|} \). Continuous compounding is the case \( k = r \), and the rule of 70 comes from \( \ln 2 \approx 0.693 \).
  • \( \dfrac{dy}{dt} = -k(y-E) \), \( k > 0 \), gives \( y = E + (y_0-E)e^{-kt} \): cooling, mixing and price adjustment all decay towards an equilibrium.
  • Logistic (AP BC): \( P \to L \); fastest growth at \( P = \tfrac{L}{2} \) with rate \( \tfrac{kL}{4} \); \( P = \dfrac{L}{1 + Ae^{-kt}} \) with \( A = \dfrac{L-P_0}{P_0} \).
  • Euler (AP BC, IB HL): \( y_{n+1} = y_n + h\,f(x_n, y_n) \). It underestimates a concave-up solution, and halving \( h \) roughly halves the error.
  • IB HL also uses \( y = vx \) for homogeneous equations and the integrating factor \( e^{\int P\,dx} \) for linear ones.
  • The full chapter in Mathematics Made Simple has many more worked examples and a full set of practice questions with a complete answer key.
Want more questions like these, with worked answers?
The practice book has hundreds more, graded from easy to exam level.
Next: step 26 of 33Area Between Curves and Average Value