Skip to content
ISEGORIABenjamin Haire

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.

Reference: Jiří Lebl · Notes on Diffy Qs, Numerical Methods

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.

Reference: David Goldberg · Floating-Point Arithmetic

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.

Reference: Chebfun · Approximation Theory, §4.7

Continue exploring

Linear algebra: the geometry of transformationsFourier analysis: functions made of wavesDynamical systems: stability and chaosOptimization: the geometry of the best choiceProbability: learning from uncertaintyGroup theory: symmetry as algebraAlgebraic topology: detecting holesNumber theory: patterns in the integersGraph theory: routes, trees, and networksPartial differential equations: fields in motionInformation theory: uncertainty and codesCalculus of variations: paths and principlesClassical mechanics: motion and forcesElectromagnetism: fields and inductionOptics: rays, waves, and colourThermodynamics: energy, work, and entropyQuantum mechanics: amplitudes and spinComplex analysis: maps, residues, and harmonic fieldsFluid dynamics: flow, pressure, and vorticityStatistics and inference: signals in dataSpecial relativity: space, time, and lightDifferential geometry: curvature and shapeStatistical mechanics: microstates and temperatureMeasure theory: size, approximation, and convergenceMarkov chains: transition, stationarity, and absorptionDifferential forms: circulation, curl, and pullbacksGeneral relativity: curvature, clocks, and lightFunctional analysis: norms, projections, and operatorsPlasma physics: screening, orbits, and wavesLie groups and Lie algebras: continuous symmetryHamiltonian mechanics: phase space and its geometryStochastic processes: Brownian motion and noiseSolid-state physics: waves in a crystalControl theory: feedback, poles, and stabilityLogic and computability: what can be computedHyperbolic geometry: where parallels multiplyRigid-body dynamics: spinning, tumbling, precessingElliptic curves: geometry that addsAtomic physics: orbitals and spectraQuaternions: rotation as multiplicationPush-forward and pullback: integrating through a mapKnot theory: telling tangles apartFractal geometry: dimension between the integersQuantum information: entanglement and its limitsCosmology: the expanding universeCellular automata: computation from local rulesComplex systems: order from many simple partsGalois theory: the symmetry of equationsMagnetism and the Ising model: order from alignmentOscillators and escapements: how a watch keeps timeGears and mechanisms: transmitting motion exactlyQuartz resonators: a crystal that keeps timeLoudspeakers: the moving-coil driverFilters and crossovers: splitting sound between driversRoom acoustics: the room is part of the speakerWavelets: zooming in on a signalLaser physics: light that copies itselfRepresentation theory: groups acting as matricesSemiconductor physics: bands, doping, junctions

Back to the math encyclopedia