For a variation of a unit-speed geodesic, let be its tangent, its variation vector field and its variation acceleration. The second variation of Riemannian arc length has the displayed endpoint term in addition to the Riemannian index form of . Differentiating the speed twice gives . Commuting derivatives and integrating by parts gives the formula. The term cannot be discarded unless the endpoints are fixed or an appropriate endpoint condition makes it zero.
Let be a unit-speed geodesic, let be a smooth variation with fixed endpoints, and let
be its variation vector field. Then . If is its component normal to , the second variation of Riemannian arc length is
Here is the covariant derivative along , is the Riemann curvature tensor, and is the Riemannian index form. Fixed endpoints remove the boundary term. The normal projection removes a tangential change of parametrization, which does not change length to second order.
The Bonnet-Myers theorem states that if a complete connected -dimensional Riemannian manifold satisfies
for some , then
In particular, is compact and has finite fundamental group.
By the Hopf-Rinow theorem, points are joined by a unit-speed length-minimizing geodesic . Choose a parallel orthonormal frame normal to and set
The endpoint-vanishing fields arise from fixed-endpoint variations. Since minimizes length, its Riemannian index form is nonnegative on each . Summing the second variation of Riemannian arc length gives
Using the Ricci curvature bound and integrating and yields
so . Taking the supremum over proves the diameter bound. Hopf-Rinow now makes the closed bounded space compact. Finally, the same bound applies to the complete universal cover; a compact universal cover has finite fibres over , so is finite.