I was trying to derive equation (65) in the following review:


This slightly unusual then usual classical mechanics because it includes a variation of time also, $\delta t$.

Usually one would define, $$\delta S~=~ \int \left[ L \left(\tilde{q}(t),\dot{\tilde{q}}(t),t\right) - L \left(q(t),\dot{q}(t),t\right)\right] dt , $$ where,

$$\tilde{q}~=~q+\delta q. $$

We have then (before applying int by parts),

$$ \delta S ~=~ \int \left(\frac{\partial L}{\partial q}\delta q +\frac{\partial L}{\partial \dot q}\delta \dot q\right)dt.$$

How does one proceed if both $q$ and $t$ vary and further that $q$ depends on a varying $t$?

Is the definition now

$$\delta S~=~ \int \left[ L \left(\tilde{q}(t+\delta t),\dot{\tilde{q}}( t+\delta t), t+\delta t\right) - L \left(q(t),\dot{q}(t),t\right)\right] dt~? $$

If so how does one proceed?

  • $\begingroup$ this is the variational principle with varying boundary as well (begin/end times) which gives a generalised Euler-Lagrange problem and can determine end times also $\endgroup$ – Nikos M. Jun 14 '14 at 23:50

I) Hint: Decompose the full infinitesimal variation

$$ \tag{A} \delta q~=~\delta_0 q + \dot{q} \delta t $$

in a vertical infinitesimal variation $\delta_0 q$ and a horizontal infinitesimal variation $\delta t$. Similarly the full infinitesimal variation becomes

$$ \tag{B} \delta I~=~\delta_0 I + \left[ L ~\delta t \right]_{t_1}^{t_2}, $$

where the vertical piece follows the standard Euler-Lagrange argument

$$ \tag{C} \delta_0 I~=~ \int_{t_1}^{t_2}\! dt~\left[\frac{\partial L}{\partial q}-\dot{p} \right] \delta_0 q + \left[ p ~\delta_0q \right]_{t_1}^{t_2}, $$

and we have for convenience defined the Lagrangian momenta

$$ \tag{D} p~:=~\frac{\partial L}{\partial \dot{q}}. $$

Now combine eqs. (A-D) to derive eq. (65) in Ref. 1:

$$ \tag{65} \delta I~=~ \int_{t_1}^{t_2}\! dt~\left[\frac{\partial L}{\partial q}-\dot{p} \right] \delta_0 q + \left[ p ~\delta q - (p\dot{q}-L)\delta t\right]_{t_1}^{t_2}, $$

II) Ideologically, we should stress that Ref. 1 is not interested in proposing a variational principle for non-vertical variations (such as, e.g., Maupertuis' principle, or a variant of Pontryagin's maximum principle, etc). Ref. 1 is merely calculating non-vertical variations within a theory that is still governed by the principle of stationary action (for vertical variations).

III) Ref. 1 mainly uses eq. (65) to deduce properties of the on-shell Dirichlet action $^1$

$$ \tag{E} S(q_2,t_2;q_1,t_1)~:=~I[q_{\rm cl};t_1,t_2],$$

cf. e.g. this Phys.SE post.


  1. L.B. Szabados, Quasi-Local Energy-Momentum and Angular Momentum in GR: A Review Article, Living Rev. Relativity 7 (2004) 4.


$^1$ Ref. 1 calls $S(q_2,t_2;q_1,t_1)$ the Hamilton-Jacobi principal function. Although related, the Hamilton-Jacobi principal function $S(q,P,t)$ is strictly speaking another function, cf. e.g. this Phys.SE post.

  • $\begingroup$ in the ‘‘Best Answer’’, could you please explain to me how did $[L \delta t]_{t_1}^{t_2}$ in (B) become $p \delta q - p \dot{q}$ in (65)? $\endgroup$ – Y2H Jun 17 '20 at 18:09

This is the Variational Problem with free end-time and one proceeds like this:

$$\delta S= \int_{t_i}^{t_f+\delta t_f} L \left(q+\delta q,\dot{q}+\delta \dot{q},t\right) dt - \int_{t_i}^{t_f} L \left(q, \dot{q}, t\right) dt$$

After several transformations and integration by parts one finally gets the usual Euler-Lagrange diff eq plus a boundary condition involving $\delta t_f$:

