Solution (source code)

= Solution

The <Chebyshev alternation theorem> says that for $f\in C([a,b])$ a <polynomial> $q$ of degree at most $n-1$ is a best <uniform approximation> precisely when there are $n+1$ ordered points $a\leq x_0<\cdots<x_n\leq b$ such that
$$
f(x_j)-q(x_j)=\varepsilon(-1)^j\|f-q\|_\infty,\qquad\varepsilon\in\{1,-1\}.
$$
The best <polynomial> is unique. These equally large alternating extrema are the equal-ripple criterion; the zero-error case is interpreted in the evident way.