Geodesic Equations
Geodesic Equations
Geodesics are the "straightest possible curves" on a manifold — the generalization of straight lines to curved spaces. A curve is a geodesic if its velocity vector is parallel-transported along itself:
In coordinates, this becomes the geodesic equation:
Connection to the Lagrangian
This is exactly the Euler-Lagrange equation for the Lagrangian ! The Christoffel coefficients appear in the Lagrange equations for free motion — the deep connection between geometry and dynamics.
Integration
Introduce the velocity as an auxiliary variable:
This is a first-order ODE system we can integrate with RK4.
Examples
Flat : All , so : 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 is a geodesic: at , , so no acceleration.
Your Task
Implement integrate_geodesic(p0, v0, christoffel_fn, t_end, steps) using RK4 integration. Return the final position.