Lessons and exercises follow the school system and stay in its language.Les leçons et les exercices suivent le système scolaire et restent dans sa langue.Lektionen und Übungen folgen dem Schulsystem und bleiben in seiner Sprache.

Euler's method and logistic models

Print the chapter

Every lesson of the chapter, ready for paper. Exercise sets are lettered A, B, C… and answered at the end.

To save a PDF, choose “Save as PDF” in the print dialog.

1. Euler's method

Warm-up

Three quick questions from earlier lessons.

  1. f(2)=3f(2) = 3 and f′(2)=2f'(2) = 2. Write the local linearization L(x)L(x) of ff at x=2x = 2.
  2. f(x)=xf(x) = \sqrt{x} has f′(x)=12xf'(x) = \dfrac{1}{2\sqrt{x}}. Use the local linearization at x=4x = 4 to estimate 6\sqrt{ 6 }. Give an exact fraction.
  3. Near x=4x = 4, the graph of ff is concave up. Does the local linearization at x=4x = 4 over- or underestimate f(x)f(x) for xx near 44?
    1. Underestimate: the tangent line lies below the curve.
    2. Overestimate: the tangent line lies above the curve.
    3. Neither: near x=4x = 4 the linearization is exact.

Discover

y′=yy' = y, y(0)=1y(0) = 1. At (0,1)(0, 1) the slope is 1. Follow the tangent line for a step of 0.50.5. Where do you land?

  1. (0.5, 1.5)(0.5,\ 1.5)
  2. (0.5, 2)(0.5,\ 2)

Key idea

Walk along short tangent lines.

Euler's method for y′=f(x,y)y' = f(x, y), y(x0)=y0y(x_0) = y_0, step hh: xn+1=xn+hx_{n+1} = x_n + h, yn+1=yn+h f(xn,yn)y_{n+1} = y_n + h\,f(x_n, y_n). Smaller steps give better estimates.

Worked example

y′=x+yy' = x + y, y(0)=1y(0) = 1, h=0.5h = 0.5. Estimate y(1)y(1).

y1=1+0.5⋅1=1.5y_1 = 1 + 0.5 \cdot 1 = 1.5
Slope at (0, 1) is 1.
y2=1.5+0.5⋅2=2.5y_2 = 1.5 + 0.5 \cdot 2 = 2.5
Slope at (0.5, 1.5) is 2.
y(1)≈2.5y(1) \approx 2.5
Two steps reach x = 1.

Your turn, guided

Your turn: y′=2yy' = 2y, y(0)=3y(0) = 3, one step with h=0.1h = 0.1.

y(0.1)≈3.6y(0.1) \approx 3.6
3 + 0.1 × 6.

Practice ★

  1. dydx=3x+y\dfrac{dy}{dx} = 3x + y and y(1)=1y(1) = 1. Use one step of Euler's method with h=0.1h = 0.1 to estimate y(1.1)y(1.1).
  2. dydx=16x+y\dfrac{dy}{dx} = 16x + y and y(1)=41y(1) = 41. Use one step of Euler's method with h=0.1h = 0.1 to estimate y(1.1)y(1.1).
  3. dydx=1x+y\dfrac{dy}{dx} = 1x + y and y(1)=3y(1) = 3. Use one step of Euler's method with h=0.1h = 0.1 to estimate y(1.1)y(1.1).

Watch out!

Practice ★★

  1. dydx=y\dfrac{dy}{dx} = y and y(0)=4y(0) = 4. Use Euler's method with two steps of size h=12h = \tfrac{1}{2} to estimate y(1)y(1).
  2. dydx=y\dfrac{dy}{dx} = y and y(0)=74y(0) = 74. Use Euler's method with two steps of size h=12h = \tfrac{1}{2} to estimate y(1)y(1).
  1. The solution of dydx=y\dfrac{dy}{dx} = y, y(0)=1y(0) = 1, is concave up. Does Euler's method with h>0h > 0 over- or underestimate y(1)y(1)?
    1. Underestimate: each step follows a tangent line, which lies below a concave-up curve
    2. Overestimate
    3. It is exact

