Lesson 15 of 15

Geodesic Equations

Geodesic Equations

Geodesics are the "straightest possible curves" on a manifold — the generalization of straight lines to curved spaces. A curve γ(t)\gamma(t) is a geodesic if its velocity vector is parallel-transported along itself:

γ˙γ˙=0\nabla_{\dot\gamma} \dot\gamma = 0

In coordinates, this becomes the geodesic equation:

d2xkdt2+Γijkdxidtdxjdt=0\frac{d^2 x^k}{dt^2} + \Gamma^k_{ij}\frac{dx^i}{dt}\frac{dx^j}{dt} = 0

Connection to the Lagrangian

This is exactly the Euler-Lagrange equation for the Lagrangian L=12gijx˙ix˙jL = \frac{1}{2}g_{ij}\dot{x}^i\dot{x}^j! The Christoffel coefficients appear in the Lagrange equations for free motion — the deep connection between geometry and dynamics.

Integration

Introduce the velocity vk=dxk/dtv^k = dx^k/dt as an auxiliary variable:

dxkdt=vk,dvkdt=Γijkvivj\frac{dx^k}{dt} = v^k, \qquad \frac{dv^k}{dt} = -\Gamma^k_{ij}\, v^i\, v^j

This is a first-order ODE system we can integrate with RK4.

Examples

Flat R2\mathbb{R}^2: All Γ=0\Gamma = 0, so x¨=0\ddot{x} = 0: straight lines.

Unit sphere: Geodesics are great circles — the equator, meridians, and any circle obtained by slicing the sphere with a plane through the center.

The equator γ(t)=(π/2,t)\gamma(t) = (\pi/2, t) is a geodesic: at θ=π/2\theta = \pi/2, Γϕϕθ=sin(π/2)cos(π/2)=0\Gamma^\theta_{\phi\phi} = -\sin(\pi/2)\cos(\pi/2) = 0, so no acceleration.

Your Task

Implement integrate_geodesic(p0, v0, christoffel_fn, t_end, steps) using RK4 integration. Return the final position.

Python runtime loading...
Loading...
Click "Run" to execute your code.