3
$\begingroup$

Why am I getting zero divergence of function $\vec{f} = \frac{1}{r^2} \hat{r}$, where $r$ is the distance from the origin and $\hat{r}$ is the unit vector in the radial direction. The divergence of this function over a sphere of radius $R$, which includes the origin.

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

  • 0
    Yes you have done it correctly.. Just look at the behaviour of the function by plotting it if you are too curious..2017-02-09
  • 0
    @SchrodingersCat But the answer is $4\pi $2017-02-09
  • 1
    Well, that is because the function has a singularity at $r=0$. And the divergence is not defined at that point. Better use the divergence theorem and you will get your result.2017-02-09
  • 0
    Divergence should be $4 \pi$ but I'm getting 0.2017-02-09
  • 0
    Are you sure you have the question right? The divergence is $0$.2017-02-09
  • 0
    Yes the question is right.2017-02-09
  • 0
    But you mean the integral over the surface of the sphere of the divergence ?2017-02-09
  • 0
    @Zubzub: But the integral of a zero function over any domain is still zero.2017-02-10

2 Answers 2

4

The divergence of $\vec F(\vec r)=\frac{\vec r}{r^3}$ is not $4\pi$. By direct computation, we have

$$\nabla \cdot \vec F(\vec r)=\begin{cases}0&,r\ne 0\\\\\text{undefined}&,r=0\end{cases}$$

However, we can assign meaning to $\nabla \cdot \vec F(\vec r)$ at the origin and write

$$\bbox[5px,border:2px solid #C0A000]{\nabla \cdot \vec F(\vec r)\sim 4\pi \delta(\vec r)}$$

where $\delta(\vec r)$ is the Dirac Delta distribution. To do this, we introduce the regularization function

$$\psi(\vec r;a)=\frac{\vec r}{(r^2+a^2)^{3/2}}\tag 1$$

Note that for $r\ne 0$, $\lim_{a\to 0}\psi(\vec r;a)=\vec F(\vec r)$. Taking the divergence of $\psi(\vec r;a)$ yields

$$\nabla \cdot \psi(\vec r;a)=\frac{3a^2}{(r^2+a^2)^{5/2}}$$

Now, in THIS ANSWER, I showed that for any smooth test function $\phi(\vec r)$

$$\begin{align} \lim_{a \to 0}\int_V \nabla \cdot \vec \psi(\vec r; a)\phi(\vec r)\,dV&=\begin{cases}4\pi \phi(0)&,0\in V\\\\0&,0\notin V\end{cases} \end{align}$$

And it is in this sense that

$$\bbox[5px,border:2px solid #C0A000]{\lim_{a\to 0} \nabla \cdot \vec \psi(\vec r;a)=4\pi \delta(\vec r)}$$

1

$\hat{r} = (x,y,z)/\sqrt{x^2 + y^2 + z^2}$ $$ F(x,y,z) = \frac{1}{(x^2 + y^2 + z^2)^{3/2}} (x,y,z) \\ \frac{\partial}{\partial x} F = \frac{\partial}{\partial x} \frac{x}{(x^2 + y^2 + z^2)^{3/2}} = \frac{-2x^2 + y^2 + z^2}{(x^2 + y^2 + z^2)^{5/2}} \\ \frac{\partial}{\partial y} F = \frac{\partial}{\partial y} \frac{y}{(x^2 + y^2 + z^2)^{3/2}} = \frac{x^2 -2y^2 + z^2}{(x^2 + y^2 + z^2)^{5/2}} \\ \frac{\partial}{\partial z} F = \frac{\partial}{\partial z} \frac{z}{(x^2 + y^2 + z^2)^{3/2}} = \frac{x^2 + y^2 -2z^2}{(x^2 + y^2 + z^2)^{5/2}} \\ $$ Putting together : $$ \nabla\cdot F = \frac{\partial}{\partial x} F + \frac{\partial}{\partial y} F + \frac{\partial}{\partial z} F = \frac{0}{(x^2 + y^2 + z^2)^{5/2}} = 0 $$

  • 0
    Hopefully corrected now :|2017-02-09
  • 0
    answer is $4 \pi$2017-02-09
  • 1
    This doesn't interpret the divergence of $\vec F$ in the sense of distributions, which is, I believe, the area that the OP is questioning.2017-02-09