Suppose an initial-value problem y'=f(t,y), y(t_0)=y_0 has no tidy closed form. Euler's method still builds an approximate solution. It takes one small step at a time, using nothing but the slope f already hands you.
There's no formula for the curve, so follow the direction the slope points. Take a small step. Then ask the slope again from the new spot. Smaller steps track the true curve more closely. That comes at the cost of needing more of them. There are two different ways to talk about how wrong this gets. One step's own mistake shrinks fast as the step gets smaller. Cut the step in half, and that single step's error drops to roughly a quarter of what it was. But reaching the same finish line with a smaller step also means taking more steps. Those small mistakes pile up along the way. Add up every step's mistake, and cutting the step size in half only cuts the total mistake in half too — not down to a quarter. That total, end-to-end mistake is what actually decides whether a method is worth using, not any single step's own mistake.
Starting from (t_0,y_0), Euler's method repeats y_{n+1} = y_n + h\,f(t_n,y_n), \qquad t_{n+1}=t_n+h for a fixed step size h. Walk forward along the tangent line at the current point. Then repeat from wherever that lands.
The error this introduces splits into two related quantities. The local truncation error is the error made in a single step, assuming that step started from the exact value. It comes straight from Taylor's theorem. Expand the true solution: y(t_{n+1})=y(t_n)+h\,y'(t_n)+\frac{h^2}{2}y''(\xi_n) for some \xi_n between t_n and t_{n+1}. Subtract Euler's own update y_n+h\,f(t_n,y_n)=y_n+h\,y'(t_n). What's left is exactly the \frac{h^2}{2}y''(\xi_n) term. So the local truncation error is O(h^2): one step's error shrinks quadratically as h shrinks. Reaching a fixed final time t_0+T takes T/h steps. Those O(h^2) per-step errors accumulate into a global error of (T/h)\times O(h^2)=O(h) — one power of h worse than the local error. This global error is the number this course actually tracks when comparing methods. It describes the error at the end of the whole computation, not just one step of it.
Euler's polyline drifting off the true curve
Shrink h and watch the dashed polyline hug the true curve more closely.
Loading interactive…
Worked example
One step of Euler's method by hand
-
1
For y'=y, y(0)=1, take one Euler step with h=0.5.
-
2
y_1 = y_0 + h\,f(t_0,y_0) = 1 + 0.5(1) = 1.5.
-
3\boxed{y_1 = 1.5 \text{ (true value } e^{0.5}\approx1.6487\text{)}}
A single step already misses by about 0.15 — Euler's method's known weakness this course's own methods improve on directly.
Loading interactive…
Worked example
Halving the step size
-
1
Redo the same problem with h=0.25, two steps to reach t=0.5.
-
2
Step 1: y_1 = 1 + 0.25(1) = 1.25. Step 2: y_2 = 1.25 + 0.25(1.25) = 1.5625.
-
3\boxed{y_2 = 1.5625 \text{ (closer to } e^{0.5}\approx1.6487\text{)}}
Halving h roughly halved the error (from \approx0.15 to \approx0.086) — the linear relationship this course's own error-analysis chapter makes precise.
Loading interactive…
Worked example
Estimating the local truncation error directly
-
1
For y'=y, use the Taylor-remainder estimate \frac{h^2}{2}y''(\xi_n) to approximate the local truncation error of one Euler step with h=0.5 starting at y(0)=1, using y''(0)=1 as a stand-in for y''(\xi_n).
-
2
\frac{(0.5)^2}{2}(1) = 0.125.
-
3\boxed{\text{local truncation error} \approx 0.125}
Close to the 0.1487 actual error from the first worked example above — the Taylor-remainder estimate predicts the size of a single step's error without ever needing the true solution in advance.
Loading interactive…
Where this goes next
Where this course goes from here
This course's own initial-value-problem chapter treats Euler's method as the floor, not the destination. It refines the same tangent-line idea into better methods: Runge-Kutta, multistep. These reach far better accuracy per step. The chapter also gives a formal treatment of exactly how much error one more step of any of them buys or costs.
Quick review
Practice from earlier coursework, pulled in for this topic.
From Ordinary Differential Equations
Using Euler's method with h=0.25, estimate y(0.25) for \dfrac{dy}{dx}=2y, y(0)=1.
Right on try — credit. Right — the answer had already been shown, so no credit this time. Next try is worth Answer shown after three tries — this one no longer earns credit. You chose to see the answer — this one earns no credit.
Why
y_1 = 1 + 0.25(2\cdot1) = 1.5.
Correct answer
Also accepted:
Why
y_1 = y_0 + h\,f(x_0,y_0).
From Ordinary Differential Equations
For \dfrac{dy}{dx}=-y (exact solution decaying and concave up), does Euler's method over- or under-estimate y, compared to the true solution?
Right on try — credit. Right — the answer had already been shown, so no credit this time. Next try is worth Answer shown after three tries — this one no longer earns credit. You chose to see the answer — this one earns no credit.
The tangent-line step lands below, not above, a concave-up curve, so Euler underestimates rather than overestimates here.
Euler's method has nonzero error for essentially any h>0 on this equation.
The over/under-estimate direction here follows from the curve's concavity, not the sign of y_0.
Why
A concave-up curve lies above its own tangent line everywhere except the touching point, so following the tangent line for one step lands below the true curve -- Euler's estimate undershoots the true (positive, decaying) value.
A tangent line to a concave-up curve sits below the curve everywhere except the touching point.
From Calculus II — Integral Calculus & Infinite Series
Using Euler's method with h=1 on y'=2y, y(0)=1, find y_2 (two steps).
Right on try — credit. Right — the answer had already been shown, so no credit this time. Next try is worth Answer shown after three tries — this one no longer earns credit. You chose to see the answer — this one earns no credit.
Why
y_1=1+1(2\cdot1)=3. Then y_2=3+1(2\cdot3)=9.
Correct answer
Also accepted:
Why
Apply Euler's step twice in a row: y_1=y_0+h\cdot f(x_0,y_0), then y_2=y_1+h\cdot f(x_1,y_1), with f(x,y)=2y.