In introductory general relativity courses, free particle trajectories, such as astronomical orbits, are generally developed via a Lagrangian and variational calculus, so that physical examples can precede the mathematics of tensor calculus. The use of a Hamiltonian is viewed as more advanced and typically comes later if at all. We suggest here that this might not be the optimal order in a first course in general relativity, especially if orbits are to be solved with numerical methods. We discuss some of the issues that arise in both the Lagrangian and Hamiltonian approaches.
References
The factor of 1/2 is included so that the quantities agree with the usual meaning of the component Pμ of the 4-momentum.
It can be argued (quite correctly) that the right form of the Lagrangian should be the square root of the negative of the expression in Eq. (1). In the interest of simplicity we are cutting a corner here. It can be shown without too much difficulty that either form of the Lagrangian gives the same equations of motion if the Lagrangian itself has a constant value for the solution. In the case of an affine parameter, which is the case that we consider, the Lagrangian is a constant for the solution curve.
For the wormhole of Ref. 1 the radial coordinate is ℓ, not r.
When we add the information that the Lagrangian is constant, we are actually modifying the problem. Without this the curve parameter λ is unconstrained; when we specify that the Lagrangian we are constraining λ to be an affine parameter.
The integral can be evaluated with good accuracy through the use of Gauss-Chebyshev integration, but this is not familiar to most undergraduates and has no real advantage over the substitution presented here.
With modern symbolic manipulation packages this effort is much easier than it had formerly been, adding another consideration in favor of the Hamiltonian approach.