Graph Geodesics via the Calculus of Variations
Length and energy have the same minimizers, and energy is the one worth varying.
This is the third in a series of posts on multiple ways to compute the geodesic equation for surfaces in described as the graph of a function . I’ve ended up re-doing these calculations several times in the past while writing various programs, so want to record them in one spot for my future reference (and hopefully, the benefit of others!).
The two previous notes got to the same pair of equations twice over: first by grinding out the Christoffel symbols of the induced metric and expanding in coordinates, and then much more quickly by stepping out into and asking that the acceleration be normal to the surface. Both of them assume we already know what a geodesic is. Here we do something different - we ask for the shortest path, and let the equation come out. This is the only one of the three routes that defines a geodesic instead of assuming one.
We keep the notation of the previous notes. The graph is parameterized by , and a curve on it is specified by giving and as functions of time,
Throughout, a dot is a time derivative along the curve, so that in particular
which is exactly the vertical component of the velocity. This lets us write the speed with no reference to the metric components at all:
Length, and Varying It
The obvious thing to minimize is the length,
but it is not obvious what minimizing it should even mean. The domain of is the set of all curves joining two points, which is infinite dimensional, and not the sort of thing we can differentiate over directly.
The calculus of variations gets around this by never looking at the whole space at once. Pick a curve , and pick any smooth one parameter family passing through it at , with every member sharing ‘s endpoints. Such a family is a variation: a one dimensional slice through the space of curves. Restricted to that slice is just a real valued function of the single variable , and we know what to do with those. If is shortest among all curves then it is shortest along every slice through it, so
That’s the whole strategy, and in principle we could stop right here: expand the derivative in coordinates, demand it vanish for every variation, and read off a differential equation. Nobody does, because the integrand has a square root in it. Every derivative of it has the square root too, and the equations come out in a form that needs cleaning up before it is any use.
Energy
The standard fix is to square the integrand and be rid of the root. Define the energy
This is a polynomial in the velocities, so varying it is routine. The question is whether we are still varying the same thing. Squaring is not an innocent operation on an integral: and are different objects, and there is no general reason a minimizer of one should minimize the other.
Along a slice the two graphs do move together, and both are stationary in the same place. That is no coincidence.
Among curves with fixed endpoints,
with equality if and only if is constant. Consequently the minimizers of are exactly the minimizers of traversed at constant speed.
The inequality is Cauchy-Schwarz applied to the functions and on :
and Cauchy-Schwarz is an equality precisely when the two functions are proportional, which here means is constant.
To see why that gives what we want, take any curve . Traversing the same route at constant speed leaves alone and drops all the way to , the smallest value it could possibly have for that length. So every curve can be improved in energy without changing its length, and the ones that cannot be improved are exactly the constant speed ones. Minimizing finds the shortest route and, among the many ways of walking it, insists on the one that wastes nothing.
Reparameterization
That last point deserves a section of its own, because it is a reason to prefer even setting the square root aside.
Length is reparameterization invariant: it depends on the route and not on the schedule. Walk the same path faster here and slower there and doesn’t change at all. This is not a small blind spot. The reparameterizations of a single curve form an infinite dimensional family, an entire flat valley on which is constant, and a variation along that valley is a slice where is not merely stationary but identically equal to its value at the center:
isn’t fooled. Along the same slice it has a strict minimum, and by the equality case above that minimum sits exactly at the constant speed schedule.
This is what makes the functional to vary. can’t determine and , and no differential equation could, since gives the same value to every reparameterization and has nothing to tell them apart with. picks out a single parametrized curve from that valley, which is the sort of thing a pair of differential equations can describe. So we go looking for them.
One consequence before we start. Geodesics are usually said to be affinely parameterized, and that is usually presented as an extra condition imposed by hand. It isn’t: it’s the equality case of Cauchy-Schwarz, and it shows up whether we ask for it or not.
The Euler-Lagrange Equations
So we minimize
Write for the integrand and vary first. The only place and appear is through , so
Now take the total time derivative of the first of these, remembering that is being evaluated along the curve so that :
The Euler-Lagrange equation sets this equal to , and the entire last term cancels against it:
The same computation in gives the companion, and together they are startlingly simple:
The horizontal acceleration is the gradient of , scaled by the vertical acceleration and pointing the other way. Everything the surface does to the particle is in that one number .
Solving for the Vertical Acceleration
The equations above are not yet explicit, because contains and . Differentiating once more,
Abbreviate the second-derivative terms as and substitute the two equations we just derived:
which is now a linear equation in alone:
Putting this back into proves, for the third time, the theorem of the series:
If is a geodesic on the graph of a function , then