# build smooth function on smooth manifold

I would like to know how can I build smooth function f on smooth n- dimensional manifold X which provides: f=0 on some open set U. f=1 on a slightly larger V contains U. I know to do it if the manifold contained in R^n (I can write explicitly this kind of function using convolution on characteristic function) but for general manifold I can't since I don't have euclidean metric on the manifold. thanks for the helpers .

-
As stated: it is impossible. You have $U\subset V$ and you are requiring $f(U) = \{0\}$ and $f(V) = \{1\}$, which contradicts the fact that $f$ is a function. –  Willie Wong Mar 6 '13 at 12:29
In general, the idea you are looking for is probably that of a smooth partition of unity, which are guaranteed to exist for most definitions of "smooth manifold", and can be used to build Riemannian metrics by gluing together local definitions. See for example Theorem 2.23 in Lee's Introduction to Smooth Manifolds. –  Willie Wong Mar 6 '13 at 12:34