# Why do we need a partition of unity to extend functions?

As part of an exercise, my textbook (Analysis on Manifolds) first gives an alternate definition as to what it means for a function $f$ to be differentiable at a point. It then asks us to extend $f$ to $h$ using the method described below. I question why one must use a partition of unity to make this extension. I would define a new function, albeit not a tame one, as follows:

$$g(x): A \to \mathbb{R}^{n}$$

$$g(x) = g_{x}(x)$$

where $$A = \cup U_{x}$$ where $U_{x}$ is the open set given in the definition in part $a$ over which some $C^{r}$ function $g_{x}$ exists so that $g_{x} = f$ on $U_{x}$

I sense that this function is not easy to work with. How is a function defined with a partition of unity any better?

If it helps anyone, here is the entire problem statement: EDIT I sense it would be good to compare my naive definition above with what I presume is a representation using a partition of unity.

Let the open sets $U_{x}$ for each $x \in S$ be put into a collection $\{U_{1}, U_{2}, \dots \}$ (can we do this if $U_{i}$ are uncountable)? Let their union be $A$, and make a $C^{\infty}$ partition of unity $\{\phi_{i}\}$ on $A$ dominated by this collection. Now create our extension:

$$H(x) = \sum_{i=1}^{\infty}\phi_{i}(x)g_{i}(x) = \sum_{i=1}^{\infty}h(x)$$

where $g_{i}(x)$ is the $C^{r}$ function agreeing with $f$ on $U_{i}(x)$ and $h(x)$ is a proven (this was part a of the exercise) well-defined function.By the local finiteness condition, this sum has only finitely many non-zero terms, so the finite summands $\phi_{i}(x)g(x)$, each $C^{r}$, are also $C^{r}$ when summed together.

• How do you know that the map $x \to g_x(x)$ is even continuous? – guest Mar 5 '17 at 5:00
• How do you know $x \mapsto g_x(x)$ is well-defined? If $z \in U_x$ and $z \in U_y$, you would need $g_x(z) = g_y(z)$. – Hurkyl Mar 5 '17 at 5:16
• @guest I see. Thanks – Muno Mar 5 '17 at 5:33
• Hurkyl's anwer has it all! It is the well-definedness issue. You must have a way of passing from $g_x$ on one neighborhood to $g_y$ on a different one in a $C^r$ smooth manner. To be able to do this, you take a weighted average of them. And this weights come from the partition of unity. – Behnam Esmayli Mar 5 '17 at 6:04

As you seem to have observed yourself, the problem is that your function $g$ is not "tame". There's no reason to expect it to be continuous, let alone differentiable: you're using a different function $g_x$ to define its value at each different point $x$, and it would be a huge coincidence if somehow they all managed to come together to give a continuous function. On the other hand, as you note, the function constructed with the partition of unity is guaranteed to be $C^r$, because in a neighborhood of each point you are just taking a finite sum of $C^r$ functions. If you just wanted some extension of $f$ to a function on $A$ and didn't care about it being a nice function, there is a much easier way to do that: for instance, you could just define your function to be $0$ at every point of $A\setminus S$.