Which of the following sets are dense in $C[0,1]$ with respect to sup-norm topology?
$1$. {$f$$\in$ $C[0,1]$ : $f$ is a polynomial }
$2$. {$f$$\in$ $C[0,1]$ :$f(0)$=$0$}
$3$. {$f$$\in$ $C[0,1]$ :$f(0)$$\neq$$0$}
$4$. {$f$$\in$$C[0,1]$ :$\int_{0}^{1}f(x)dx$$=$5}
I am thinking to apply Stone-weierstrass theorem but I don't know how to use it properly. Please help!
Answer: $1,\, 3$
Proof:
Stone-Weierstrass theorem states explicitly the dense property of the polynomials in $(C[0,1],\parallel\cdot\parallel_\infty)$
It is not dense. Because it is a proper closed subset of $(C[0,1],\parallel\cdot\parallel_\infty)$ as it is the inverse image of $\{0\}$ under the continuous map $f\mapsto f(0)$.
It is dense. It is obvious that every element of that set is a limit point of that set. So now, let $f(0)=0$. Then the sequence of functions $f_n(x)=f(x)+\frac{1}{n}$ converges to $f$ with respect to supnorm and $f_n(0)=\frac{1}{n}\neq 0$.
It is not dense. Because it is the inverse of the set $\{5\}$ under the continuous map $f\mapsto \int_0^1 f(x)dx$. And hence it is a proper closed set.