Exit ticket

Three questions to check you have got it.

  1. dydx=3x+y\dfrac{dy}{dx} = 3x + y and y(1)=1y(1) = 1. Use one step of Euler's method with h=0.1h = 0.1 to estimate y(1.1)y(1.1).
  2. dydx=16x+y\dfrac{dy}{dx} = 16x + y and y(1)=41y(1) = 41. Use one step of Euler's method with h=0.1h = 0.1 to estimate y(1.1)y(1.1).
  3. dydx=1x+y\dfrac{dy}{dx} = 1x + y and y(1)=3y(1) = 3. Use one step of Euler's method with h=0.1h = 0.1 to estimate y(1.1)y(1.1).

Summary card

Euler's method

yn+1=yn+h f(xn,yn)y_{n+1} = y_n + h\,f(x_n, y_n): slope at the current point × step.

Watch out: update the slope at each new point.

One more step is optional: a challenge. Try it, or finish the lesson now.

Challenge ★★★

  1. dydx=2y\dfrac{dy}{dx} = 2y and y(0)=1y(0) = 1. Use Euler's method with two steps of size h=12h = \tfrac{1}{2} to estimate y(1)y(1).

2. Logistic growth: carrying capacity and fastest growth

Warm-up

Three quick questions from earlier lessons.

  1. A population grows with dPdt=kP\dfrac{dP}{dt} = kP. It starts at 100 and doubles every 3 years. What is it after 9 years?
  2. Solve dydt=−2y\dfrac{dy}{dt} = -2y with y(0)=5y(0) = 5.
  3. A substance decays with dmdt=km\dfrac{dm}{dt} = km and has a half-life of 2 years. Find kk (exact).

Discover

A population starts at 10 and follows a logistic model with carrying capacity kk. Move kk.

Logistic curves starting at 10 with carrying capacity k: slow growth, then fast growth in the middle, then levelling off at k.

Where on the curve is the population growing fastest?

  1. Halfway to kk
  2. Just before it reaches kk

Key idea

Growth slows as resources run out.

Logistic model: dPdt=rP(1−PK)\dfrac{dP}{dt} = rP\left(1 - \dfrac{P}{K}\right). Equilibria P=0P = 0 and P=KP = K (the carrying capacity). For 0<P00 < P_0, P(t)→KP(t) \to K. Growth is fastest at P=K2P = \tfrac{K}{2}.

Worked example

dPdt=0.4P(1−P500)\dfrac{dP}{dt} = 0.4P\left(1 - \dfrac{P}{500}\right).

Carrying capacity K=500K = 500
Set the rate to 0.
Fastest growth at P=250P = 250
Half of K.
Maximum rate 5050 per unit time
0.4 × 250 × ½.

Your turn, guided

Your turn: dPdt=0.2P(1−P800)\dfrac{dP}{dt} = 0.2P\left(1 - \dfrac{P}{800}\right). Fastest growth at…

P=400P = 400
K/2.

Practice ★

  1. A population follows dPdt=710P(1−P558)\dfrac{dP}{dt} = \dfrac{ 7 }{10}P\left(1 - \dfrac{P}{ 558 }\right). What is its carrying capacity?
  2. A population follows dPdt=910P(1−P428)\dfrac{dP}{dt} = \dfrac{ 9 }{10}P\left(1 - \dfrac{P}{ 428 }\right). What is its carrying capacity?
  1. dPdt=310P(1−P280)\dfrac{dP}{dt} = \dfrac{ 3 }{10}P\left(1 - \dfrac{P}{ 280 }\right). For which population PP is it growing fastest?
  2. dPdt=910P(1−P590)\dfrac{dP}{dt} = \dfrac{ 9 }{10}P\left(1 - \dfrac{P}{ 590 }\right). For which population PP is it growing fastest?

