  We present an original, generic, and efficient approach for computing the
first and second partial derivatives of ray velocities along ray paths in
general anisotropic elastic media. These derivatives are used in solving
kinematic problems, like two-point ray bending methods and seismic tomography,
and they are essential for evaluating the dynamic properties along the rays
(amplitudes and phases). The traveltime is delivered through an integral over a
given Lagrangian defined at each point along the ray. Although the Lagrangian
cannot be explicitly expressed in terms of the medium properties and the ray
direction components, its derivatives can still be formulated analytically
using the corresponding arclength-related Hamiltonian that can be explicitly
expressed in terms of the medium properties and the slowness vector components.
This requires first to invert for the slowness vector components, given the ray
direction components. Computation of the slowness vector and the ray velocity
derivatives is considerably simplified by using an auxiliary
scaled-time-related Hamiltonian obtained directly from the Christoffel equation
and connected to the arclength-related Hamiltonian by a simple scale factor.
This study consists of two parts. In Part I, we consider general anisotropic
(triclinic) media, and provide the derivatives (gradients and Hessians) of the
ray velocity, with respect to (1) the spatial/directional vectors and (2) the
elastic model parameters. In Part II, we apply the theory of Part I explicitly
to polar anisotropic media (transverse isotropy with tilted axis of symmetry,
TTI), and obtain the explicit ray velocity derivatives for the coupled qP and
qSV waves and for SH waves.
