Take one small step
xₙ₊₁ = xₙ + h, yₙ₊₁ = yₙ + h f(xₙ, yₙ)
Read the slope at your current point. Follow that direction for one step. At the new point, read the slope again.
Predict first: Will the next step go up or down? Does the slope at the new point stay the same?
Record each step
| n | xₙ | yₙ | f(xₙ, yₙ) |
|---|
Compare at the same x
Reducing h adds more steps over the same interval. Changing the field’s visual density would not change the calculation.
A curve becomes a sequence of local decisions
The dashed segment previews one Euler step. Its slope is f(xₙ, yₙ), evaluated at the current approximate point. The horizontal change is h and the vertical change is h f(xₙ, yₙ). After taking that step, we update the slope.
The polygon is an approximation. Its segments need not be tangent to the exact solution through the original initial point: later Euler points usually lie off that curve.
Try this in class
- Keep h = 1. Predict the first two slopes and take two steps.
- Go to the endpoint, then reveal the exact solution. How large is the error?
- Turn on h/2, then try h = 0.1. Compare all approximations at the same endpoint.
- Switch to the HW 2 equation and repeat with h = 0.2 and h = 0.1.
For these smooth examples, reducing h reduces the endpoint error. Euler’s global error is O(h) on a fixed interval under the usual regularity assumptions; this is not a guarantee for every equation or every step size.