Unit 7 Topic 7.5

Euler's Method

every AB topic, then series

4 min readfreeNot practiced

A slope field shows the direction a solution curve takes at every point, but not a formula for the curve. Euler's method turns the slope field into numbers: it estimates the value of a solution by walking along short tangent segments, reading a new slope from the differential equation at the start of each one. It works for any differential equation dydx=F(x,y)\frac{dy}{dx} = F(x, y), including ones you cannot solve.

One step is a tangent line

Suppose a solution passes through (x0,y0)(x_0, y_0). The equation gives its slope there, F(x0,y0)F(x_0, y_0). For a short run Δx\Delta x, the tangent line rises by about Δy=F(x0,y0)Δx\Delta y = F(x_0, y_0)\,\Delta x, so

y1=y0+F(x0,y0)Δxatx1=x0+Δx.y_1 = y_0 + F(x_0, y_0)\,\Delta x \quad \text{at} \quad x_1 = x_0 + \Delta x.

This is the local linearization of topic 4.6, with the slope supplied by the differential equation. Euler's method simply repeats it: from (x1,y1)(x_1, y_1), read the slope F(x1,y1)F(x_1, y_1) and step again.

Several steps, in a table

Worked example 1. The solution y=f(x)y = f(x) of dydx=x+y\frac{dy}{dx} = x + y passes through (0,1)(0, 1). Use Euler's method with two steps of equal size to approximate f(1)f(1).

Two equal steps from x=0x = 0 to x=1x = 1: Δx=0.5\Delta x = 0.5.

xxyydydx=x+y\frac{dy}{dx} = x + yΔx\Delta xΔy\Delta y
0110.50.5
0.51.520.51
12.5

So f(1)≈2.5f(1) \approx 2.5. Each row's slope comes from that row's own xx and yy.

On the exam, show each step: the slope used, the point it was read at, and the new value. Arithmetic does not need simplifying, so 1.5+2(0.5)1.5 + 2(0.5) earns the point as written. Take exactly the number of steps asked for: a third step overshoots.

Too big or too small?

Each Euler step follows a tangent line, so the shape of the solution decides the error. The figure shows two steps on dydx=y\frac{dy}{dx} = y from (0,1)(0, 1). The solution through that point is y=exy = e^x (check: its derivative is itself), which is concave up, so the steps fall below it: Euler gives 2.252.25 for a true value of e≈2.718e \approx 2.718.

The slope field of dy/dx = y for x from −0.25 to 1.25, with the solution through (0, 1), y = e to the x, drawn in blue. Two violet Euler steps of size 0.5 start at (0, 1): slope 1 to (0.5, 1.5), then slope 1.5 to (1, 2.25). The true value at x = 1 is e, about 2.718, above the last violet point. The solution is concave up, so the steps fall below it and 2.25 is an underestimate.
Figure 1. Tangent steps lie below a concave up solution: an underestimate. LevlPrep original diagram.

To find the concavity without solving, differentiate the equation implicitly. For dydx=x+y\frac{dy}{dx} = x + y:

d2ydx2=1+dydx=1+x+y,\frac{d^2y}{dx^2} = 1 + \frac{dy}{dx} = 1 + x + y,

which is positive for x≥0x \ge 0 and y>0y > 0. The solution curves there are concave up, so the estimate 2.5 in worked example 1 is an underestimate. With more than one step, the concavity must hold for every solution curve a step starts on, not only for ff: each step lies below the curve through its own starting point, and that curve stays below ff because solution curves do not cross. Here every step stays where x≥0x \ge 0 and y>0y > 0. Concave down curves lie below their tangent lines, so Euler's method would give an overestimate. Name the concavity and say why it decides the answer; "the solution is increasing" is not a reason.

Step size

Shorter steps update the slope more often and follow the curve more closely. For dydx=y\frac{dy}{dx} = y from (0,1)(0, 1), the true value at x=1x = 1 is e≈2.718e \approx 2.718:

Δx\Delta xStepsEstimate of y(1)y(1)
0.522.25
0.2542.441
0.1102.594

A step can also go left: to estimate f(0.5)f(0.5) from a point at x=1x = 1, use Δx=−0.5\Delta x = -0.5.

Euler's method in context

Worked example 2. The volume VV of water in a tank, in liters, satisfies dVdt=20−2V\frac{dV}{dt} = 20 - 2\sqrt{V}, with tt in minutes, and V=25V = 25 at t=0t = 0. Estimate VV at t=1t = 1 with two steps of size 0.50.5.

At t=0t = 0: dVdt=20−2(5)=10\frac{dV}{dt} = 20 - 2(5) = 10, so V≈25+10(0.5)=30V \approx 25 + 10(0.5) = 30 liters at t=0.5t = 0.5.

At t=0.5t = 0.5: dVdt=20−230\frac{dV}{dt} = 20 - 2\sqrt{30}, so VV≈30\approx 30+(20−230)(0.5)+ \left(20 - 2\sqrt{30}\right)(0.5)=40−30= 40 - \sqrt{30}≈34.5\approx 34.5 liters at t=1t = 1.

The rate has units of liters per minute and Δt\Delta t has units of minutes, so each ΔV\Delta V is in liters, the units of the estimate.

Spot a mistake on this page?