$$0 = L(q, \dot{q}, t) \delta t_f + \frac{\partial L}{\partial \dot{q}}(\delta q_f - \dot{q} \delta t_f)$$

Derivation steps:

a. Expand the first integral in a Taylor series and keep terms of 1st order and splitting the limits of integration (and doing any cancelations):

$$ \delta S= \int_{t_f}^{t_f+\delta{t_f}} \left[ L + \frac{\partial{L}}{\partial{q}}\delta{q} + \frac{\partial{L}}{\partial{\dot{q}}}\delta{\dot{q}} \right] dt + \int_{t_i}^{t_f} \left[ \frac{\partial{L}}{\partial{q}}\delta{q} + \frac{\partial{L}}{\partial{\dot{q}}}\delta{\dot{q}} \right] dt $$

b. The total variation consists of 2 variations; $\delta{q}$ and $\delta{t_f}$. Integrating over a small interval i.e $[t_f, t_f + \delta{t_f}]$ is effectively equivalent to multiplication by $\delta{t_f}$:

$$ \delta S= \delta{t_f} \left[ L + \frac{\partial{L}}{\partial{q}}\delta{q} + \frac{\partial{L}}{\partial{\dot{q}}}\delta{\dot{q}} \right] + \int_{t_i}^{t_f} \left[ \frac{\partial{L}}{\partial{q}}\delta{q} + \frac{\partial{L}}{\partial{\dot{q}}}\delta{\dot{q}} \right] dt $$

c. Terms like $\delta{t_f}\delta{q}$ or $\delta{t_f}\delta{\dot{q}}$ are 2nd order variations and can be dropped:

$$ \delta S= \delta{t_f} L + \int_{t_i}^{t_f} \left[ \frac{\partial{L}}{\partial{q}}\delta{q} + \frac{\partial{L}}{\partial{\dot{q}}}\delta{\dot{q}} \right] dt $$

d. Integration by parts yields a usual Euler-Lagrange diff eq. plus the boundary condition.

e. On the boundary condition at time $t_f$ one has:

Total variation of $q$ at $t_f$ is

$$\delta{q_f} = \delta{q(t_f)} + (\dot{q} + \delta{\dot{q}})\delta{t_f} = \delta{q(t_f)} + \dot{q}\delta{t_f}$$


$$\delta{q(t_f)} = \delta{q_f} - \dot{q}\delta{t_f}$$

Hint for @Y2H:

The total variation at the boundary $\delta{q_f}$ is simply the sum of the path and time variations at the boundary (since these can be considered as independent variations), ie $(\delta{q(t_f)}) + (q(t_f+\delta{t_f})+\delta{q(t_f+\delta{t_f})}-q(t_f)-\delta{q(t_f)})$ and the latter can be decomposed (up to 1st order variations) as $(\dot{q}(t_f) + \delta{\dot{q}(t_f)})\delta{t_f}$

PS: There has been a long time since posted this answer and I dont have my notes handy, but hope the above give you a hint.

PS2: Here are some synoptic lecture notes on generalised calculus of variations with free end points

  • $\begingroup$ Comment to the answer (v2): Note that to have a well-posed variational problem with unknown end-time, one in general needs to specify conditions on the allowed variations. $\endgroup$ – Qmechanic Jun 16 '14 at 3:52
  • $\begingroup$ @Qmechanic, correct, the answer follows the question regarding the extended formalism, the conditions are part of the problem and the final time is related to the boundary condition $\endgroup$ – Nikos M. Jun 16 '14 at 7:40
  • $\begingroup$ So is there a way to decompose that first integral? $\endgroup$ – user50482 Jun 16 '14 at 23:34
  • 1
    $\begingroup$ @Y2H, there has been a long time since posted this answer and I dont find my notes handy, but I will try to give you a hint. Updated my answer, hope it helps. For example Optimal Control theory makes heavy use of variational problems where many parameters are variated, including start and end time. Search for those to get the idea, although the derivations steps are given in this answer $\endgroup$ – Nikos M. Jun 25 '20 at 7:11
  • 1
    $\begingroup$ @Y2H, found some synoptic but good lecture notes on generalised calculus of variations with free end points, To get you started $\endgroup$ – Nikos M. Jun 28 '20 at 10:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.