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.

Differential equations

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. Differential equations: solutions and equilibria

Warm-up

Three quick questions from earlier lessons.

  1. f(x)=(3x+6)2f(x) = (3x + 6)^{ 2 }. Find f′(x)f'(x).
  2. f(x)=sin⁡(3x2)f(x) = \sin(3x^2). Find f′(x)f'(x).
  3. f(x)=e3x2f(x) = e^{ 3x^2}. Find f′(x)f'(x).

Discover

A differential equation links a function with its derivatives. Is y=e2xy = e^{2x} a solution of y′=2yy' = 2y?

  1. Yes
  2. No

Key idea

A solution is a function, not a number.

A differential equation relates yy, its derivatives and the variable. A function is a solution if substituting it makes both sides equal for every xx. A constant solution y=cy = c (an equilibrium) has y′=0y' = 0.

Worked example

Find the equilibrium of dydt=3(y−5)\dfrac{dy}{dt} = 3(y - 5), and check y=5+2e3ty = 5 + 2e^{3t}.

3(y−5)=0⇒y=53(y - 5) = 0 \Rightarrow y = 5
Constant solution: y' = 0.
y′=6e3ty' = 6e^{3t}
Differentiate the proposed solution.
It is a solution
Right side: 3(2e^{3t}) = 6e^{3t}. Equal.

Your turn, guided

Your turn: the equilibrium of dydt=2(4−y)\dfrac{dy}{dt} = 2(4 - y).

y=4y = 4
Set 2(4 − y) = 0.

Practice ★

  1. Which function is a solution of dydx=5y\dfrac{dy}{dx} = 5y?
    1. y=3e5xy = 3e^{ 5x}
    2. y=e3xy = e^{3x}
    3. y=5xyy = 5xy
    4. y=ex+5y = e^{x} + 5
  2. Which function is a solution of dydx=6y\dfrac{dy}{dx} = 6y?
    1. y=3e6xy = 3e^{ 6x}
    2. y=e3xy = e^{3x}
    3. y=6xyy = 6xy
    4. y=ex+6y = e^{x} + 6
  1. dydt=2(y−3)\dfrac{dy}{dt} = 2(y - 3). Find the constant (equilibrium) solution y=cy = c.
  2. dydt=19(y−25)\dfrac{dy}{dt} = 19(y - 25). Find the constant (equilibrium) solution y=cy = c.

Watch out!

Practice ★★

  1. For which k>0k > 0 is y=ekxy = e^{kx} a solution of y′′−9y=0y'' - 9y = 0?
  2. For which k>0k > 0 is y=ekxy = e^{kx} a solution of y′′−289y=0y'' - 289y = 0?

Exit ticket

Three questions to check you have got it.

  1. dydt=2(y−3)\dfrac{dy}{dt} = 2(y - 3). Find the constant (equilibrium) solution y=cy = c.
  2. dydt=19(y−25)\dfrac{dy}{dt} = 19(y - 25). Find the constant (equilibrium) solution y=cy = c.
  3. dydt=4(y−9)\dfrac{dy}{dt} = 4(y - 9). Find the constant (equilibrium) solution y=cy = c.

Summary card

Differential equations

  • Check a solution: compute its derivatives, substitute, compare.
  • Equilibrium: set the rate equal to 0.

Watch out: equilibrium means y′=0y' = 0, not y=0y = 0.

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

Challenge ★★★

  1. For which k>0k > 0 is y=ekxy = e^{kx} a solution of y′′−y′−2y=0y'' - y' - 2y = 0?

2. Slope fields

Warm-up

Three quick questions from earlier lessons.

  1. Which function is a solution of dydx=5y\dfrac{dy}{dx} = 5y?
    1. y=3e5xy = 3e^{ 5x}
    2. y=e3xy = e^{3x}
    3. y=5xyy = 5xy
    4. y=ex+5y = e^{x} + 5
  2. For which k>0k > 0 is y=ekxy = e^{kx} a solution of y′′−9y=0y'' - 9y = 0?
  3. dydt=2(y−3)\dfrac{dy}{dt} = 2(y - 3). Find the constant (equilibrium) solution y=cy = c.

Discover

For dydx=x−y\dfrac{dy}{dx} = x - y, a slope field draws a short segment at each grid point with that slope. What is the slope at (3,1)(3, 1)?

  1. 2
  2. −2

Key idea

A slope field shows the shape of all solutions without solving.

At each point (x,y)(x, y) draw a segment of slope f(x,y)f(x, y). Solution curves follow the segments. If ff depends only on xx, segments are parallel along vertical lines; only on yy, along horizontal lines; where f=0f = 0, segments are horizontal.

