Consider the matrix element
M_{\mathrm{fi}}=\int \mathrm{d}^{3} x \int \mathrm{d} t \mathrm{e}^{\mathrm{i} p_{\mathrm{f}} \cdot x}\left(\partial_{\mu} A^{\mu}(x)+A^{\mu}(x) \partial_{\mu}\right) \mathrm{e}^{-\mathrm{i} p_{\mathrm{i}} \cdot x} . (1)
Assume that the four-potential fulfills the conditions
\begin{aligned} & A^{0}(\boldsymbol{x}, t) \rightarrow 0 \text { for } t \rightarrow \pm \infty, & (2a) \\ & |\boldsymbol{A}(\boldsymbol{x}, t)| \rightarrow 0 \text { for }|\boldsymbol{x}| \rightarrow \infty, & (2b)\end{aligned}
and show that
(a) \int \mathrm{d} t \mathrm{e}^{\mathrm{i} p_{\mathrm{f}} \cdot x} \partial_{t}\left(A^{0} \mathrm{e}^{-\mathrm{i} p_{\mathrm{i}} \cdot x}\right)=\left(-\mathrm{i}\left(p_{\mathrm{f}}\right)_{0}\right) \int \mathrm{d} t \mathrm{e}^{\mathrm{i} p_{\mathrm{f}} \cdot x} A^{0} \mathrm{e}^{-\mathrm{i} p_{\mathrm{i}} \cdot x}, (3)
(b) \int \mathrm{d}^{3} x \mathrm{e}^{\mathrm{i} p_{\mathrm{f}} \cdot x} \nabla \cdot\left(\boldsymbol{A} \mathrm{e}^{-\mathrm{i} p_{\mathrm{i}} \cdot x}\right)=\mathrm{i} \boldsymbol{p}_{\mathrm{f}} \cdot \int \mathrm{d}^{3} x \mathrm{e}^{\mathrm{i} p_{\mathrm{f}} \cdot x} \boldsymbol{A} \mathrm{e}^{-\mathrm{i} p_{\mathrm{i}} \cdot x}, (4)
and therefore also
(c) \int \mathrm{d}^{4} x \mathrm{e}^{\mathrm{i} p_{\mathrm{f}} \cdot x}\left(\partial_{\mu} A^{\mu}+A^{\mu} \partial_{\mu}\right) \mathrm{e}^{-\mathrm{i} p_{\mathrm{i}} \cdot x}=-\mathrm{i}\left(p_{\mathrm{f}}+p_{\mathrm{i}}\right)_{\mu} \cdot \int \mathrm{d}^{4} x \mathrm{e}^{\mathrm{i} p_{\mathrm{f}} \cdot x} A^{\mu} \mathrm{e}^{-\mathrm{i} p_{\mathrm{i}} \cdot x} (5)
hold.
(a) A partial integration of the time integral yields
\begin{aligned} \int\limits_{-\infty}^{\infty} \mathrm{d} t \mathrm{e}^{\mathrm{i} p_{\mathrm{f}} \cdot x} \partial_{t} A^{0} \mathrm{e}^{-\mathrm{i} p_{\mathrm{i}} \cdot x} & =\left[A^{0} \mathrm{e}^{\mathrm{i}\left(p_{\mathrm{f}}-p_{\mathrm{i}}\right) \cdot x}\right]_{t=-\infty}^{t=+\infty}-\int\limits_{-\infty}^{+\infty} \mathrm{d} t A^{0} \mathrm{e}^{-\mathrm{i} p_{\mathrm{i}} \cdot x} \partial_{t} \mathrm{e}^{\mathrm{i} p_{\mathrm{f}} \cdot x} \\ & =-\mathrm{i}\left(p_{\mathrm{f}}\right)_{0} \int\limits_{-\infty}^{+\infty} \mathrm{d} t \mathrm{e}^{\mathrm{i} p_{\mathrm{f}} \cdot x} A^{0} \mathrm{e}^{-\mathrm{i} p_{\mathrm{i}} \cdot x} . \qquad (6) \end{aligned}
The surface term vanishes because of the boundary condition (2a).
(b) Analogously, a partial integration over the spacial coordinates leads to (Gauss’s theorem)
\begin{aligned} & \int \mathrm{d}^{3} x \mathrm{e}^{\mathrm{i} p_{\mathrm{f}} \cdot x} \nabla \cdot\left({A} \mathrm{e}^{-\mathrm{i} p_{\mathrm{i}} \cdot x}\right) \\ & \quad=\int\limits_{\text {surface, } |x| \rightarrow \infty} \mathrm{d} {F} \cdot {A} \mathrm{e}^{\mathrm{i}\left(p_{\mathrm{f}}-p_{\mathrm{i}}\right) \cdot x}-\int \mathrm{d}^3 x \mathrm{e}^{-\mathrm{i} p_{\mathrm{i}} \cdot x} {A} \cdot \nabla \mathrm{e}^{\mathrm{i} p_{\mathrm{f}} \cdot x}\\ & \quad={i}p_{\mathrm{f}} \cdot \int \mathrm{d}^{3} x \mathrm{e}^{\mathrm{i} p_{\mathrm{f}} \cdot x} {A} \mathrm{e}^{-\mathrm{i} p_{\mathrm{i}} \cdot x} . \qquad (7) \end{aligned}
Owing to boundary condition (2b), the surface integral again vanishes.
(c) Summarizing (a) and (b) we obtain
\int \mathrm{d}^4 x \mathrm{e}^{\mathrm{i} p_{\mathrm{f}} \cdot x} \partial_\mu\left(A^\mu \mathrm{e}^{-\mathrm{i} p_{\mathrm{i}} \cdot x}\right)=-\mathrm{i}\left(p_{\mathrm{f}}\right)_\mu \int \mathrm{d}^4 x \mathrm{e}^{\mathrm{i} p_{\mathrm{f}} \cdot x} A^\mu \mathrm{e}^{-\mathrm{i} p_{\mathrm{i}} \cdot x} . (8)
On the other hand we have
\partial_\mu \mathrm{e}^{-\mathrm{i} p_{\mathrm{i}} \cdot x}=-\mathrm{i}\left(p_{\mathrm{i}}\right)_\mu \mathrm{e}^{-\mathrm{i} p_{\mathrm{i}} \cdot x}, (9)
i.e.,
\begin{aligned} M_{\mathrm{fi}} & =\int \mathrm{d}^4 x \mathrm{e}^{\mathrm{i} p_{\mathrm{f}} \cdot x}\left(\partial_\mu A^\mu+A^\mu \partial_\mu\right) \mathrm{e}^{-\mathrm{i} p_{\mathrm{i}} \cdot x} \\ & =-\mathrm{i}\left(p_{\mathrm{f}}+p_{\mathrm{i}}\right)_\mu \int \mathrm{d}^4 x \mathrm{e}^{\mathrm{i} p_{\mathrm{f}} \cdot x} A^\mu \mathrm{e}^{-\mathrm{i} p_{\mathrm{i}} \cdot x} . & (10) \end{aligned}