# Geodesic equation: geodesics on a sphere

Reference: Moore, Thomas A., A General Relativity Workbook, University Science Books (2013) – Chapter 8; Problem 8.2.

We’ve seen that geodesic curves are found by maximizing the proper time between two events, where the proper time interval is given by

$\displaystyle \Delta\tau=\int_{0}^{1}\sqrt{-g_{ij}\frac{dx^{i}}{d\sigma}\frac{dx^{j}}{d\sigma}}d\sigma \ \ \ \ \ (1)$

We can do this by solving the set of Lagrangian differential equations given by

$\displaystyle \frac{d}{dt}\left(\frac{\partial L}{\partial\dot{q}_{a}}\right)-\frac{\partial L}{\partial q_{a}}=0 \ \ \ \ \ (2)$

where the Lagrangian function is given by

$\displaystyle L=\sqrt{-g_{ij}\left(x^{k}\left(\sigma\right)\right)\frac{dx^{i}}{d\sigma}\frac{dx^{j}}{d\sigma}} \ \ \ \ \ (3)$

Here, the object’s world path is given in parametric form by ${x^{i}\left(\sigma\right)}$. The metric can depend on the position, so it too is ultimately a function of the parameter ${\sigma}$, which plays the role of ${t}$ in 2. For this Lagrangian, the coordinates are ${q_{a}=x^{a}}$ and the generalized velocities are ${\dot{q}_{a}=\frac{dx^{a}}{d\sigma}\equiv\dot{x^{a}}}$. We therefore have

 $\displaystyle \frac{\partial L}{\partial\dot{x}^{a}}$ $\displaystyle =$ $\displaystyle -\frac{1}{2L}g_{ij}\left(\delta_{\;\; a}^{i}\frac{dx^{j}}{d\sigma}+\frac{dx^{i}}{d\sigma}\delta_{\;\; a}^{j}\right)\ \ \ \ \ (4)$ $\displaystyle$ $\displaystyle =$ $\displaystyle -\frac{g_{aj}}{L}\frac{dx^{j}}{d\sigma} \ \ \ \ \ (5)$

This follows because ${g_{ij}}$ does not depend on ${\dot{x}^{a}}$ (it depends only on the coordinates, not the velocities), and also because ${g_{aj}=g_{ja}}$.

The other derivative comes out to

$\displaystyle \frac{\partial L}{\partial x^{a}}=-\frac{1}{2L}\frac{\partial g_{ij}}{\partial x^{a}}\frac{dx^{i}}{d\sigma}\frac{dx^{j}}{d\sigma} \ \ \ \ \ (6)$

We can get rid of ${L}$ in these two results by noticing from 1 that

$\displaystyle \frac{d\tau}{d\sigma}=\sqrt{-g_{ij}\frac{dx^{i}}{d\sigma}\frac{dx^{j}}{d\sigma}}=L \ \ \ \ \ (7)$

We therefore get

 $\displaystyle \frac{\partial L}{\partial\dot{x}^{a}}$ $\displaystyle =$ $\displaystyle -\frac{g_{aj}}{L}\frac{dx^{j}}{d\sigma}\ \ \ \ \ (8)$ $\displaystyle$ $\displaystyle =$ $\displaystyle -g_{aj}\frac{d\sigma}{d\tau}\frac{dx^{j}}{d\sigma}\ \ \ \ \ (9)$ $\displaystyle$ $\displaystyle =$ $\displaystyle -g_{aj}\frac{dx^{j}}{d\tau}\ \ \ \ \ (10)$ $\displaystyle \frac{\partial L}{\partial x^{a}}$ $\displaystyle =$ $\displaystyle -\frac{1}{2L}\frac{\partial g_{ij}}{\partial x^{a}}\frac{dx^{i}}{d\sigma}\frac{dx^{j}}{d\sigma}\ \ \ \ \ (11)$ $\displaystyle$ $\displaystyle =$ $\displaystyle -\frac{1}{2}\frac{d\sigma}{d\tau}\frac{\partial g_{ij}}{\partial x^{a}}\frac{dx^{i}}{d\sigma}\frac{dx^{j}}{d\sigma}\ \ \ \ \ (12)$ $\displaystyle$ $\displaystyle =$ $\displaystyle -\frac{1}{2}\frac{\partial g_{ij}}{\partial x^{a}}\frac{dx^{i}}{d\tau}\frac{dx^{j}}{d\sigma} \ \ \ \ \ (13)$

Putting it all together using 2, we get

