# Why is $\text{div}(\vec{r}/r^3) = 0$?

Let's begin with some context. I was reading Griffiths's introduction to electrodynamics.

This makes sense given all the content one can find online in order to understand visually the divergence.

So the problem arises when one tries to understand conceptually (or visually) the fact that $$\nabla\cdot\frac{\hat{r}}{r^2} = 0, \qquad r\neq 0.$$ I've done the calculation where:

$$\nabla \cdot \frac{\hat{r}}{r^2}=\frac{1}{r^2}\frac{\partial}{\partial r}(r^2\frac{1}{r^2})=\frac{1}{r^2}\frac{\partial}{\partial r}(1)=0.$$

That's fine but I find it impossible to understand it visually. Take for example this picture.

$\vec{r}/r^3 = 0$ " />

Having in mind the intuitive explanation of the divergence, like the one showed in the links, is easy to see that the flow through a small region in the image above, not containing the origin, is not equal to zero. Furthermore, it is obvious that the divergence is not zero because it doesn't look anything like the next image whose divergence is zero.

(In the image above the vector field isn't changing in space.)

Finally, I know that using the divergence theorem one can show mathematically that: $$\int \nabla\cdot\vec{r}/r^3 d\tau=\int \frac{\vec{r}}{r^3}\cdot d\vec{a} .$$ And if we consider the surface of a sphere of any radius, centered at the origin, one can show that $$\int \frac{\vec{r}}{r^3}\cdot d\vec{a}=4\pi.$$

Again, that's okay but doesn't help me to understand visually why $$\nabla\cdot\frac{\vec{r}}{r^3} = 0~?$$

• The divergence in question is not equal to zero. It is equal to the delta function centered at the origin (i.e., infinite at the origin, where as you correctly point out the field is clearly "diverging"). This is all explained on page 45 of Griffiths (section 1.5.1), and also related to your last statement about using the divergence theorem to get 4pi. Apr 10, 2021 at 21:33
• Possible duplicates: physics.stackexchange.com/q/126366/2451 , physics.stackexchange.com/q/488220/2451 and links therein. Apr 10, 2021 at 22:29

It the question it is said:

"[it] is easy to see that the flow through a small region in the image above, not containing the origin, is not equal to zero"

but if you look at the diagram, what you see, for any region not containing the origin, is field lines coming in from one side of the chosen region and going out the other side. And if you count the number of lines coming in then it is equal to the number going out. That is the property of zero divergence. The very fact that one can draw continuous field lines, not starting or stopping anywhere but just going on, is itself also the property of zero divergence!

Once you have a charge in your region then there can be field lines starting or stopping on that charge, and then you have non-zero divergence.

You need to be careful when calculating the divergence in this case. In particular, notice that the function is undefined or infinite at the origin.

If you calculate the divergence in any area not containing the origin you should be able to convince yourself visually that there is an equal number of field lines entering a region as there are exiting.

If you calculate the divergence in an area which contains the origin, then if you switch the integral to a dot product over the surface via Stokes’s theorem you will get a finite value. If you don’t make this switch you will get zero, but only because you have actually ignored the origin.

A nice way of capturing this property is to say that the divergence is a delta function, which Griffiths does later on.

As @Uyttendaele comments(1) $$$$\boxed{\:\: \boldsymbol{\nabla}\boldsymbol{\cdot}\left(\dfrac{\mathbf{r}\boldsymbol{-}\mathbf{r}_{0}}{\:\,\Vert\mathbf{r}\boldsymbol{-}\mathbf{r}_{0}\Vert^{\bf 3}}\right)\boldsymbol{=}4\pi\delta\left(\mathbf{r}\boldsymbol{-}\mathbf{r}_{0}\right)\:\:\:\vphantom{\dfrac{\tfrac{a}{b}}{\tfrac{a}{b}}}} \tag{A-01}\label{A-01}$$$$ see my answer here Divergence of $\frac{ \hat {\bf r}}{r^2} \equiv \frac{{\bf r}}{r^3}$, what is the 'paradox'?

$$=\!=\!=\!=\!=\!=\!=\!=\!=\!=\!=\!=\!=\!=\!=\!=\!=\!=\!=\!=\!=\!=\!=\!=\!=\!=\!=\!=\!=\!=\!=\!=\!=\!=\!=\!=\!=\!=\!=\!=\!=\!=\!=\!=\!=\!=\!=\!=\!=\!=\!=\!=\!=\!=\!=\!=\!=\!=\!=\!=\!=\!=\!=\!=$$

(1) $$''\texttt{Introduction to Electrodynamics}''\texttt{ D.J.Griffiths, Edition 3 or 4, Sect.1.5.3, eq.(1.100)}$$