Question about partition of unity exercise. I want to solve the following problem:
Let $M$ be a paracompact hausdorff manifold, $g: M \rightarrow \mathbb{R}$ and $\varepsilon : M \rightarrow (0, +\infty)$ two continuous functions. Prove the existence of a smooth function $h: M \rightarrow \mathbb{R}$ with $|h(x)-g(x)|<\varepsilon(x)$ for all $x \in M$.
I even have a hint, which states the following:
Use a partition of unity $\mathcal{F}$, which is subordinated to the covering with the sets $U_x := \{y \in M : |g(y)-g(x)|<\varepsilon(x) \}$ for $x \in M$ and put $h(x):=\sum_{f \in \mathcal{F}} f(x) g(x_f)$, where $supp(f) \subseteq U_{x_f}$.
My only observation until now was that when looking at this sum $\sum_{f \in \mathcal{F}} f(x) g(x_f)$ it is enough to sum over all $f$'s where $x$ is in the support (obviously, since all the other terms would vanish anyway), and this in turn means then that it is enough to sum over all $f \in \mathcal{F}$ such that $|g(x)-g(x_f)| < \varepsilon(x)$ holds (since every support lies in such a $U_{x_f}$).
Then i thought that if i could show that $h(x)=\sum_{f \in \mathcal{F}} f(x) g(x_f) = g(x_{f_0})$, for some $f_0 \in \mathcal{F}$, then the desired inequality would follow. However, i would still need to show something for the smoothness (i think), so i think this does not work out. Maybe I am not familiar enough with partitions of unity. Can someone help me out here?
 A: In case anyone is interested in an answer, i think i got one now:
It is just some reformulation with two little arguments: look at $|h(x)-g(x)|$ and reformulate:
\begin{equation}
|h(x)-g(x)|= |\sum_{f \in \mathcal{F}} f(x) g(x_f) - g(x)| = |\sum_{f \in \mathcal{F}} f(x) g(x_f) - \sum_{f \in \mathcal{F}}f(x)g(x)|.
\end{equation}
The first equality is by definition. Since the partition of unity sums up to $1$ at each point, i can just replace $g(x)$ by $\sum_{f \in \mathcal{F}}f(x)g(x)$. 
Next, add them together in one sum, and obtain
\begin{equation}
|\sum_{f \in \mathcal{F}} f(x) (g(x_f) - g(x))| \leq \sum_{f \in \mathcal{F}} f(x)|(g(x_f) - g(x))|<\sum_{f \in \mathcal{F}}f(x)\varepsilon(x)=\varepsilon(x).
\end{equation}
The first inequality is just basic calcus estimation, and also the $f(x)$'s are always between $0$ and $1$. The second (strict) inequality comes from the definition of the sets in the covering, since all the terms where i would not be able to make this estimate vanish anyway.