$\displaystyle -\frac{d}{d\sigma}\left(g_{aj}\frac{dx^{j}}{d\tau}\right)+\frac{1}{2}\frac{\partial g_{ij}}{\partial x^{a}}\frac{dx^{i}}{d\tau}\frac{dx^{j}}{d\sigma}=0 \ \ \ \ \ (14)$

(To those following along in Moore’s book: his equation 8.11 is wrong, and should be the equation given here.) We can now eliminate the parameter ${\sigma}$ by multiplying through by ${-\frac{d\sigma}{d\tau}}$:

$\displaystyle \frac{d}{d\tau}\left(g_{aj}\frac{dx^{j}}{d\tau}\right)-\frac{1}{2}\frac{\partial g_{ij}}{\partial x^{a}}\frac{dx^{i}}{d\tau}\frac{dx^{j}}{d\tau}=0 \ \ \ \ \ (15)$

This is one form of the geodesic equation, which is a second order ordinary differential equation. (It’s an ordinary differential equation despite the appearance of the partial derivative ${\frac{\partial g_{ij}}{\partial x^{a}}}$ because we will know the metric as a function of the coordinates, so this derivative will be known when we set out to solve the ODE.)

As an example of how we can use this equation to determine geodesics, we’ll look at the usual example of the curved 2-d surface of a sphere of radius ${R}$. The metric for this space is, using the usual spherical coordinates ${\theta}$ and ${\phi}$

$\displaystyle g_{ij}=\left[\begin{array}{cc} R^{2} & 0\\ 0 & \left(R\sin\theta\right)^{2} \end{array}\right] \ \ \ \ \ (16)$

The required derivatives of ${g_{ij}}$ are

$\displaystyle \partial_{\theta}g_{ij}=\left[\begin{array}{cc} 0 & 0\\ 0 & 2R^{2}\sin\theta\cos\theta \end{array}\right] \ \ \ \ \ (17)$

$\displaystyle \partial_{\phi}g_{ij}=\left[\begin{array}{cc} 0 & 0\\ 0 & 0 \end{array}\right] \ \ \ \ \ (18)$

Then 15 becomes (using ${s}$ as the parameter in place of ${\tau}$) for ${a=\theta}$:

 $\displaystyle R^{2}\frac{d^{2}\theta}{ds^{2}}-R^{2}\sin\theta\cos\theta\left(\frac{d\phi}{ds}\right)^{2}$ $\displaystyle =$ $\displaystyle 0\ \ \ \ \ (19)$ $\displaystyle \frac{d^{2}\theta}{ds^{2}}-\sin\theta\cos\theta\left(\frac{d\phi}{ds}\right)^{2}$ $\displaystyle =$ $\displaystyle 0 \ \ \ \ \ (20)$

And for ${a=\phi}$:

 $\displaystyle \frac{d}{ds}\left(\left(R\sin\theta\right)^{2}\frac{d\phi}{ds}\right)$ $\displaystyle =$ $\displaystyle 0\ \ \ \ \ (21)$ $\displaystyle \frac{d}{ds}\left(\sin^{2}\theta\frac{d\phi}{ds}\right)$ $\displaystyle =$ $\displaystyle 0 \ \ \ \ \ (22)$

The last equation can be integrated once to get

$\displaystyle \sin^{2}\theta\frac{d\phi}{ds}=\frac{k}{R} \ \ \ \ \ (23)$

where ${k}$ is a constant with dimensions of length, so that ${k/R}$ is dimensionless. Substituting this into the other ODE gives

 $\displaystyle \frac{d^{2}\theta}{ds^{2}}-\left(\frac{k}{R\sin^{2}\theta}\right)^{2}\sin\theta\cos\theta$ $\displaystyle =$ $\displaystyle 0\ \ \ \ \ (24)$ $\displaystyle \frac{d^{2}\theta}{ds^{2}}$ $\displaystyle =$ $\displaystyle \frac{k^{2}\cos\theta}{R^{2}\sin^{3}\theta} \ \ \ \ \ (25)$

We’ve decoupled the equations, although this latest ODE isn’t exactly easy to solve. We can make a bit of progress by observing that in 2-d space, the infinitesimal interval is given by ${ds^{2}=g_{ij}dx^{i}dx^{j}}$, so

$\displaystyle g_{ij}\frac{dx^{i}}{ds}\frac{dx^{j}}{ds}=\left(\frac{ds}{ds}\right)^{2}=+1 \ \ \ \ \ (26)$

