# Differential form of Gauss's law from Coulomb's law in spherical coordinates [duplicate]

Coulomb's law for the static electric field of a point charge is given by

$$\overrightarrow{E}=\frac{1}{4\pi\epsilon_0}\frac{q}{r^2}\hat{r}$$

Now if we take the divergence of both sides of the above equation we will get

$$\overrightarrow{\nabla}\cdot \overrightarrow{E}=\frac{q}{4\pi\epsilon_0}\left\{\frac{1}{r^2}\frac{\partial}{\partial r}\left(r^2\frac{1}{r^2}\right)\right\}$$ $$\Rightarrow \overrightarrow{\nabla}\cdot \overrightarrow{E}=0$$

But according to the differential form of Gauss's law $$\overrightarrow{\nabla}\cdot \overrightarrow{E}$$ should be equals to $$\frac{\rho}{\epsilon_0}$$; where $$\rho$$ is volume charge density.

In this condition I can not understand where I have made mistakes or where I am logically wrong. So can any one please help me to get rid from this conceptual dilemma?

What you did is correct everywhere except at $$r=0$$. The charge density is zero everywhere except there (where it is infinite). The expression $$r^2/r^2$$ is indeterminate at $$r=0$$, so you can’t use that method of calculating the divergence there.