# geodesic computation: “energy” minimization versus arc length minimization

Is it true that applying the Euler-Lagrange equation to the integral $E(\gamma)=\int_{t_1}^{t_2} g_{\alpha\beta}(\gamma^{\alpha})'(\gamma^{\beta})'\operatorname{d}\!t$ rather than the arc length integral $L(\gamma)=\int_{t_1}^{t_2} \sqrt{g_{\alpha\beta}(\gamma^{\alpha})'(\gamma^{\beta})'}\operatorname{d}\!t$ is just a mathematical trick for simplifying computation when parameterizing by arc length?

Isn't it true that if you are parameterizing a curve on a surface by something other than a constant multiple of arc length (for example, a curve $\mathbf{C}(x)=(x,y(x))$ in the parameter space of the hemisphere surface mapping $z=\sqrt{1-x^2-y^2}$), the critical point of $E(\mathbf{C})$ will not be a geodesic in general?

-

## migrated from mathoverflow.netFeb 6 at 4:56

This question came from our site for professional mathematicians.

If you restrict the parameter to be something other than arc length, the critical point of the "energy" functional will not be a geodesic. Example: finding a geodesic over hilly terrain in the form latitude as a function of longitude. This is exactly the example demonstrated in my answer, only with the simplest possible "terrain". – J. Heller Jan 30 at 22:59
Why would you want to restrict the parameter like that? – Deane Jan 30 at 23:22
If you want to compute a geodesic at specific lat or lon values (for example, at surface patch boundaries), it would be much more efficient using the ODE based on a parametrization by lon or lat (this would be a $(x(y),y)$ parametrization). The ODE based on arc length parametrization has four 1st order equations instead of two and you would have to use Newton's method to get the point of the geodesic at a specific lat or lon value. – J. Heller Jan 31 at 0:55
That sounds reasonable, but what does that have to do with the energy functional? It is indeed straightforward to write down the ODE satisfied by a geodesic parameterized by one of the coordinates, and indeed the ODE is not the Euler-Lagrange equation of the energy functional. That's not surprising since the energy functional is not invariant under changes of parameterization (in contrast to the length functional). – Deane Jan 31 at 17:35
The reason I posted this question is that I ran into some people on Wikipedia who seem to believe that there is some physical significance to the "energy" functional. My goal was to show that this is false, that using the "energy" functional is just a mathematical trick that is only valid when parametrizing by arc length. – J. Heller Jan 31 at 19:37

The minimum for the length functional is badly non-unique: it is given by any parametrization of the geodesic, not necessarily the natural one. On the other hand, the energy functional is locally uniformly convex; therefore the minimizer is unique and the variational calculus is nice.

It is instructive to do the computation for the Euclidean plane. Suppose we are looking for the condition that a curve $(x(t),y(t))$ is a geodesic. Then, for the energy functional $\int \left(x'(t)^2+y'(t)^2\right)dt,$ the Euler-Lagrange equations read $x''(t)=0$ and $y''(x)=0$, which is the straight line traced at constant speed. On the other hand, for the length functional $\int \sqrt{x'(t)^2+y'(t)^2}dt,$ one gets, after some algebra, $$\frac{x''}{x'}=\frac{x'x''+y'y''}{x'^2+y'^2}\;\mathrm{and}\;\frac{y''}{y'}=\frac{x'x''+y'y''}{x'^2+y'^2},$$ and from the equality between the left-hand sides we get $x'(t)\equiv Cy'(t)$, which also gives a straight line, but with arbitrary parametrization.

Added: It is worth to mention that the "energy functional" is a Lagrangian action for a free particle confined to the surface. Therefore, the law of conservation of energy implies that any solution $\gamma(t)$ will move at constant speed (which is of course also possible to see directly). And if one restricts the the class of curves to such solutions, the EL equations indeed take the same form for both functionals.

-

The correct answer to the second question is that the critical point of $E(\gamma)$ (sometimes called the "energy" functional) is not a geodesic in general when parameterizing by something other than arc length. It is not a geodesic for the example given in the question (the simplest possible non-trivial example). The coefficients of the first fundamental form of the upper hemisphere mapping $z=\sqrt{1-x^2-y^2}$ are $g_{11}=1+x^2/z^2,$ $g_{12}=xy/z^2,$ and $g_{22}=1+y^2/z^2.$ The coordinates of the curve are $\gamma^1(x)=x$ and $\gamma^2(x)=y(x)$ (the 2 means the second coordinate of the curve, not squared) so the derivatives of the coordinates are $(\gamma^1)'=1$ and $(\gamma^2)' = y'(x).$ So

$$g_{\alpha\beta} (\gamma^{\alpha})'(\gamma^{\beta})'= (1+x^2/z^2) + (2xy/z^2) y' + (1+y^2/z^2) (y')^2.$$

Replacing $z^2$ with $1-x^2-y^2$ yields