Here, this gives us

 $\displaystyle R^{2}\left(\frac{d\theta}{ds}\right)^{2}+R^{2}\sin^{2}\theta\left(\frac{d\phi}{ds}\right)^{2}$ $\displaystyle =$ $\displaystyle 1\ \ \ \ \ (27)$ $\displaystyle R^{2}\left(\frac{d\theta}{ds}\right)^{2}+R^{2}\sin^{2}\theta\left(\frac{k}{R\sin^{2}\theta}\right)^{2}$ $\displaystyle =$ $\displaystyle 1\ \ \ \ \ (28)$ $\displaystyle \frac{d\theta}{ds}$ $\displaystyle =$ $\displaystyle \pm\frac{1}{R}\sqrt{1-\frac{k^{2}}{\sin^{2}\theta}}\ \ \ \ \ (29)$ $\displaystyle$ $\displaystyle =$ $\displaystyle \pm\frac{1}{R\sin\theta}\sqrt{\sin^{2}\theta-k^{2}} \ \ \ \ \ (30)$

Although we could integrate this directly (using software), the answer isn’t terribly illuminating. We can take a different approach by rearranging the equation to get

 $\displaystyle ds$ $\displaystyle =$ $\displaystyle \pm\frac{R\sin\theta d\theta}{\sqrt{\sin^{2}\theta-k^{2}}}\ \ \ \ \ (31)$ $\displaystyle$ $\displaystyle =$ $\displaystyle \pm\frac{R\sin\theta d\theta}{\sqrt{1-\cos^{2}\theta-k^{2}}}\ \ \ \ \ (32)$ $\displaystyle$ $\displaystyle =$ $\displaystyle \pm\frac{R\sin\theta d\theta}{\sqrt{a^{2}-\cos^{2}\theta}} \ \ \ \ \ (33)$

where ${a^{2}=1-k^{2}}$. Now we can use the substitution ${u=\cos\theta}$ with ${du=-\sin\theta d\theta}$ and we get

 $\displaystyle \int ds$ $\displaystyle =$ $\displaystyle \pm R\int\frac{\sin\theta d\theta}{\sqrt{a^{2}-\cos^{2}\theta}}\ \ \ \ \ (34)$ $\displaystyle$ $\displaystyle =$ $\displaystyle \mp R\int\frac{du}{\sqrt{a^{2}-u^{2}}}\ \ \ \ \ (35)$ $\displaystyle s$ $\displaystyle =$ $\displaystyle \mp R\arctan\left(\frac{u}{\sqrt{a^{2}-u^{2}}}\right)+u_{0} \ \ \ \ \ (36)$

If we want the path length to be zero at ${\theta=\pi/2}$, this corresponds to ${u=0}$, so we take ${u_{0}=0}$. This gives

$\displaystyle \tan\frac{s}{R}=\mp\frac{u}{\sqrt{a^{2}-u^{2}}} \ \ \ \ \ (37)$

Defining ${\psi\equiv s/R}$ and squaring both sides, we get

 $\displaystyle \tan^{2}\psi$ $\displaystyle =$ $\displaystyle \frac{u^{2}}{a^{2}-u^{2}}\ \ \ \ \ (38)$ $\displaystyle a^{2}\tan^{2}\psi$ $\displaystyle =$ $\displaystyle u^{2}\left(1+\tan^{2}\psi\right)\ \ \ \ \ (39)$ $\displaystyle u$ $\displaystyle =\cos\theta=$ $\displaystyle \pm a\sin\psi \ \ \ \ \ (40)$

Returning to 23, we can now eliminate ${\theta}$, since ${\sin^{2}\theta=1-\cos^{2}\theta=1-a^{2}\sin^{2}\psi}$

 $\displaystyle \left(1-a^{2}\sin^{2}\psi\right)\frac{d\phi}{ds}$ $\displaystyle =$ $\displaystyle \frac{k}{R}\ \ \ \ \ (41)$ $\displaystyle \frac{d\phi}{ds}$ $\displaystyle =$ $\displaystyle \frac{k}{R\left(1-a^{2}\sin^{2}\frac{s}{R}\right)} \ \ \ \ \ (42)$

Integrating this using software gives the rather cryptic result

$\displaystyle \phi=k{\it \mbox{arctanh}}\left(\sqrt{-1+{a}^{2}}\tan\left({\frac{s}{R}}\right)\right){\frac{1}{\sqrt{-1+{a}^{2}}}}+\phi_{0} \ \ \ \ \ (43)$

