# Continuity equation involving vectors

A time dependent point charge $$q\left ( t \right )$$ at the origin $$\rho\left ( \vec{r},t \right )=q\left ( t \right )\delta ^{3}\left ( \vec{r} \right )$$, is fed by a current $$\vec{J}\left ( \vec{r},t \right )=-\left ( \frac{1}{4 \pi} \right )\left ( \frac{\dot{q}}{r^{2}} \right )\hat{r}$$ where $$\dot{q}=\frac{\mathrm{dq} }{\mathrm{d} t}$$

I want to determine that $$\nabla\cdot \vec{J}=-\frac{\partial \rho}{\partial t}$$ but the integrals are giving me a terribly hard time.

Here's my attempt: $$\vec{\nabla} \cdot \vec{J}=0$$

$$\frac{\partial \rho}{\partial t}$$, as I've worked, is $$\dot{q}\delta ^{3}\left ( \vec{r} \right )$$

but it doesn't seem to satisfy the continuity equation. Is this a problem with the physics or the mathematics?

• Be careful at the origin $\nabla\cdot\vec{J}\neq 0$. – James Rowland Aug 11 '16 at 4:59

We know that the two answers should agree, but indeed, you found that $$\nabla\cdot J=0$$ by taking derivatives everywhere BUT at the origin. At the origin the result is obviously infinite. However this infinity is special (we expect it to be a delta function at the origin).

One way to detect delta functions at the origin is by taking an integral on a sphere around the origin and apply the divergence theorem:

$$\int_{B=\{r\leq R>0\}}\nabla\cdot J ~dV= \int_{\partial B}\mathbf{J}\cdot d\mathbf{S}=\int_{r=R} R^2\sin\theta d\theta d\phi\Big(-\frac{\dot{q}}{4\pi R^2}\Big)=-\dot{q}$$

Then we let $$R\to 0$$. The only function that can provide a contribution to an integral as one shrinks the region of integration around a certain point, is a delta-function at that point.

We see that $$\nabla\cdot J=-\dot{q}\delta^{3}(\mathbf{r})$$ satisfies the equation above and therefore this is the solution you are looking for. A full mathematical treatment would go into using Schwarz class test functions to deal with the quantity of interest as a distribution. However, physicists that deal with electromagnetism consider a fact of life that the following identities hold:

$$\nabla^2\Big(\frac{1}{r}\Big)=4\pi\delta^{3}(\mathbf{r})~~~,~~~ \nabla\cdot\Big(\frac{\hat{\mathbf{r}}}{r^2}\Big)=-4\pi\delta^{3}(\mathbf{r})$$

When you work with Dirac delta functions, don't use radial or cylindrical coordinates. They tend to exclude the origin so that a Dirac delta at the origin would not contribute to the integral. Try to reformulate your problem in Cartesian coordinate that you can integrate from -infinity to infinity.