Let $C[0, 1]$ denote the set of all real-valued continuous functions on $[0, 1]$.
Consider the normed linear space
$$
X=\{f\in C[0,1]| f(\frac{1}{2})=0\}
$$
with the sup-norm
$$||f|| = \sup\{|f(t)| : t ∈ [0, 1]\}.$$
Show that the set
$$P=\{f\in X | f \text{ is a polynomial}\}$$
is dense in $X$.
I was trying to approach this problem using Weierstrass' approximation theorem but by doing so, for each $f\in X$, I can only find polynomials with roots in a neighborhood of $\frac{1}{2}$.
Hint: Let $p$ be a polynomial such that $|p(x)-f(x)| <\epsilon/2$ for all $x$. We can write $p(x)$ in the form $ \sum\limits_{k=0}^{N}a_k(x-\frac 1 2)^{k}$. Let $q(x)= \sum\limits_{k=1}^{N}a_k(x-\frac 1 2)^{k}$. $q$ is a polynomial vanishing at $\frac 1 2$. Verify that $|q(x)-f(x)| <\epsilon$ for all $x$.