# Spray (mathematics)

In differential geometry, a spray is a vector field H on the tangent bundle TM that encodes a quasilinear second order system of ordinary differential equations on the base manifold M. Usually a spray is required to be homogeneous in the sense that its integral curves t→Φ$_H$$^t$(ξ)∈TM obey the rule Φ$_H$$^t$(λξ)=Φ$_H$$^{λt}$(ξ) in positive re-parameterizations. If this requirement is dropped, H is called a semi-spray.
Sprays arise naturally in Riemannian and Finsler geometry as the geodesic sprays whose integral curves are precisely the tangent curves of locally length minimizing curves. Semisprays arise naturally as the extremal curves of action integrals in Lagrangian mechanics. Generalizing all these examples, any (possibly nonlinear) connection on M induces a semispray H, and conversely, any semispray H induces a torsion-free nonlinear connection on M. If the original connection is torsion-free it coincides with the connection induced by H, and homogeneous torsion-free connections are in one-to-one correspondence with full sprays.

## Formal definitions

Let M be a differentiable manifold and (TM,π$_{TM}$,M) its tangent bundle. Then a vector field H on TM (that is, a section of the double tangent bundle TTM) is a semi-spray on M, if any of the three following equivalent conditions holds:
* (π$_{TM}$)$_*$H$_ξ$ = ξ.
* JH=V, where J is the tangent structure on TM and V is the canonical vector field on TM\0.
* j∘H=H, where j:TTM→TTM is the canonical flip and H is seen as a mapping TM→TTM.
A semispray H on M is a (full) spray if any of the following equivalent conditions hold:
* H$_{λξ}$ = λ$_*$(λH$_ξ$), where λ$_*$:TTM→TTM is the push-forward of the multiplication λ:TM→TM by a positive scalar λ>0.
* The Lie-derivative of H along the canonical vector field V satisfies [V,H]=H.
* The integral curves t→Φ$_H$$^t$(ξ)∈TM\0 of H satisfy Φ$_H$$^t$(λξ)=λΦ$_H$$^{λt}$(ξ) for any λ>0.
Let $(x^{i},\xi ^{i})$ be the local coordinates on $TM$ associated with the local coordinates $(x^{i}$) on $M$ using the coordinate basis on each tangent space. Then $H$ is a semi-spray on $M$ if it has a local representation of the form
    $H_{\xi }=\xi ^{i}{\frac {\partial }{\partial x^{i}}}{\Big |}_{(x,\xi )}-2G^{i}(x,\xi ){\frac {\partial }{\partial \xi ^{i}}}{\Big |}_{(x,\xi )}.$
on each associated coordinate system on TM. The semispray H is a (full) spray, if and only if the spray coefficients G$^i$ satisfy
    $G^{i}(x,\lambda \xi )=\lambda ^{2}G^{i}(x,\xi ),\quad \lambda >0.\,$

## Semi-sprays in Lagrangian mechanics

A physical system is modeled in Lagrangian mechanics by a Lagrangian function L:TM→R on the tangent bundle of some configuration space M. The dynamical law is obtained from the Hamiltonian principle, which states that the time evolution γ:[a,b]→M of the state of the system is stationary for the action integral
    ${\mathcal {S}}(\gamma ):=\int _{a}^{b}L(\gamma (t),{\dot {\gamma }}(t))dt$.
In the associated coordinates on TM the first variation of the action integral reads as
    ${\frac {d}{ds}}{\Big |}_{s=0}{\mathcal {S}}(\gamma _{s})={\Big |}_{a}^{b}{\frac {\partial L}{\partial \xi ^{i}}}X^{i}-\int _{a}^{b}{\Big{\frac {\partial ^{2}L}{\partial \xi ^{j}\partial \xi ^{i}}}{\ddot {\gamma }}^{j}+{\frac {\partial ^{2}L}{\partial x^{j}\partial \xi ^{i}}}{\dot {\gamma }}^{j}-{\frac {\partial L}{\partial x^{i}}}{\Big )}X^{i}dt,$
