How do integral representations of $\mathbf A$ and $\Phi$ satisfy Lorenz condition? The following are the integral solutions of the potentials, obtained from the retarded potentials (by a Fourier transform):
$$\mathbf A (\mathbf r) = \frac{\mu_0}{4\pi}\int_V \frac{\mathbf J (\mathbf r')e^{-jk|\mathbf r -\mathbf r'|}}{|\mathbf r - \mathbf r'|}\, \mathrm{d}^3\mathbf r'\,$$
$$\Phi (\mathbf r) = \frac{1}{4\pi\epsilon_0}\int_V \frac{\rho (\mathbf r')e^{-jk|\mathbf r -\mathbf r'|}}{|\mathbf r - \mathbf r'|}\, \mathrm{d}^3\mathbf r'\,$$
I want to see if they satisfy the Lorenz gauge condition:
$$\nabla\cdot\mathbf{A} + j\omega \epsilon_0 \mu_0\Phi = 0$$
After taking the divergence of $\mathbf A$ using the formula for $\nabla. (\psi \mathbf A)=\nabla \psi. \mathbf A+ \psi \nabla. \mathbf A $, I can't proceed further because additional integrals appear and also the divergence of the primed $\mathbf J(\mathbf r')$ is zero (doesn't act on the primed coordinates).
I know that I must use the continuity equation somewhere but can't go any further.
 A: Given your description, you've probably done the following already:
\begin{align*}
\nabla \cdot \mathbf A &= \frac{\mu_0}{4\pi}\int_V \nabla \cdot \left[ \mathbf J (\mathbf r') \frac{e^{-jk|\mathbf r -\mathbf r'|}}{|\mathbf r - \mathbf r'|} \right] \, \mathrm{d}^3\mathbf r' \\&= \frac{\mu_0}{4\pi}\int_V \mathbf J (\mathbf r') \cdot \nabla \left[ \frac{e^{-jk|\mathbf r -\mathbf r'|}}{|\mathbf r - \mathbf r'|} \right] \, \mathrm{d}^3\mathbf r'  
\end{align*}
But since the quantity in square brackets only depends on the difference $\mathbf r -\mathbf r'$, we have
$$
\nabla \left[ \frac{e^{-jk|\mathbf r -\mathbf r'|}}{|\mathbf r - \mathbf r'|} \right] = - \nabla' \left[ \frac{e^{-jk|\mathbf r -\mathbf r'|}}{|\mathbf r - \mathbf r'|} \right],
$$
where $\nabla'$ now denotes the gradient with respect to $\mathbf{r'}$.  If you substitute this in and do an integration by parts, you'll get two terms.  One of them (after applying the continuity equation) will be equal to $-i \omega c^2 \Phi$, while the other will be an integral over the boundary of the volume you're looking at.  Assuming that our volume $V$ contains all of the current sources, the boundary term will vanish, and the Lorenz condition follows.
