This is a question from Stuart Calculus 7ed, section 16.9:
"Verify that ${\rm div}({\bf E})=0$ for the electric field ${\bf E}=\frac{\epsilon Q}{\|\bf x\|^{3}}{\bf x}$ ."
We can rewrite: $$ {\bf E}=\epsilon Q\frac{x}{(x^2+y^2+z^2)^{3/2}}{\bf i}+\epsilon Q\frac{y}{(x^2+y^2+z^2)^{3/2}}{\bf j}+\epsilon Q\frac{z}{(x^2+y^2+z^2)^{3/2}}{\bf k} $$
It's easy to prove it using the definition of divergence
$$ {\rm div}({\bf E})=\nabla \boldsymbol{\cdot}{\bf E}=\frac{\partial}{\partial x}\frac{\epsilon Qx}{(x^2+y^2+z^2)^{3/2}}+\frac{\partial}{\partial y}\frac{\epsilon Qy}{(x^2+y^2+z^2)^{3/2}}+\frac{\partial}{\partial z}\frac{\epsilon Qz}{(x^2+y^2+z^2)^{3/2}}=\epsilon Q\frac{3(x^2+y^2+z^2)-3x^2-3y^2-3z^2}{(x^2+y^2+z^2)^{5/2}}=0 $$
I found this to be a weird result, given that this is the plotted vector field, and it very clearly "diverges" (as in the all vectors point outward) from the origin. Am I misinterpretating the vector plot or the definition of divergence?
I also tried to prove it using the divergence theorem.
Let S be the surface of a sphere of radius 1 with normal vector n, and R the region limited by this sphere. From the divergence theorem:
$$ \iint _{S}\left({\bf E}\boldsymbol{\cdot} {\bf n}\right)dS=\iiint _{R}\left( \nabla\boldsymbol{\cdot}{\bf E}\right)dV $$
$$ \nabla\boldsymbol{\cdot}{\bf E}=0 \therefore \iiint _{R}\left( \nabla\boldsymbol{\cdot}{\bf E}\right)dV=0 \therefore \iint _{S}\left({\bf E}\boldsymbol{\cdot} {\bf n}\right)dS=0 $$
However, I solved the surface integral and found the result $4\pi \epsilon Q$. Am I just making a mistake? I can't figure it out where the mistake is in my solving process.
Thanks in advance!
You didn’t make a mistake. The mistake is in the sloppy problem statement. It should say that you should prove that the divergence is $0$ except at the origin. The divergence of the electric field is proportional to the charge density, so for a point charge it’s a delta distribution at the origin. So there’s no contradiction between your two results: Away from the singularity at the origin, the divergence is $0$, but if you integrate the flux over a surface that encloses the origin you pick up the delta contribution from the singularity at the origin.