The unsolved extension problem on manifolds. I have been struggeling for quite a while with this problem:
Let $M \subset \mathbb{R}^n$ be a compact $C^k-$ submanifold and $\phi_i: B_i(0) \rightarrow M$ be the associated set of charts $(\phi_i)_{i \in \{1,...,n\}}$, where $B_i(0)$ is an open ball around $0$, such that $\phi_i(B_i(0)) \subset M$ is relatively open. Now we call a function $f: M \rightarrow \mathbb{R}$ k-times continuously differentiable if for every chart $f \circ \phi_i$ is k-times continuously differentiable. 
Now I am supposed to show that there is a map $F: \mathbb{R}^n \rightarrow \mathbb{R}$ that is k-times continuously differentiable and $F|_M = f$ such that $\text{supp(F)} \subset N$, where N is an epsilon-surrounding of M. 
What have I tried so far: My first idea was to use a partition of unity, as we only have a continuously differentiable function $f$ via $f \circ \phi_i$, but this did not really work. Further, my problem was how to make the transition from $M$, where it is pretty clear, what $F$ does to $N$, which is outside from $M$ and hence completely undefined.
I appreciate any kind of help and suggestion, also if you cannot offer a complete solution.
Thank you very much in advance.
 A: First you extend $f$ to a neighbourhood $N$ of $M$ that should roughly look like $M\times (-\varepsilon, \varepsilon)^{n-d}$. Then you take a ($C^\infty$) cutoff-function $\varphi$ that is $\equiv 1$ on $M$ and has support in $N$. Then you can extend the cut-off $\varphi\cdot F_N$ trivially (by $0$) to all of $\mathbb{R}^n$.
To get the first extension, you get local extensions and glue them together using a partition of unity.
Since $M$ is a $C^k$ submanifold of $\mathbb{R}^n$, every $m\in M$ has a neighbourhood $U_m$ such that there exists a $C^k$-diffeomorphism $\psi_m \colon U_m \to (-\delta_m,\delta_m)^n$ that maps $U_m \cap M$ to $(-\delta_m,\delta_m)^d\times \{0\}$ ($d$ is the dimension of $M$). You can trivially extend $f$ to $U_m$ by declaring it independent of the last $n-d$ coordinates in the chart $\psi$. That is the local extension. Since $M$ is compact, it is covered by finitely many of the $U_m$, and then you glue the local extensions to $U_1,\,\dotsc,\, U_r$ together with a partition of unity.
