Bottom: error vs h on log-log axes. Slopes reveal order.
About
Global error of Euler = O(h), Heun = O(h²), RK4 = O(h⁴). On a log-log plot of error vs h, the slopes are 1, 2, 4. RK4 uses 4 function evaluations per step — an excellent tradeoff between cost and accuracy.