ISEGORIA / MATH ENCYCLOPEDIA
Numerical analysis: when computation misleads
Time stepping, cancellation, and interpolation error.
Before you begin: Calculus and basic differential equations
Predict, manipulate, then check your reasoning against the example and question. Graphs illustrate the mathematics; they do not replace a proof.
1. Accuracy and stability
Compare explicit Euler, fourth-order Runge–Kutta and implicit Euler with exact exponential decay. Each method multiplies the solution by a fixed factor R(−5h) per step, drawn on the right. Drag h until a factor leaves the band |R| < 1 and the numerical solution grows although the true one decays.
Worked example. At h=0.5, Euler multiplies each step by −1.5 and diverges.
Watch out. Higher order does not guarantee stability for every step size: RK4 is explicit and fails beyond h ≈ 0.557. Implicit Euler decays for every h, but stability is not accuracy.
What is Euler’s strict stability interval for this equation?
0<h<0.4, because |1−5h|<1.
2. Subtracting almost equal numbers
Compare direct evaluation with an algebraically equivalent rationalized expression. As x shrinks, √(1 + x) and 1 agree in more and more leading digits, and the subtraction throws them away. The digit table shows which digits of the direct numerator survive.
Worked example. At x=10⁻¹⁶, binary64 commonly rounds 1+x to 1, so the direct numerator becomes zero.
Watch out. The plotted error uses the stable equivalent as a reference; it is not an arbitrary-precision certificate.
Does making x smaller always improve a numerical limit estimate?
No. Truncation error may shrink while roundoff error becomes dominant.
3. Where you sample matters
Interpolate the Runge function with a polynomial. Compare equally spaced nodes with Chebyshev–Lobatto nodes clustered near the ends; the other family's interpolant is drawn dashed. The right panel tracks the maximum error as the degree grows: one family diverges, the other converges.
Worked example. For degree 10, equally spaced interpolation oscillates strongly near the endpoints.
Watch out. The displayed maximum error is sampled, not a rigorous supremum bound. More nodes alone need not improve interpolation.
Why can a perfect fit at all nodes still be misleading?
Values between nodes can oscillate dramatically; fitting data and approximating a function are different requirements.