I am reading about Lagrangian mechanics.

At some point the difference between the temporal derivative of a variation and variation of the temporal derivative is discussed.

The fact that the two are the same is presented in the book I am reading as a rule, commutativity, and possible non-commutative rules are mentioned too.

I do not get it: given a path $q(t)$ and its variation $\delta q(t)$, the equivalence between the variation of the derivative $\delta \dot{q}$ and derivative of the variation $\dot{\delta q}$ seems to me a fact descending straight from calculus, not an arbitrary choice.


  1. B.D. Vujanovic and T.M. Atanackovic, An introduction to modern variational techniques in mechanics and engineering, (2004); p.12.

  2. C. Lanczos, The Variational principles of Mechanics.

  • $\begingroup$ Isn't the straightforward way to prove $\delta(y') = (\delta y)'$ to show that $$\delta \left( \lim_{h\rightarrow 0}\frac{y(x+h)-y(x)}{h} \right) = \lim_{h\rightarrow 0}\frac{\delta y(x+h) - \delta y(x)}{h} .$$ Normally one cannot interchange limits (hence, one cannot usually interchange limits and integrals/derivatives); however, in this case the variation is just a subtraction, so I think the interchange is perfectly valid. $\endgroup$
    – Khun Chang
    Commented Jun 1 at 15:52
  • $\begingroup$ In other words $$\delta \left( \lim_{h\rightarrow 0}\frac{y(x+h)-y(x)}{h} \right) = \lim_{h\rightarrow 0}\frac{\bar{y}(x+h)-\bar{y}(x)}{h} - \lim_{h\rightarrow 0}\frac{y(x+h)-y(x)}{h} = \lim_{h\rightarrow 0}\frac{\delta y(x+h) - \delta y(x)}{h} .$$ $\endgroup$
    – Khun Chang
    Commented Jun 1 at 15:57

2 Answers 2


It does follow from calculus. Here's the standard way this is treated (I'm not going to be explicit about mathematical details such as smoothness assumptions here).

Definition of $\delta q$.

Given a parametrized path $q:t\mapsto q(t)$, we consider a deformation of the path which we call $\hat q:(t, \epsilon)\mapsto \hat q(t,\epsilon)$ satisfying $\hat q(t,0) = q(t)$. The parameter $\epsilon$ is the deformation parameter. We can now define the variation $\delta q$ of the path $q$ as follows: \begin{align} \delta q(t) = \frac{\partial\hat q}{\partial \epsilon}(t,0) \tag{$\star$} \end{align} To motivate this definition, notice that we can Taylor expand $\hat q$ in the $\epsilon$ argument about $\epsilon=0$ as follows: \begin{align} \hat q(t,\epsilon) = \hat q(t,0) + \epsilon \frac{\partial\hat q}{\partial\epsilon}(t,0) + O(\epsilon^2) \end{align} which, in light of the definition of $\delta q$ above can be rewritten as \begin{align} \hat q(t,\epsilon) = q(t) + \epsilon\delta q(t) + O(\epsilon^2) \end{align} so that we recognize $\delta q(t)$ as the first order Taylor coefficient of the deformation $\hat q$ when we expand in the deformation parameter. Note that some authors in physics will instead define $\delta q$ with an extra factor of $\epsilon$ on the right hand side of $(\star)$, but this is just a matter of convention.

The commutativity property.

Now that we have defined $\delta q$, we address the commutativity of $\delta$ and $t$-derivatives. Well, now that everything is very explicit, this is pretty straightforward. First, we need note that $\dot q$ is a different curve than $q$, so we need to define its variation $\delta\dot q$. The standard way to do this is to induce this variation using the same deformation $\hat q$. Namely, we define \begin{align} \delta\dot q(t) = \frac{\partial^2\hat q}{\partial \epsilon\partial t}(t,0) \tag{$\star\star$} \end{align} then we can compute \begin{align} \frac{d}{dt}\delta q(t) = \frac{d}{d t}\left(\frac{\partial\hat q}{\partial \epsilon}(t,0)\right) = \frac{\partial^2\hat q}{\partial t\partial \epsilon}(t,0) = \frac{\partial^2\hat q}{\partial \epsilon\partial t}(t,0) = \delta\dot q(t) \end{align} which is the desired result.

