Construct an exact benchmark with two time scales
Let \(s(t)=\sin t\) and choose a relaxation time \(\varepsilon>0\). Consider \(y'=s'(t)+(s(t)-y)/\varepsilon\), with \(y(0)=1\). Set \(e=y-s\). Subtraction of \(s'\) gives \(e'=-e/\varepsilon\), hence the reference solution \(y(t)=\sin t+e^{-t/\varepsilon}\). The slow reference changes over times of order one, while the initial mismatch decays significantly over \(\varepsilon\). We know both pieces exactly and can diagnose errors even when a stable result looks visually smooth.
Explicit Euler applied to a perturbation of the state multiplies that perturbation by \(1-r\), with \(r=h/\varepsilon\). It damps monotonically only for \(0<r\le1\), changes sign while damping for \(1<r<2\), and grows for \(r>2\). These statements compare nearby solutions at equal drive. The full signal also contains the time variation of \(s\). At the boundary \(r=2\) a state perturbation alternates without decaying. Refining the step to follow a slow input alone can therefore give the wrong choice of \(h\).
Solve only the fast part implicitly
Split \(f_{\rm slow}(t)=\cos t\) from \(f_{\rm fast}(t,y)=(\sin t-y)/\varepsilon\). Evaluate the slow part at \(t_n\) and the fast part at \(t_{n+1},y_{n+1}\). This first-order additive implicit-explicit Euler step needs one scalar linear solve:
The state perturbation now multiplies by \(1/(1+r)\). It is damped at every positive step and tends to zero as \(r\) grows. Subtract \(\sin t_{n+1}\) from both sides after solving. The mismatch obeys \(e_{n+1}=[e_n+h\cos t_n-(\sin t_{n+1}-\sin t_n)]/(1+r)\). The bracketed forcing defect is \(O(h^2)\) for smooth input. In the stiff limit at fixed \(h\), the endpoint approaches the current reference. Moving the reference in the fast term to the old time would instead drag it one sample behind in that limit. The choice of what to treat implicitly includes the time at which a fast equilibrium is imposed.
Test early-time accuracy and late-time stability
For \(\varepsilon=0.02\), \(h=0.05\), \(r=2.5\). At the first step the exact value is
Explicit Euler gives
The implicit-explicit value is
The latter is stable but visibly overestimates the surviving transient. Its damping factor \(1/3.5=0.286\) differs substantially from \(e^{-2.5}=0.0821\). A question about peak rate or initial settling requires shorter steps even if the late-time reference is recovered.
The experiment holds the final time at one while the number of steps changes. The vertical coordinate is the base-ten logarithm of absolute error, with values below \(10^{-15}\) drawn at that floor. Negative heights therefore correspond to errors less than one. Track the maximum error separately from the final error as the transient dies out. Try an initially unstable explicit run, then double the number of steps. The stiffness criterion depends on the ratio \(h/\varepsilon\), while accuracy on the reference also depends on \(h\) itself.
Tutorial on identifying which component is stiff
Keep \(h=0.04\) and reduce \(\varepsilon\) from 0.04 to 0.004. For each case compare exact, explicit and implicit amplification of a state perturbation. What quantity would force a reduction of \(h\) even with the implicit-explicit method?
Work through the solution
At \(r=1\) the three factors are \(e^{-1}=0.368\), zero and \(1/2\). At \(r=10\) they are \(4.54\times10^{-5}\), \(-9\) and \(1/11=0.0909\). For a measurement of the initial decay rate the implicit discretisation substantially misrepresents both exact factors. Bounding error during that transient requires smaller steps relative to \(\varepsilon\), even though its numerical amplification is stable.
Further reading · Ascher, Ruuth and Wetton, implicit-explicit time discretisations.
Study the full derivation
Why stiff stability does not guarantee the expected order · Dynamics and numerical time integration
A differential equation is constructed to have a smooth, known solution and a rapidly damped error mode. Use it to distinguish stability of the homogeneous equation, tracking of a moving target and the effect of off-grid stage forcing.