Hi,

I have a function $Z:M\times M\to \mathbb{R}$ defined by two points on the manifold $M$. $M$ is a submanifold of a Riemannian manifold $N$ and $Z$ involves the Riemannian distance function $d$ on $N$. I would like to compute the first and second derivatives of $Z$ (perhaps with respect to some coordinates $(x^i,y^i)$ on $M\times M$.) One can compute the derivatives of $d$ at $(x,y)$ by considering a geodesic variation (in $N$) of the geodesic $\gamma$ joining $x$ and $y$. One gets:

$$(D|_{(x,y)}d)(u,v)=\big< v,\gamma'(d(x,y))\big> -\big< u,\gamma'(0)\big>$$

where $(u,v)\in T_xM$

I haven't yet computed the Hessian but the same technique should work. My problem is that $Z$ also involves the vector field $w:M\times M\to N$ defined by $w(x,y)=\gamma'(0)$, where $\gamma$ is as above. In fact, the term I have is $\big< w,\nu_x\big>$, where $\big<\cdot, \cdot\big>$ is the metric on $N$ and $\nu_x(x,y)$ is the outer unit normal at $x$. Note, though that $$\big< w,\nu_x\big> = -(Dd)(\nu_x)=-(Dd)(\nu,0)$$

Any ideas on how I can compute the derivatives of this expression? The problem seems to be that my vector fields are sections of the bundle $TM$ over the product $M\times M$. So perhaps I should be asking what the the connection should look like on $\Gamma(M\times M,TM)$?

Note also that in $N=\mathbb{R}^n$ the answer is easy since $w=(y-x)/|y-x|$

Thanks.