# Does it make sense to speak in a total derivative of a functional? Part I

I would like to consider the problem of the total derivative of a given functional $$\begin{equation} \mathcal{L}\bigg[\phi\big(x,y,z,t\big),\frac{\partial{\phi}}{\partial{x}}\big(x,y,z,t\big),\frac{\partial{\phi}}{\partial{y}}\big(x,y,z,t\big),\frac{\partial{\phi}}{\partial{z}}\big(x,y,z,t\big),\frac{\partial{\phi}}{\partial{t}}\big(x,y,z,t\big),x,y,z,t\bigg],\tag{I.1}\label{eq0} \end{equation}$$ where all variable are independent each other.

However, before expressing my inquiry about the problem itself, I will make a brief preamble as motivation, or warm-up, as you wish. All the exhibition considered here takes into account that all functions are continuous and differentiable in any order, that is, they are all $$C^{\infty}$$ class.

Let us consider the case in which $$z$$ is a function of two variables $$x$$ and $$y$$, say $$z=f(x,y)$$, while $$x$$ and $$y$$, in turn, are functions of two variables $$u$$ and $$v$$, so that $$x=g(u,v)$$ and $$y=h(u,v)$$. Then $$z$$ becomes a function of $$u$$ and $$v$$, namely, $$z=f\big(g\big(u,v\big),h\big(u,v\big)\big)=f\big(u,v\big)$$. Here, we consider $$u$$ and $$v$$ as independents variables.

As we know, the total differential of the function $$z=f(x,y)$$ with respect to $$x$$ and $$y$$ is given by $$\begin{equation} dz=\frac{\partial{f}}{\partial{x}}dx+\frac{\partial{f}}{\partial{y}}dy,\tag{I.2}\label{eq1} \end{equation}$$ while the total differential of the functions $$x$$ and $$y$$ with respect to $$u$$ and $$v$$ are given by \begin{align} dx=\frac{\partial{g}}{\partial{u}}du+\frac{\partial{g}}{\partial{v}}dv,\tag{I.3}\label{eq2}\\ dy=\frac{\partial{h}}{\partial{u}}du+\frac{\partial{h}}{\partial{v}}dv.\tag{I.4}\label{eq3} \end{align}

Now, let us replacing (\ref{eq2}) and (\ref{eq3}) in (\ref{eq1}), such that now we have $$\begin{equation} dz=\Bigg(\frac{\partial{f}}{\partial{x}}\frac{\partial{g}}{\partial{u}}+\frac{\partial{f}}{\partial{y}}\frac{\partial{h}}{\partial{u}}\Bigg)du+\Bigg(\frac{\partial{f}}{\partial{x}}\frac{\partial{g}}{\partial{v}}+\frac{\partial{f}}{\partial{y}}\frac{\partial{h}}{\partial{v}}\Bigg)dv.\tag{I.5}\label{eq4} \end{equation}$$

Thus, knowing that the total differential of $$z$$ with respect to $$u$$ and $$v$$ is given by $$\begin{equation} dz=\frac{\partial{f}}{\partial{u}}du+\frac{\partial{f}}{\partial{v}}dv,\tag{I.6}\label{eq5} \end{equation}$$ we can, by direct comparison, to conclude that \begin{align} \frac{\partial{z}}{\partial{u}}=\frac{\partial{f}}{\partial{x}}\frac{\partial{g}}{\partial{u}}+\frac{\partial{f}}{\partial{y}}\frac{\partial{h}}{\partial{u}},\tag{I.7}\label{eq6}\\ \frac{\partial{z}}{\partial{v}}=\frac{\partial{f}}{\partial{x}}\frac{\partial{g}}{\partial{v}}+\frac{\partial{f}}{\partial{y}}\frac{\partial{h}}{\partial{v}}.\tag{I.8}\label{eq7} \end{align} And here arises my first question: Does it make sense to speak of the total derivative of $$z$$ in relation both of the two variables $$u$$ and $$v$$?

If the answer will be yes, and I think that this to be the answer, so, from Eq. (\ref{eq5}), it is valid that $$\begin{equation} \frac{dz}{du}=\frac{\partial{f}}{\partial{u}}\frac{du}{du}+\frac{\partial{f}}{\partial{v}}\frac{dv}{du}=\frac{\partial{f}}{\partial{u}}\quad\text{and}\quad\frac{dz}{dv}=\frac{\partial{f}}{\partial{u}}\frac{du}{dv}+\frac{\partial{f}}{\partial{v}}\frac{dv}{dv}=\frac{\partial{f}}{\partial{v}}. \tag{I.9}\label{eq7a} \end{equation}$$ If the answer will be no, so the notation $$dz/du$$ and $$dz/dv$$ cannot be used and we can only speak in the validity of the equations (\ref{eq6}) and (\ref{eq7}). Here, $$\dfrac{\partial{z}}{\partial{u}}\equiv\dfrac{\partial{f}}{\partial{u}} \quad\text{and}\quad\dfrac{\partial{z}}{\partial{v}}\equiv\dfrac{\partial{f}}{\partial{v}}.$$

