← Calculus 2

Euler’s method

Step along the slope field to approximate a solution.

Start this lesson

Euler’s method approximates a solution by taking small straight steps. From a point (x, y), the slope is f(x, y). Move h to the right and change y by h × slope: yₙₑₓₜ = y + h·f(x, y). Repeat.

Example: dy/dx = x + y, y(0) = 1, h = 0.5, two steps

  1. slope at (0, 1) is 1: y = 1 + 0.5(1) = 1.5 — First step to x = 0.5
  2. slope at (0.5, 1.5) is 2: y = 1.5 + 0.5(2) = 2.5 — Second step to x = 1
  3. y(1) ≈ 2.5

Why it works: Over a short step, a curve is nearly straight, so following the slope a small step at a time traces an approximate solution.

Tip: Smaller steps give better approximations but take more work.