# How to prove that divergence of the current density is equal to the minus time derivative of the charge density?

Namely, in Weinberg's book (Graviation and Cosmology...) on p. 40 after eq. 2.6.5 we see: \begin{align}\nabla\cdot \vec J(\vec x,t) = \sum_n e_n \frac{\partial}{\partial x^i} \delta^3(\vec x-\vec x_n(t)) \frac{dx_n^i(t)}{dt} = - \sum_n e_n \frac{\partial}{\partial x_n^i} \delta^3(\vec x-\vec x_n(t)) \frac{dx_n^i(t)}{dt} \\ = - \sum_n e_n \frac{\partial}{\partial t} \delta^3(\vec x-\vec x_n(t)) = - \frac{\partial}{\partial t} \epsilon(\vec x,t),\end{align}, where the summation is performed over all point sources with electric charge $e_n$, the current density $\vec J(\vec x,t) = \sum_n e_n \delta^3(\vec x-\vec x_n(t)) \frac{d \vec x_n(t)}{dt}$, the charge density $\epsilon(\vec x,t) = \sum_n e_n \delta^3(\vec x-\vec x_n(t))$, and the Einstein's summation convention is assumed for space indices $i\in\{1,2,3\}$.

Could you explain in detail the intermediate steps of this derivation please? For instance, how do we get $\frac{\partial}{\partial x^i} \rightarrow - \frac{\partial}{\partial x_n^i}$?

The steps here are used in other derivations too, whenever one wants to establish a conservation law, starting from a discrete particle-based description (for example, in the molecular derivation of the laws of fluid hydrodynamics). Basically, one formally converts a set of point-based quantities (charges here) into a continuous function of space, $\vec{x}$, by using the Dirac delta function. Then, one time differentiates this function. Then, the aim is to convert the result into the spatial divergence of another function. If this can be done, it establishes conservation: the original quantity can only change, within a volume of space, by flowing into or out of that region of space.
My description above corresponds to the equations in the question, if you read them backwards step by step. Start with the equation near the end, where you go from line 1 to line 2 of your derivation. Taking the time derivative is just an application of the chain rule $$\frac{\partial}{\partial t} f(a(t)) = \left(\frac{\partial}{\partial a} f(a)\right) \, \frac{d a}{d t} \quad\Rightarrow\quad \frac{\partial}{\partial t} \delta(x-x_n(t)) = \left(\frac{\partial}{\partial x_n} \delta(x-x_n(t))\right) \, \frac{d x_n}{d t}$$ It applies to any function $f(x_n(t))$, nothing special about the delta function. In your case, you also have vector indices $i$ to sum over, because the function depend on all the components, and your delta function is a three-dimensional one. I'm omitting these details to avoid clutter.
The preceding equation, which you mention in your "for instance", is just an application of the identity $$\frac{\partial}{\partial a} f(a-b) = -\frac{\partial}{\partial b} f(a-b) \quad\Rightarrow\quad \frac{\partial}{\partial x} \delta(x-x_n) = -\frac{\partial}{\partial x_n} \delta(x-x_n)$$ which again applies to any function $f(a-b)$, not just to the delta function. If it doesn't seem obvious, just compare how you expect the function to change when you make a small change in $a$, with the case when you make a small change in $b$. In your case, this applies component by component, for each $i$.
• Thank you for the detailed answer, it was very helpful. Indeed, to my confusion, I assumed I didn't know some exotic delta-function derivation rules; but in reality it was just basic calculus, e.g. $\frac{d}{da} f(a-b) = \lim \frac {f([a+\Delta] - b) - f(a-b)}{\Delta} = - \lim \frac {f(a - [b +\Delta]) - f(a-b)}{\Delta} = - \frac{d}{db} f(a-b).$ – peter Jul 23 '18 at 10:31