Second derivative expression I have $f:\mathbb R^n\to \mathbb R$ and $\gamma:\mathbb R \to \mathbb R^n$, which are both $\mathrm C^2$. Considering $g=f\circ \gamma$, how could I express $g''$, second derivative of $g$ in terms of partial derivatives of $f$ and $\gamma$?. The first I know is that 
$$ \mathrm Dg(a) = \mathrm Df(\gamma(a)) \circ D\gamma(a), $$
so I consider $Dg:x\mapsto Dg(x)$, but this gets complicated. Thanks in advance.
Edit: I know what is the Hessian matrix, I would like to apply it here.
Edit II: Well, it is clear that
$$ g'(a) h = \langle \nabla  g(a), h\rangle = \langle \nabla f(\gamma(a)), \langle \nabla \gamma(a),h\rangle\rangle $$
so, what now?
 A: Since you want the derivative of the scalar function $$g(t):=f\bigl(\gamma(t)\bigr)\tag{1}$$ in terms of partial derivatives I'd argue as follows: Differentiating $(1)$ with respect to $t$ using the chain rule gives
$$g'(t)=\sum_{i=1}^n f_{.i}\bigl(\gamma(t)\bigr)\>\gamma_i'(t)\ ,$$
so $g'$ is a finite sum of products of functions of $t$. For the second derivative we have to use the product rule, and the chain rule again:
$$g''(t)=\sum_{i,\> k\>=1}^n f_{.ik}\bigl(\gamma(t)\bigr)\>\gamma_k'(t)\gamma_i'(t)+\sum_{i=1}^n f_{.i}\bigl(\gamma(t)\bigr)\>\gamma_i''(t)\ .$$
A: Sometimes notation gets in the way of understanding things throughly.
It is then, when you need to drop your notation and get your hands dirty; don't be afraid ;).
$$g(x) = f(\gamma(x))$$
$$g'(x) = \frac{d}{dx} f(\gamma(x)) = \sum_{i=1}^n \frac{\partial}{\partial \gamma(x)_i} f(\gamma(x)) \frac{d}{d x} \gamma_i(x) = \\
= \sum_{i=1}^n (\partial_i f)(\gamma(x)) \cdot (\gamma_i)'(x)$$
$$g''(x) = \frac{d}{dx} g'(x) = \sum_{i=1}^n \frac{d}{dx} (\partial_i f)(\gamma(x)) \cdot (\gamma_i)'(x) = \\
= \sum_{i=1}^n \left[ \sum_{j=1}^n (\partial_j \partial_i f)(\gamma(x)) (\gamma_j)'(x) \right] \cdot (\gamma_i)'(x)\ + (\partial_i f)(\gamma(x)) \cdot (\gamma_i)''(x) \\
= \sum_{i,j=1}^n(\partial_j \partial_i f)(\gamma(x)) \cdot (\gamma_j)'(x)(\gamma_i)'(x)\ + \sum_{i=1}^n (\partial_i f)(\gamma(x)) \cdot (\gamma_i)''(x) = \\
= \sum_{i,j=1}^n \nabla \gamma(x)_i H(f)_{ij}(\gamma(x)) \nabla \gamma(x)_j + \sum_{i=1}^n (\nabla f)_i(\gamma(x)) (\gamma_i)''(x) =\\$$
$$ = \nabla\gamma(x)^\top H(f)(\gamma(x)) \nabla \gamma(x) + \nabla f(\gamma(x)) \cdot \gamma''$$
You can rewrite this into your notation...
