TITLE: Proof that continuous partial derivatives implies differentiability
QUESTION [18 upvotes]: This is the statement of Theorem 2.8 from Spivak's Calculus on Manifolds. I'd like feedback on if this looks fine as far as a generalization to his proof goes:
Theorem: If $f: \mathbb{R}^n \rightarrow \mathbb{R}^m$, then $Df(a)$ exists if all $D_jf^i(x)$ exist in an open set containing $a$ and if each function $D_jf^i$ is continuous at $a$.
Proof: Let $f: \mathbb{R}^n \rightarrow \mathbb{R}^m$ and suppose that all $D_jf^i(x)$ exist in an open set containing $a=(a^1,...,a^n)$ and that each function $D_jf^i$ is continuous at $a$. Then, for each $j$ such that $1 \leq j \leq n$, by the mean value theorem, we can find $b^j$ satisfying $a^j<b^j<a^j+h^j$, so that, $$\lim_{h \to 0} \frac{|f(a+h)-f(a)-(\sum_{j=1}^n D_jf^1(a)(h^j),...,\sum_{j=1}^n D_jf^m(a)(h^j))|}{|h|}=$$ $$\lim_{h \to 0} \frac{|f(a^1+h^1,a^2...,a^n)-f(a)+...+f(a+h)-f(a^1+h^1,...,a^{n-1}+h^{n-1},a^n)-(...)|}{|h|}=$$ $$\lim_{h \to 0} \frac{|D_1f(b^1,a^2...,a^n)(h^1)+...+D_nf(a^1+h^1,...,a^{n-1}+h^{n-1},b^n)(h^n)-(...)|}{|h|}=$$ $$\lim_{h \to 0} \frac{| (\sum_{j=1}^n [D_jf^1(c_j)-D_jf^1(a)](h^j),...,\sum_{j=1}^n [D_jf^m(c_j)-D_jf^m(a)](h^j))|}{|h|} \leq$$ $$\lim_{h \to 0} |(\sum_{j=1}^n |D_jf^1(c_j)-D_jf^1(a)|\frac{|h^j|}{|h|},...,\sum_{j=1}^n |D_jf^m(c_j)-D_jf^m(a)|\frac{|h^j|}{|h|})| \leq$$ $$\lim_{h \to 0} |(\sum_{j=1}^n |D_jf^1(c_j)-D_jf^1(a)|(1),...,\sum_{j=1}^n |D_jf^m(c_j)-D_jf^m(a)|(1))|=0,$$ where $h=(h^1,...,h^m)$, each $c_j$ is defined suitably in terms of $a^j$'s, $b^j$'s and $h^j$'s, and the last equality holds by the continuity hypothesis. Therefore $Df(a)$ exists.
Thanks in advance.

REPLY [18 votes]: To simplify life, use the $\|\cdot\|_1$ norm.
To reduce clutter, let $\phi_k(h) = (h_1,...,h_k,0,...0)$. Let $\phi_0(h) = 0$,
and note that $\|\phi_k(h)-\phi_j(h)\|_1 \le \|h\|_1$.
First suppose $m=1$.
Let $\epsilon>0$.
By continuity, we can choose $\delta>0$ such that $|D_kf(a+h)-D_kf(a)| < \epsilon$ for all $k$ and $\|h\| < \delta$.
Let $A=(D_1f(a),...,D_n f(a))$ and suppose $\|h\| < \delta$, then we have
\begin{eqnarray}
|f(a+h)-f(a)-Ah| &=& |\sum_{k=1}^n (f(a+\phi_k(h))-f(a+\phi_{k-1}(h))-D_kf(a)h_k)| \\
&\le& \sum_{k=1}^n |f(a+\phi_k(h))-f(a+\phi_{k-1}(h))-D_kf(a)h_k|
\end{eqnarray}
By the mean value theorem, there are $c_k \in [a+\phi_{k-1}(h), a+\phi_k(h)]$ (that is, each $c_k$ lies on the line segment) such that
$f(a+\phi_k(h))-f(a+\phi_{k-1}(h)) = D_k f(c_k) h_k$. Note that
$\|c_k -a\|_1 \le \|h\|_1$. Continuing:
\begin{eqnarray}
|f(a+h)-f(a)-Ah| &\le& \sum_{k=1}^n |D_k f(c_k) h_k-D_kf(a)h_k| \\
&=& \sum_{k=1}^n |D_k f(c_k) -D_kf(a)||h_k| \\
&<& \epsilon \sum_{k=1}^n |h_k| \\
&=& \epsilon \|h\|_1
\end{eqnarray}
Since $\epsilon>0$ was arbitrary, this shows that $f$ is differentiable at $a$ and $Df(a)h = Ah$.
It is straightforward to show that if $f_1,...f_m$ are differentiable, then so is
$f(x) = (f_1(x),...,f_n(x))$, and
$Df(x)h = (Df_1(x)h, ..., D f_m(x)h)$.