We can convert this into something more meaningful if we remember that ${k=\sqrt{1-a^{2}}}$, so ${\sqrt{-1+a^{2}}=ik}$. Also, since

 $\displaystyle \tanh ix$ $\displaystyle =$ $\displaystyle \frac{e^{ix}-e^{-ix}}{e^{ix}+e^{-ix}}\ \ \ \ \ (44)$ $\displaystyle$ $\displaystyle =$ $\displaystyle i\frac{\sin x}{\cos x}\ \ \ \ \ (45)$ $\displaystyle$ $\displaystyle =$ $\displaystyle i\tan x \ \ \ \ \ (46)$

the inverse functions are related by

$\displaystyle \mbox{arctanh}ix=i\arctan x \ \ \ \ \ (47)$

Putting this together, we get

 $\displaystyle \phi-\phi_{0}$ $\displaystyle =$ $\displaystyle \frac{1}{i}i\arctan\left(k\tan\left(\frac{s}{R}\right)\right)\ \ \ \ \ (48)$ $\displaystyle \tan\left(\phi-\phi_{0}\right)$ $\displaystyle =$ $\displaystyle k\tan\left(\frac{s}{R}\right) \ \ \ \ \ (49)$

We now have equations giving ${\theta}$ and ${\phi}$ in terms of ${s}$:

 $\displaystyle \cos\theta$ $\displaystyle =$ $\displaystyle \pm a\sin\frac{s}{R}\ \ \ \ \ (50)$ $\displaystyle \tan\left(\phi-\phi_{0}\right)$ $\displaystyle =$ $\displaystyle k\tan\left(\frac{s}{R}\right) \ \ \ \ \ (51)$

We know that the geodesics on a sphere should be arcs from great circles, that is, arcs from circles formed by the intersection of a plane containing the centre of the sphere with the sphere itself. Note that we’re looking for great circles that connect any two points on the sphere, so these circles need not go through the poles. We can define these circles by considering a plane with equation ${z=my}$ where ${m}$ is a constant, and its intersection with the sphere ${x^{2}+y^{2}+z^{2}=R^{2}}$. All these planes will contain the ${x}$ axis, but we are free to define the ${x}$ axis pointing in any direction from the centre of the sphere so we haven’t really restricted the solution in any way.

The intersection of the plane and sphere is given by converting to spherical coordinates:

 $\displaystyle x^{2}+y^{2}+\left(my\right)^{2}$ $\displaystyle =$ $\displaystyle R^{2}\ \ \ \ \ (52)$ $\displaystyle R^{2}\sin^{2}\theta\cos^{2}\phi+\left(1+m^{2}\right)R^{2}\sin^{2}\theta\sin^{2}\phi$ $\displaystyle =$ $\displaystyle R^{2}\ \ \ \ \ (53)$ $\displaystyle \sin^{2}\theta\left(\cos^{2}\phi+\sin^{2}\phi+m^{2}\sin^{2}\phi\right)$ $\displaystyle =$ $\displaystyle 1\ \ \ \ \ (54)$ $\displaystyle \pm m\sin\phi$ $\displaystyle =$ $\displaystyle \sqrt{\frac{1}{\sin^{2}\theta}-1}\ \ \ \ \ (55)$ $\displaystyle$ $\displaystyle =$ $\displaystyle \cot\theta \ \ \ \ \ (56)$

Thus the equation ${\pm m\sin\phi=\cot\theta}$ is the equation of a great circle that includes the intersection of the ${x}$ axis with the sphere. Does this agree with the solution from the geodesic equation above?

Conventional spherical coordinates requires ${\phi=0}$ along the ${x}$ axis and since we’re passing all our planes through that axis, we need to choose the constant ${\phi_{0}}$ above to match this. We’ve taken ${s=0}$ on the equator, which also intersects the ${x}$ axis, so we need to take ${\phi_{0}=0}$ as well. Therefore the geodesics are

 $\displaystyle \cos\theta$ $\displaystyle =$ $\displaystyle \pm a\sin\frac{s}{R}\ \ \ \ \ (57)$ $\displaystyle \tan\phi$ $\displaystyle =$ $\displaystyle k\tan\left(\frac{s}{R}\right) \ \ \ \ \ (58)$