where X:[a,b]→R is the variation vector field associated with the variation γ$_s$:[a,b]→M around γ(t) = γ$_0$(t). This first variation formula can be recast in a more informative form by introducing the following concepts:
* The covector $\alpha _{\xi }=\alpha _{i}(x,\xi )dx^{i}|_{x}\in T_{x}^{*}M$ with $\alpha _{i}(x,\xi )={\tfrac {\partial L}{\partial \xi ^{i}}}(x,\xi )$ is the conjugate momentum of $\xi \in T_{x}M$.
* The corresponding one-form $\alpha \in \Omega ^{1}(TM)$ with $\alpha _{\xi }=\alpha _{i}(x,\xi )dx^{i}|_{(x,\xi )}\in T_{\xi }^{*}TM$ is the Hilbert-form associated with the Lagrangian.
* The bilinear form $g_{\xi }=g_{ij}(x,\xi )(dx^{i}\otimes dx^{j})|_{x}$ with $g_{ij}(x,\xi )={\tfrac {\partial ^{2}L}{\partial \xi ^{i}\partial \xi ^{j}}}(x,\xi )$ is the fundamental tensor of the Lagrangian at $\xi \in T_{x}M$.
* The Lagrangian satisfies the Legendre condition if the fundamental tensor $\displaystyle g_{\xi }$ is non-degenerate at every $\xi \in T_{x}M$. Then the inverse matrix of $\displaystyle g_{ij}(x,\xi )$ is denoted by $\displaystyle g^{ij}(x,\xi )$.
* The Energy associated with the Lagrangian is $\displaystyle E(\xi )=\alpha _{\xi }(\xi )-L(\xi )$.
If the Legendre condition is satisfied, then dα∈Ω$^2$(TM) is a symplectic form, and there exists a unique Hamiltonian vector field H on TM corresponding to the Hamiltonian function E such that
    $\displaystyle dE=-\iota _{H}d\alpha$.
Let (X$^i$,Y$^i$) be the components of the Hamiltonian vector field H in the associated coordinates on TM. Then
    $\iota _{H}d\alpha =Y^{i}{\frac {\partial ^{2}L}{\partial \xi ^{i}\partial x^{j}}}dx^{j}-X^{i}{\frac {\partial ^{2}L}{\partial \xi ^{i}\partial x^{j}}}d\xi ^{j}$
and
    $dE={\Big{\frac {\partial ^{2}L}{\partial x^{i}\partial \xi ^{j}}}\xi ^{j}-{\frac {\partial L}{\partial x^{i}}}{\Big )}dx^{i}+\xi ^{j}{\frac {\partial ^{2}L}{\partial \xi ^{i}\partial x^{j}}}d\xi ^{i}$
so we see that the Hamiltonian vector field H is a semi-spray on the configuration space M with the spray coefficients
    $G^{k}(x,\xi )={\frac {g^{ki}}{2}}{\Big{\frac {\partial ^{2}L}{\partial \xi ^{i}\partial x^{j}}}\xi ^{j}-{\frac {\partial L}{\partial x^{i}}}{\Big )}.$
Now the first variational formula can be rewritten as
    ${\frac {d}{ds}}{\Big |}_{s=0}{\mathcal {S}}(\gamma _{s})={\Big |}_{a}^{b}\alpha _{i}X^{i}-\int _{a}^{b}g_{ik}({\ddot {\gamma }}^{k}+2G^{k})X^{i}dt,$
and we see γ[a,b]→M is stationary for the action integral with fixed end points if and only if its tangent curve γ':[a,b]→TM is an integral curve for the Hamiltonian vector field H. Hence the dynamics of mechanical systems are described by semisprays arising from action integrals.

## Geodesic spray

The locally length minimizing curves of Riemannian and Finsler manifolds are called geodesics. Using the framework of Lagrangian mechanics one can describe these curves with spray structures. Define a Lagrangian function on TM by
    $L(x,\xi )={\tfrac {1}{2}}F^{2}(x,\xi ),$
