If $f:S\rightarrow \mathbb{R}^m$ is a map such that each $f|_{S_i}:S_i\rightarrow \mathbb{R}^m$ is differentiable, prove that $f$ is differentiable. QUESTION 1: Let $f, g: S\rightarrow \mathbb{R}^m$ be differentiable vector-valued functions and let $\lambda\in \mathbb{R}$. Prove that the function $(f+g):S\rightarrow \mathbb{R}^m$ is also differentiable.
PROOF: Let $X:U\rightarrow S$ be a parametrization of $S$. Then $$(f+g)\circ X= f\circ X + g\circ X$$ which is differentiable, as a sum of differentiable functions.
MY DOUBT IN QUESTION 1: How can I show in a step by step way that the sum above is distributive with the composition maps?
QUESTION 2: Suppose that a surface $S$ is a union $S=\displaystyle\bigcup_{i\in I} S_i$, where each $S_i$ is open. If $f:S\rightarrow \mathbb{R}^m$ is a map such that each $f|_{S_i}:S_i\rightarrow \mathbb{R}^m$ is differentiable, prove that $f$ is differentiable.
MY ATTEMPT: We have already proved that open sets in surfaces are also surfaces. Defining $f|_{S_i}:S_i\rightarrow \mathbb{R}^m$ as $f_i:S_i\rightarrow \mathbb{R}^m$ such that $f=\sum f_i$, considering $X:U\rightarrow S$ a parametrization of S (which is a surface), then we can write $(f_1+\cdots +f_n)\circ X= f_1\circ X+\cdots +f_n\circ X$ is differentiable, this is $f$ is differentiable.
MY DOUBT IN QUESTION 2: I'm not sure if I can interpret the union as a sum. Would you help me?
 A: Question 2. You do not need to extend $f$ on $S$ (it is an answer to your comment to another answer) because $f$ is already defined on $S$, it is already a normal function. You have just to show that it is differentiable. But differentiability is a local property, in other words, it is enough to check it in any neighborhood of every point of $S$. Since $S$ is the union of open sets $S_i$, then for each point $s\in S$ there is an index $i(s)$ such that $s\in S_{i(s)}$. Since $f |_{S_{i(s)}}$ is differentiable on $S_{i(s)}$, then $f$ is differentiable at point $s$, because $f$ and $f|_{S_{i(s)}}$ are equal on $S_{i(s)}$. You do not even need a parameterization of $S$.
A: *

*This is correct. Distributivity comes pretty much directly from definition, try calculating $(f+g)\circ X(p)$. Recall that $(f+g)(q) := f(q)+g(q)$.


*This is wrong. Recall that differentiability is a local property. That means if we want to prove $f$ is differentiable at $p$, we can take $X:U\to S$ with $X(S)$ small enough to be contained in $S_i$ (where $p\in X(S)\cap S_i$). Compatibility of parametrizations takes over the rest.
A: Question 1. The definition of sum of functions $f$ and $g$ is a function $(f+g):S\rightarrow \mathbb{R}^m$, which can be described with a formula $(f+g)(s)=f(s)+g(s)$. It is correct since $\mathbb{R}^m$ is a vector space. To show that functions $(f+g)\circ X$ and $f\circ X+g\circ X$ you need to show that they are pointwisely equal on $U$. Indeed, \begin{equation*}((f+g)\circ X)(u)=(f+g)(X(u))=f(X(u))+g(X(u))=
(f\circ X)(u)+(g\circ X)(u)=(f\circ X+g\circ X)(u),\end{equation*}
where I used the definition of composition of functions. Here you have no more than definitions.
