Second variation of geodesic energy (source code)

= Second variation of geodesic energy
{title2=$E''(0)=I(V,V)$}

For $E=\tfrac12\int|\dot\gamma|^2$ and a geodesic base curve, a variation field $V$ satisfies
$$
E''(0)=[\langle\nabla_sV,\dot\gamma\rangle]_a^b+
\int_a^b\left(|\nabla_tV|^2-\langle R(V,\dot\gamma)\dot\gamma,V\rangle\right)dt.
$$
The endpoint term vanishes for fixed endpoints and for periodic variations of closed geodesics. The integral is the <Riemannian index form>. This uses the <Levi-Civita connection> and the convention $R(X,Y)=\nabla_X\nabla_Y-\nabla_Y\nabla_X-\nabla_{[X,Y]}$.