Extending a map of manifolds continuously Let $M$ and $N$ be manifolds, and $A \subset M$ compact.  Let $f:A \rightarrow N$ be a continuous mapping.  Show there exists an open neighborhood $U$ containing $A$ and continuous extension $g:U \rightarrow N$ where $g|_A = f$.
Similarly, if $E(x)$, $x \in A$, is a continuous distribution on $A$ (distribution in the sense of differential geometry), show that we can extend the distribution to an open set $U$ containing $A$.
The latter question comes from studying a proof in Brin and Stuck's Introduction to Dynamical Systems (thm 5.3.1), where it is stated without proof.  The first is a simpler version of that question I made up.
Now it seems like the first question should be easy, just some proof involving partitions of unity, but I can't seem to find it.  There doesn't seem to be an obvious way of gluing together functions that's consistent with changing charts.  Also, a proof must use the fact that we're allowed an arbitrarily small neighborhood $U$ around $A$, since in general one cannot extend such a map $f$ to all of $M$.
Thanks in advance for any advice!
 A: Use Whitney embedding to place $N$ inside some $\mathbb{R}^N$ and then extend the map to all of $M$ with, say, Tietze extension.  The map can then leave $N$, but applying the tubular neighborhood theorem to $N$, we can continuously project the extended map back onto $N$ in an open neighborhood.
A: This is a partial answer to the first question. Let $ A= K $. Let $ f(K) \subset \bigcup_{i=1}^{n} V_i $, where $ V_i \subset \subset U_i $ and $ \{U_i,\psi_i\} $ are local charts. Let $ K_i=f^{-1}(f(K) \cap \overline{V_i}) $. Then $ K_i $ is compact and $ \bigcup_{i=1}^{n} K_i = K $. 
By Theorem 1 of pag 13 of Evans- Gariepy book we find a continous function $ \tilde{g_i} : M \rightarrow R^n $ such that
$$ \tilde{g_i}|_{K_i}=\psi_i \circ f $$
Note $ \tilde{g_i}(K_i) \subset \psi_i(U_i) $. Choose $ \tilde{W_i} $ such that $ \tilde{g_i}(K_i) \subset \tilde{W_i} \subset\subset \psi_i(U_i) $. Then $ K_i \subset \tilde{g_i}^{-1}( \tilde{W_i})= W_i $
Define $ g_i = \psi^{-1} \circ \tilde{g_i} $ on $ W_i $. Then $ g_i $ is continous on $ W_i $ and $ g_i|_{K_i}=f|_{K_i} $. In this way we obtain several local extensions of $ f $. But i don't see how i can patch toghter them for obtaining a unique  extension.
A: See the paper by Bethuel and Demengel [Calc. Var. 3, 475-491 (1995)] which states, in the case M^n is a ball and A is the boundary of said ball, that the continuous extension holds if and only if \pi_{n-1}(N) = 0. The extension problem seems to have topological obstructions and relate to homotopy theory.
