Showing Lorenz gauge is satisfied in retarded potential - vector calculus I am trying to show that $\nabla\cdot \vec{A}=-\mu_0 \epsilon_0 \frac{\partial V}{\partial t}$
$V=\frac{1}{4\pi\epsilon_0}\int \frac{\rho(\vec{r}',t_r)}{r}d\tau'$
$\vec{A}=\frac{\mu_0}{4\pi}\int \frac{J(\vec{r}',t_r)}{r}d\tau'$
Where $d\tau'=dxdydz$, $t_r=t-\frac{r}{c}$ is the retarded time, $\vec{r}$ is the position vector of the charge and $\vec{r}'$ is the position of the observer (us) and $r=|\vec{r}-\vec{r}'|$ the distance from us to the source.
Probably best to start with $\nabla\cdot \vec{A}$:
$\nabla\cdot \vec{A} =\frac{1}{4\pi \epsilon_0}\int \nabla \cdot \left(\frac{\vec{J}(\vec{r}',t_r)}{r}\right)d\tau'$
Apparently,
$\nabla\cdot ({\vec{J}\over r})=\frac{1}{r}(\nabla\cdot \vec{J})+\frac{1}{r}(\nabla'\cdot \vec{J})-\nabla'\cdot ({\vec{J}\over r})$
This is the first thing I need to do to get any further but I cannot do this. $\nabla$ is differentiation with respect to $r$ and $\nabla'$ is with respect to $r'$.
I thought that
$\nabla\cdot ({\vec{J}\over r})=\frac{1}{r}(\nabla\cdot\vec{J})+\vec{J}\cdot (\nabla(\frac{1}{r}))$
 A: The identity 
$$ \nabla\cdot \vec{A}=-\mu_0 \epsilon_0 \frac{\partial V}{\partial t} $$
holds because $V,\vec A$ are calculated from $\rho, \vec J$ by the same integral transform and because 
$$\nabla\cdot \vec J = - \frac{\partial\rho}{\partial t} $$
The integral transform may be written in the combined way
$$ \{V \epsilon_0(\vec r, t),\vec A(\vec r,t)/\mu_0\} = \int d t'\,d^3 r' 
\{\rho(\vec r',t'),\vec J(\vec r',t')\} D(\vec r'-\vec r,t'-t)$$
where the braces represent a "list" (like in Mathematica) and where the kernel of the integral transform is
$$ D(\vec y,t) = \frac{1}{4\pi |\vec y|} \delta(t-|\vec y|) \theta(t). $$
Note that in your formulae for $V,\vec A$, you forgot to integrate over the 3-space and divide by $1/|\vec r - \vec r'|$. The theta function guarantees that the potential is retarded, omitting any advanced contributions. The delta-function produces the right distance.
Now, the integral transform may be expressed by an operator ${\mathcal D}$ that is translationally symmetric. It therefore commutes with the operator of the four-divergence
$$\nabla_4\cdot\{ V\epsilon_0,\vec A/\mu_0 \}\equiv \frac{\nabla\cdot \vec A}{\mu_0}+
\frac{\partial V\epsilon_0}{dt}=\dots$$
may be written, because $V\epsilon_0={\mathcal D}\rho$ and $\vec A/\mu_0={\mathcal D}\vec J$, as
$$\dots = \nabla_4\cdot {\mathcal D} \{\rho,\vec J\} = {\mathcal D}\nabla_4\cdot \{\rho,\vec J  \} = 0$$
but this vanishes because of the continuity equation for the sources (even before we act on it with ${\mathcal D}$). The proof may be rewritten without unconventional "operators" but I think that its idea is much more transparent in this form.
A: $$
\newcommand{\k}[1]{\left( #1 \right)}
$$
\begin{align}
\nabla\cdot{\vec{J}\over r}={1\over r}\k{\nabla\cdot\vec{J}}+\vec{J}\cdot\k{\nabla\k{{1\over r}}}\\
\nabla'\cdot{\vec{J}\over r}={1\over r}\k{\nabla'\cdot\vec{J}}+\vec{J}\cdot\k{\nabla'\k{{1\over r}}}\\
\nabla'\k{{1\over r}}=-\nabla\k{{1\over r}}
\end{align}
A: This is how it's done by using the hints given:
Since $\rho = \rho ({\vec{r}'}, t_r)$, then it is not true that $\nabla \cdot \vec{J} = - \partial \rho/\partial t$. Instead, realize that since $\vec{J}$ is dependent of $\vec{r}'$ both explicitly and through $R = |\vec{r} - \vec{r}'|$, then one can write:
$$\nabla' \cdot \vec{J} = -\dot{\rho} - \frac{1}{c}\dot{\vec{J}} \cdot \nabla' (R),$$ since $\partial \vec{J}/\partial \vec{r}' = - \dot{\rho}$. This is the reason why you want to include the $\nabla'$ operator, because you need it to end up with $\dot{\rho}$.
Now consider the following expression:
$$ \nabla \left( \frac{\vec{J}}{R} \right) + \nabla' \left( \frac{\vec{J}}{R} \right) =  \frac{1}{R} \left(\nabla \cdot \vec{J} \right) + \frac{1}{R} \left(\nabla' \cdot \vec{J} \right) + \vec{J} \cdot \nabla \left(\frac{1}{R} \right) + \vec{J} \cdot \nabla' \left(\frac{1}{R} \right),$$
by normal differentiation. Now realize that:
$$\vec{J} \cdot \nabla \left(\frac{1}{R} \right) = -\vec{J} \cdot \frac{\hat{R}}{\vec{R}^2} = -\nabla' \left(\frac{\vec{J}}{R} \right),$$
which can be calculated by using Levi-Civita.
Then one is left with (by subtracting $\nabla' \left(\frac{\vec{J}}{R} \right)$ on both sides):
$$\nabla \left(\frac{\vec{J}}{R} \right) =  \frac{1}{R} \left(\nabla \cdot \vec{J} \right) + \frac{1}{R} \left(\nabla' \cdot \vec{J} \right) - \nabla' \left(\frac{\vec{J}}{R} \right)$$
Since $\nabla \cdot \vec{J} = -\frac{1}{c} \dot{\vec{J}} \cdot \left(\nabla R \right)$, it should be easy to show that the equation above reduces to:
$$\nabla \left(\frac{\vec{J}}{R} \right) = -\dot{\rho}/R - \nabla' \left(\frac{\vec{J}}{R} \right).$$
This can then be plugged into the expression for $\nabla \cdot \vec{A}$. When calculating the integrals, just use the divergence theorem to show that the latter term vanishes since you are free to choose your surface orientation as you like. After that, it is easy to see that the Lorenz gauge indeed holds.
Don't hesitate to correct me if something's wrong.