Worked example

Describe the field of dydx=y−2\dfrac{dy}{dx} = y - 2.

Same slope along each horizontal line
Depends only on y.
Horizontal segments along y=2y = 2
y − 2 = 0.
Rising above y=2y = 2, falling below
Signs.

Your turn, guided

Your turn: dydx=xy\dfrac{dy}{dx} = xy at (2,−3)(2, -3).

slope −6-6
2 × (−3).

Practice ★

  1. In the slope field of dydx=x+2y\dfrac{dy}{dx} = x + 2y, what is the slope of the segment at (3,0)(3, 0)?
  2. In the slope field of dydx=x+11y\dfrac{dy}{dx} = x + 11y, what is the slope of the segment at (−7,−8)(-7, -8)?
  3. In the slope field of dydx=x+2y\dfrac{dy}{dx} = x + 2y, what is the slope of the segment at (−2,3)(-2, 3)?

Watch out!

Practice ★★

  1. In the slope field of dydx=9x2\dfrac{dy}{dx} = 9x^2, which segments are all parallel?
    1. Those along any vertical line x=cx = c
    2. Those along any horizontal line y=cy = c
    3. None: every segment has its own slope
  1. Slope field of dydx=y(3−y)\dfrac{dy}{dx} = y(3 - y). Tick all the true statements.
    1. Segments are horizontal along y=0y = 0 and y=3y = 3
    2. Slopes are positive for 0<y<30 < y < 3
    3. Slopes are negative for y>3y > 3
    4. Slopes are positive for y>3y > 3
    5. Segments are horizontal along x=3x = 3
  2. Slope field of dydx=y(5−y)\dfrac{dy}{dx} = y(5 - y). Tick all the true statements.
    1. Segments are horizontal along y=0y = 0 and y=5y = 5
    2. Slopes are positive for 0<y<50 < y < 5
    3. Slopes are negative for y>5y > 5
    4. Slopes are positive for y>5y > 5
    5. Segments are horizontal along x=5x = 5

Exit ticket

Three questions to check you have got it.

  1. In the slope field of dydx=x+2y\dfrac{dy}{dx} = x + 2y, what is the slope of the segment at (3,0)(3, 0)?
  2. In the slope field of dydx=x+11y\dfrac{dy}{dx} = x + 11y, what is the slope of the segment at (−7,−8)(-7, -8)?
  3. In the slope field of dydx=x+2y\dfrac{dy}{dx} = x + 2y, what is the slope of the segment at (−2,3)(-2, 3)?

Summary card

Slope fields

  • Slope at (x,y)(x, y): substitute into f(x,y)f(x, y).
  • Only xx: parallel along verticals. Only yy: along horizontals.
  • f=0f = 0: horizontal segments (equilibria if constant in yy).

Watch out: (x,y)(x, y) in that order.

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

Challenge ★★★

  1. In the slope field of dydx=x−y\dfrac{dy}{dx} = x - y, at which point on the yy-axis is the slope −3-3? Give its yy-coordinate.

3. Separation of variables and initial conditions

Warm-up

Three quick questions from earlier lessons.

  1. Find FF with F′(x)=2xcos⁡(x2)+3F'(x) = 2x\cos(x^2) + 3 and F(0)=0F(0) = 0.
  2. Find FF with F′(x)=x ex2F'(x) = x\,e^{x^2} and F(0)=3F(0) = 3.
  3. Find FF with F′(x)=(5x+2)2F'(x) = (5x + 2)^{ 2 } and F(0)=0F(0) = 0.

Discover

To solve dydx=2xy\dfrac{dy}{dx} = 2xy, Ana integrates both sides with respect to xx and writes y=x2y+Cy = x^2 y + C. Why is that not a solution method?

  1. yy is not a constant: the variables must be separated first
  2. It is fine, it just needs a value for CC

Key idea

Gather each variable with its own differential.

Separable equation dydx=g(x)h(y)\dfrac{dy}{dx} = g(x)h(y): write dyh(y)=g(x) dx\dfrac{dy}{h(y)} = g(x)\,dx, integrate both sides (one constant CC), solve for yy, then use the initial condition to find CC.

Worked example

Solve dydx=2xy\dfrac{dy}{dx} = 2xy with y(0)=3y(0) = 3.

dyy=2x dx\dfrac{dy}{y} = 2x\,dx
Separate.
ln⁡∣y∣=x2+C\ln|y| = x^2 + C
Integrate.
y=3ex2y = 3e^{x^2}
Exponentiate: y = Ae^{x²}; y(0) = 3 gives A = 3.

Your turn, guided

Your turn: dydx=3y\dfrac{dy}{dx} = 3y, y(0)=2y(0) = 2.

y=2e3xy = 2e^{3x}
ln|y| = 3x + C, so y = Ae^{3x}.

Practice ★

  1. Solve dydx=4xy\dfrac{dy}{dx} = 4xy with y(0)=5y(0) = 5.
  2. Solve dydx=4xy\dfrac{dy}{dx} = 4xy with y(0)=9y(0) = 9.
  3. Solve dydx=4xy\dfrac{dy}{dx} = 4xy with y(0)=2y(0) = 2.

Watch out!

Practice ★★

  1. Solve dydx=xy\dfrac{dy}{dx} = \dfrac{x}{y} with y(0)=8y(0) = 8 (so y>0y > 0). Give yy in terms of xx.
  2. Solve dydx=xy\dfrac{dy}{dx} = \dfrac{x}{y} with y(0)=6y(0) = 6 (so y>0y > 0). Give yy in terms of xx.
  1. Solve dydx=y2\dfrac{dy}{dx} = y^2 with y(0)=13y(0) = \dfrac{1}{ 3 }.

Exit ticket

Three questions to check you have got it.

  1. Solve dydx=4xy\dfrac{dy}{dx} = 4xy with y(0)=5y(0) = 5.
  2. Solve dydx=4xy\dfrac{dy}{dx} = 4xy with y(0)=9y(0) = 9.
  3. Solve dydx=4xy\dfrac{dy}{dx} = 4xy with y(0)=2y(0) = 2.

Summary card

Separation of variables

  1. dyh(y)=g(x) dx\dfrac{dy}{h(y)} = g(x)\,dx.
  2. Integrate both sides, one +C+C.
  3. Solve for yy; use the initial value.

Watch out: ex+C=Aexe^{x + C} = Ae^x, not ex+Ce^x + C.

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

Challenge ★★★

  1. Solve dydx=−xy\dfrac{dy}{dx} = -\dfrac{x}{y} with y(0)=3y(0) = 3 (so y>0y > 0). Give yy in terms of xx.

4. Exponential growth and decay

Warm-up

Three quick questions from earlier lessons.

  1. A sample of 160 mg of a radioactive substance has a half-life of 10 years. How many mg are left after 30 years?
  2. A dose of 200 mg of a medicine has a half-life of 2 hours. Write the amount A(t)A(t), in mg, left after tt hours.
  3. A sample of 200 mg has a half-life of 2 years. How much is left after 8 years? Round to 2 decimal places.

Discover

The blue curve is y=a ekty = a\,e^{kt}, a solution of y′=kyy' = ky with y(0)=ay(0) = a. Move kk through 0.

Solutions y = a e^(kt) of y' = ky. For k > 0 they grow faster and faster; for k < 0 they decay towards 0; k = 0 gives a constant.

For k<0k < 0, what happens to yy?

  1. It decays towards 0
  2. It falls in a straight line and crosses 0

Key idea

Rate proportional to amount means exponential.

dydt=ky\dfrac{dy}{dt} = ky with y(0)=y0y(0) = y_0 has the solution y=y0ekty = y_0 e^{kt}. k>0k > 0: growth, doubling time ln⁡2k\tfrac{\ln 2}{k}. k<0k < 0: decay, half-life ln⁡2∣k∣\tfrac{\ln 2}{|k|}.

Worked example

Bacteria double every 3 hours, starting from 500. How many after 12 hours?

500⋅24500 \cdot 2^4
12 hours = 4 doubling times.
=8000= 8000
Compute.
y=500e(ln⁡2/3)ty = 500e^{(\ln 2/3)t}
Equivalently k = ln 2 / 3.

Your turn, guided

Your turn: half-life 5 years, find kk.

k=−ln⁡25k = -\dfrac{\ln 2}{5}
e^{5k} = ½.

Practice ★

  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. A population grows with dPdt=kP\dfrac{dP}{dt} = kP. It starts at 127 and doubles every 29 years. What is it after 87 years?
  1. Solve dydt=−2y\dfrac{dy}{dt} = -2y with y(0)=5y(0) = 5.
  2. Solve dydt=4y\dfrac{dy}{dt} = 4y with y(0)=8y(0) = 8.

Watch out!

