Trajectory of particle is always the stationary point of action:

where is the Lagrangian.