Show: for $0 < r < R$ there exists a $C^{\infty}$ function $\Phi: \mathbb R^{n} \to [0,1]$ where $\Phi(x)=0$ for $\vert \vert x \vert \vert >R$ and $\Phi(x)=1$ where $\vert \vert x \vert \vert\leq r$. On the real axis (1-dimensional axis) I already showed the existence of a smooth function $\varphi$ where $\varphi\vert_{]-r,r[}=1$ and $\varphi\vert_{\mathbb R\setminus]-R,R[}=0$
My idea: We construct $\Phi$ simply as a composition of $\varphi$ and $\vert \vert \cdot \vert \vert$, so that:
$\Phi = \varphi \circ \vert \vert \cdot \vert \vert$
$\varphi$ is $C^{\infty}$ but I am not sure whether $\vert \vert \cdot \vert \vert$ is $C^{\infty}$, I know that $\vert \vert \cdot \vert \vert$ is continuous though.
Any help?
To simplify the argument, just use $\|\cdot\|^2$ instead, which is a polynomial.
Nevertheless, $\|\cdot\|$ is also smooth, except at the origin, because $\sqrt \cdot $ is smooth except at $0$. The problem at $0$ is not a problem in the current situation though, because $\phi$ is constant around $0$.