minimax approximation
When you replace a function by a simpler one (say a low-degree polynomial), you care about the WORST mistake anywhere in the range, not the average. A library routine for sin(x) must be accurate at every input, so the goal is to make the single largest error as small as possible. Minimax approximation does exactly that: among all approximants of a given form, it finds the one whose maximum error is the smallest — it MINIMIZES the MAXimum deviation.
Formally, for a target f on an interval, you seek the degree-n polynomial p that minimizes the worst-case gap, the so-called L-infinity or uniform norm: max over x of |f(x) - p(x)|. This is a different goal from least-squares (which minimizes the AVERAGE squared error and can let the peak error grow) and from interpolation (which forces the error to zero at the nodes but ignores it elsewhere). The minimax solution exists and is unique, and it has a startling signature described by the equioscillation theorem: the error curve f(x) - p(x) reaches its maximum magnitude at least n + 2 times, with the sign flipping each time, like a wave bouncing equally between +E and -E. That equal-ripple pattern is the fingerprint of optimality — if the ripples were uneven you could nudge p to shave the tallest one.
Minimax is the gold standard wherever a guaranteed error bound matters: the polynomial and rational approximations baked into math libraries (for exp, log, sin) are minimax-designed, computed by the Remez exchange algorithm that hunts for the equioscillating solution. The honest practical notes: the true minimax polynomial is harder to compute than least-squares or interpolation (it needs the iterative Remez algorithm), so in practice interpolation at Chebyshev nodes is often used as a near-minimax shortcut — it is provably within a small factor of optimal and far cheaper. Minimax answers 'how good can a degree-n approximation possibly be?', and its existence rests on the Weierstrass theorem that says the error can be driven to zero as the degree grows.
Approximate f(x) = |x| on [-1, 1] by a straight line. The best uniform line is the constant p(x) = 0.5: the error |x| - 0.5 equals +0.5 at x = -1, -0.5 at x = 0, and +0.5 at x = 1 — three equal-magnitude alternating peaks, the equioscillation signature of optimality. No line does better than 0.5.
Optimal means the error ripples bounce equally between +E and -E.
Minimax minimizes the WORST error (uniform norm), not the average squared error (that is least squares). The true minimax polynomial needs the iterative Remez algorithm, so Chebyshev-node interpolation is often used as a cheap near-minimax substitute.