Practice ★★

  1. A substance decays with dmdt=km\dfrac{dm}{dt} = km and has a half-life of 2 years. Find kk (exact).
  2. A substance decays with dmdt=km\dfrac{dm}{dt} = km and has a half-life of 92 years. Find kk (exact).

Exit ticket

Three questions to check you have got it.

  1. Solve dydt=−2y\dfrac{dy}{dt} = -2y with y(0)=5y(0) = 5.
  2. Solve dydt=4y\dfrac{dy}{dt} = 4y with y(0)=8y(0) = 8.
  3. Solve dydt=3y\dfrac{dy}{dt} = 3y with y(0)=4y(0) = 4.

Summary card

Exponential models

  • y′=kyy' = ky, y(0)=y0⇒y=y0ekty(0) = y_0 \Rightarrow y = y_0e^{kt}.
  • Decay: k<0k < 0; k=−ln⁡2/(half-life)k = -\ln 2 / (\text{half-life}).

Watch out: equal times multiply by equal factors.

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

Challenge ★★★

  1. A substance with a half-life of 23 years decays exponentially. What fraction of it is left after 69 years?

5. Newton's law of cooling

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 cup at temperature bb °C cools in a 20 °C room. The violet line is the room temperature. Move bb and the cooling constant kk.

Newton's law of cooling: T = 20 + (b − 20)e^(−kt). Whatever the start, the temperature approaches the room's 20 °C, faster for larger k.

Which temperature does the cup approach?

  1. 20 °C
  2. 0 °C

Key idea

The difference with the surroundings decays exponentially.

Newton's law of cooling: dTdt=−k(T−A)\dfrac{dT}{dt} = -k(T - A), with AA the surrounding temperature and k>0k > 0. Solution: T=A+(T0−A)e−ktT = A + (T_0 - A)e^{-kt}.

Worked example

Tea at 90 °C in a 20 °C room, k=0.1k = 0.1 per minute.

T−20=70e−0.1tT - 20 = 70e^{-0.1t}
u = T − 20 satisfies u' = −0.1u.
T=20+70e−0.1tT = 20 + 70e^{-0.1t}
So:
It starts cooling at 7 °C per minute
At t = 0 the rate is −0.1 × 70.

Your turn, guided

Your turn: soup at 80 °C in a 25 °C room, k=0.2k = 0.2. The rate at t=0t = 0?

−11-11 °C/min
−0.2 × (80 − 25).

Practice ★

  1. Soup at 90 °C is left in a 20 °C kitchen and follows Newton's law of cooling. Which temperature does it approach in the long run?
  1. dTdt=−210(T−22)\dfrac{dT}{dt} = -\tfrac{ 2 }{10}(T - 22) and T(0)=83T(0) = 83. How fast is the temperature changing at t=0t = 0, in °C/min?
  2. dTdt=−710(T−23)\dfrac{dT}{dt} = -\tfrac{ 7 }{10}(T - 23) and T(0)=61T(0) = 61. How fast is the temperature changing at t=0t = 0, in °C/min?

Watch out!

Practice ★★

  1. A drink at 65 °C cools in a 18 °C room: dTdt=−310(T−18)\dfrac{dT}{dt} = -\tfrac{ 3 }{10}(T - 18). Find T(t)T(t).
  2. A drink at 89 °C cools in a 16 °C room: dTdt=−210(T−16)\dfrac{dT}{dt} = -\tfrac{ 2 }{10}(T - 16). Find T(t)T(t).

Exit ticket

Three questions to check you have got it.

  1. A drink at 65 °C cools in a 18 °C room: dTdt=−310(T−18)\dfrac{dT}{dt} = -\tfrac{ 3 }{10}(T - 18). Find T(t)T(t).
  2. A drink at 89 °C cools in a 16 °C room: dTdt=−210(T−16)\dfrac{dT}{dt} = -\tfrac{ 2 }{10}(T - 16). Find T(t)T(t).
  3. A drink at 79 °C cools in a 15 °C room: dTdt=−210(T−15)\dfrac{dT}{dt} = -\tfrac{ 2 }{10}(T - 15). Find T(t)T(t).

Summary card

Newton's law of cooling

  • T′=−k(T−A)T' = -k(T - A).
  • T=A+(T0−A)e−ktT = A + (T_0 - A)e^{-kt}, approaching AA.

Watch out: it is the difference T−AT - A that decays.

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

Challenge ★★★

  1. dTdt=−210(T−20)\dfrac{dT}{dt} = -\tfrac{ 2 }{10}(T - 20) with T(0)=80T(0) = 80. When is the temperature 50 °C? (exact)

6. 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.

7. 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").