# Detailed computations of geodesic equation (using Langrangian or not)

Given a manifold and a path $$\gamma$$ on this manifold, I want to know if this path is actually a geodesic.

From what I read, I should compute the geodesic equation with that path, then check if it equals zero. I should hence compute :

$${d^2 x^\mu \over ds^2}+\Gamma^\mu {}_{\alpha \beta}{d x^\alpha \over ds}{d x^\beta \over ds}$$

Where, if I understand correctly, $$s$$ is the variable that parametrises $$\gamma$$, and $$x^\mu$$ are the components of $$\gamma$$ in some generalised coordinate system.

Still understanding Christoffel symbols is really hard to me, and I might not be ready using these yet.

I read there is another (probably simpler) formulation using a Lagrangian, which would need me to compute, if I'm right :

$$\frac{\partial \dot{\gamma}}{\partial x^\mu} - \frac{\mathrm d}{\mathrm ds} \left(\frac{\partial \dot{\gamma}}{\partial \dot{x}^\mu}\right)$$

Again, I am failing manipulating such expressions.

I would like you to help me with this simple example : in $$\mathbb{R}^3$$, let the manifold be the sphere of radius $$1$$ and center $$O$$ and we consider :

$$\gamma : s \mapsto \begin{pmatrix}\cos s \\ \sin s \\ 0\end{pmatrix}$$

This obviously parametrises a great circle of the sphere, and hence is a geodesic. So I already know our computations should give us $$0$$, yet and I am failing getting it. We suppose we have euclidean metric.

Computing $$\dot{\gamma} : s \mapsto \begin{pmatrix}-\sin s \\ \cos s \\ 0\end{pmatrix}$$ is not what poses a problem.

To my understanding, we have $$x^1 = \cos s$$, so what does $$\frac{\partial (-\sin s)}{\cos s}$$ worth ? Does it mean I should express $$-{\sin s}$$ from $$\cos s$$, which would give something like $$-{\sin s} = \pm \sqrt{1 - (\cos s)^2}$$ ?

• I understand Einstein summation convention ;
• I should be familiar with Leibniz differential notations, though detailing steps does not harm ;
• I have been initiated to tensors, but can not pretend mastering them ;
• I know some vector differential operator, but would rather avoid using nabla notation ;
• I know the Lagrangian is somehow a "potential" we want to minimise, but I have no intuition about it.

### Implicit coordinates

If everything is given in impicit coordinates, the easiest way to check if a curve is geodesic, is to check if the curvature vector of the curve is perpendicular to the manifold: $$\pmb k = \ddot{\pmb\gamma}-\dot{\pmb\gamma}\frac{\ddot{\pmb\gamma}\cdot\dot{\pmb\gamma}}{\dot{\pmb\gamma}^2}, \qquad |\pmb k\cdot\pmb n|=|\pmb k||\pmb n|,$$ where $$\mathbf n$$ is a normal to the manifold.

So for your example: $$\dot{\pmb\gamma}=(-\sin s, \cos s, 0),\qquad \ddot{\pmb\gamma}=(-\cos s, -\sin s, 0),\\ \pmb k=\ddot{\pmb\gamma}=(-\cos s, -\sin s, 0)$$

So you can see that $$\pmb k$$ is perpendicular to the sphere.

### Local coordinates

However, if you want to use the equations you presented, you need to keep in mind that both equations assume local coordinates $$x^\mu$$. That is if the manifold is embedded is $$\mathbb R^3$$ with coordinates $$\xi^i = (\xi, \eta, \zeta)$$, then local coordinates are some functions $$x\equiv x^1=x^1(\xi,\eta,\zeta)$$, $$y\equiv x^2=x^2(\xi,\eta,\zeta)$$. And the curve is assumed to be expressed in this local coordinates.

So as an example, let's consider unit sphere. We can select spherical coordinates as local coordinates: $$\xi = \cos y\cos x,\qquad \eta=\cos y\sin x, \qquad\zeta = \sin y,\\ x = \begin{cases}\arccos\frac{\xi}{\sqrt{\xi^2+\eta^2}},& \eta\ge 0,\\ -\arccos\frac{\xi}{\sqrt{\xi^2+\eta^2}},& \eta< 0,\end{cases}, \qquad y = \arctan\frac{\zeta}{\sqrt{\xi^2+\eta^2}},$$

Then we can calulate metric tensor of our manifold in local coordinates: $$g_{\alpha\beta}=\mathbf e_\alpha\cdot\mathbf e_\beta=\frac{\partial\xi^i}{\partial x^\alpha}\frac{\partial\xi^i}{\partial x^\beta}=\begin{pmatrix}\cos^2y& 0\\0 & 1\end{pmatrix}.$$

