There is this simple relation that is easy to prove in electrodynamics that is: $\nabla \cdot \mathbf{E} = \frac {\sigma}{\epsilon_0}$. But when I use the divergence on an electrical field in a problem I don't get this relation, I get $\frac {Q}{\epsilon_0}$, here's an example:
The eletrical field on a point outside an eletrical charged espherical shell (with radius R, and charge density $\sigma$) is, in espherical coordinates: $\mathbf{E} = \frac {R^2 \sigma} {\epsilon_0 r^2}$. So, if you take the divergence on both sides you get: $$\nabla \cdot \mathbf{E} = 4\pi \frac { R^2 \sigma}{\epsilon_0} = \frac {Q}{\epsilon_0}$$
Where did I get it wrong? I don't understand where my error is.