I am working through Griffiths, Introduction to Electrodynamics, and finding the divergence of the electric field generated by a single charge sitting at the origin.
$$\mathbf{E}(\mathbf{r}) = \frac{\hat{\bf r}}{|\mathbf{r}|^2}$$
I compute $\nabla \cdot \mathbf{E}$ and get 0. This seems very surprising -- I wouldn't have expected it, but the factors cancel out just so.
Sometimes, the book uses two-dimensional drawings, so I assumed that everything would be mostly the same in two dimensions. But to my surprise, it's not -- if I use only two dimensions and compute $\nabla \cdot \mathbf{E}$, I don't get zero.
$$\nabla \cdot \mathbf{E} = \frac{\partial}{\partial x}\left(\frac{x}{(x^2 + y^2)^{3/2}}\right) + \frac{\partial}{\partial y}\left(\frac{y}{(x^2 + y^2)^{3/2}}\right) \ne 0$$
Why is this? It seems like such a coincidence that we live in three dimensions, and three dimensions is also where this divergence works out to be zero.
Possible explanations:
- I know vaguely that the inverse square law is related to three dimensions; if I had to summarize my understanding it would be roughly "if you want conservation of energy to work out in three dimensions, you need the force to go as the inverse of the square rather than e.g. as the inverse or the inverse of the cube". Is this related?