By inverting the matrix we obtain the inverse metric tensor: $$g^{\alpha\beta} = \begin{pmatrix}1/\cos^2y& 0\\0 & 1\end{pmatrix}.$$

Christoffel symbols by defintion: $$\Gamma^\mu_{\alpha\beta} = \frac{\partial \mathbf e_\alpha}{\partial x^\beta}\cdot \mathbf e^\mu= \frac{\partial^2 \xi^i}{\partial x^\alpha\partial x^\beta}g^{\mu\nu}\frac{\partial \xi^i}{\partial x^\nu}.$$

Computation gives us: $$\Gamma^1_{\alpha\beta} = \begin{pmatrix}0 & -\tan y\\-\tan y& 0\end{pmatrix},\qquad \Gamma^2_{\alpha\beta} = \begin{pmatrix}\sin y\cos y & 0\\0 & 0\end{pmatrix}.$$

Now let's consider a curve on a sphere with equation $$x=s$$, $$y=y_0$$ (some parallel with latitude $$y_0$$). The geodesic equation will give us: $$\mu=1:\qquad 0 + \begin{pmatrix}1\\ 0\end{pmatrix}^T\begin{pmatrix}0 & -\tan y\\-\tan y& 0\end{pmatrix}\begin{pmatrix}1\\ 0\end{pmatrix} =0\\ \mu=2: \qquad 0 + \begin{pmatrix}1\\ 0\end{pmatrix}^T\begin{pmatrix}\sin y\cos y & 0\\0& 0\end{pmatrix}\begin{pmatrix}1\\ 0\end{pmatrix} = \sin y\cos y = 0$$

