Halving the step size should halve the error. The tool says 1.73.
The page prints the ratio itself: 0.000405 at h = 0.2, 0.000234 at half that. Divide them and you get 1.73, not 2, and nothing is broken.
Euler's method is first order. Every textbook says so, and what it means is that the error is proportional to the step size h, so halving h should halve the error.
Open Euler's method at its defaults: y′ = x − y, y(0) = 1, forty steps of h = 0.2, finishing at x = 8. The page reports a global error of 0.000405, and then does something unusually honest: it re-runs the whole thing at h/2 and prints that error too, 0.000234, with the ratio between them:
Eh / Eh/2 = 0.000405 / 0.000234 = 1.731285
Not 2. The method is first order, the arithmetic is correct, and halving the step bought a 42% reduction rather than a 50% one.
Sweep it, do not sample it
Two numbers can only give a direction, so run the ratio down the range, keeping the endpoint fixed at x = 8 by doubling the step count each time h halves:
- h = 0.4 → ratio 1.475764
- h = 0.2 → ratio 1.731285
- h = 0.1 → ratio 1.865689
- h = 0.05 → ratio 1.933036
- h = 0.025 → ratio 1.966586
The promised 2 is a limit, and this is what approaching it looks like. But the interesting column is not the ratio, it is the shortfall: how far each measurement sits below 2:
0.524 → 0.269 → 0.134 → 0.067 → 0.033
That halves every time h halves. The gap between "first order" and what first order actually delivers is itself first order in h.
Where the missing half comes from
The order comes from a truncation. Euler keeps the first term of the Taylor expansion of the solution and throws away everything from the second derivative onwards, which the Taylor tool makes visible: the discarded terms carry h², h³ and so on. One step therefore loses something of size h², and reaching x = 8 takes 8/h of them, so h² per step becomes h in the total. The "first" in first order is already a statement about a sum.
So the global error is not C·h. It is
E(h) = C₁h + C₂h² + C₃h³ + ⋯
and the ratio of two such sums is
E(h) / E(h/2) = (C₁h + C₂h² + ⋯) / (C₁h/2 + C₂h²/4 + ⋯)
which tends to 2 as h shrinks and the h² term dies faster than the h term. But at any finite h the second term is still in there, contributing to the denominator more than proportionally. "First order" names the term that survives longest, not the only term present. At h = 0.4 the h² contribution eats a quarter of the promised factor of two, and the ratio comes out at 1.476.
You can see the same thing in the error column of the step table on the page. The running error does not climb steadily: it rises to about 0.0804 by x = 0.8, then falls as the solution flattens, and finishes at the 0.000405 the summary quotes. The global error is a sum of local errors that partly cancel, and that sum has no reason to be a clean multiple of h at a step size you would actually use.
The reason this matters, and it is not pedantry
The standard way to estimate an error you cannot compute is Richardson extrapolation, and it works by assuming the ratio. Run at h, run at h/2, and if the method is order p the difference between the two answers is about (2p − 1) times the error of the finer one. For Euler, p = 1, so the difference is about equal to the remaining error.
Feed h = 0.4 into that reasoning and you have assumed a ratio of 2 where the true one is 1.476. Work it through: the estimate you get is 0.476 of the error that is really left, so it understates it by a factor of about two, and it understates rather than overstates. You will believe the answer is better than it is, and the belief gets more confident as the step gets coarser, which is exactly when you need it least.
The defence is the one the page demonstrates: do not assume the ratio, measure it. Two runs give you the ratio; three give you the ratio's trend. If the ratio is not close to 2p for the p you think you have, then either the step is too coarse for the asymptotic regime, or the method is not the order you believe, or the solution has a feature the analysis did not anticipate. All three are worth finding out before quoting a number.
Which is the argument for a better method, not a smaller step
Halving the step doubles the work. On a first-order method it buys a factor of two, eventually. That is a poor exchange, and it is why almost nothing in production integrates with Euler.
Simpson's rule is fourth order: halving its step divides the error by about 16, so the same doubling of work buys eight times more accuracy than Euler's doubling does. Runge and Kutta's methods do the equivalent for differential equations, and Butcher's history in the references traces that line back to Runge in 1895 and Kutta in 1901.
The general shape is worth carrying away: for a method of order p, the exchange rate is 2p accuracy per doubling of effort, and p is a property of the algorithm rather than of the problem. Choosing the method sets the exchange rate. Choosing the step size only moves you along it, and as the sweep above shows it does not even do that at the advertised rate until h is small enough that the advertisement has become true.
References (2)
- the extrapolation that assumes the ratio, and the paper that introduced it Richardson (1911). The approximate arithmetical solution by finite differences of physical problems involving differential equations. Philosophical Transactions of the Royal Society A 210.
- how the profession escaped first order Butcher (1996). A history of Runge-Kutta methods. Applied Numerical Mathematics 20(3).