Best polynomial approximation of a partially constant function Suppose $\alpha \in [0;1]$. Let's define $f_\alpha$ as the function $[0;1] \to [0;1]$ with the following formula:
$$f_\alpha(x) = \begin{cases} 0 & \quad x < \alpha \\ 1 & \quad x \geq \alpha \end{cases}$$
What is the best $n$-degree polynomial approximation of $f_\alpha(x)$?
By best $n$-degree polynomial approximation I mean a polynomial $p_n(x)$ of degree $\leq n$ such that $\sup_{x \in [0;1]} |f_\alpha(x) - p_n(x)|$ is smallest possible.
The best polynomial approximation exists due to the facts that $L_\infty[0;1]$ is a Banach space, all polynomials of degree at most $n$ form its closed convex subspace and there is a projection theorem for Banach spaces.
 A: For all $n$, the constant polynomial
$$c(x) = \frac{1}{2}$$
is the best approximation for the function $f_{\alpha}$.
To see this, we show that for every polynomial $p : [0,1] \to \Bbb R$ the following holds:
$$\sup_{x \in [0,1]} |f_{\alpha} (x) - c(x)| \le \sup_{x \in [0,1]} |f_{\alpha} (x) - p(x)|$$
First: obviously
$$\sup_{x \in [0,1]} |f_{\alpha} (x) - c(x)|= \frac{1}{2}$$
So it is enough to prove that for any polynomial $p$ the inequality
$$\sup_{x \in [0,1]} |f_{\alpha} (x) - p(x)|\ge \frac{1}{2}$$ holds. There are two cases:

*

*First case: $p( \alpha ) \le 1/2$. In this case you have
$$|f_{\alpha} (\alpha) - p(\alpha)| = |1-p(\alpha)| = \left|\frac{1}{2} + \frac{1}{2} - p( \alpha) \right| = \frac{1}{2}  + \left( \frac{1}{2} - p( \alpha) \right) \ge \frac{1}{2}$$
In particular the supremum is larger or equal to $1/2$.


*Second case: $p( \alpha ) > 1/2$. In this case consider arbitrary $x \in [0 ;\alpha )$. You have
$$\sup_{x \in [0,1]} |f_{\alpha} (x) - p(x)| \ge \sup_{x \in [0,\alpha)} |f_{\alpha} (x) - p(x)| \ge \lim_{x \to \alpha^-} |f_{\alpha} (x) - p(x)| = p(\alpha) > \frac{1}{2}$$
This completes the proof.
Remark: the polynomial minimizing the quantity $\sup_{x \in [0,1]} |f_{\alpha} (x) - p(x)|$ need not to be unique. There may be more than one, but I think that the constant polynomial is the simplest one.
