How can I show that f is twice differentiable if $f$ is continuously partially differentiable twice Let $f$:$\mathbb{R}^n \rightarrow \mathbb{R}^m $ be a map .How can I show that $f$ is twice differentiable if $f$ is continuously partially differentiable twice?
So I started with : first derivative : $Df:\mathbb{R}^n \rightarrow L(\mathbb{R}^n,\mathbb{R}^m)$
and the second one $D^{2}f:\mathbb{R}^n\rightarrow L(\mathbb{R}^n,L(\mathbb{R}^n,\mathbb{R}^m))$
In the end I get that the first direction goes when $D^{2}f(x)(v,w)$ exist and continuous , but i am stuck on how to prove it .
Thank you in advance.
 A: First we have the following proposition, which is basically just an identification.
Proposition. Let $f: \mathbb{R}^n \rightarrow \mathbb{R}^m$ be differentiable. Then $f$ is twice differentiable if and only if each partial derivative $D_if_j$
($1\leq i\leq n$, $1\leq j\leq m$) is differentiable.
Proof. Fix $x\in\mathbb{R}^n$. Suppose $Df$ is differentiable at $x$, and let $A=D^{2}f(x)$. Then by definition $A\in L(\mathbb{R}^n,L(\mathbb{R}^n,\mathbb{R}^m))$ and
$$\frac{\|f'(x+h)-f'(x)-Ah \|_{\text{op}}}{\|h\|}\to 0 \quad \text{as}\quad h\to 0 \quad \quad (1)$$
The norm in the numerator is the operator norm on $L(\mathbb{R}^n,\mathbb{R}^m)$, while the norm in the denominator is the euclidean norm on $\mathbb{R}^n$.
Now, since the vector space $L(\mathbb{R}^n,\mathbb{R}^m)$ is finite dimensional, all norms on this space are equivalent, and therefore $(1)$ holds with any such norm in the numerator. We will construct a norm on $L(\mathbb{R}^n,\mathbb{R}^m)$ as follows:
Let $\alpha,\beta,\gamma$ denote the standard bases for $\mathbb R^n,\mathbb R^m,\mathbb R^{mn}$ respectively. For $T\in L(\mathbb{R}^n,\mathbb{R}^m)$, write $[T]_\alpha^\beta$ for the $m\times n$ matrix representation of $T$ with respect to $\alpha$ and $\beta$. Define $\varphi: L(\mathbb{R}^n,\mathbb{R}^m)\to\mathbb{R}^{mn}$ by $$\varphi(T)=\text{vec } [T]_\alpha^\beta$$ where $\text{vec}$ denotes the vec operator, which stacks the columns of a matrix on top of one another. Note that $\varphi$ is the composition of two invertible linear maps, and hence is itself an invertible linear map. This allows us to define a norm on $L(\mathbb{R}^n,\mathbb{R}^m)$ via the rule
$$T\mapsto \|\varphi(T)\|$$
Therefore $(1)$ is equivalent to
$$\frac{\|(\varphi\circ f')(x+h)-(\varphi \circ f')(x)-(\varphi \circ A)h \|}{\|h\|}\to 0 \quad \text{as}\quad h\to 0 \quad \quad (2)$$
Since $\varphi \circ A:\mathbb{R}^n \to \mathbb{R}^{mn}$ is linear, we have
$$(\varphi \circ A)h=[(\varphi \circ A)h]_\gamma=[\varphi \circ A]_\alpha^\gamma [h]_\alpha=Bh$$
where $B=[\varphi \circ A]_\alpha^\gamma $ is $mn\times n$. Moreover, for any $h\in\mathbb{R}^n$, we have $(\varphi\circ f')(h)=\text{vec } J(h)$, where $J(h)$ denotes the Jacobian matrix of $f'(h)$.  Therefore $(2)$ is equivalent to
$$\frac{\|\text{vec } J(x+h)-\text{vec } J(x)-Bh \|}{\|h\|}\to 0 \quad \text{as}\quad h\to 0 \quad \quad (3)$$
From $(3)$ it is clear that each row entry of $\text{vec } J(x)$ is a differentiable function, the derivative being the corresponding row of $B$.
Conversely suppose each partial derivative $D_if_j$ is differentiable. Then there exists an $mn\times n$ matrix $B$ such that $(3)$ holds, namely the matrix $B$ whose rows are the $1\times n$ vectors $D D_if_j$. Define $A:\mathbb{R}^n\to L(\mathbb{R}^n,\mathbb{R}^m)$ by the rule
$$Ah=(\varphi^{-1}\circ B) (h)$$
Then $A\in L(\mathbb{R}^n,L(\mathbb{R}^n,\mathbb{R}^m))$. Define a norm on $\mathbb{R}^{mn}$ by the rule
$$y\mapsto \|\varphi^{-1}(y)\|_{\text{op}}$$
Since all norms on $\mathbb{R}^{mn}$ are equivalent, it follows that $(3)$ is equivalent to
$$\frac{\|f'(x+h)-f'(x)-Ah \|_{\text{op}}}{\|h\|}\to 0 \quad \text{as}\quad h\to 0 \quad \quad (3)$$
and hence $f'$ is differentiable at $x$ with $D^2f(x)=A$.
Corollary. Let $f:\mathbb{R}^n \rightarrow \mathbb{R}^m$ be twice continuously differentiable, i.e. all second partial derivatives $D_iD_{j}f_{k}$ exists and are continuous. Then $f$ is twice differentiable.
Proof. Fix $i,j$. By assumption the partial derivatives of $D_if_j$ exists and are continuous, which implies that $D_if_j$ is differentiable. As $i,j$ are arbitrary, the previous proposition implies that $f$ is twice differentiable.