Naturalness questions.

In some sense, the definitions $(\star)$ and $(\star\star)$ are arbitrary, but only to the extent that any definition is always arbitrary because we have to choose it. They are, however, standard and pretty physical if you ask me.

To get intuition for $(\star)$, consider $\hat q(t,\epsilon)$, and imagine fixing some $t_*$. Then as we vary $\epsilon$, we obtain a curve $\epsilon\mapsto \hat q(t_*, \epsilon)$. The variation $\delta q(t_*)$ is the derivative of this curve with respect to $\epsilon$ evaluated at $\epsilon = 0$, in other words, it is its tangent vector at $\epsilon = 0$ (think velocity). This tangent vector simply tells us the "direction" in which the original curve $q$ is changing at point $t_*$ as we apply the deformation to it. See the following diagram (which I hope is more clear than what I just said)

enter image description here

Here's another way of seeing that the definition $(\star)$ is natural which also shows why $(\star\star)$ is natural. In classical mechanics, we often consider a system described by an action which is the integral of a local lagrangian; \begin{align} S[q] = \int dt\,L(q(t), \dot q(t), t). \end{align} Now, suppose that we want to determine what happens to $S[q]$ when we deform the path $q$. Using the notation $\hat q$ from above for the deformation, this amounts to evaluating $S[\hat q(\cdot,\epsilon)]$. Let's compute this quantity to first order in epsilon. We find that \begin{align} S[\hat q(\cdot, \epsilon)] &= \int dt\, L\left(\hat q(t,\epsilon), \frac{\partial\hat q}{\partial t}(t,\epsilon), t\right) \\ &= S[q] +\epsilon \int dt\left[\frac{\partial L}{\partial q}(q(t), \dot q(t), t)\delta q(t) + \frac{\partial L}{\partial \dot q}(q(t), \dot q(t), t)\delta \dot q(t)\right] + O(\epsilon^2) \end{align} I have skipped some steps here, but the point is that the quantities $\delta q$ and $\delta\dot q$ that we defined in $(\star)$ and $(\star\star)$ naturally arise in the context of taking the variation of a functional of the path $q$. In particular, the variation of $\dot q$ induced by the variation of $q$ as defined in $(\star\star)$ is the object that naturally arises, not some other independent variation.

However, see Qmechanic's answer below which points out that in other contexts, like when using D'Alembert's principle, the variations $q$ and $\dot q$ may not have precisely the same meaning as they do in the contexts described above, and in these contexts the commutativity rule need not hold.

  • $\begingroup$ Just a small correction, in the third sentence it should be $\hat{q}(t,0)=q(t)$ instead of $\hat{q}(t,0)=q(0)$. $\endgroup$
    – Natanael
    Commented Jan 12, 2014 at 7:57
  • 1
    $\begingroup$ Thanks for the clarifying explanation. I am still confused on the possibility oh having any rule different than (**). q(t) and its time derivative refer to the same path, who could one not use the same deformation for both (as you suggest is "standard")? Thanks a lot $\endgroup$
    – user37155
    Commented Jan 12, 2014 at 14:13
  • $\begingroup$ @user37155 I strongly agree that not using $\hat q$ to induce the deformation of $\dot q$ would be rather awkward, and more importantly it would be less useful in some contexts (the commutativity to which this question refers won't generally hold for example), but it's certainly a logical possibility. In the context of classical mechanics, I've never personally seen a context in which one would want to adopt something other than $(\star\star)$. $\endgroup$ Commented Jan 12, 2014 at 20:32

I) The point of Ref. 1 is similar to why the generalized positions $q^j$ and the generalized velocities $\dot{q}^j$ in the Lagrangian $L(q,\dot{q},t)$ are independent variables, see e.g. this Phys.SE post. A less confusing notation would probably be to denote the generalized velocities $v^j$ instead of $\dot{q}^j$.

