Studying path integrals, in class we were looking for actions of relativistic particle.
One of the possible action was $$S[x^\mu(\tau)]=-m \int d\tau\sqrt{-\dot{x}^\mu\dot{x}_\mu}$$ We introduced another action, which would eliminate the square root (and eventually allow massless limit) introducing the einbein $e(\tau)$ $$S[x^\mu(\tau),e(\tau)]=\int d\tau \frac 12(e^{-1}\dot{x}^\mu\dot{x}_\mu -em^2)$$ We then got an expression for $e(\tau)$ for which we obtain the first action. So with this expression of $e(\tau)$ the two actions are equivalent.
My question is: how do we get the action with the einbein? We get it from the first action (without einbein) through some considerations, or is just "guessed" and then we impose condition on it reobtain what we already know?