The one formula this whole page turns on:
hnew=h⋅S(εtol)1/(p+1),p=4⇒p+11=51
Before you touch a single exercise, let us pin down every symbol so nothing is used before it is defined.
Read the figure below before starting. It plots, for a step that lands exactly at tol, the predicted next-step error as a fraction of tol against the choice of S — showing why S≈0.9 is the safe-but-not-wasteful sweet spot, and marking the accept region.
See the parent note for the fuller stage-by-stage derivation.
(a) An embedded Runge–Kutta pair (RK45 / Fehlberg / Dormand–Prince).
(b) ε=y(5)−y(4). For a system this is the tolerance-scaled RMS norm (accept when ε≤1); for a single equation it is just ∣y(5)−y(4)∣. It is free because it reuses every expensive f-evaluation and adds only a cheap weighted difference h∑i(bi−bi∗)ki.
(c) The controller uses p=4: the error estimate essentially measures the 4th-order result's local error. You still advance with y(5) (local extrapolation), but the exponent in the update is 1/(p+1)=1/5 using p=4. See Order of a Numerical Method.
Recall Solution L1.2
Rule: accept iff ε≤tol.
A:2×10−7≤10−6 → accept.
B:10−6≤10−6 → accept (equality passes).
C:9×10−6>10−6 → reject, redo the step from the same tn.
(a) ε=5×10−8<10−6 → accept.
(b) Ratio εtol=5×10−810−6=20.
hnew=0.9×0.20×201/5=0.18×1.8206=0.3277.
We had error to spare, so we grow — but only by 201/5≈1.82, not by 20, because local error scales like h5.
Recall Solution L2.2
(a) 8×10−6>10−6 → reject.
(b) Ratio =8×10−610−6=0.125.
hnew=0.9×0.15×0.1251/5=0.135×0.6598=0.08908.
Retry from the same tn with hnew≈0.0891.
Recall Solution L2.3
(a) tol=atol+rtol∣yn∣=10−8+10−6×40=10−8+4×10−5≈4.001×10−5.
(b) ε=3×10−5<4.001×10−5 → accept (the relative part saved us).
(c) Ratio =4.001×10−5/3×10−5=1.3337.
hnew=0.9×0.10×1.33371/5=0.09×1.0593=0.09534.
Note how using only atol (10−8) would have rejected this perfectly good step — see Local vs Global Truncation Error for why absolute-only tolerances misbehave when ∣y∣ is large.
Set ε=tol. Then the raw update factor is
r=S(εtol)1/5=S⋅1=S=0.9,hnew=0.9h.
Predicted error scales as h5, so
εnext≈Chnew5=C(0.9h)5=0.95(Ch5)=0.95ε=0.95tol.0.95=0.59049, so εnext≈0.590tol — comfortably under budget. That is exactly what the safety factor buys: even when we hit tol dead-on, the next step is predicted to land at ~59% of tol, so it is very likely accepted on the first try. This is the same trade-off drawn in the opening figure.
Recall Solution L3.2
Shrink factor =(tol/ε)exp=(1/4)exp=0.25exp.
Student X: 0.251/5=0.75786 → h drops to ~76% of old.
Student Y: 0.251/2=0.5 → h halves.
Because true local error ∝h5, a factor-4 error overshoot only needs h→4−1/5h≈0.758h to fix. Student Y's 1/2 exponent over-shrinks to 0.5h, wasting steps: the retried step will come back at ε≈C(0.5h)5=4⋅0.55tol=0.125tol — 8× under budget, meaning the very next step immediately tries to grow again. Wrong exponent ⇒ oscillating, inefficient stepping. See Taylor Series Expansion for where the h5 comes from.
Recall Solution L3.3
(a) Ratio =10−6/2×10−13=5×106.
rraw=0.9×(5×106)1/5=0.9×21.867=19.68.
(b) 19.68>fmax=5 → the clamp fires (recall fmax≈5 from the opening definitions).
(c) hnew=h⋅fmax=0.04×5=0.20.
The h5 error model is only trustworthy locally; a ~20× jump could leap into a region with completely different curvature, so we cap the growth at 5×.
Attempt 1:ε1=6.25×10−6>10−6 → reject. Stay at t=0.
Ratio =10−6/6.25×10−6=0.16. Factor =0.9×0.161/5=0.9×0.69314=0.62383 (inside clamps).
h→0.10×0.62383=0.062383.Attempt 2 (from t=0 with h=0.062383): ε2=4×10−7<10−6 → accept. Advance: t=0+0.062383=0.062383.
Now pick the step for the next interval: ratio =10−6/4×10−7=2.5, factor =0.9×2.51/5=0.9×1.2011=1.0810.
hnext=0.062383×1.0810=0.067437.Summary: rejected once (t stays 0), accepted second try (t advances to ≈0.06238), then grows slightly to ≈0.06744 for the next interval.
Recall Solution L4.2
(a) Attempts =80+12=92.
(b) f calls =92×6=552.
(c) Wasted =12×6=72 calls; fraction =72/552=0.13043…≈13.0%.
A rejection rate around 10–15% is healthy — it means the controller is pushing h to the edge of the tolerance rather than being timidly small.
Attempt 1 (h=0.20): ε=3.2×10−5>10−6 → reject.
Ratio =10−6/3.2×10−5=0.03125. Factor =0.9×0.031251/5=0.9×0.5=0.45 (inside clamps, since 0.45>fmin=0.2).
h→0.20×0.45=0.09.Attempt 2 (h=0.09): ε=3.5×10−6>10−6 → reject.
Ratio =10−6/3.5×10−6=0.285714. Factor =0.9×0.2857141/5=0.9×0.778087=0.700278.
h→0.09×0.700278=0.063025.Attempt 3 (h=0.063025): ε=5×10−7<10−6 → accept. Advance: t=0.063025.
Final:t≈0.06303 after two rejections and one acceptance. Notice the clamp never fired here; each shrink stayed well above fmin=0.2 of the previous h.
Recall Solution L5.2
(a) Ratio =10−6/0.3=3.33×10−6. Raw factor =0.9×(3.333×10−6)1/5.
(3.333×10−6)1/5=0.080274, so raw =0.9×0.080274=0.072247.
(b) 0.072247<fmin=0.2 → the lower clamp fires.
(c) hnew=h×fmin=0.30×0.2=0.06.
(d) A raw factor far below fmin repeatedly is the fingerprint of a stiff region — an explicit adaptive method may thrash here; consider an implicit solver (see Stiff ODEs and Stability).
Correct (p=4, exponent 1/5): factor =321/5=2.0, hnew=0.20.
The correct controller grows more (factor 2 vs 1.78). Reason: the error estimate ε tracks the 4th-order solution's error, which scales as h5; a 32× error surplus permits a 321/5=2× step increase. Using p=5 underestimates how fast you may grow — safe but wasteful. The mnemonic stays: "Tol Over Error, to the Fifth-root."
Recall Solution L5.4
(a) Maximum shrink: hraw=h⋅fmin=8×10−6×0.2=1.6×10−6.
(b) 1.6×10−6<hmin=2×10−6 → it violates the floor.
(c) The solver must not silently take a sub-floor step. Standard behaviour (e.g. scipy's solve_ivp) is to either clamp h up to hmin and accept a slightly-too-large error with a warning, or abort with a "step size too small" failure. Blindly continuing to shrink is dangerous because (i) h can underflow toward machine ε≈2.2×10−16, where tn+h rounds back to tn and the integration stalls forever; and (ii) tens of thousands of micro-steps accumulate round-off that swamps the very accuracy you were chasing. Repeatedly hitting hmin is the classic signal to switch to an implicit method built for stiff problems.