the equioscillation theorem
Suppose you have found the best possible degree-n polynomial approximation to a function — the one with the smallest worst-case error. How would you even RECOGNIZE it? The equioscillation theorem gives a clean, checkable fingerprint: the best approximation is the unique one whose error wiggles up and down, touching its maximum size the same number of times with alternating signs.
Precisely: a degree-n polynomial p is the minimax (best uniform) approximation to a continuous f on an interval if and only if the error e(x) = f(x) - p(x) attains its maximum absolute value E at AT LEAST n + 2 distinct points, with the sign of e ALTERNATING from one such point to the next (+E, -E, +E, ...). Why must optimality look like this? If the error reached its peak +E in fewer places, or did not alternate, you could add a small correcting polynomial that pushes down the highest peak without raising the others — proving p was not optimal. So equal, alternating ripples are not a coincidence; they are exactly the condition under which no further improvement is possible. The theorem also delivers uniqueness: only one polynomial can equioscillate this way.
This theorem is the theoretical engine behind minimax approximation and the practical Remez exchange algorithm, which repeatedly adjusts the polynomial to force the error onto an equioscillating pattern, converging on the best approximation. It is why a well-designed library approximation of sin or exp has an error graph that looks like a tidy, even ripple rather than a spike. The honest scope: the theorem characterizes the best UNIFORM (worst-case) approximation specifically — it is silent about least-squares (average-error) fits, which equioscillate in a weighted sense but not pointwise, and it assumes you are approximating a continuous function by ordinary polynomials on a real interval.
Best line to f(x) = x^2 on [0, 1] is p(x) = x - 1/8. The error x^2 - x + 1/8 equals +1/8 at x = 0, -1/8 at x = 1/2, +1/8 at x = 1 — three (= n + 2 with n = 1) alternating extrema of equal size 1/8. That equioscillation certifies p as the minimax line.
n + 2 equal, sign-alternating peaks certify the best approximation.
Equioscillation characterizes the best UNIFORM (minimax) approximation, not the least-squares one. The count is at least n + 2 alternating extrema for a degree-n polynomial; this both proves optimality and guarantees the minimax polynomial is unique.