How to derive Gauss's law for magnetism, $\nabla \cdot \vec{B}=0,$ if charge density is discontinuous? I want to derive Gauss's law for magnetism,$$
\nabla \cdot \vec{B} = 0
\,.$$
The derivation in Griffiths Introduction to elecrodynamics uses$$
\nabla \cdot\vec{B}
~=~\frac{\mu_0}{4\pi} \int {\nabla \cdot \left(\vec{J} \times \frac{\vec{r}}{r^3} 
\right)}
\,,$$but to use this, I would need $\vec{J} \times \frac{\vec{r}}{r^3}$ and $\nabla \cdot \left(\vec{J} \times \frac{\vec{r}}{r^3} \right)$ to be continuous.
Since $\vec{J}= \rho \vec{v}$, then if $\rho$ (charge density) has a continuous derivative, I'm done; but, I'm not sure why can I affirm this because clearly, I can construct charge distributions with jump discontinuities.
 A: I don't believe continuity is required. So long as the only source is some current $\vec{J}$ and not some monopole, you should be able to prove $\nabla \cdot\vec{B}=0$. 
You'll notice in Griffiths when he presents the expression:
$$\nabla \cdot\vec{B}
~=~\frac{\mu_0}{4\pi} \int {\nabla \cdot \left(\vec{J} \times \frac{\vec{r}}{r^3} 
\right)}
\,,$$
It's allowable to move the gradient operator inside the integral regardless of the current density because the bounds are fixed space (i.e. constants that are not functions of $\vec{r}$). This means we fall into the special case of the Leibniz integral rule where the gradient operator and the integral signs are interchangeable. 
His argument that the RHS is zero comes from the following vector identities:
$$\nabla \cdot(\vec{J} \times \frac{\vec{r}}{r^3})= \frac{\vec{r}}{r^3} \cdot (\nabla \times \vec{J}) - \vec{J} \cdot (\nabla \times  \frac{\vec{r}}{r^3})$$
Because $\vec{J}$ is dependent on the source space $(x',y',z')$ and not the measurement space where we are taking the curl $(x,y,z)$, we can say the curl of the current density is zero. Now we need only to evaluate the second term, which we can expand using another product rule.
$$\nabla \times  \frac{\vec{r}}{r^3}= \frac{1}{r^3}(\nabla \times  \vec{r})- \vec{r} \times (\nabla \frac{1}{r^3})$$
Both of these terms go to zero because the curl of $\vec{r}$ is zero, and because $\vec{r} \times \vec{r}$ is zero (I'm not sure exactly why Griffiths makes this last step, I would have believed that $\nabla \times  \frac{\vec{r}}{r^3}=0$ from the same argument). 
Regardless, the result does not depend on the continuity of the current density, just the space in which the problem is defined. 