We need to use a bit of trigonometric wizardry to convert these equations. First, ${\sin^{2}x=1-\cos^{2}x=1-1/\left(1+\tan^{2}x\right)=\tan^{2}x/\left(1+\tan^{2}x\right)}$, so

 $\displaystyle \cos^{2}\theta$ $\displaystyle =$ $\displaystyle a^{2}\frac{\tan^{2}\frac{s}{R}}{1+\tan^{2}\frac{s}{R}}\ \ \ \ \ (59)$ $\displaystyle \frac{1}{1+\tan^{2}\theta}$ $\displaystyle =$ $\displaystyle a^{2}\frac{\tan^{2}\phi}{k^{2}+\tan^{2}\phi}\ \ \ \ \ (60)$ $\displaystyle \frac{\cot^{2}\theta}{1+\cot^{2}\theta}$ $\displaystyle =$ $\displaystyle a^{2}\frac{\sin^{2}\phi}{k^{2}\left(1-\sin^{2}\phi\right)+\sin^{2}\phi}\ \ \ \ \ (61)$ $\displaystyle$ $\displaystyle =$ $\displaystyle \frac{\left(1-k^{2}\right)\sin^{2}\phi}{k^{2}+\left(1-k^{2}\right)\sin^{2}\phi}\ \ \ \ \ (62)$ $\displaystyle$ $\displaystyle =$ $\displaystyle \frac{\frac{1-k^{2}}{k^{2}}\sin^{2}\phi}{1+\frac{1-k^{2}}{k^{2}}\sin^{2}\phi} \ \ \ \ \ (63)$

The LHS and RHS are equal if

 $\displaystyle \cot^{2}\theta$ $\displaystyle =$ $\displaystyle \frac{1-k^{2}}{k^{2}}\sin^{2}\phi\ \ \ \ \ (64)$ $\displaystyle \cot\theta$ $\displaystyle =$ $\displaystyle \pm\sqrt{\frac{1-k^{2}}{k^{2}}}\sin\phi \ \ \ \ \ (65)$

That is, these are great circles if we identify

$\displaystyle m=\sqrt{\frac{1-k^{2}}{k^{2}}} \ \ \ \ \ (66)$

## 22 thoughts on “Geodesic equation: geodesics on a sphere”

1. Chris Kranenberg

The expression k=√(1-a^2 ) leading to √(-1+a^2 )=ik should be
√(-1+a^2 )=-ik, and since 〖tanh〗^(-1) (x) is an odd function, the integrated result is
∅-∅_0=(k〖tanh〗^(-1) (-iktanu))/(-ik)=(-k〖tanh〗^(-1) (iktanu))/(-ik)=(〖tanh〗^(-1) (iktanu))/i where u=s/R.
A different approach that may be more direct is taking the hyperbolic tangent of each side giving
tanh(i(∅-∅_0 ))=iktanu
Now,
tanh�?�(ix)=(e^ix-e^(-ix))/(e^ix+e^(-ix) )=2isinx/2cosx=isinx/cosx=itanx
So,
itan(∅-∅_0 )=iktanu
tan�?�(∅-∅_0 )=ktanu
Also, the right side of the equation after “putting this all together, we get�? should be
∅-∅_0=1/i iarctan(ktan(s/R))

1. growescience

Taking ${sqrt{-1+a^{2}}=-ik}$ in equation 43 wouldn’t make any difference since, as you say, arctanh is an odd function so

 $displaystyle k{it mbox{arctanh}}left(sqrt{-1+{a}^{2}}tanleft({frac{s}{R}}right)right){frac{1}{sqrt{-1+{a}^{2}}}}$ $displaystyle =$ $displaystyle k{it mbox{arctanh}}left(-iktanleft({frac{s}{R}}right)right){frac{1}{-ik}}$ $displaystyle$ $displaystyle =$ $displaystyle -k{it mbox{arctanh}}left(iktanleft({frac{s}{R}}right)right){frac{1}{-ik}}$ $displaystyle$ $displaystyle =$ $displaystyle frac{1}{i}{it mbox{arctanh}}left(iktanleft({frac{s}{R}}right)right)$

which is the same result that I use to get equation 48. [Unless I’m missing something?]

1. growescience

I guess what I’m not seeing is why it’s more natural to take ${sqrt{-1+a^{2}}=-ik}$ in equation 43 rather than ${+ik}$. To me the positive square root always seems the more natural choice unless there’s some reason the negative root is required.

1. Chris Kranenberg

It can be viewed as starting with +sqrt(1 – a^2) = k then factoring out an i then multiplying both sides by -i giving +sqrt(-1 – a^2) = -ik. Your point is well taken. Thanks.

1. gwrowe Post author

The integral can also be an arcsin, but the arctan is correct too. You can use the trig identity

$\displaystyle \tan\left(\arcsin x\right)=\frac{x}{\sqrt{1-x^{2}}}$

to convert between them. [To prove this identity, just let ${x=\sin y}$.]