Watch out!

Practice ★★

  1. dPdt=0.2P(1−P750)\dfrac{dP}{dt} = 0.2P\left(1 - \dfrac{P}{ 750 }\right) with P(0)>0P(0) > 0. Tick all the true statements.
    1. P=0P = 0 and P=750P = 750 are equilibrium solutions
    2. If P(0)>750P(0) > 750, then PP decreases towards 750
    3. lim⁡t→∞P(t)=750\displaystyle\lim_{t \to \infty} P(t) = 750
    4. Starting below 750, PP eventually exceeds 750
    5. lim⁡t→∞P(t)=0.2\displaystyle\lim_{t \to \infty} P(t) = 0.2

Exit ticket

Three questions to check you have got it.

  1. dPdt=310P(1−P280)\dfrac{dP}{dt} = \dfrac{ 3 }{10}P\left(1 - \dfrac{P}{ 280 }\right). For which population PP is it growing fastest?
  2. dPdt=910P(1−P590)\dfrac{dP}{dt} = \dfrac{ 9 }{10}P\left(1 - \dfrac{P}{ 590 }\right). For which population PP is it growing fastest?
  3. dPdt=110P(1−P342)\dfrac{dP}{dt} = \dfrac{ 1 }{10}P\left(1 - \dfrac{P}{ 342 }\right). For which population PP is it growing fastest?

Summary card

Logistic growth

  • P′=rP(1−P/K)P' = rP(1 - P/K); equilibria 00 and KK.
  • P→KP \to K; fastest growth at K/2K/2.

Watch out: rr is a rate, KK is a population.

One more step is optional: a challenge. Try it, or finish the lesson now.

Challenge ★★★

  1. dPdt=710P(1−P208)\dfrac{dP}{dt} = \dfrac{ 7 }{10}P\left(1 - \dfrac{P}{ 208 }\right). Find dPdt\dfrac{dP}{dt} when the population is twice the carrying capacity.

3. The logistic solution

Warm-up

Three quick questions from earlier lessons.

  1. A population follows dPdt=710P(1−P558)\dfrac{dP}{dt} = \dfrac{ 7 }{10}P\left(1 - \dfrac{P}{ 558 }\right). What is its carrying capacity?
  2. dPdt=310P(1−P280)\dfrac{dP}{dt} = \dfrac{ 3 }{10}P\left(1 - \dfrac{P}{ 280 }\right). For which population PP is it growing fastest?
  3. dPdt=0.2P(1−P750)\dfrac{dP}{dt} = 0.2P\left(1 - \dfrac{P}{ 750 }\right) with P(0)>0P(0) > 0. Tick all the true statements.
    1. P=0P = 0 and P=750P = 750 are equilibrium solutions
    2. If P(0)>750P(0) > 750, then PP decreases towards 750
    3. lim⁡t→∞P(t)=750\displaystyle\lim_{t \to \infty} P(t) = 750
    4. Starting below 750, PP eventually exceeds 750
    5. lim⁡t→∞P(t)=0.2\displaystyle\lim_{t \to \infty} P(t) = 0.2

Discover

The logistic solution is P(t)=K1+Ae−rtP(t) = \dfrac{K}{1 + Ae^{-rt}}. What does P(t)P(t) approach as t→∞t \to \infty?

  1. KK
  2. 00

Key idea

The explicit solution, fitted to the start.

dPdt=rP(1−PK)\dfrac{dP}{dt} = rP\left(1 - \dfrac{P}{K}\right), P(0)=P0P(0) = P_0 has the solution P(t)=K1+Ae−rtP(t) = \dfrac{K}{1 + Ae^{-rt}} with A=K−P0P0A = \dfrac{K - P_0}{P_0}.

Worked example

K=1000K = 1000, P0=200P_0 = 200, r=0.5r = 0.5.

