# Map from a manifold to $[0,1]$

I am looking through a practice exam to prepare for an upcoming final and I am having through with this question.

Question: Let $M$ be a manifold, $p \in M$, and $U \subset M$ an open set containing $p$. Show there is a continuous function $f : M \to [0, 1]$ such that $f(p) = 1$ and $\overline{f^{-1}((0, 1])}$ is a subset of $U$.

The bar is the closure of the set.

My Ideas: Around $p$ there is an open set $V$ which is homeomorphic to the unit ball in $\mathbb{R}^n$ for some $n$. Let $g : V \to B_1(0)$ witness this. I am not sure if there is a way to extend $g$ so that its domain is all of $M$. But even if I did get this I am not sure how to make $f(p) = 1$. If I am not mistaken once I can map to the ball I can project onto $[0, 1]$ to get a continuous map there.

Thanks for any help.

-
For such functions see en.wikipedia.org/wiki/Mollifier –  Ma Ming Jun 13 '13 at 9:36

Are all manifolds normal? So I guess I can just say using Urysohn's lemma we get a continuous map $f : M \to [0, 1].$ With $f(x) = 0$ for $x \in U^c$ and $f(p) = 1$ since $\{ p \}$ and $U^c$ is closed. –  user82241 Jun 13 '13 at 9:53