Prove polynomial sequence converging to f exists (Weierstrass Approximation Theorem)

real-analysisweierstrass-approximation

I have the following problem:
Prove there is a sequence of polynomials, $p_n(x)$, such that $p_n(x)$ converges uniformly to $|x|$ on [-1,1] and $p_n(0)=0$ for all n.

I'm not sure if I'm misunderstanding the question. Can I just use Bernstein polynomials and show that they converge to |x|? Is that even possible?

Best Answer

There is a problem with the Bernstein polynomials as they are. If we let $b_{\nu, n}(x) = x^\nu(1 - x)^{n - \nu}$, then we can form a uniform approximation of $|x|$ by $$B_n(x) = \sum_{\nu = 0}^n\left|2\frac{\nu}{n} - 1\right|b_{\nu,n}\left(\frac{x+1}{2}\right).$$ That said, we don't have $B_n(0) = 0$, as required by the question. Computing, we get $$B_n(0) = \sum_{\nu = 0}^n\left|2\frac{\nu}{n} - 1\right|b_{\nu,n}\left(\frac{1}{2}\right) = \frac{1}{2^n}\sum_{\nu = 0}^n\left|2\frac{\nu}{n} - 1\right| > 0.$$ Instead, consider $p_n(x) = B_n(x) - B_n(0)$ (or indeed, $B_n$ could be any uniform approximation of $|x|$ with polynomials). Then $p_n(0) = 0$ and \begin{align*} \Big|p_n(x) - |x|\Big| &= \Big|B_n(x) - B_n(0) - |x|\Big| \\ &\le \Big|B_n(x) - |x|\Big| + |B_n(0)| \\ &= \Big|B_n(x) - |x|\Big| + \Big|B_n(0) - |0|\Big|. \end{align*} Since $B_n(x) \to |x|$ uniformly, we know that, for all $\varepsilon > 0$, there exists some $N$ such that \begin{align*} n > N &\implies \forall x \in [-1, 1], \Big|B_n(x) - |x|\Big| < \frac{\varepsilon}{2} \\ &\implies \forall x \in [-1, 1], \Big|B_n(x) - |x|\Big| + \Big|B_n(0) - |0|\Big| < \varepsilon \\ &\implies \forall x \in [-1, 1], \Big|p_n(x) - |x|\Big| < \varepsilon. \end{align*}

Related Question