Ready-to-use formulas for geodesics on any surface given a metric.
Lots of computations start with the dreaded task of computing christoffel symbols. This short note does the calculation once and for all for 2-dimensional Riemannian metrics, so I don’t have to keep repeating it.
General Christoffel Symbols in 2 Dimensions
For the metric ds2=Edx2+2Fdxdy+Gdy2 with determinant D=EG−F2, the Christoffel symbols are
Γxxx=2DGEx−F(2Fx−Ey)Γxxy=2DE(2Fx−Ey)−FEx
Γyyx=2DG(2Fy−Gx)−FGyΓyyy=2DEGy−F(2Fy−Gx)
Γxyx=Γyxx=2DGEy−FGxΓxyy=Γyxy=2DEGx−FEy
Using these one can directly compute the geodesic equations, by expanding out the definition ∇γ˙γ˙ for a curve γ(t)=(u(t),v(t)).
Geodesics
A curve γ(t)=(x(t),y(t)) is a geodesic if it satisfies the following ODEs:
{x¨+x˙2Γxxx+2x˙y˙Γxyx+y˙2Γyyx=0y¨+x˙2Γxxy+2x˙y˙Γxyy+y˙2Γyyy=0}
In general plugging in the Christoffel symbols here is quite messy, and its best to rather wait until you’ve computed them and do it indivdually in each special case.
We record two common and useful special cases here:
Geodesics of Diagonal Metrics
The geodesics of a diagonal metric ds2=Edx2+Gdy2 satisfy
x¨+2EExx˙2+2Eyx˙y˙−Gxy˙2=0
y¨+2GGyy˙2+2Gxx˙y˙−Eyx˙2=0
The geodesics of the conformally flat metric ds2=e2ψ(dx2+dy2) satisfy
x¨+ψx(x˙2−y˙2)+2ψyx˙y˙=0
y¨+ψy(y˙2−x˙2)+2ψxx˙y˙=0
Notation
Setting some notation, we will use coordinates named x,y in which our metric can be written as
g=(EFFG)
or as a line element, ds2=Edx2+2Fdxdy+Gdy2. We will often have use to discuss the inverse of the metric tensor, and so it will be useful to have a nice notation for working with it mid-computation. Here, we will use script letters to represent the components of the inverse
g−1=(EFFG)
To expand this out in terms of the original E,F,G it is useful to give a name to the metric determinant:
D=EG−F2
in which case we can write
E=DGF=D−FG=DE
General Christoffel Symbols
General christoffel symbols can be computed as functions of the metric tensor via the identity
Γkℓi=21∑mgim(∂ℓgmk+∂kgmℓ−∂mgkℓ)
Our goal here is to expand this out in two dimensions (where i,k,ℓ,m∈{x,y}). A priori there are eight possible Christoffel symbols here (three choices of x,y), but the symbols enjoy a symmetry in their lower indices Γxy∗=Γyx∗ which reduces the number of independent possibilites to six. By the notational symmetry swapping all x‘s and y‘s, it then suffices to compute three Christoffel symbols directly from the definition: we choose Γxxx,Γxxy and Γxyx.
Γxxx Computation
Γxxx=21m∑gxm(∂xgmx+∂xgmx−∂mgxx)=21m∑gxm(2∂xgmx−∂mgxx)=21[gxx(2∂xgxx−∂xgxx)+gxy(2∂xgyx−∂ygxx)]=21[gxx∂xgxx+gxy(2∂xgxy−∂ygxx)]=21[E∂xE+F(2∂xF−∂yE)]=21[EEx+F(2Fx−Ey)]
Rewriting in terms of E,F,G and D=EG−F2:
Γxxx=2DGEx−F(2Fx−Ey)
Swapping all instances x and y (which also swaps E and G) gives the Christoffel symbol Γyyy:
Γyyy=2DEGy−F(2Fy−Gx)
Γxxy Computation
Γxxy=21m∑gym(∂xgmx+∂xgmx−∂mgxx)=21m∑gym(2∂xgmx−∂mgxx)=21[gyx(2∂xgxx−∂xgyx)+gyy(2∂xgyx−∂ygxx)]=21[gyx(∂xgxx)+gyy(2∂xgyx−∂ygxx)]=21[F∂xE+G(2∂xF−∂yE)]=21[FEx+G(2Fx−Ey)]
Rewriting in terms of E,F,G and D=EG−F2:
Γxxy=2DE(2Fx−Ey)−FEx
Swapping all instances x and y gives the Christoffel symbol Γyyx:
Γyyx=2DG(2Fy−Gx)−FGy
Γxyx Computation
Γxyx=21m∑gxm(∂ygmx+∂xgmy−∂mgxy)=21[gxx(∂ygxx+∂xgxy−∂xgxy)+gxy(∂ygyx+∂xgyy−∂ygxy)]=21[gxx(∂ygxx)+gxy(∂xgyy)]=21[E∂yE+F∂xG]=21[EEy+FGx]
Rewriting in terms of E,F,G and D=EG−F2:
Γxyx=2DGEy−FGx
Swapping all instances x and y gives the Christoffel symbol Γyxy:
Γyxy=2DEGx−FEy
Expanding the Geodesic Equation
The geodesic equation stipulates that the acceleration along the curve is zero. Given a curve γ(t)=(x(t),y(t)) its first derivative is calculable by usual differentiation
γ˙=x˙∂x+y˙∂y
But the second derivative is now a derivative not of a function, but of a vector field along a curve. This requires covariant differentiation - specifically the generalization D/dt of the usual covariant derivative ∇ of vector fields to fields along curves. Computing
dtDγ˙=dtD(x˙∂x+y˙∂y)=dtDx˙∂x+dtDy˙∂y=(dtDx˙∂x+x˙dtD∂x)+(dtDy˙∂y+y˙dtD∂y)=x¨∂x+x˙(∇γ˙∂x)+y¨∂y+y˙(∇γ˙∂y)
where we have used linearity and the Leibniz rule, together with the fact that D/dt agrees with the time derivative along coordinate functions and the covariant derivative in direction γ along vector fields. Continuing we expand occurances of ∇γ˙ using the tensorality of the covariant derivative: for any vector field V,
∇γ˙V=∇x˙∂x+y˙∂yV=∇x˙∂x+∇y˙∂yV=∇x˙V∂x+∇y˙V∂y=x˙∇∂xV+y˙∇∂yV
Plugging this in for both V=∂x and V=∂y, yields the following, where in the second line we have used the symmetry that ∇∂x∂y=∇∂y∂x for coordinate vector fields.
dtDγ˙=x¨∂x+x˙(x˙∇∂x∂x+y˙∇∂y∂x)+y¨∂y+y˙(x˙∇∂x∂y+y˙∇∂y∂y)=x¨∂x+y¨∂y+x˙2∇∂x∂x+2x˙y˙∇∂y∂x+y˙2∇∂y∂y
Finally, it has come time for the Christoffel symbols to make their appearance, as the the coefficients of covariantly differentiating coordinate fields:
∇∂x∂x∇∂x∂y∇∂y∂y=Γxxx∂x+Γxxy∂y=Γxyx∂x+Γxyy∂y=Γyyx∂x+Γyyy∂y
Plugging these in,
dtDγ˙=x¨∂x+y¨∂y+x˙2(Γxxx∂x+Γxxy∂y)+2x˙y˙(Γxyx∂x+Γxyy∂y)+y˙2(Γyyx∂x+Γyyy∂y)
and re-grouping terms by basis vector,
dtDγ˙=(x¨+x˙2Γxxx+2x˙y˙Γxyx+y˙2Γyyx)∂x+(y¨+x˙2Γxxy+2x˙y˙Γxyy+y˙2Γyyy)∂y
This gives a full expression for the acceleration along a curve γ. Because geodesics have vanishing acceleration, setting both components to zero gives a pair of coupled nonlinear differential equations specifying geodesics:
{x¨+x˙2Γxxx+2x˙y˙Γxyx+y˙2Γyyx=0y¨+x˙2Γxxy+2x˙y˙Γxyy+y˙2Γyyy=0}
Diagonal Metrics
A diagonal metric has F=0, which simplfies many of the Christoffel symbols. We compute three such simplifications here:
ΓxxxΓxxyΓxyx=2(EG−F2)GEx−F(2Fx−Ey)=2EGGEx=2EEx=2(EG−F2)E(2Fx−Ey)−FEx=2EG−EEy=−2GEy=2(EG−F2)GEy−FGx=2EGGEy=2EEy
Switching x and y as previously gives the other three. We summarize all in the table below
Γxxx=2EExΓxxy=−2GEy
Γyyx=−2EGxΓyyy=2GGy
Γxyx=2EEyΓxyy=2GGx
To get the geodesic equations, we simply plug these in and simplify. Note that all with a superscript x (which occur in the x¨ equation) have denominator 2E
and all terms for the y¨ equation share denominator 2G.
The geodesics of a diagonal metric ds2=Edx2+Gdy2 satisfy
x¨+2EExx˙2+2Eyx˙y˙−Gxy˙2=0
y¨+2GGyy˙2+2Gxx˙y˙−Eyx˙2=0
A conformally flat metric is a positive scalar multiple of the Euclidean metric ds2=Ψ(dx2+dy2). In the terminology above this is F=0 and E=G. This makes the Christoffel symbols easy to compute from the diagonal metric case
Γxxx=2ΨΨxΓxxy=−2ΨΨy
Γyyx=−2ΨΨxΓyyy=2ΨΨy
Γxyx=2ΨΨyΓxyy=2ΨΨx
Plugging these in and simplifying gives the geodesic equations
x¨+2ΨΨx(x˙2−y˙2)+2Ψyx˙y˙=0
y¨+2ΨΨy(y˙2−x˙2)+2Ψxx˙y˙=0
Since the function Ψ is always positive, it is often convenient to express it as an exponential, indeed as Ψ=e2ψ for some lowercase ψ.
ds2=e2ψ(dx2+dy2)
This notation results in particularly simple forms of the Christoffel symbols: for instance
Γxxx=2ΨΨx=2e2ψ∂xe2ψ=2e2ψe2ψ2ψx=ψx
The result of all such Christoffel symbols are summarized below:
Γxxx=ψxΓxxy=−ψy
Γyyx=−ψxΓyyy=ψy
Γxyx=ψyΓxyy=ψx
The geodesic equations in this case become
x¨+ψx(x˙2−y˙2)+2ψyx˙y˙=0
y¨+ψy(y˙2−x˙2)+2ψxx˙y˙=0