Numerical Methods: Solving the Continuous on the Discrete

Numerical methods is the discipline of translating continuous mathematical models into discrete, finite-precision algorithms. In a world where computers cannot represent $1/3$ or \pi exactly, the challenge is not just finding a solution, but ensuring that the inevitable errors do not grow to consume the result. This field is the foundation of every simulation, from fluid dynamics to LLM training.


1. The Foundation: Floating-Point Reality (IEEE 754)

The core of numerical analysis is the management of two competing sources of error.

1.1 Truncation vs. Round-off Error

1.2 The Condition Number: Measuring Geometric Distortion

The Condition Number \kappa(A) measures how sensitive a function is to small changes in input.


2. Root Finding: Finding f(x) = 0

2.1 Bisection (The Robust Turtle)

Relies on the Intermediate Value Theorem. It repeatedly halves an interval containing a root.

2.2 Newton-Raphson (The Fast Rabbit)

Uses the local tangent line to project toward the x-axis: x_{n+1} = x_n - \frac{f(x_n)}{f'(x_n)}.


3. Numerical Integration: Quadrature and Curvature

3.1 Simpson's Rule: The Parabolic Approximation

While the Trapezoidal Rule fits lines, Simpson's Rule fits parabolas through sets of three points.

3.2 Adaptive Quadrature: Dynamic Resolution


4. Initial Value Problems (ODEs): Stability in the Complex Plane

Solving y' = f(t, y) requires stepping through time. The choice of method is governed by the Stability Region (S) in the complex plane.

4.1 Forward Euler (Explicit)

Takes a step in the direction of the gradient at the start of the interval.

4.2 Runge-Kutta 4 (RK4)

Takes four "trial" steps to sample the slope and averages them (1-2-2-1 weighting).


5. Quantitative Foundation: Comparison Table

MethodOrderTruncation ErrorStability TypeBest For
Bisection1O(2^{-n})AbsoluteRobust root finding.
Newton2O(h^2)LocalFast refinement.
Trapezoidal2O(h^2)A-Stable (Infinite)Stiff ODEs / Real-time physics.
RK44O(h^4)Conditional (Large)Smooth, non-stiff systems.
Simpson4O(h^4)FiniteHigh-precision integration.

5.1 The "Stiffness" Challenge

A system is stiff if it contains vastly different time scales (e.g., a chemical reaction with both microsecond and hour-long phases).


See Also: