I'm trying to check that every continuous function $f:S^n \to S^n$ can be approximated by differentiable ones. Well, by Stone-Weierstrass I can approximate the coordinate functions $f_i:S^n \to \Bbb R$ by differentiable ${\tilde f_i}:S^n \to \Bbb R$. The problem is, of course, I can't guarantee ${\tilde f}:=({\tilde f}_1,\dots,{\tilde f}_{n+1})$ to be in $S^n$. To solve this i thought of projecting ${\tilde f}(p)$ to the point in the sphere that minimizes the distance ${\tilde f}(p)$ to $S^n$, this projection would still approximate $f$ but I see no reason for this projection to be differentiable. Any hint?
Sorry, by approximate I mean $\sup_{x \in S^n} |{\tilde f}(x) - f(x)| < 1$ (I don't know if $1$ is important here)
You're fine, as long as your approximation satisfies $|f-g|<1$. The function $\pi\colon \mathbb R^{n+1}-\{0\}\to S^n$, $\pi(x)=x/|x|$, is smooth.