The lab runs Euler's method three times on one equation, with step sizes h, h/2 and h/4, to the same end time T = 1. For each it prints the error E(h) against the known solution, then the two ratios E(h)/E(h/2) and E(h/2)/E(h/4), and the order those ratios imply.
y′ = 2t, y(0) = 0, exact y = t², T = 1
h N y_N y(1) E(h)
1/4 4 3/4 1 1/4
1/8 8 7/8 1 1/8
1/16 16 15/16 1 1/16
ratios E(1/4)/E(1/8) = 2, E(1/8)/E(1/16) = 2
On this equation the error is exactly h: E(1/4) = 1/4, E(1/8) = 1/8, E(1/16) = 1/16. Euler's method on y′ = 2t is a left sum, and the left sum of 2t over N pieces from t = 0 to t = 1 is h²·N·(N − 1) = 1 − h, which differs from 1 by exactly h. Both ratios are exactly 2, the order is 1, and here that is not an approximation.
Where the total comes from
Look at one step. The true solution t² moves from t² to (t + h)², a rise of 2th + h². Euler's step rises by h·2t. The difference is h², whatever t is, so every step falls short by the same h². With N = 1/h steps the total is (1/h)·h² = h. At h = 1/4 each of the four steps misses by 1/16, and the four add to 1/4.
Theorem · Euler's method is first orderFor a right-hand side with continuous first derivatives, Euler's error at a fixed T is approximately C·h for a constant C that depends on the equation and T but not on h. Halving h therefore halves the error, and the ratio E(h)/E(h/2) approaches 2.
The lab demonstrates the claim on chosen equations by exact ratios, and does not prove it for every equation. On an equation where f also depends on y, an early error is carried forward by the later steps, which changes the constant C and not the power of h.
When the ratio only approaches 2
Take y′ = t², with exact solution t³/3. Euler's method is again a left sum, and the lab prints the errors 11/96, 23/384 and 47/1536. The ratios are 44/23 ≈ 1.91304 and 92/47 ≈ 1.95745, both rounded here, and the order tile reads ≈ 0.968973, also rounded. The ratios are close to 2 and not equal to it.
The reason can be read off the numbers. For this equation the error is exactly h/2 − h²/6: at h = 1/4 that is 1/8 − 1/96 = 11/96. The first term halves exactly when h does. The second term is four times smaller after each halving, so it falls faster, and its effect on the ratio fades: the ratio stays below 2 and climbs towards it as h falls.
Example · An error that is itself roundedOn y′ = y with exact solution e^t, the true value e is not a fraction, so the lab cannot subtract exactly. Each error is printed rounded with ≈, the two ratios are rounded, and the order is rounded.
That is the exactness rule at work: Euler's values (1 + h)ⁿ are exact, the true value is not, and the lab says so in every tile where the two meet.