Variational principle for a point particle (massive or massless) in curved space We know that for a point particle, the action is
$$ S[x,e] ~=~ \frac{1}{2}\int_{\lambda_A}^{\lambda_B} d\lambda\left[e^{-1}(\lambda)~g_{\mu\nu}(x(\lambda))~\dot{x}^\mu(\lambda)~\dot{x}^\nu(\lambda) -(mc)^2e(\lambda)\right] , $$
with signature convention $(-,+,+,+)$.
It was mentioned on some website as a I googled that $e$ and $x$ are the dynamical variables and from them we should get the Euler-Lagrange equations.
I was wondering how to start since just a few minutes ago I first encountered this einbein variable (which I didn't know was a variable in the first place)!
 A: *

*The einbein field $e(\lambda)\neq 0$ is not a dynamical field because there is no $\dot{e}(\lambda)$ present. It is a so-called auxiliary field or generalized Lagrange multiplier. Its EL eq. simplifies to
$$ (mce)^2~\approx~-g_{\mu\nu}~\dot{x}^{\mu}\dot{x}^{\nu} . \tag{1}$$
[Here the $\approx$ symbol means equality modulo eom.] Here $m$ is the rest mass of the point particle. See also this related Phys.SE post and links therein.


*In the massive case $m>0$, we can integrate out the $e$ field, which means to replace it in the action $S[x,e]$ by its eom
$$ e~\approx~\pm\frac{1}{mc}\sqrt{-g_{\mu\nu}~\dot{x}^{\mu}\dot{x}^{\nu}} ,\tag{2} $$
which has two branches. The resulting action is
$$\begin{align} S_{\pm}[x]~:=~&S\left[x,e=\pm\frac{1}{mc}\sqrt{ \ldots}\right]\cr 
~=~&\mp mc \int \!d\lambda~ \sqrt{- g_{\mu\nu}~\dot{x}^{\mu}\dot{x}^{\nu}}~ \left\{ \begin{array}{c} < \cr > \end{array}\right\}~0. \end{align}\tag{3}$$
The $S_{+}[x]$ branch is the standard square-root action for a massive point particle, cf. e.g. this and this Phys.SE posts. The minimum of $S_{+}[x]$ (and the maximum of $S_{-}[x]$) is obtained for timelike geodesic curves $x^{\mu}(\lambda)$. Often we throw away the $S_{-}[x]$ branch since we are mostly interested in the minimum.
This can be encoded into the variational principle by imposing that the einbein field $e(\lambda)>0$ is positive.


*In the massless case $m=0$, eq. (1) becomes
$$  g_{\mu\nu}~\dot{x}^{\mu}\dot{x}^{\nu} ~\approx~0, \tag{4}$$
which is the equation of motion (EOM) for a massless particle, cf. e.g. this Phys.SE post.
