I am asked to show that every cont. function from a manifold M to $\mathbb{R}$ can be approximated by smooth functions.
Try: let f be a map from M to the reals(R). Let ${s_{i}, U_{i}}$ be our atlas. Then $f(p)$ can be rewritten as $fs_{i}^{-1}$ at $s_{i}(p)$. Now, since $f$ is cont. and $s_{i}$ is a chart, their composition is cont. Now, we have $f$ represented by all these cont. maps according to the appropriate charts. But notice that $fs_{i}^{-1}$ is a map from the reals to the reals, and hence we invoke the Wierstrass approximation theorem and say there exists a polynomial $P(x)_{i}$, such that the supremum of the distance between $P(x)_{i}$ and $fs_{i}^{-1}$ is less than arbitrary $\epsilon_{i}.$
Hence, a candidate for the desired function is $\{P(x)_{i} : x = s_{i}(p)\}$. I hope this makes, its the collection of all these approximating polynomials, in accordance with the charts. Now the issue is showing that this map is smooth. I am assuming the coordinate transformations are supposed to come in here, but i am at a loss.
Thanks in advance.
Let $(U_i, s_i)$ be an atlas and $\eta_i$ a smooth partition of unity subordinate to $U_i$: this means
Now, on each $U_i$ we can approximate in the chart as you suggested - let $p_i$ be a smooth function on $s_i(U_i)$ approximating $f \circ s_i^{-1}$ to within $\epsilon$. We can use $\eta_i$ to patch all of these local approximations together into a global approximation: define $$ \tilde f (x) = \sum_i p_i (s_i(x))\eta_i(x).$$
This is smooth because it is locally the finite sum of smooth functions - if you fix an $x\in M$ and look at $\tilde f$ on the nice neighbourhood provided by the partition of unity, then there are only finitely many non-zero terms in the sum, and each is the product of a smooth function $p_i \circ s_i$ with a smooth function $\eta_i$.
As to the approximation, we have $$\begin{align} |f(x) - \tilde f(x)| &= \left|\sum_i \eta_i(x)\left(f(x) - p_i(s_i(x))\right)\right|\\ &\le \sum_i \eta_i(x) \left| f(x) - p_i(s_i(x))\right| \end{align}$$ where we used $\sum_i \eta_i = 1$ to move $f$ inside the sum. Now, the uniform approximation $|f \circ s_i^{-1} - p_i| < \epsilon$ on the image of the chart $s_i$ means that $|f(x) - p_i(s_i(x))| < \epsilon$ for every $x \in U_i$, and thus we have the bound $$|f(x) - \tilde f(x)| < \sum_i \eta_i(x) \epsilon = \epsilon.$$