Constructing a smooth bump function on a manifold In "Loring W. Tu, An introduction to manifolds" the following question exists: Let $q$ be a point of an $n$-dimensional manifold $M$ and $U$ any neighborhood of $q$. Construct a smooth bump function at $q$ supported in $U$. I answered that question but I want to make sure. Here is my answer:
Let $q$ be arbitrary of $M$ that is contained in a neighborhood $U\subset M$. Then, there exists a coordinate chart $(V,\phi)$ in the maximal atlas of $M$ such that $q\in V \subset U$. In particular, there exists a smooth bump function $\rho:\mathbb{R}^n \to \mathbb{R}$ at $\phi(q)$ supported in $\phi(V)$ that is identically $1$ in a neighborhood $B_r(\phi(q)) \subset \phi(V)$, say, of $\phi(q)$. Define a map $f:M\to \mathbb{R}$ by 
$$
f(p) = 
\begin{cases}
\rho\bigl(\phi(p)  \bigr), &\text{$p\in V$}, \\
0, &\text{$p\not\in V$}.
\end{cases}
$$
Being the composite of two smooth function, $f$ is smooth on $V$ and hence on the whole manifold $M$. If $p\in \phi^{-1}\bigl( B_r(\phi(q)) \bigr)$, then $\phi(p) \in B_r\bigl( \phi(q) \bigr)$ and therefore, by the construction of $\rho$, $\rho\bigl( \phi(p) \bigr)=1$. That is, $f \equiv 1$ on the neighborhood $\phi^{-1}\bigl( B_r(\phi(q)) \bigr)$ of $q$. Clearly, by the definition of $f$, $supp\, f \subset V \subset U$. Hence, $f$ is a smooth bump function at $q$ supported in $U$.
Can anyone please revise my proof ?. I appreciate your help.
Thanks in advance.
Note: A smooth bump function $f:M\to \mathbb{R}$ at a point $q\in M$ supported in $U\subset M$ is a non-negative smooth function such that $f\equiv 1$ on a neighborhood $V_q \subset U$ of $q$ and that $supp\, f \subset U$.
 A: As pointed out in the comments, the map $f$ that you constructed may not be $C^{\infty}$. But you are almost there.
Notice that in Tu's book the bump function $\phi:\mathbb{R}^{n}\rightarrow \mathbb R$ could be chosen so that its support $\mathrm{supp}\phi$ is a compact subspace of $\mathbb{R}^{n}$. Then $\phi^{-1}(\mathrm{supp}\rho)$, being the image of a compact subspace under the continuous map $\phi^{-1}:\phi(V)\rightarrow V$, is a compact subspace of $V$. Hence $\phi^{-1}(\mathrm{supp}\rho)$ is a compact subspace of $M$. But $M$ is Hausdorff, so this means that $\phi^{-1}(\mathrm{supp}\rho)$ is closed in $M$. Therefore, we have that $$\mathrm{supp}f=\mathrm{cl}_{M}((\rho\circ\phi)^{-1}(\mathbb{R}^\times))=\mathrm{cl}_{M}(\phi^{-1}(\rho^{-1}(\mathbb{R}^\times))\subset\mathrm{cl}_{M}(\phi^{-1}(\mathrm{supp}\rho))=\phi^{-1}(\mathrm{supp}\rho)\subset V.$$
From this follows that $f$ is smooth: If $p\notin V$, choose a chart about $p$ disjoint from $\phi^{-1}(\mathrm{supp}\rho)$. (This is possible because $\phi^{-1}(\mathrm{supp}\rho)$ is closed in $M$.) Then this chart is also disjoint from $\mathrm{supp}f$, so on this chart $f$ is identically $0$. Hence $f$ is $C^{\infty}$
 at $p$. This proves that $f$ is $C^{\infty}$ at every point not in $V$. By construction, $f$ is also $C^{\infty}$ at every point in $V$. Hence $f$ is $C^{\infty}$.
Finally you check that $f$ satisfies all the properties required as a bump function at $q$ supported in $U$. This should not be difficult.
