Euler Methods
Differential Equations · Section 2.7 · generated practice set
Stepping along the direction field by hand, the improved Euler correction, and why global error is one order worse than local.
Practice this set → Fresh numbers on every attempt. No account needed.
Method
Euler's method walks the direction field one straight segment at a time.
$$y_{n+1} = y_n + h\,f(t_n, y_n), \qquad t_{n+1} = t_n + h$$
Show the work as a small table: $n$, $t_n$, $y_n$, $f(t_n,y_n)$, $y_{n+1}$. Graders want the intermediate values, and it is how you catch your own arithmetic slips.
Improved Euler (Heun)
Predict with Euler, then average the slopes at both ends:
$$\tilde y_{n+1} = y_n + hf(t_n,y_n), \qquad y_{n+1} = y_n + \frac{h}{2}\Big[f(t_n,y_n) + f(t_{n+1}, \tilde y_{n+1})\Big]$$
Error
Euler is first order: global error $\sim h$, so halving $h$ roughly halves the error. Improved Euler is second order: global error $\sim h^2$, so halving $h$ cuts the error by about 4.
Whether Euler overshoots or undershoots depends on concavity: on a concave-up solution the tangent line lies below the curve, so Euler underestimates.
Definitions and theorems
Worked example
Use Euler's method with $h = 0.5$ to approximate $y(1)$ for $y' = t + y$, $y(0) = 1$.
- Step 1: $f(0, 1) = 0 + 1 = 1$, so $y_1 = 1 + 0.5(1) = 1.5$ at $t = 0.5$.
- Step 2: $f(0.5, 1.5) = 0.5 + 1.5 = 2$, so $y_2 = 1.5 + 0.5(2) = 2.5$ at $t = 1$.
- Euler estimate: $y(1) \approx 2.5$.
- Exact solution is $y = 3e^t - t - 1$, giving $y(1) = 3e - 2 \approx 6.155$.
- The error is large because $h$ is large and the solution is strongly concave up — the tangent lines all fall below the curve.
Common mistakes
- Updating $t$ and $y$ out of order. Use the old $t_n$ and $y_n$ to compute the slope, then advance both.
- Rounding intermediate values. Carry 4+ decimals through every step; round only the final answer.
- Using $f(t_{n+1}, y_n)$. Plain Euler evaluates the slope only at the left endpoint.
- Confusing local and global error. Euler's local error is $O(h^2)$ but the global error is only $O(h)$ — the errors accumulate over $1/h$ steps.
Practice it
Reading the method is not the same as being able to run it under time pressure. This set generates a new problem with new coefficients every attempt, marks each part separately, and shows the full worked solution.