Ref. 1 is referring to the non-commutative possibility

$$\tag{1} \delta v^j ~\neq~ \frac{d}{dt}\delta q^j $$

in the context of d'Alembert's principle

$$\tag{2} \sum_{i=1}^N(m_i\ddot{\bf r}_i-{\bf F}^{(a)}_i) \cdot \delta {\bf r}_i~=~0, $$

where ${\bf r}_i$ are the positions of the $i$'th point particle. Here $\delta q^j$ and $\delta v^j$ are infinitesimal virtual variations.

It is consistent to allow a non-commutative rule (1) in d'Alembert's principle (2). (In fact, d'Alembert's principle, in it basic form (2), does not depend on $\delta v^j$.)

D'Alembert's principle (2) can e.g. be used to prove the central Lagrangian equation

$$\tag{3} \sum_j\left( \frac{dp_j}{dt} - \frac{\partial T}{\partial q^j}-Q_j \right) \delta q^j~=~0 , \qquad p_j~:=~\frac{\partial T}{\partial v^j},$$

and in turn, Lagrange equations, without resorting to the principle of stationary action, cf. next Section II. Here $T$ is the kinetic energy and $Q_j$ is the generalized force. See also e.g. this Phys.SE answer. Refs. 1 and 2 rewrite Lagrange's central equation (3) in the following form

$$ \tag{4} \frac{d}{dt}\sum_j p_j\delta q^j ~=~\underbrace{\delta T}_{\sum_j\left(\frac{\partial T}{\partial q^j}\delta q^j+ p_j~\delta v^j\right)} +\sum_j Q_j~\delta q^j +\sum_j p_j\left[\frac{d}{dt} \delta q^j-\delta v^j\right], $$

see eq. (1.3.39) in Ref. 1 or eq. (6.4.11) in Ref. 2. This form (4) also involves $\delta v^j$.

II) The above section I should be contrasted with the action functional

$$\tag{5} S[q] ~:=~ \int_{t_i}^{t_f}dt \ L(q(t),\dot{q}(t),t)$$

and the principle of stationary action. Here $q^j:[t_i,t_f]\to\mathbb{R}$ is a (possibly virtual) path. The time derivative $\dot{q}^j\equiv\frac{dq^j}{dt}$ do depend on the function $q^j:[t_i,t_f]\to \mathbb{R}$.

To derive Euler-Lagrange equations from the principle of stationary action, we use the commutative rule

$$\tag{6} \delta \dot{q}^j ~=~ \frac{d}{dt}\delta q^j $$

in a crucial way. The commutative rule (4) is in this context not negotiable, but follows directly from the pertinent definitions of the infinitesimal virtual variation

$$\tag{7} \delta q^j~:=~q^{\prime j}-q^j,$$

$$\tag{8} \delta \dot{q}^j~:=~\dot{q}^{\prime j}-\dot{q}^j ~:=~\frac{dq^{\prime j}}{dt}-\frac{dq^j}{dt} ~\stackrel{\text{linearity}}{=}~\frac{d}{dt}(q^{\prime j}-q^j) ~\stackrel{(7)}{=}~\frac{d}{dt}\delta q^j,$$

between two neighboring paths $q^j$ and $q^{\prime j}$.


  1. B.D. Vujanovic and T.M. Atanackovic, An introduction to modern variational techniques in mechanics and engineering, (2004); p.12.

  2. A.I. Lurie, Analytical Mechanics (Foundations of Engineering Mechanics), (2002); Section 1.7.

  • $\begingroup$ +1: Thanks for pointing out the subtleties one encounters when considering virtual variations. $\endgroup$ Commented Jan 13, 2014 at 3:06
  • $\begingroup$ Further references: M.R. Flannery, D'Alembert-Lagrange analytical dynamics for nonholonomic systems, J. Math. Phys. 52 (2011) 032705. $\endgroup$
    – Qmechanic
    Commented Sep 15, 2022 at 10:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.