I'm attempting to plot geodesics in curved spacetime (e.g. the Schwarzschild metric) starting from the Lagrangian
$$ L = \frac{1}{2} g_{\alpha \beta} \dot{x}^\alpha \dot{x}^\beta $$ using the Euler Lagrange equations:
$$ \frac{\partial L}{\partial x^\alpha} = \frac{d}{d \lambda} \frac{\partial L}{\partial \dot{x}^\alpha} $$ My question is mostly on how to specify what kind of geodesics I wish to get in the resulting differential equations. For timelike, null, and spacelike particles $2L = -1,0,1$, respectively, so I was thinking of potentially working this is as a constraint and using
$$ \frac{\partial L}{\partial x^\alpha} + \kappa \frac{\partial f}{\partial x^\alpha} = \frac{d}{d \lambda} \frac{\partial L}{\partial \dot{x}^\alpha} $$
with $f = 2L$. Or is it a matter of specifying initial conditions such that you get the kind of particle you want, i.e. $c^2 = v_{x0}^2 + v_{y0}^2 + v_{z0}^2$ for null particles?