I study engineering so I don't know calculus with sufficient rigor to know if a derivative exists or not.
If one wants to take the divergence of the field $\vec{E}=\frac{\hat{r}}{r^2}$ the typical answer is that it is zero everywhere except at the origin, where it explodes. But how is this apparent when calculating the following expression:
$\nabla \cdot \vec{E} = \frac{1}{r^2} \frac{\partial}{\partial r}(\frac{r^2}{r^2})$
Is it because of a division by zero in the coordinate $r=0$?
Why then doesn't my textbook and professor make a big deal out of the divergence of $\vec{E}=\frac{\hat{r}}{r}$ if to calculate it you stumble upon $\nabla \cdot \vec{E} = \frac{1}{r^2} \frac{\partial}{\partial r} (\frac{r^2}{r})$?
Is it because the numerator converges more rapidly such that it can be differentiated and thus you can say that you avoid division by zero? If thats the case then why cant the limit of the former expression be 1? Or is this divergence also undefined and I haven't been told about it?
How can I determine when division by zero renders a nonexistent derivative?
Thanks.
At $0$, $\vec{E}$ is not defined for either case so it does not make sense to consider the divergence at this point. However in the former case, the divergence of the electric field is zero everywhere except $0$ as you note. In the latter case, the divergence of the electric field behaves like $r^{-2}$. Not only is it not defined at zero, but it in fact diverges as you approach zero.
Gauss' theorem for electric fields says that $\nabla \cdot \vec{E} = \frac{\rho}{\varepsilon_0}$, where $\rho$ is the electric density. For a point mass, it has no density away from its location, so we expect that the right hand side should be zero everywhere it is defined. This justifies our above calculation. However a point mass intuitively has "infinite" density at its location because there is a finite amount of charge localized within zero volume (making the ratio of charge to volume (i.e. charge density) infinite). Appealing to Gauss' law, this says that the divergence is somehow infinite at the origin. This is the justification for saying that the divergence explodes at the origin.
In the latter case, however, there would be a true density if we somehow measured an electric field of the form $\frac{\hat{r}}{r}$ since the divergence is nonzero everywhere. (Again: appeal to Gauss' law.) This does not resemble a point mass and so it's not an often-considered case outside of comparisons which is why your text does not make a big deal out of it.