Functional derivative commutes with total derivative I have a question about a rule from the calculus of variations.
Assume we consider the space of differentiable functions on $C^1(\mathbb{R})$ (or for the sake of simplicity the smooth functions $C^{\infty}(\mathbb{R})$.
My question is why the "variational derivative" commutes with a total derivative, namely why for $q \in C^1(\mathbb{R})$ holds
$$\frac{\delta}{\delta q(\tilde{t})} \frac{d}{dt} =  \frac{d}{dt} \frac{\delta}{\delta q(\tilde{t})} ~?$$
 A: OP is essentially asking the following.

Why the total time derivative
$$ \frac{d}{dt}~=~\frac{\partial}{\partial t} + \sum_{m=0}^{\infty}\sum_{i=1}^n q^{i(m+1)}(t)\frac{\partial}{\partial q^{i(m)}(t)} \tag{1} $$
and the
functional/variational derivative
$$ \frac{\delta}{\delta q^j(t^{\prime})} \tag{2}$$
commute?

That's a good question. The intuitive reason is that the differentiations refer to different variables. But actual calculations make it less obvious (cf. e.g. eq. (3) below). Assume that the derivatives (1) & (2) act on some space ${\cal F}$.

*

*For instance, say that ${\cal F}$ is the space of functions of the form $f(q^{i(m)}(t),t)$. Then we may write the functional derivative (2) as
$$ \frac{\delta}{\delta q^j(t^{\prime})} 
~=~ \sum_{\ell=0}^{\infty}\delta^{(\ell)}(t\!-\!t^{\prime})\frac{\partial}{\partial q^{j(\ell)}(t)},\tag{2'}$$
because an infinitesimal variation is of the form
$$\begin{align}\int\! dt^{\prime} &\sum_{j=1}^n \frac{\delta f(q^{i(m)}(t),t)}{\delta q^j(t^{\prime})}\delta q^j(t^{\prime})\cr 
~=~&\delta  f(q^{i(m)}(t),t)\cr  
~=~&\sum_{j=1}^n \sum_{\ell=0}^{\infty}\frac{\partial f(q^{i(m)}(t),t)}{\partial q^{j(\ell)}(t)}\delta q^{j(\ell)}(t)\cr 
~=~&\int\! dt^{\prime} \sum_{j=1}^n \sum_{\ell=0}^{\infty}\delta^{(\ell)}(t\!-\!t^{\prime})\frac{\partial f(q^{i(m)}(t),t)}{\partial q^{j(\ell)}(t)} \delta q^j(t^{\prime}).
\end{align} \tag{2"} $$
When we calculate the commutator
$$\begin{align}\left[\frac{\delta}{\delta q^j(t^{\prime})}, \frac{d}{dt}\right]
\stackrel{(1)+(2')}{=}& \sum_{m=0}^{\infty}\sum_{i=1}^n \left[\frac{\delta}{\delta q^j(t^{\prime})},q^{i(m+1)}(t)\right]\frac{\partial}{\partial q^{i(m)}(t)}\cr
&-\sum_{\ell=0}^{\infty}\left[\frac{d}{dt}, \delta^{(\ell)}(t\!-\!t^{\prime})\right]\frac{\partial}{\partial q^{j(\ell)}(t)} 
\cr 
~~=~~& \sum_{m=0}^{\infty} \delta^{(m+1)}(t\!-\!t^{\prime}) \frac{\partial}{\partial q^{i(m)}(t)}\cr
&- \sum_{\ell=0}^{\infty} \delta^{(\ell+1)}(t\!-\!t^{\prime})\frac{\partial}{\partial q^{j(\ell)}(t)}\cr
~~=~~&0,\end{align} \tag{3} $$
we get zero!


*If we extend ${\cal F}$ with functions of finite many other times, or with functionals (say, with internal time-integrations), or both, similar calculations show that the derivatives (1) & (2) commute.
