Deriving Solution for Wave Equation Using Retarded Green Function In the book Advanced Classical Electromagnetism by Robert Wald, it was shown if $\psi$ satisfy the homogeneous wave equation
$$\square\psi=0$$
then we have
$$\psi\left(x^{\mu}\right)=-\frac{1}{c} \int_{x^{\prime 0}=0}\left[\psi\left(x^{\prime \mu}\right) \partial_{0}^{\prime} G_{\mathrm{ret}}\left(x^{\mu}, x^{\prime \mu}\right)-G_{\mathrm{ret}}\left(x^{\mu}, x^{\prime \mu}\right) \partial_{0}^{\prime} \psi\left(x^{\prime \mu}\right)\right] d^{3} x^{\prime}\tag{5.133}$$
where the retarded Green function is defined as
$$G_{\text {ret }}\left(t, x ; t^{\prime}, x^{\prime}\right)= \begin{cases}0, & \text { for } t<t^{\prime} \\ \frac{\delta\left(t-t^{\prime}-\left|x-x^{\prime}\right| / c\right)}{4 \pi\left|x-x^{\prime}\right|}, & \text { for } t>t^{\prime}\end{cases}\tag{5.50}$$
but in the next line, he suddenly has
$$\psi(t, \boldsymbol{x})=\frac{1}{4 \pi} \int_{S^{\prime}}\left[\frac{1}{r^{\prime 2}} \psi\left(\theta^{\prime}, \varphi^{\prime}\right)+\frac{1}{r^{\prime}}\left(\frac{1}{c} \frac{\partial \psi}{\partial t}\left(\theta^{\prime}, \varphi^{\prime}\right)+\hat{\boldsymbol{r}}^{\prime} \cdot \nabla \psi\left(\theta^{\prime}, \varphi^{\prime}\right)\right)\right] r^{\prime 2} \sin \theta^{\prime} d \theta^{\prime} d \varphi^{\prime}\tag{5.134}$$
for $t>0$.
I find this step particularly hard to follow, here are some of my questions:

*

*Can we assume that the usual rule defining derivative of delta function (distribution) continue to hold in this case, such that $\delta' f=-\delta f'$?

*If so, where does the first and third term of the integrand of (5.134) come from? Since the derivative is taken with respect to the zeroth (i.e. time) component in (5.133), I feel there shouldn't be a gradient term in (5.134). Also, I wonder why the first term scale as $1/r'^2$...

 A: *

*You can integrate by part the $\delta$-function as usual, under an integral. Here, the $\delta'$ which appears is integrated by part in a integral over the spatial variable $x$. Another way of saying this is that because the $\delta$ function is a function of $t-t'-|x-x'|/c$, the time derivative is changed into a spatial derivative.


*Let us compute.
$(5.133)$ is :
$$\psi(t,x) = -\frac{1}{c^2}\int\Big[\psi(x',0) \frac{\delta'(t-|x-x'|/c)}{4\pi |x-x'|} - \frac{\delta(t-|x-x'|/c)}{4\pi|x-x'|}\frac{d\psi}{dt}(x',0)\Big]\text d^3x'$$
Take spherical coordinates around the point $x$, so that $\text d^3 x' = r'^2 \sin(\theta')\text d\theta' \text d\varphi'\text dr'$ and :
$$\psi(t,x) = -\frac 1{c^2}\int \Big[\psi(r',\theta',\varphi')\frac{\delta'(t-r'/c)}{4\pi r'}- \frac{\delta(t-r'/c)}{4\pi r'}\frac{d\psi}{dt}(r',\theta',\varphi')\Big]r'^2 \sin(\theta')\text d\theta' \text d\varphi'\text dr'$$
We can then integrate by part over $r$ in the first term to get :
\begin{align}
\psi(t,x) &= \frac{1}{4\pi c^2}\int \Big[ c\frac{d}{dr'}\Big(r'\psi(r',\theta',\varphi')\Big)\delta(t-r'/c)+  \delta(t-r'/c)r'\frac{d\psi}{dt}(r',\theta',\varphi')\Big] \sin(\theta')\text d\theta' \text d\varphi'\text dr' \\
&=\frac{1}{4\pi}\int_{S'} \Big[\psi(\theta',\varphi') + r'\frac{d\psi}{dr'}(\theta',\varphi') + \frac{r'}c \frac{d\psi}{dt}(\theta',\varphi')\Big]\sin(\theta')\text d\theta' \text d\varphi'
\end{align}
Now, we use $\frac{d\psi}{dr'} = \mathbf{\hat r'}\cdot\nabla \psi$ and factorize the $r'^2$ into the measure on the right, to get :
$$\psi(t,x)=  \frac{1}{4\pi}\int_{S'} \Big[\frac{1}{r'^2}\psi(\theta',\varphi') + \frac{1}{r'}\big[\mathbf{\hat r'}\cdot\nabla \psi(\theta',\varphi') + \frac{1}c \frac{d\psi}{dt}(\theta',\varphi')\big]\Big]r'^2\sin(\theta')\text d\theta' \text d\varphi'$$