A=4A = 4
(1000 − 200)/200.
P(t)=10001+4e−0.5tP(t) = \dfrac{1000}{1 + 4e^{-0.5t}}
Substitute.
P(0)=200P(0) = 200
Check t = 0: 1000/5.

Your turn, guided

Your turn: K=600K = 600, P0=100P_0 = 100. Find AA.

A=5A = 5
(600 − 100)/100.

Practice ★

  1. The logistic solution P(t)=2031+Ae−rtP(t) = \dfrac{ 203 }{1 + Ae^{-rt} } has P(0)=58P(0) = 58. Find AA.
  2. The logistic solution P(t)=7551+Ae−rtP(t) = \dfrac{ 755 }{1 + Ae^{-rt} } has P(0)=48P(0) = 48. Find AA.
  1. P(t)=2771+5e−0.3tP(t) = \dfrac{ 277 }{1 + 5e^{-0.3t} }. Find the initial population P(0)P(0).
  2. P(t)=7421+4e−0.3tP(t) = \dfrac{ 742 }{1 + 4e^{-0.3t} }. Find the initial population P(0)P(0).

Watch out!

Practice ★★

  1. dPdt=210P(1−P253)\dfrac{dP}{dt} = \dfrac{ 2 }{10}P\left(1 - \dfrac{P}{ 253 }\right). How fast is the population growing when P=2532P = \dfrac{ 253 }{2}?
  2. dPdt=710P(1−P556)\dfrac{dP}{dt} = \dfrac{ 7 }{10}P\left(1 - \dfrac{P}{ 556 }\right). How fast is the population growing when P=5562P = \dfrac{ 556 }{2}?

Exit ticket

Three questions to check you have got it.

  1. The logistic solution P(t)=2031+Ae−rtP(t) = \dfrac{ 203 }{1 + Ae^{-rt} } has P(0)=58P(0) = 58. Find AA.
  2. The logistic solution P(t)=7551+Ae−rtP(t) = \dfrac{ 755 }{1 + Ae^{-rt} } has P(0)=48P(0) = 48. Find AA.
  3. The logistic solution P(t)=7701+Ae−rtP(t) = \dfrac{ 770 }{1 + Ae^{-rt} } has P(0)=24P(0) = 24. Find AA.

Summary card

The logistic solution

P(t)=K1+Ae−rtP(t) = \dfrac{K}{1 + Ae^{-rt}}, A=K−P0P0A = \dfrac{K - P_0}{P_0}, P→KP \to K.

Watch out: check AA by computing P(0)P(0).

One more step is optional: a challenge. Try it, or finish the lesson now.

Challenge ★★★

  1. P(t)=6721+3e−7t/10P(t) = \dfrac{ 672 }{1 + 3e^{-7t/10} }, so P(0)=6724P(0) = \tfrac{ 672 }{4}. When does PP reach 6722\tfrac{ 672 }{2}? (exact)

4. Euler's method

Discover

y′=yy' = y and y(0)=1y(0) = 1. Without solving, how could you estimate y(0.1)y(0.1)?

  1. Follow the slope for a short step: 1+0.1×11 + 0.1 \times 1
  2. You cannot: you must solve the equation first

Key idea

Euler's method.

For y′=f(x,y)y' = f(x, y), step by step with step size hh:

yn+1=yn+h f(xn,yn)y_{n+1} = y_n + h\,f(x_n, y_n), xn+1=xn+h\quad x_{n+1} = x_n + h.

Worked example

y′=yy' = y, y(0)=1y(0) = 1, two steps of h=0.1h = 0.1:

y1=1+0.1×1=1.1y_1 = 1 + 0.1 \times 1 = 1.1
First step.
y2=1.1+0.1×1.1=1.21y_2 = 1.1 + 0.1 \times 1.1 = 1.21
Second step.

Your turn, guided

Your turn: one step of h=0.1h = 0.1 for y′=yy' = y, y(0)=5y(0) = 5.

