I'm trying to solve an exercise which its conclusion seems to be the title of this post. The exercise is:
- Show that the function $h:\Bbb R\to [0,1[$ given by $h(t)=\begin{cases} e^{-1/t^2} &\text{if } t\neq 0\\ 0 &\text{otherwise} \end{cases}$ is $C^\infty$.
- Show that the functions $h_+(t)=\begin{cases} e^{-1/t^2} &\text{if } t\gt 0\\ 0 &\text{otherwise} \end{cases}\quad\text{and}\quad h_{-}(t)=\begin{cases} e^{-1/t^2} &\text{if } t\lt 0\\ 0 &\text{otherwise} \end{cases}$ are $C^\infty$.
- Show that the function $k:\Bbb R\to [0,1[$ given by $k(t)=h_-(t-b)h_+(t-a)$ is $C^\infty$ and positive for $t\in ]a,b[$.
- Let $R$ the rentangle $]a_1,b_1[\times\cdots\times]a_n,b_n[$. Show that there is a $C^\infty$ function $g:\Bbb R^n\to [0,1[$ strictly positive on $R$.
- Conclude that if $K$ is a compact subset of $\Bbb R^n$ and $U$ is an open neighborhood of $K$, there is a $C^\infty$ function $f:\Bbb R^n\to [0,1]$ such that $f_{|K}\equiv 1$ and its support is contained in $U$.
From 1.-4. I can prove that for any open and bounded set $O\subset \Bbb R^n$, there is a $C^\infty$ function with its support contained in $O$. So my first attempt was apply this to the open $U\setminus K$. Then I get a $C^\infty$ function $f$ that is $0$ (in particular) over $K$. If I just consider $\chi_K+f$ that function can fail to be $C^\infty$.
In a discussion on the chat, robjohn suggest this. It works fine, but then my question is:
Can 5. be proved by using 1.-4.? If yes, how?