I have a function $v : \mathbb{R}^d \to \mathbb{R}^d$, and i define $g : \mathbb{R} \to \mathbb{R}^d$ such that $g(r)=v(q+r\delta)$ where $q, \delta \in \mathbb{R}^d$.My goal is to compute $d^2g(r)$
I computed the first order derivative using the chain rule $$dg(r).z = dv(q+r\delta).z\delta$$
Then, i would like to compute the second order derivative but i don't know how i can do that.
Thankfully, $g$ is defined on $\Bbb R$ so there's "only one variable" and your life is made easier. $g'(r)=\mathrm{d}v(q+r\delta)(\delta)$ and this is now a composition of things, again susceptible to the chain rule.
$$g':\Bbb R\overset{x\mapsto q+x\delta}{\longrightarrow}\Bbb R^d\overset{\mathrm{d}v}{\longrightarrow}\mathscr{L}(\Bbb R^d;\Bbb R^d)\overset{\mathrm{eval}(\delta)}{\longrightarrow}\Bbb R^d$$
Let's focus on the first two maps. By the chain rule, their derivative is $h'(r)=\mathrm{d}^2v(q+r\delta)(\delta):\Bbb R\to\mathscr{L}(\Bbb R^d;\Bbb R^d)$ (if you like, a matrix-valued function. $\mathrm{d}^2v$ is a less familiar object I believe sometimes called a tensor). $\mathrm{eval}$ is linear and is its own derivative (abusing language slightly) so overall (applying the chain rule to $\mathrm{eval}(\delta)\circ h$) we see: $$g''(r)=\mathrm{d}^2v(q+r\delta)(\delta)(\delta)$$In less formal notation, that's sort of like a Hessian and $g''(r)=\delta^T\mathrm{d}^2v(q+r\delta)\delta$ could be written if you interpreted it carefully. I don't think I recommend this. $\mathrm{d}^2v$ contains the data of, if you fix coordinates, the Hessian matrices of each coordinate function $\pi_i v$ for $1\le i\le d$, if that helps; a genuinely analogous matrix representation would, in full, have to be drawn in three dimensions.
Much more simply, $g''(r)$ is the vector of second derivatives of each projective $\pi_ig:\Bbb R\to\Bbb R$, and these are simpler to calculate.