The situation is similar when we are considering coordinates transformation of type: \begin{align} \begin{split} x'=f\big(x,y,z,t),\\ y'=g\big(x,y,z,t),\\ z'=h\big(x,y,z,t),\\ t'=w\big(x,y,z,t), \end{split} \end{align} where the set of prime coordinates are independent of each other. Similarly, the set of coordinates without prime are also independent of each other. Thus, such that the total differential are \begin{align} \begin{split} dx'=&\frac{\partial{f}}{\partial{x}}dx+\frac{\partial{f}}{\partial{y}}dy+\frac{\partial{f}}{\partial{z}}dz+\frac{\partial{f}}{\partial{t}}dt,\\ dy'=&\frac{\partial{g}}{\partial{x}}dx+\frac{\partial{g}}{\partial{y}}dy+\frac{\partial{g}}{\partial{z}}dz+\frac{\partial{g}}{\partial{t}}dt,\\ dz'=&\frac{\partial{h}}{\partial{x}}dx+\frac{\partial{h}}{\partial{y}}dy+\frac{\partial{h}}{\partial{z}}dz+\frac{\partial{h}}{\partial{t}}dt,\\ dt'=&\frac{\partial{w}}{\partial{x}}dx+\frac{\partial{w}}{\partial{y}}dy+\frac{\partial{w}}{\partial{z}}dz+\frac{\partial{w}}{\partial{t}}dt, \end{split} \end{align} and so, we have found to case of $$x'$$, for example, that $$\begin{equation} \frac{dx'}{dx}=\frac{\partial{f}}{\partial{x}},\quad\frac{dx'}{dy}=\frac{\partial{f}}{\partial{y}}\quad\frac{dx'}{dz}=\frac{\partial{f}}{\partial{z}},\quad\text{and}\quad\frac{dx'}{dt}=\frac{\partial{f}}{\partial{t}}. \end{equation}$$ And again, we ask ourselves: is it valid to use the $$d/dx$$, $$d/dy$$, $$d/dz$$ and $$d/dt$$ notation, since the function $$x'$$ has a dependence on the variables $$x$$, $$y$$, $$z$$ and $$t$$?

To finalize this preamble, which already is very long and tiresome, let us consider that the variables $$x$$, $$y$$ and $$z$$ have dependence with $$t$$, i.e., we have $$x\big(t\big)$$, $$y\big(t\big)$$ and $$z\big(t\big)$$, so we can write: \begin{align} \begin{split} \frac{dx'}{dt}=\frac{\partial{f}}{\partial{x}}\frac{dx}{dt}+\frac{\partial{f}}{\partial{y}}\frac{dy}{dt}+\frac{\partial{f}}{\partial{z}}\frac{dz}{dt}+\frac{\partial{f}}{\partial{t}},\\ \end{split} \tag{I.10}\label{eq11} \end{align} where, by simplicity, we have consider only the total derivative to $$x'$$. Obviously, that $$y'$$, $$z'$$ and $$t'$$ have analog equations. If $$x'$$, $$y'$$, $$z'$$ and $$t'$$ are not explicitly dependents of $$t$$ variable, so, of course, $$\frac{\partial{f}}{\partial{t}}=\frac{\partial{g}}{\partial{t}}=\frac{\partial{h}}{\partial{t}}=\frac{\partial{w}}{\partial{t}}=0.$$ We also point out that Eq. (\ref{eq11}) can be rewritten as \begin{align} \begin{split} dx'=\Bigg(\frac{\partial{f}}{\partial{x}}\frac{dx}{dt}+\frac{\partial{f}}{\partial{y}}\frac{dy}{dt}+\frac{\partial{f}}{\partial{z}}\frac{dz}{dt}+\frac{\partial{f}}{\partial{t}}\Bigg)dt=\frac{df}{dt}dt.\\ \end{split} \tag{I.11}\label{eq12} \end{align}

After this exhaustive exposition, I want to turn back in the original problem of the functional (\ref{eq0}), whose total differential is given by $$\begin{equation} d\mathcal{L}=\frac{\partial{\mathcal{L}}}{\partial{\phi}}d\phi+\frac{\partial{\mathcal{L}}}{\partial{\big(\partial_i\phi\big)}}d\big(\partial_i\phi\big)+\frac{\partial{\mathcal{L}}}{\partial{x}}dx+\frac{\partial{\mathcal{L}}}{\partial{y}}dy+\frac{\partial{\mathcal{L}}}{\partial{z}}dz+\frac{\partial{\mathcal{L}}}{\partial{t}}dt.\tag{I.12}\label{eq15} \end{equation}$$ Here, we can immediately think in the total derivative as (I will do the exposition only the $$x$$ variable.) $$\begin{equation} \frac{d\mathcal{L}}{dx}=\frac{\partial{\mathcal{L}}}{\partial{\phi}}\frac{\partial\phi}{\partial x}+\frac{\partial{\mathcal{L}}}{\partial{\big(\partial_i\phi\big)}}\frac{\big(\partial_i\phi\big)}{\partial x}+\frac{\partial{\mathcal{L}}}{\partial{x}},\tag{I.13}\label{eq16} \end{equation}$$ once that $$x$$, $$y$$ and $$z$$ are independents each other. However, if remember that \begin{align} \begin{split} d\phi &=\frac{\partial\phi}{\partial x}dx+\frac{\partial\phi}{\partial y}dy+\frac{\partial\phi}{\partial z}dz+\frac{\partial\phi}{\partial t}dt,\\ d\big(\partial_i\phi\big) &=\frac{\partial\big(\partial_i\phi\big)}{\partial x}dx+\frac{\partial\big(\partial_i\phi\big)}{\partial y}dy+\frac{\partial\big(\partial_i\phi\big)}{\partial z}dz+\frac{\partial\big(\partial_i\phi\big)}{\partial t}dt, \end{split} \end{align} we can, instead of we immediately write equation (\ref{eq16}), rewritten the equation (\ref{eq15}) as $$\begin{multline} d\mathcal{L}=\Bigg(\frac{\partial\mathcal{L}}{\partial\phi}\frac{\partial\phi}{\partial{x}} + \frac{\partial\mathcal{L}}{\partial\big(\partial_i\phi\big)}\frac{\partial\big(\partial_i\phi\big)}{\partial{x}} + \frac{\partial\mathcal{L}}{\partial{x}}\Bigg)dx\\ + \Bigg(\frac{\partial\mathcal{L}}{\partial\phi}\frac{\partial\phi}{\partial{y}} + \frac{\partial\mathcal{L}}{\partial\big(\partial_i\phi\big)}\frac{\partial\big(\partial_i\phi\big)}{\partial{y}} + \frac{\partial\mathcal{L}}{\partial{y}}\Bigg)dy\\+ \Bigg(\frac{\partial\mathcal{L}}{\partial\phi}\frac{\partial\phi}{\partial{z}} + \frac{\partial\mathcal{L}}{\partial\big(\partial_i\phi\big)}\frac{\partial\big(\partial_i\phi\big)}{\partial{z}} + \frac{\partial\mathcal{L}}{\partial{z}}\Bigg)dz\\ + \Bigg(\frac{\partial\mathcal{L}}{\partial\phi}\frac{\partial\phi}{\partial{t}} + \frac{\partial\mathcal{L}}{\partial\big(\partial_i\phi\big)}\frac{\partial\big(\partial_i\phi\big)}{\partial{t}} + \frac{\partial\mathcal{L}}{\partial{t}}\Bigg)dt\tag{I.14}\label{eq18} \end{multline}$$ Here's the dilemma! Since $$\phi$$ and $$\partial_i\phi$$ are functions of the variables $$x$$, $$y$$, $$z$$ and $$t$$, and, in addition, the functional $$\mathcal{L}$$ itself depends explicitly on these same variables, we could then think that the functional $$\mathcal{L}$$ is implicitly a function of the variables $$x$$, $$y$$, $$z$$ and $$t$$, and, therefore, $$\mathcal{L}=\mathcal{L}\big(x,y,z,t\big)$$. If so, then the total implicit'' the total differential of $$\mathcal{L}$$ would be given by $$\begin{equation} d\mathcal{L}=\frac{\partial{\mathcal{L}}}{\partial{x}}dx+\frac{\partial{\mathcal{L}}}{\partial{y}}dy+\frac{\partial{\mathcal{L}}}{\partial{z}}dz+\frac{\partial{\mathcal{L}}}{\partial{t}}dt \end{equation}$$ But this is not right since it contradicts the Eq. (\ref{eq15})! Based on this contradiction, I ask: who are the terms in parentheses in Eq. (\ref{eq18})? Is it possible to speak in a total derivative of the functional $$\mathcal{L}$$?

To conclude, I would like to justify this exposition, and its inquiries, saying that the problem arises when I try to derive the Noether theorem. In a certain passage, similar terms arose, suggesting the use of a total derivative. However, I was unsure whether such a procedure would be correct or valid.

See Does it make sense to speak in a total derivative of a functional? Part II to additional motivation.

• Comment to the post (v2): OP's eq. (1) seems to be just a (composite) function rather than a generic functional. – Qmechanic Apr 21 at 11:17
• It's functional! For simplicity $\theta\big(x,y,z,t\big)$ instead of the derivatives of $\phi$. – lucenalex Apr 21 at 11:22
• How is this a physics question rather than one purely about Mathematics? – ACuriousMind Apr 22 at 19:31
• @Qmechanic, I've changed the notation, and I think it made it clearer that L is indeed functional. – lucenalex Apr 22 at 19:35
• @ACuriousMind, in a way, I agree with you. However, I'd rather think it's a matter of mathematical physics. – lucenalex Apr 22 at 19:38

## 2 Answers

1. Consider for simplicity a single real scalar field $$\phi: \mathbb{R}^4\to \mathbb{R}\tag{A}$$ on a 4-dimensional spacetime $$\mathbb{R}^4$$. The Lagrangian density $${\cal L}:~ \mathbb{R} \times \mathbb{R}^4 \times \mathbb{R}^4~~\to~~ \mathbb{R}\tag{B}$$ is a differentiable function. We can construct partial derivatives of the Lagrangian density $${\cal L}$$ wrt. any of its 1+4=4=9 arguments. See also this & this related Phys.SE posts.

2. The integrand $$\phi^{\ast}{\cal L}:\mathbb{R}^4\to \mathbb{R}\tag{C}$$ of the action functional $$S[\phi]~:=~\int_{\mathbb{R}^4} \!d^4x~ (\phi^{\ast}{\cal L})(x)\tag{D}$$ is the pullback $$x~~\mapsto~~ (\phi^{\ast}{\cal L})(x)~:=~{\cal L}(\phi(x),\partial\phi(x),x)\tag{E}$$ of the Lagrangian density $${\cal L}$$ by the field $$\phi$$.

3. The derivative $$x~~\mapsto~~\frac{d(\phi^{\ast}{\cal L})(x)}{dx^{\mu}}\tag{F}$$ of the pullback (E) is by definition the total derivative [wrt. the spacetime coordinate $$x^{\mu}$$].

4. Be aware that physics texts usually don't bother to spell out the difference between the Lagrangian density $${\cal L}$$ and its pullback $$\phi^{\ast}{\cal L}$$, either in words or notation. It is implicitly understood.

Sorry, but I think much of this is quite misguided. The issue is that you're mixing up functions with different arguments.

As a simpler example, in classical mechanics, the Lagrangian $$L(q, \dot{q}, t)$$ is a function of multiple variables. It doesn't make sense to take a "total derivative" with respect to $$t$$. However, if we evaluate it on a specific path $$\bar{q}(t)$$, then we can construct the function of a single variable $$\bar{L}(t) \equiv L(\bar{q}(t), \dot{\bar{q}}(t), t).$$ For example, in the Euler-Lagrange equation $$\frac{d}{dt} \frac{\partial L}{\partial \dot{q}} = \frac{\partial L}{\partial q}$$ the partial derivative with respect to $$\dot{q}$$ involves the function of multiple variables $$L$$, but the total derivative $$d/dt$$ involves a function of one variable. In particular, it is completely meaningless to try to speak of the total derivative of $$L(q, \dot{q}, t)$$ with respect to $$t$$, if you don't specify a path. Once you do specify a path, it is trivial, because you're left with a function of time alone.

Similarly, when you have $$\mathcal{L}(\phi, \partial_\mu \phi, x^\mu)$$, it doesn't make sense to take the "total" derivative of $$\mathcal{L}$$ with respect to $$x^\mu$$, because it also depends on the field. It only makes sense after you plug in a specific field profile $$\phi(x)$$ to construct the function $$\tilde{\mathcal{L}}(x) \equiv \mathcal{L}(\phi(x), \partial_\mu \phi(x), t)$$ which then can be differentiated with respect to $$x^\mu$$. Once you do this, computing $$\partial_\mu \tilde{\mathcal{L}}(x)$$ is a trivial application of the chain rule. As long as you distinguish $$\mathcal{L}$$ and $$\tilde{\mathcal{L}}$$, there's nothing conceptually confusing here.

• Specifying the path means to know who it is q (t), correct? – lucenalex Apr 21 at 12:00
• @AlexsandroLucenaMota Yes. – knzhou Apr 21 at 12:06
• I've been thinking about everything you mentioned above, but I'm still quite intrigued. So, how is the chain rule applied to the Lagrangian functional? (More specifically from the point of view of Minkowski space.) – lucenalex Apr 21 at 15:27
• In mathematics it is standard to refer to the function $D\Phi$ that assigns to a point the best linear approximation to $\Phi$ at that point the total derivative. This can be represented as a matrix of partial derivatives, and seems to be what the OP is referring to. Also see total derivative – doetoe Apr 23 at 15:39
• @AlexsandroLucenaMota I updated and clarified the answer, hope it's more helpful now. – knzhou Apr 23 at 17:29