5.55.5
5+0.1×55 + 0.1 \times 5.

Practice ★

  1. y′=yy' = y and y(0)=14y(0) = 14. Estimate y(0.1)y(0.1) with one step of Euler's method.
  2. y′=yy' = y and y(0)=6y(0) = 6. Estimate y(0.1)y(0.1) with one step of Euler's method.
  3. y′=yy' = y and y(0)=1y(0) = 1. Estimate y(0.1)y(0.1) with one step of Euler's method.

Practice ★★

  1. y′=2yy' = 2y and y(0)=2y(0) = 2. Estimate y(0.2)y(0.2) with two steps of h=0.1h = 0.1.
  2. y′=2yy' = 2y and y(0)=17y(0) = 17. Estimate y(0.2)y(0.2) with two steps of h=0.1h = 0.1.

Exit ticket

Two questions to check.

  1. y′=yy' = y and y(0)=14y(0) = 14. Estimate y(0.1)y(0.1) with one step of Euler's method.
  2. y′=yy' = y and y(0)=6y(0) = 6. Estimate y(0.1)y(0.1) with one step of Euler's method.

Summary card

Euler's method

  • Next value = current value + step × slope.
  • Smaller steps, better estimates.

Weather and climate models solve differential equations step by step, with much finer methods.

5. History of differential equations: Euler and Verhulst

Discover

In 1838 the Belgian mathematician Pierre-François Verhulst studied how populations grow. Before him, many believed a population grows forever like a geometric sequence. What did Verhulst add?

  1. Growth is limited by the size and fertility of the country
  2. Populations always shrink

Key idea

Equations that describe change.

176017801800182018401768Euler1768Euler
  1. Step 1176017801800182018401768Euler1768EulerLeonhard Euler 1707–1783Jakob Emanuel Handmann, 1753. Public domain1768–70: Euler's Institutiones calculi integralis: integrals and methods for differential equations.
  2. Step 2176017801800182018401768Euler1838Verhulst1768Euler1838VerhulstPierre François Verhulst 1804–1849Unknown artist. Public domain1838: Verhulst's law of population growth: growth is limited by the country.
  3. Step 3176017801800182018401768Euler1838Verhulst1844Verhulst: the 'logistic function'1768Euler1838Verhulst1844Verhulst: the 'logistic function'Pierre François Verhulst 1804–1849Unknown artist. Public domain1844: Verhulst names the solution of his equation the 'logistic function'.

Euler's Institutiones calculi integralis (1768–70) studied integrals and methods for differential equations, such as integrating factors. In 1838 Verhulst proposed his law of population growth, and in 1844 he named its solution the logistic function.

Worked example

A logistic model: P′=0.5 P(1−P1000)P' = 0.5\,P\left(1 - \dfrac{P}{1000}\right). How fast does the population grow when P=200P = 200?

0.5×200×(1−0.2)0.5 \times 200 \times \left(1 - 0.2\right)
Substitute P=200P = 200.
=80= 80 per unit of time
100×0.8100 \times 0.8.

Practice ★

  1. What name did Verhulst give in 1844 to the solution of his population equation?
    1. The logistic function
    2. The exponential function
    3. The normal distribution
  1. Verhulst's model P′=0.5 P(1−P400)P' = 0.5\,P\left(1 - \dfrac{P}{ 400 }\right): at which population P>0P > 0 does growth stop?
  2. Verhulst's model P′=0.5 P(1−P900)P' = 0.5\,P\left(1 - \dfrac{P}{ 900 }\right): at which population P>0P > 0 does growth stop?
  1. Same model with limit 900: how fast does the population grow when it is half the limit?

Summary card

Differential equations today

  • Medicine: how a drug's concentration falls in the blood.
  • Ecology and epidemics: logistic and related models.
  • Physics and engineering: motion, circuits, heat.

Sources: MacTutor biographies of Euler and Verhulst (see "Sources and credits").