Chain Rule Multivariable I'm trying to calculate $D^2(F\circ\varphi)_t$, where $\varphi:\mathbb{R}\to\mathbb{R}^n$ and $F:\mathbb{R}^n\to\mathbb{R}$. 
$D(F\circ\varphi)(t)=(DF)_{\varphi(t)}\cdot(DF)_t$. So,
$D(D(F\circ\varphi)(t))=D(DF)_{\varphi(t)}\cdot(DF)_t+(DF)_{\varphi(t)}\cdot D(DF)_t=D(DF\circ\varphi(t))\cdot(DF)_t+(DF)_{\varphi(t)}\cdot D(DF)_t=(D^2F)_{\varphi(t)}\circ (DF)_{\varphi'(t)}\cdot (DF)_t+(DF)_{\varphi(t)}\cdot (D^2F)_t$
Can someone explain what is wrong with this?
 A: Here is an informal development:
\begin{eqnarray}
D (f \circ \phi) (x+h) - D (f \circ \phi) (x) &\approx& Df(\phi(x+h)) D \phi(x+h)-Df(\phi(x)) D \phi(x) \\
&\approx& Df(\phi(x+h))(D \phi(x)+ D^2\phi(x) h)-Df(\phi(x)) D \phi(x) \\
&\approx& (Df(\phi(x)+D \phi(x) h))(D \phi(x)+ D^2\phi(x) h)-Df(\phi(x)) D \phi(x) \\
&\approx& (Df(\phi(x)) +D^2f(\phi(x)) D \phi(x)h ) \ (D \phi(x)+ D^2\phi(x)h)-Df(\phi(x)) D \phi(x) \\
&\approx& Df(\phi(x)) D^2\phi(x)h + D^2f(\phi(x) (D \phi(x)h ) D \phi(x)  + D^2f(\phi(x) ((D \phi(x)h ) (D^2\phi(x)h))\\
\end{eqnarray}
Hence we get
$D^2(f \circ \phi)(x)h = Df(\phi(x)) (D^2\phi(x)h) + D^2f(\phi(x) ) (D \phi(x)h ) D \phi(x)$.
Since $h \in \mathbb{R}$, we can write
$D^2(f \circ \phi)(x) = Df(\phi(x)) D^2\phi(x) + D^2f(\phi(x)) ( D \phi(x) )D \phi(x)$.
A: qbert is right, the first line should read $$D(F \circ \varphi)(t) = (DF)_{\varphi (t)} + D\varphi(t) $$ and subsequently $$D(D(F\circ\varphi)(t)) = D((DF)_{\varphi(t)} + D\varphi(t)) = D((DF)_{\varphi(t)}) + D(D\varphi(t)) \\ = D((DF)_{\varphi(t)} + D\varphi(t))+ D(D\varphi(t)) \\ = (D^2F)_{\varphi(t)} + 2D^2\varphi(t).$$ I think this is a little wrong since I'm not very used to this notation, but the first line is really all that matters.
