I have a question regarding some calculations in Torres del Castillo's paper "Hamiltonian structures for classical fields". Let $\phi_{(a)}$ ($a=1,2,\dots,n$) be the variables that determine the state of a field and let $ x ^ i $ ($i=1,2,3$) be any curvilinear coordinates. If $F$ is a functional given by $$ F=\int\text{d}^3x\,\mathcal{F}(\phi_{(a)},\partial_i\phi_{(a)},\partial_i\partial_j\phi_{(a)},\dots,x^i,t). $$ then the time derivative of $F$ is $$ \frac{\text{d}F}{\text{d}t}=\int\text{d}^3x\left[\frac{\partial\mathcal{F}}{\partial\phi_{(a)}}\dot{\phi}_{(a)}+\frac{\partial\mathcal{F}}{\partial(\partial_i\phi_{(a)})}\partial_i\dot{\phi}_{(a)}+\dots+\frac{\partial\mathcal{F}}{\partial{t}}\right]. $$ The author states that, by performing an integration by parts and supossing that the derivatives of $\mathcal{F}$ are square-integrable functions, one could arrive to the expression $$ \frac{\text{d}F}{\text{d}t}=\int\text{d}^3x\left[\frac{\partial\mathcal{F}}{\partial\phi_{(a)}}+\left(\frac{\text{d}}{\text{d}x^i}\right)^\dagger\frac{\partial\mathcal{F}}{\partial(\partial_i\phi_{(a)})}+\dots\right]\dot{\phi}_{(a)}+\int\text{d}^3x\,\frac{\partial\mathcal{F}}{\partial{t}}, $$ where $(\text{d}/\text{d}x^i)^\dagger$ is the adjoint operator of $\text{d}/\text{d}x^i$, defined by $$ \int\text{d}^3x\,f^*(\mathbf{x})\left(\frac{\text{d}}{\text{d}x^i}\right)g(\mathbf{x})=\int\text{d}^3x\,\left[\left(\frac{\text{d}}{\text{d}x^i}\right)^\dagger{f}(\mathbf{x})\right]^*g(\mathbf{x}), $$ where $f$ and $g$ are arbitrary square-integrable functions. Could someone explain to me how to get to that expression?
EDIT: Apparently, the result can be obtained from the definition of $(\text{d}/\text{d}x^i)^\dagger$, considering that $$\left(\frac{\text{d}}{\text{d}x^i}\right)\phi_{(a)}=\partial_i\phi_{(a)}.$$ Why should I do this consideration? When is this consideration not met?
The key is that, when we restrict ourselves to square-integrable functions, the adjoint operator of $\frac{d}{dx^i}$ is simply $-\frac{d}{dx^i}$. Indeed:
\begin{equation} \int d^3x f^*(\mathbf{x})\frac{d}{dx^i}g(\mathbf{x}) = \int d^3x g(\mathbf{x})\left(-\frac{d}{dx^i}f(\mathbf{x})\right)^* \ , \end{equation}
because surface terms vanish. Since the derivatives of $\cal{F}$ are square integrable by hypothesis, $\frac{\partial\mathcal{F}}{\partial(\partial_i\phi_{(a)})}\rightarrow 0$ as $\mathbf{x}$ goes to infinity. Given that the time derivative of a physical field cannot go to infinity, surface terms cannot survive, and we must have
\begin{equation} \int d^3x \partial_i\dot{\phi} \frac{\partial\mathcal{F}}{\partial(\partial_i\phi)} =\int d^3x \dot{\phi_{}}\left(-\frac{d}{dx^i} \frac{\partial\mathcal{F}}{\partial(\partial_i\phi)}\right), \end{equation} from which the desired result follows.