Consider the closed convex subset $\mathcal{F} = \{f \in C[0,1] : 0 \leq f \leq 1, f(0)=0, f(1)=1\}$. Consider the polynomial class $\mathcal{P} = \{p \text{ is a polynomial} : p(0)=0, p(1)=1, 0 \leq p \leq 1\}$. Is $\mathcal{P}$ dense in $\mathcal{F}$ in the sup norm?


Is anything known about Weierstrass theorem generalized as above to handle constraints? Or is there a counterexample?



Polynomial approximation of continuous function with constraints
Indeed, $\mathcal{P}$ is dense in $\mathcal{F}$. The Bernstein polynomials approximating $f\in\mathcal{F}$ belong to $\mathcal{P}$, see Theorem 11.68 in:


[http://www.pitt.edu/~hajlasz/Teaching/Math1530Fall2018/selection.pdf](http://www.pitt.edu/%7Ehajlasz/Teaching/Math1530Fall2018/selection.pdf)