So first equation is always true, while second is true only if $$y_0=0$$ which is the equator (we don't consider degraded curves $$y_0=\pm\pi/2$$).

This the most straightforward way to use geodesics. However, it implies a lot of calculations.

### Euler-Lagrange equation

You have made a mistake in Euler-Lagrange equation. The Lagrangian $$L=\frac12\dot{\pmb\gamma}^2$$, and not just $$\dot\gamma$$. So the equation should read: $$\frac12\frac{\partial}{\partial x^\mu}\dot{\pmb\gamma}^2 - \frac12\frac{d}{ds}\frac{\partial\dot{\pmb\gamma}^2}{\partial \dot x^\mu}=0$$

Now how to use it. First, let's notice that we can rewrite the Lagrangian in local coordinates: $$L=\dot{\pmb\gamma}^2=g_{\alpha\beta}\dot x^\alpha\dot x^\beta$$. It's just the definition of scalar product in curvilinear coordinate system. Then we need to keep in mind that $$x^\mu$$ and $$\dot x^\mu$$ are assumed to be independent. So in first term: $$\frac12\frac{\partial}{\partial x^\mu}\left(g_{\alpha\beta}\dot x^\alpha\dot x^\beta\right) = \frac12\frac{\partial g_{\alpha\beta}}{\partial x^\mu}\dot x^\alpha\dot x^\beta.$$

The inside part of second term: $$\frac{\partial g_{\alpha\beta}\dot x^\alpha\dot x^\beta}{\partial \dot x^\mu} = g_{\alpha\beta} \frac{\partial\dot x^\alpha}{\partial \dot x^\mu}\dot x^\beta + g_{\alpha\beta} \frac{\partial\dot x^\beta}{\partial\dot x^\mu}\dot x^\alpha = g_{\alpha\beta}\delta_{\alpha\mu}\dot x^\beta+g_{\alpha\beta}\delta_{\beta\mu}\dot x^\alpha = 2g_{\mu\alpha}\dot x^\alpha.$$ In last part we used the symmetry of metric tensor: $$g_{\alpha\beta}=g_{\beta\alpha}$$.

So now we can rewrite our equation as: $$\frac12\frac{\partial g_{\alpha\beta}}{\partial x^\mu}\dot\gamma^\alpha\dot\gamma^\beta -\frac{d}{ds}\left(g_{\mu\alpha}\dot\gamma^\alpha\right).$$

Let's consider the same metric and curve as in previous section. $$\frac{\partial g_{\alpha\beta}}{\partial x^1} = 0,\qquad \frac{\partial g_{\alpha\beta}}{\partial x^2} = \begin{pmatrix} -2\cos x\sin x&0\\0&0 \end{pmatrix}$$

Covector $$g_{\mu\alpha}\dot\gamma^\alpha=\begin{pmatrix}\cos^2 y\\0\end{pmatrix}$$ doesn't depend on $$s$$, so its full derivative $$d/ds$$ is zero. Thus we end with the same equation: $$\frac12\begin{pmatrix}1\\ 0\end{pmatrix}^T\begin{pmatrix}-2\sin y\cos y & 0\\0& 0\end{pmatrix}\begin{pmatrix}1\\ 0\end{pmatrix}=0$$

Finally, it's possible to show that the equation is the same: $$\frac{d}{ds}(g_{\mu\alpha}\dot\gamma^\alpha) = \frac{\partial g_{\mu\alpha}}{\partial x^\beta}\dot\gamma^\beta\dot\gamma^\alpha + g_{\mu\alpha}\ddot\gamma^\alpha = \frac12\left(\frac{\partial g_{\mu\alpha}}{\partial x^\beta}+\frac{\partial g_{\mu\beta}}{\partial x^\alpha}\right)\dot\gamma^\beta\dot\gamma^\alpha + g_{\mu\alpha}\ddot\gamma^\alpha.$$ In last part we used the symmetry of $$\dot\gamma^\beta\dot\gamma^\alpha$$ and split the term in two and renamed indices in one of the new terms. Thus, we can write our equation as: $$g_{\mu\alpha}\ddot\gamma^\alpha +\frac12\left(\frac{\partial g_{\mu\alpha}}{\partial x^\beta}+\frac{\partial g_{\mu\beta}}{\partial x^\alpha} - \frac{\partial g_{\alpha\beta}}{\partial x^\mu}\right)\dot\gamma^\beta\dot\gamma^\alpha = g_{\mu\alpha}\ddot\gamma^\alpha + \Gamma_{\mu\,\alpha\beta}\dot\gamma^\beta\dot\gamma^\alpha = 0$$ Finally, we multiply the equation by $$g^{\mu\nu}$$ and get: $$\ddot\gamma^\nu + \Gamma^\nu_{\alpha\beta}\dot\gamma^\beta\dot\gamma^\alpha = 0$$

• This is a great answer ! Thanks very much, it helped me a lot. Suspected typos : $\Gamma^\mu_{\alpha\beta} = \frac{\partial^2 \xi^i}{\partial x^\alpha\partial x^\beta}g^{\mu\nu}\frac{\partial \xi^i}{\partial x^\nu}$, not $\frac{\partial^2 \xi^i}{\partial x_\alpha\partial x_\beta}g^{\mu\nu}\frac{\partial \xi^i}{\partial x^\nu}$ ; Lots of $\partial$ missing in the Euler-Lagrange part. You said I made a mistake. If any, my mistake was to believe French wikipedia (fr.wikipedia.org/wiki/%C3%89quation_des_g%C3%A9od%C3%A9siques) ; should I correct it ? – tnetennba Aug 7 at 15:05
• Also, you wrote $g_{\alpha\beta}=\mathbf e_\alpha\cdot\mathbf e_\beta=\frac{\partial\xi^i}{\partial x^\alpha}\frac{\partial\xi^i}{\partial x^\beta}$ which is okay ; then you wrote $g_{\alpha\beta}=\begin{pmatrix}\cos^2y& 0\\0 & 1\end{pmatrix}.$ which is abuse of notation, right ? I mean, it is actually $g$, not $g_{\alpha\beta}$. Is such an abuse of notation standard ? I understand it is useful for distinguishing metric tensor (covariant) and inverse metric tensor (contravariant), and indeed it helped me. But couldn't it confuse other people ? – tnetennba Aug 7 at 15:09
• Thanks! I guess I have fixed most of the typos. I thought you “made a mistake” as “made a typo”: $\dot\gamma$ instead of $\dot\gamma^2$. I presented a more general and traditional approach with lagrangian $L=\dot\gamma^2/2$. If you know some physics, you can see that this is the Lagrangian of a free particle $L=mv^2/2$. Wikipedia page has lagrangian $L=|\dot\gamma|$, where parametrization is natural $|\dot\gamma|=1$. In other words, they are trying to minimize the length of the curve. This approach is legit (you don't have to edit wikipedia), however, less general. – Vasily Mitch Aug 7 at 20:15
• And by the way, it's easy to see that if $|\dot\gamma|=1$ and $\int|\dot\gamma|ds$ is minimal, then $\int\dot\gamma^2 ds$ will be minimal too. – Vasily Mitch Aug 8 at 6:50
• Speaking of whether $g_{\alpha\beta}=\begin{pmatrix}a&b\\b&c\end{pmatrix}$ is an abuse of notation, I doubt that writing symmetric tensor this way can confuse someone. And it used (abused?) pretty often (wikiwand.com/en/Metric_tensor_(general_relativity)#/…). – Vasily Mitch Aug 8 at 7:32