My instructor mentioned as an application of stone-weistrass that the set of polynomials in $t^2$ is dense in $C([a, b])$ if $0 \notin [a,b]$. I could not be able to prove the density to understand the application.
Stone-Weistrass Theorem : Let $E$ be a compact metric space. If $A$ is a subalgebra of $C(E)$ that separates points and contains the constant functions, then $\bar{A} = C(E)$.
Let $A = \{p(t^2) \in C(E) \}$ , then this set clearly contains constant functions. But not sure how to show that the functions in $A$ separate points in $E$ and how $0 \notin [a,b]$ is derived.
Hint: let $x, y$ be real numbers and define $p(t) = t^2 - x^2$. If $x \neq y$, can we have $p(x) = p(y)$? What if $x$ and $y$ are both positive? Or both negative?