# Divergence of $\frac{1}{s}\hat{s}$ in cylindrical coordinates

In Griffiths' electrodynamics, the divergence of $$\frac{1}{r^{2}}\hat{r}$$ is evaluated in spherical coordinates to be $$4\pi\delta(r)$$. I encounter the same problem in case of $$\frac{1}{s}\hat{s}$$ where $$s$$ is the radius in cylindrical coordinates. I think that it is $$2\pi\delta(s)$$ but I am not sure.

If I put this in the expression for divergence in cylindrical coordinates I get zero to be the answer but it is only intuitive that there should be some divergence at the origin as in the case of $$\frac{1}{r^{2}}\hat{r}$$. If I compute the flux through a closed surface say a cylinder the flux through the top and bottom end is zero while flux through the lateral surface is $$2\pi h$$,where h is the height of cylinder .In this case it is dependent on the surface features(as opposed to the case of $$\frac{1}{r^{2}}\hat{r}$$).This violates the divergence theorem.What is the correct divergence of this vector field?

• When I put the vector field into the expression for divergence in polar coordinates I get 0 but if I take a cylindrical surface around it it gives me 2\pi but I am not sure about it Is this true? – ben tenyson Mar 18 at 13:58
• What is s can you define – Sourabh Mar 18 at 13:58
• @Aaron Stevens so only way that's true is if it is $2\pi\delta(s)$ Is this correct? – ben tenyson Mar 18 at 13:59
• @ Sourabh it is the radius in cylindrical coordinates – ben tenyson Mar 18 at 14:11
• @Aaron Stevens I have added more details to my question now – ben tenyson Mar 18 at 14:57

So $$1/s$$ does not have a divergence. It cannot have a divergence. Divergences are a property of vector fields, it is a scalar field.

I think you may have meant $$\vec F(s, \varphi, z) = \hat s / s = (x\hat x + y \hat y)/(x^2 + y^2)$$, which has the nice property that it has zero divergence if $$s\ne 0.$$ If so, then I think this is an an answerable question.

But first I also have to correct a misconception (you may not have it but many students do): the divergence of $$\hat r/r^2$$ is not $$4\pi \delta(r)$$. It is, rather, $$4\pi ~\delta_3\big(\vec r\big).$$ This is a 3D Dirac $$\delta$$-function which looks for whether a volume includes the origin point $$\vec 0$$ in it, so we can write this in Cartesian coordinates as $$\delta(x)~\delta(y)~\delta(z)$$. This is distinct from the 1D Dirac $$\delta$$ function applied to the spherical coordinate $$r$$, $$\delta(r).$$ For one reason why this matters, it matters because we have a mathematical ambiguity about what $$\int_0^X dx~\delta(x)$$ should be, should it be 0 or 1 or maybe $$1/2$$ in between? The starting point of the integral is not clear on whether it contains that point at $$x=0$$ completely or halfway or not at all. And this is important here because all of our radial integrals start at 0 so if you choose $$1/2$$ as a nice intermediary then you would find that because the angular integral gives you $$4\pi$$ of solid angle already, the divergence of $$\hat r / r^2$$ is actually something like $$2 \delta(r)$$ when understood in that way. But it's just not a great way to understand the problem.

Now this misconception becomes important for us, because you are about to encounter a 2D Dirac $$\delta$$-function in 3D space and then it becomes very hard to denote what even we're talking about. To be clear, we are talking about a scalar field that in Cartesian coordinates would be $$2\pi ~\delta(x)~\delta(y).$$ You have the right prefactor. But as for how you would clearly denote that you want a 2D $$\delta$$ function within the 3D space, I am not sure... Possibly you could write $$\nabla\cdot \vec F = 2\pi~\int_{-\infty}^{\infty} dz_0~\delta_3\big(\vec r - z_0~\hat z\big),$$ using superposition to give a clear sense of “here is exactly what I mean.” Because if you were to multiply that by some $$f(\vec r)$$ and then $$\iiint d^3 r$$ over some volume, that sort of expression should ultimately reduce it down to $$\int_a^b dz_0~f(0, 0, z_0)$$ as needed when all of the commutations are done. Or maybe we just invent the non-square matrix $$\mathbf P_z = \begin{bmatrix}1&0&0\\0&1&0\end{bmatrix}$$ and simply write $$\nabla\cdot\vec F = 2\pi~\delta_2\big(\mathbf P_z~\vec r \big)$$ for it, or so.

So if you are very careful about how you write $$\delta_2$$ then what you have said is correct, but if you are not very careful and you just write it as $$\delta$$ then people may misread you as talking about a 1D Dirac $$\delta$$ rather than a 2D Dirac $$\delta$$ and they would be very confused.

• An excellent explanation! – ben tenyson Mar 18 at 15:39
• Dirac delta functions really should be covered in more detail in physics classes other than "Oh yeah you can put it in an integral and it picks out some value of the integrand if you are integrating in the right place." – Aaron Stevens Mar 18 at 16:39
• Very interesting answer and for the question. – Sebastiano Mar 19 at 10:52