The drift you already saw, named at last
In the last guide you took an Euler step: standing at a point (t, y), you read the slope f(t, y) the equation hands you, and walked a short distance h straight along that tangent line to land at y + h f(t, y). Do it again, and again, and a staircase of little straight segments crawls forward in place of the smooth true solution. You almost certainly noticed the trouble: after a few steps your numerical curve sits visibly below or above the real one, and the gap keeps widening. That gap has a name, and learning to measure it is the whole job of this guide.
There are two distinct mistakes hiding inside that widening gap, and conflating them is the single most common confusion in this whole subject. The first is the error made in *one single step* — you replaced a curving true solution with one straight tangent, so even if you had started the step exactly on the true curve you would land slightly off it. The second is the *accumulated* error after many steps, the total distance between your final numerical value and the true value. We will name the first the local truncation error and the second the global truncation error, and almost everything interesting comes from how the first feeds the second.
Where one step goes wrong
To see the local error sharply, ask what the true solution does over one step and compare it to what Euler does. Calculus has a tool for exactly this — the Taylor expansion. If y(t) is the true solution and you advance one step of size h, then y(t + h) = y(t) + h y'(t) + (h^2/2) y''(t) + (higher powers of h). The Euler step keeps only the first two pieces: it uses y(t) + h y'(t), because y'(t) = f(t, y(t)) is precisely the slope the equation gives. So Euler throws away the (h^2/2) y''(t) term and everything smaller. That discarded chunk *is* the local truncation error of one step.
Read that leftover term and a lot becomes clear. The dominant piece of the local error is about (h^2/2) y'', so it shrinks like h^2 — the *square* of the step. Halve h and one step's error drops to a quarter; cut h to a tenth and one step is a hundred times more faithful. The factor y'' also tells you a true geometric story: y'' measures the curvature of the solution, so where the true curve bends hard, the straight tangent leaves it fast, and where the solution is nearly straight, Euler barely errs at all. The local error is the price of pretending a curve is a line for the length of one step.
From one slip to the whole journey
Here is the twist that surprises nearly everyone the first time. Each single step costs you an error of size about h^2 — wonderfully small. But to cross a fixed time interval, say from t = 0 to t = 1, you need about 1/h steps: halve h and you take twice as many steps. The total error is, very roughly, (number of steps) times (error per step), which is about (1/h) times h^2 = h. The two factors of h in the local error get eaten down to one. The global error over a fixed interval therefore shrinks only like h, not like h^2.
This is the deflating heart of the matter. Halve the step and you do twice the work — but the final answer is only *twice* as accurate, not four times. To gain one more decimal digit of accuracy you must shrink h by a factor of ten, doing ten times as much arithmetic, for a single digit. Euler's method buys accuracy at a brutally poor exchange rate. That exact relationship — global error proportional to h to the first power — is what earns Euler the label first-order, and it is exactly why, useful as it is for intuition, no one runs serious computations with it.
Order, made precise
The order of a method is the single most important number you can attach to any step-by-step scheme, so let us state it without fog. A method has order p if, over a fixed interval, its global truncation error behaves like a constant times h^p as the step h is driven to zero. Higher p is dramatically better: it means that as you refine the grid, the error collapses far faster. Order 1 (Euler) buys you a factor-of-10 accuracy gain for a factor-of-10 cost; order 4 buys you a factor of 10^4 = ten thousand for the same factor-of-10 refinement. That gulf is why order is the currency everyone shops in.
There is one honest caveat folded into that definition: order is a statement about the *limit* as h shrinks. It promises a rate of improvement, not an absolute size of error at any particular h. A high-order method can still be wildly wrong at a coarse step — its constant out front might be large, or the solution might be violently curved. Conversely two methods of the same order can differ by a big constant factor in practice. So 'order four' is a promise about how fast errors die *as you refine*, not a guarantee that a single run is accurate. Reading order as 'always accurate' is a subtle but real misconception.
method local error global error order
---------------------------------------------------------
Euler ~ h^2 ~ h 1
improved Euler ~ h^3 ~ h^2 2
classical RK4 ~ h^5 ~ h^4 4
---------------------------------------------------------
refine h -> h/10 : order-1 error / 10
order-2 error / 100
order-4 error / 10000The cure: stop trusting one slope
If Euler's flaw is that it commits to a single slope — the one at the very start of the step — then the cure almost writes itself: gather more slope information across the step before deciding where to land. The simplest fix takes a tentative Euler half-step or full-step, looks at the slope *there*, and then steps with an average or a midpoint slope instead of the starting one. That extra look cancels the leading (h^2/2) y'' error term, lifting the method from first to second order. This is the idea behind the improved Euler method and the midpoint method, and it costs you only one or two extra slope evaluations per step.
Push that same idea harder — sample the slope at several cleverly chosen points inside the step and blend them with carefully tuned weights so that even more Taylor terms cancel — and you reach the celebrated Runge-Kutta methods. The famous fourth-order member, RK4, evaluates the slope four times per step and combines them so that error terms up to h^4 vanish, delivering that ten-thousand-fold leverage from the table. The whole next guide is devoted to building RK4 and seeing exactly why those four slopes conspire so beautifully. Everything you measured here — local versus global, the lost power of h, the meaning of order — is the ruler you will use to prove RK4 earns its name.
Two honest limits before you go
Two cautions keep this whole picture honest. First, raising the order is not a free lunch you can pull forever. Everything above assumed truncation error — the error of cutting the Taylor series short — is the only error in the room. But a real computer also makes roundoff error: it stores numbers with finitely many digits, and every arithmetic operation discards a few. Truncation error shrinks as you make h smaller, but roundoff error per step is roughly fixed, and you do *more* steps as h shrinks — so push h absurdly small and roundoff eventually grows and swamps the gain. There is a sweet spot, not an infinite descent.
Second, a method does not even deserve an order until it passes a more basic test. It must be consistent — its single-step error must vanish as h goes to zero, so each step at least *aims* at the right slope — and it must be stable, meaning small errors do not get amplified out of control as steps compound. Only when both hold does refining the grid actually drive the global error to zero, the property called convergence. That bundle — consistency, stability, and convergence — is the bedrock every method must stand on; the later guides on multistep schemes and on stiffness are precisely where stability turns from a formality into the deciding question. Order tells you how fast you converge; consistency and stability are what let you converge at all.