$$F(x,y,y')=(1 + x^2/(1-x^2-y^2)) + (2xy/(1-x^2-y^2))y' + (1 + y^2/(1-x^2-y^2))(y')^2.$$

This is is the integrand of the "energy" functional and $\sqrt{F}$ is the integrand of the arc length functional. Applying the Euler-Lagrange equation to the "energy" functional yields

$$(x^2-1)(y^2+x^2-1)y'' - (x^2-1)y(y')^2 + 2xy^2 y' - y(y^2-1) = 0. \tag{1}$$

Applying the E-L equation to the arc length functional yields

$$(y^2+x^2-1)y'' - x(x^2-1)(y')^3 + (3x^2-1)y(y')^2 - x(3y^2-1)y' + y(y^2-1)=0. \tag{2}$$

It is easy to show that $y=kx$ (a straight line through the origin, hence a great circle when mapped to the hemisphere) solves the second ODE (for the arc length functional) but not the first ODE (for the "energy" functional). The image below shows the incorrect solution for the "energy" functional ODE for the initial conditions ($y(0)=0$, $y'(0)=1$) in red and the correct solution in blue.

The projection of a great circle whose plane is not perpendicular to the $xy$-plane into the $xy$-plane is an ellipse. Hence, there should also be solutions to the ODE of the form $(a^2+1)x^2 + 2abxy + (b^2+1)y^2=1$ (the plane of the great circle is $z=ax+by$). It is easy to check that these ellipses are indeed solutions of (2) but not (1) using a computer algebra system.

The answer to the first question is that using $E(\gamma)$ instead of $L(\gamma)$ when parameterizing by arc length is indeed just a mathematical trick to simplify computation. In his book "Differential Geometry", Kreyszig derives the geodesic equation

$$\ddot{\gamma}^{\tau} + \Gamma_{\alpha\beta}^{\tau}\dot{\gamma^{\alpha}}\dot{\gamma^{\beta}} = 0$$

(where dot denotes differentiation with respect to arc length) by applying the Euler-Lagrange equation to the arc length functional $L(\gamma)$ and then using the fact that the curve parameter is arc length to simplify the resulting equation. It is easy to show that applying the E-L equation to $E(\gamma)$ results in exactly the same equation (the geodesic equation) with a slightly less messy computation. Minimizing $E(\gamma)$ is valid because $ds / dt$ (the integrand of $L(\gamma)$) equals $(ds / dt)^2$ (the integrand of $E(\gamma)$) equals 1 when parameterizing by arc length.

There seems to be a silly, false, and unfortunately widespread belief that a geodesic must be parameterized by a constant multiple of arc length. The book "Elementary Differential Geometry" by Barrett O'Neill first published in 1966 may be a source of this belief. On page 245 of the revised 2nd edition, O'Neill defines a geodesic as a curve $\alpha:\mathbb{R}\rightarrow \mathbb{R}^3$ on a surface $M$ such that $\alpha''(t)$ is always orthogonal to the tangent plane of $M$ at $\alpha(t)$. He then goes on to "prove" that this means geodesics must have constant speed. The "proof" goes like this: $\frac{\operatorname{d}}{\operatorname{d}\!t} (|\alpha'|^2 = \alpha'\cdot\alpha') = 2\alpha'\cdot\alpha''=0$ ($\alpha'\cdot\alpha'' = 0$ since $\alpha'$ is orthogonal to the surface normal and $\alpha''$ is parallel to the surface normal). Hence $|\alpha'|^2$ (and the speed $|\alpha'|$) is constant.

The problem with this "proof" is that the correct definition of a geodesic curve on a surface (found on page 154 of Kreyszig's book) is a curve $\alpha$ such that the geodesic curvature $k_g$ vanishes at every point of the curve. Since $k_g$ is defined as $k\sin\gamma$ where $k$ is the curvature of the curve and $\gamma$ is the angle between $\ddot{\alpha}$ and the surface normal, $\ddot{\alpha}(s)$ is always parallel to the the surface normal of $M$ at $\alpha(s)$ whenever $\ddot{\alpha}(s)$ has non-zero length (dot denotes differentiation with respect to arc length and $s$ denotes arc length). If $\ddot{\alpha}$ has zero length, then $k$ must be zero and $k_g$ is also zero by definition.

The truth is that a geodesic is just a curve on a surface, and like all curves, it has infinitely many non-constant speed parameterizations. Let $\alpha:[0,L]\rightarrow\mathbb{R}^3$ (where $L$ is the length of the curve) be a geodesic curve on a surface $M$ parameterized by arc length. Let $\varphi:[0,1]\rightarrow [0,L]$ be any smooth, non-linear bijection. Then $\gamma = \alpha\circ \varphi$ is another way of representing exactly the same geodesic curve, but $|\gamma'| = |\alpha'|\varphi'$ is non-constant since $\varphi'$ is non-constant.

-
In your example, you are taking a minimum over parametrized curves such that their first coordinate moves at constant speed. This is a restrictive condition, and no wonder you don't get a correct answer. Instead, you should write the EL for an arbitrary curve $(\gamma^1(t),\gamma^2(t))$, then the result would be geodesic and automatically have arc length parametrisation. The explanation is that your "energy functional" is the Lagrangian action for a free particle confined to the surface. – Kostya_I Jan 28 at 8:20
There is a unique shortest curve between any two points on a smooth surface. The length of this curve is the same regardless of the speed that an object traverses the curve (in other words, the length is the same regardless of the parametrization of the curve). The parametrization $(x, y(x))$ definitely does not restrict the shape of the curve much. Any curve with only one $y$ value for a given $x$ value can be parametrized this way. Minimizing L gives the right answer because L is the length of the curve, minimizing E fails because E is not equal to the length of the curve. – J. Heller Jan 29 at 7:19
It does not restrict the shape of the curve, but it does restrict, well, the parametrization. And while the length functional is invariant under re-parametrizations, the energy functional is not. Therefore, taking its minimum over all the curves of the form $(\gamma^1(t),\gamma^2(t))$ with $\gamma^1(t)=t$ is not the same as taking its minimum over all parametrized curves. – Kostya_I Jan 29 at 7:40