Solution (source code)

= Solution

We work in the usual real-valued setting of the <Chebyshev alternation theorem>. For $f\in C[-1,1]$ and an algebraic <polynomial> $p$ of degree at most $n$, the theorem says that $p$ is a <best uniform approximation> if and only if its error has $n+2$ ordered points with alternating maximal values:
$$
-1\le x_0<\cdots<x_{n+1}\le1,\qquad
f(x_j)-p(x_j)=\varepsilon(-1)^j\|f-p\|_\infty,
\quad \varepsilon\in\{1,-1\}.
$$
If $f=p$, the zero-error case is included directly.

Existence follows, for example, by taking a minimizing sequence: its <supremum norms> are bounded, all norms on the finite-dimensional <polynomial> space are equivalent, and a convergent coefficient subsequence attains the infimum. To prove <uniqueness of best uniform polynomial approximation>, let $p,q$ both attain the minimum error $E$. Their average $r=(p+q)/2$ has error at most $E$ by the triangle inequality and therefore exactly $E$ by minimality.

If $E=0$, both <polynomials> equal $f$ and are equal. Otherwise apply the <Chebyshev alternation theorem> to $r$. At every alternating extremal point, $f-r$ is either $E$ or $-E$. But it is the average of $f-p$ and $f-q$, each lying in $[-E,E]$. An average attains an endpoint of this interval only when both entries equal that endpoint. Hence $p(x_j)=q(x_j)$ at all $n+2$ points. The difference is a degree-at-most-$n$ <polynomial> with more than $n$ distinct zeros, so it is identically zero. \b[The best approximating <polynomial> is unique.]