Divergence of $\frac{e^{-br}\hat{r}}{r^2}$ in electrostatics My question is how to calculate the divergence of a vector field (Electric field) given as: $\vec{E}(r)=\frac{e^{-br}\hat{r}}{r^2}$.
Or more generally how to approach finding the divergence of a vector field given as: $\frac{f(r)\hat{r}}{r^2}$.
What confuses me greatly is that the divergence does not give zero (in this case), because:
$$ \nabla f(r) = \frac{1}{r^2}\frac{\mathrm d}{\mathrm dr}\left(r^2e^{-br}\frac{1}{r^2}\right)=\frac{-b e^{-br}}{r^2}  $$
But it seems like it should be a point charge, so it should be zero and then be "repaired" using a delta-function.
A little help would be much appreciated.
 A: The result is almost correct, the divergence has the term 
$$ -\frac{ b\exp(-br)}{r^2} $$
which looks simple but it is not the behavior of the Yukawa potential which only has $1/r$, not $1/r^2$, in 3+1 dimensions.
Near $r=0$, the most singular term with the $\exp(-br)\sim 1$ behaves as $E_r=1/r^2$ which is the same as in the Coulomb potential $V\sim -1/r$ so the divergence is actually
 $$ -\frac{ b\exp(-br)}{r^2} + 4\pi \delta^{(3)}(\vec r) $$
for the same reasons as the delta-function in the Coulomb potential  The subleading terms in the expansion of the exponential produce no delta-like terms anymore.
To compare, the Yukawa potential has $V\sim \exp(-br)/r$, its gradient is (radial component) $\exp(-br)(-1/r^2-b/r)$ and its divergence is a multiple of $V$ again, so that the Yukawa potential solves the "Laplace equation" with an eigenvalue term. Note that your $E$ is just one of the terms one gets from the Yukawa potential – yours doesn't include any $\exp(-br)/r$ contribution – but it does reproduce one term of the Yukawa $E$, and this is the term sufficient to produce the delta-function, too.
