STEM-TutorLearn • Practice • ExcelBook Free DemoFree demo

Euler's method, explained with examples

Euler's method estimates the solution of a differential equation by taking many small straight-line steps along the slope. It is an AP Calculus BC topic and a common part of free-response questions on differential equations.

On this page
  1. The idea
  2. The formula
  3. Organising the work in a table
  4. Worked examples
  5. Is the estimate too high or too low?
  6. Step size and accuracy
  7. Euler's method and slope fields
  8. Common mistakes
  9. Practice questions
  10. Frequently asked questions
  11. Key takeaways
  12. Related guides

The idea

A differential equation such as dy/dx = x + y tells you the slope of the solution curve at every point, but not the curve itself. If you know one point on the curve, you can take a small step along the tangent line there, arrive at a new point, find the new slope, step again, and so on. The path of short straight segments approximates the true curve. This is Euler's method, named after the Swiss mathematician Leonhard Euler.

The formula

With step size h (also written Δx), each step uses:

xnew = xold + h

ynew = yold + h · (dy/dx at the old point)

This is just the tangent line approximation, repeated. The change in y over a small step is roughly slope times step size.

Organising the work in a table

A table keeps the steps tidy and is what AP readers expect to see. Use four columns: x, y, the slope dy/dx at that point, and the change Δy = slope × h. Each row's new y is the previous y plus the previous Δy.

Worked examples

Example 1: two steps

Given dy/dx = x + y and y(0) = 1, use Euler's method with step size 0.5 to estimate y(1).

Example 2: smaller steps

Repeat Example 1 with step size 0.25.

Example 3: a decreasing solution

Given dy/dx = −2y and y(0) = 4, estimate y(0.2) using two steps of 0.1.

Example 4: stepping backwards

Given dy/dx = 3x² and y(1) = 2, estimate y(0.8) with one step.

Example 5: a full AP-style question

The function f satisfies dy/dx = 2x − y with f(0) = 3. (a) Use Euler's method with two steps of 0.5 to approximate f(1). (b) Is this an overestimate or underestimate? Justify.

Is the estimate too high or too low?

AP questions often ask whether an Euler approximation is an overestimate or underestimate, with a justification. The answer depends on the concavity of the solution curve, found from the second derivative.

To find d²y/dx², differentiate dy/dx implicitly, remembering that y is a function of x. In Example 1, d²y/dx² = 1 + dy/dx = 1 + x + y, which is positive on the interval, so the curve is concave up and the estimate of 2.5 is too low, as we found.

Step size and accuracy

Each step follows the tangent rather than the curve, so a small error builds up every time. Smaller steps reduce the error but need more calculations. For Euler's method, the error is roughly proportional to the step size: halve h and the error roughly halves. More advanced methods, such as Runge–Kutta, are far more accurate and are what computers actually use, but they rest on the same idea.

Euler's method and slope fields

A slope field draws a short line segment with the correct slope at many points. Euler's method is like following the slope field from your starting point, step by step. If you sketch the steps on a slope field, you can see why the path drifts away from the true curve when the curve bends, and why the drift is worst where the curve is most sharply curved.

Common mistakes

Practice questions

Try each one before opening the answer.

Q1. dy/dx = 2x, y(0) = 1. Use one step of 0.5 to estimate y(0.5).

Show answer
Slope 0, so y(0.5) ≈ 1.

Q2. dy/dx = y, y(0) = 1. Use two steps of 0.5 to estimate y(1).

Show answer
1 → 1.5 → 2.25, so 2.25 (the true value is e ≈ 2.72).

Q3. dy/dx = x − y, y(1) = 3. Use one step of 0.1 to estimate y(1.1).

Show answer
Slope −2: y(1.1) ≈ 2.8.

Q4. If d²y/dx² < 0, is a forward Euler estimate too high or too low?

Show answer
Too high: the curve is concave down.

Frequently asked questions

Is Euler's method on AP Calculus AB?

No. Euler's method is a BC-only topic, in Unit 7 on differential equations.

Is Euler's method in A level Maths?

Not in A level Maths. Step-by-step numerical methods for differential equations appear in some Further Maths options.

Key takeaways