# How can this integration by parts from Dirac's Lectures on Quantum Mechanics be justified?

In Dirac's Lectures on Quantum Mechanics, when he is deriving the Hamiltonian for the free electromagnetic field, he performs an integration by parts:

\begin{align*} H &= -L + \int \pi^\mu A_{\mu, 0} \, \mathrm{d}^3 x \\ &= \int F^{r0} A_{r,0} + \frac{1}{4} F^{rs} F_{rs} + \frac{1}{2} F^{r0} F_{r0} \, \mathrm{d}^3 x \\ &= \int \frac{1}{4} F^{rs} F_{rs} - \frac{1}{2} F^{r0} F_{r0} + F^{r0} A_{0,r} \, \mathrm{d}^3 x \\ &= \int \frac{1}{4} F^{rs} F_{rs} + \frac{1}{2} B^r B^r - A_0 \pi^r{}_{,r} \mathrm{d}^3 x \end{align*} where in the last step, integration by parts has been used to transfer the gradient $_{,r}$ from $A_0$ to $F^{r0}$ (which equals $\pi^r$).

In doing so, he has thrown away (without even mentioning) an integral over the boundary surface at infinity, namely $\int A_0 \pi^r \, \mathrm{d}S^r$.

Is there some reason why this is allowed? Sure, this boundary term may integrate to zero in realistic situations, but we don't know that until we've actually found the EOM for the field. Furthermore, Dirac points out that weak (i.e., on-shell) equalities derived during his procedure cannot be used until all Poisson brackets have been worked out, so by making use of an assumption about the values of the fields at infinity, aren't we using information prematurely, which means the derivation past this point is not sound?

2) You assume that your fields decay faster than $r^{-2}$ for $r\rightarrow \infty$ such that the flux trough infinity is 0. This makes sense since some fieldconfiguration at any point should not influence what happens at $\infty$. THis is equivalent to stating that the flux trough a sphere at $\infty$ is 0 which makes sense and this does indeed make a lot of sense. If some flux were to pass trough $\infty$ you did not place it far enough...