Skip to content

Slope fields and Euler’s method

A differential equation gives the slope of the solution through every point. You can check a proposed solution by substituting it, draw the slopes as a field of short segments and read the shape of every solution at once, or step along them with Euler’s method and say whether the estimate runs high or low.

In this topic

Taught
Before the final, flavours A and B
Questions
14
Total marks
36
Suggested time
65 min
Difficulty

Introductory to Capstone

Show the 4 hardest

Key results

Checking a solution
y=φ(t) solves dydt=f(t,y)  ⟺  φ′(t)=f(t,φ(t))y = \varphi(t) \text{ solves } \frac{dy}{dt} = f(t, y) \iff \varphi'(t) = f\bigl(t, \varphi(t)\bigr)

For every tt in the interval considered; one matching point is not enough.

Linear differential equations
α(t) dydt+β(t) y+γ(t)=0\alpha(t)\,\frac{dy}{dt} + \beta(t)\,y + \gamma(t) = 0

The coefficients may depend on tt but not on yy; an equation that cannot be written this way is nonlinear.

Euler’s method
yn+1=yn+Δt f(tn,yn),tn+1=tn+Δty_{n+1} = y_{n} + \Delta t\, f(t_{n}, y_{n}), \qquad t_{n+1} = t_{n} + \Delta t

For dydt=f(t,y)\dfrac{dy}{dt} = f(t, y) with y(t0)=y0y(t_{0}) = y_{0}; then yny_{n} estimates y(tn)y(t_{n}).

Concavity from the equation
dydt=f(y)  ⟹  d2ydt2=f′(y) f(y)\frac{dy}{dt} = f(y) \implies \frac{d^{2}y}{dt^{2}} = f'(y)\,f(y)

When ff is differentiable.

Euler’s method runs low or high
y′′>0  ⟹  yn<y(tn),y′′<0  ⟹  yn>y(tn)y'' > 0 \implies y_{n} < y(t_{n}), \qquad y'' < 0 \implies y_{n} > y(t_{n})

For n≥1n \ge 1 and Δt>0\Delta t > 0, when every solution through the region the steps cross is concave up (for the first) or concave down (for the second).

Read the theoryUBC Math 100 §11.1 Introducing a new kind of equationUBC Math 100 §11.2 Verifying that a function is a solutionUBC Math 100 §12.1 Linear and nonlinear differential equationsUBC Math 100 §12.2 Slope fieldsUBC Math 100 §12.3 Euler’s method

Worked example

Standard3 marks · 5 min

Early in the season an insect population grows at a per-capita rate that falls as the season goes on. With PP in thousands of insects and tt in weeks,

dPdt=(0.6−0.2t) P,P(0)=100.\frac{dP}{dt} = (0.6 - 0.2t)\,P, \qquad P(0) = 100.

Use Euler’s method with two steps of Δt=1\Delta t = 1 to estimate P(2)P(2).

Strategy

Step along the tangent twice. Each step uses the slope at the point it starts from, which needs both the current time and the current population.

Working

  1. f(0,100)=(0.6)(100)=60,P1=100+1⋅60=160f(0, 100) = (0.6)(100) = 60, \qquad P_{1} = 100 + 1\cdot 60 = 160

    First step, from t = 0.

  2. f(1,160)=(0.6−0.2)(160)=64,P2=160+1⋅64=224f(1, 160) = (0.6 - 0.2)(160) = 64, \qquad P_{2} = 160 + 1\cdot 64 = 224

    Second step, from t = 1: both t and P have moved on.

  3. P(t)=100e0.6t−0.1t2  ⟹  P(2)=100e0.8≈222.6P(t) = 100e^{0.6t - 0.1t^{2}} \implies P(2) = 100e^{0.8} \approx 222.6

    For comparison: differentiating shows this formula solves the problem, and the two-step estimate is close to it.

Answer

P(2)≈P2=224 thousandP(2) \approx P_{2} = 224 \text{ thousand}

The answer is about 224 thousand insects.

Check

Over two weeks the per-capita rate averages 0.4, so P grows by a factor of about e0.8 ≈ 2.23, to roughly 223 thousand, close to 224.

Where this goes wrong

Leaving t = 0 in the slope for the second step, which gives 256. By t = 1 the per-capita rate has fallen to 0.4, and the second step must use it.

On the paper

Lay the steps out as a table of tt, yy, the slope and the next yy, state the step size, and round only the final answer.

Leans on

Linear approximation, from Linear approximation

Your turn

Introductory2 marks · 3 min

A loaf of bread comes out of the oven at 95 °C into a kitchen at 25 °C. Its temperature T(t)T(t), in °C after tt minutes, satisfies dTdt=0.05 (25−T)\dfrac{dT}{dt} = 0.05\,(25 - T). Use one step of Euler’s method with Δt=2\Delta t = 2 to estimate the temperature after 2 minutes.

Answer this question

Practice questions

5 of the 14, across every level. Open a solution to read the working, or answer the question yourself and it counts towards your progress.

  • Introductory1 mark · 2 min

    In each equation yy is an unknown function of tt. Which one of these differential equations is nonlinear?

    Answer this question
  • Introductory2 marks · 3 min

    A drug is given by a steady intravenous drip and cleared by the body at a rate proportional to the amount present, so the amount Q(t)Q(t), in mg after tt hours, satisfies dQdt=8−0.4Q\dfrac{dQ}{dt} = 8 - 0.4Q. For exactly one value of the constant bb, the function Q(t)=b+Ce−0.4tQ(t) = b + Ce^{-0.4t} is a solution for every constant CC. Find bb.

    Answer this question
  • Standard3 marks · 5 min

    A mass on a frictionless spring is x(t)x(t) centimetres from equilibrium after tt seconds, where

    d2xdt2=−25x,x(0)=10,x′(0)=50.\frac{d^{2}x}{dt^{2}} = -25x, \qquad x(0) = 10, \qquad x'(0) = 50.

    Find the positive ω\omega for which x(t)=Acos⁡(ωt)+Bsin⁡(ωt)x(t) = A\cos(\omega t) + B\sin(\omega t) is a solution, use the initial conditions to find AA and BB, and give xx at t=π20t = \tfrac{\pi}{20}.

    Answer this question
  • Challenging3 marks · 5 min

    Exactly one of these straight lines is itself a solution curve of dydt=2t−y\dfrac{dy}{dt} = 2t - y. Which one?

    Answer this question
  • Capstone5 marks · 10 min

    A ball is dropped from rest and falls with air resistance proportional to its speed. Its downward velocity v(t)v(t), in m/s after tt seconds, satisfies

    dvdt=10−0.5v,v(0)=0.\frac{dv}{dt} = 10 - 0.5v, \qquad v(0) = 0.

    Check that v(t)=20+Ce−t/2v(t) = 20 + Ce^{-t/2} solves the equation for every constant CC, and choose CC to match the initial condition. Then estimate v(2)v(2) with two Euler steps of Δt=1\Delta t = 1. Give the Euler estimate minus the true value v(2)v(2): positive if Euler overestimates, negative if it underestimates.

    Answer this question

Browse all 14 questions

  • Needs

    Exponential growth and decay

    The differential equations y′ = ky and y′ = a − by: half-lives, doubling times, Newton’s law of cooling and inflow and outflow.

    11 questions

  • Leads to

    Logistic growth and phase lines

    Steady states and their stability from a state-space diagram (phase line), the logistic equation, and harvesting.

    11 questions