where F:TM→R is the Finsler function. In the Riemannian case one uses F$^2$(x,ξ) = g$_{ij}$(x)ξ$^i$ξ$^j$. Now introduce the concepts from the section above. In the Riemannian case it turns out that the fundamental tensor g$_{ij}$(x,ξ) is simply the Riemannian metric g$_{ij}$(x). In the general case the homogeneity condition
    $F(x,\lambda \xi )=\lambda F(x,\xi ),\quad \lambda >0$
of the Finsler-function implies the following formulae:
    $\alpha _{i}=g_{ij}\xi ^{i},\quad F^{2}=g_{ij}\xi ^{i}\xi ^{j},\quad E=\alpha _{i}\xi ^{i}-L={\tfrac {1}{2}}F^{2}.$
In terms of classical mechanics, the last equation states that all the energy in the system (M,L) is in the kinetic form. Furthermore, one obtains the homogeneity properties
    $g_{ij}(\lambda \xi )=g_{ij}(\xi ),\quad \alpha _{i}(x,\lambda \xi )=\lambda \alpha _{i}(x,\xi ),\quad G^{i}(x,\lambda \xi )=\lambda ^{2}G^{i}(x,\xi ),$
of which the last one says that the Hamiltonian vector field H for this mechanical system is a full spray. The constant speed geodesics of the underlying Finsler (or Riemannian) manifold are described by this spray for the following reasons:
* Since g$_ξ$ is positive definite for Finsler spaces, every short enough stationary curve for the length functional is length minimizing.
* Every stationary curve for the action integral is of constant speed $F(\gamma (t),{\dot {\gamma }}(t))=\lambda$, since the energy is automatically a constant of motion.
* For any curve $\gamma :[a,b]\to M$ of constant speed the action integral and the length functional are related by
    ${\mathcal {S}}(\gamma )={\frac {(b-a)\lambda ^{2}}{2}}={\frac {\ell (\gamma )^{2}}{2(b-a)}}.$
Therefore, a curve $\gamma :[a,b]\to M$ is stationary to the action integral if and only if it is of constant speed and stationary to the length functional. The Hamiltonian vector field H is called the geodesic spray of the Finsler manifold (M,F) and the corresponding flow Φ$_H$$^t$(ξ) is called the geodesic flow.

## Correspondence with nonlinear connections

A semi-spray $H$ on a smooth manifold $M$ defines an Ehresmann-connection $T(TM\setminus 0)=H(TM\setminus 0)\oplus V(TM\setminus 0)$ on the slit tangent bundle through its horizontal and vertical projections
    $h:T(TM\setminus 0)\to T(TM\setminus 0)\quad ;\quad h={\tfrac {1}{2}}{\bigI-{\mathcal {L}}_{H}J{\big )},$
    $v:T(TM\setminus 0)\to T(TM\setminus 0)\quad ;\quad v={\tfrac {1}{2}}{\bigI+{\mathcal {L}}_{H}J{\big )}.$
This connection on TM\0 always has a vanishing torsion tensor, which is defined as the Frölicher-Nijenhuis bracket T=[J,v]. In more elementary terms the torsion can be defined as
    $\displaystyle T(X,Y)=J[hX,hY]-v[JX,hY]-v[hX,JY].$
Introducing the canonical vector field V on TM\0 and the adjoint structure Θ of the induced connection the horizontal part of the semi-spray can be written as hH=ΘV. The vertical part ε=vH of the semispray is known as the first spray invariant, and the semispray H itself decomposes into
    $\displaystyle H=\Theta V+\epsilon .$
The first spray invariant is related to the tension
    $\tau ={\mathcal {L}}_{V}v={\tfrac {1}{2}}{\mathcal {L}}_{[V,H]-H}J$
of the induced non-linear connection through the ordinary differential equation
    ${\mathcal {L}}_{V}\epsilon +\epsilon =\tau \Theta V.$
Therefore, the first spray invariant ε (and hence the whole semi-spray H) can be recovered from the non-linear connection by
    $\epsilon |_{\xi }=\int \limits _{-\infty }^{0}e^{-s}(\Phi _{V}^{-s})_{*}(\tau \Theta V)|_{\Phi _{V}^{s}(\xi )}ds.$
From this relation one also sees that the induced connection is homogeneous if and only if H is a full spray.