# Why is $\nabla \cdot \vec{E} \neq 4 \pi\ k$ times the charge density?

For a line charge with density $$\lambda$$, we wish to compute the divergence at a point on line charge. We start from definition of divergence:

$$\nabla \cdot \vec{E}=\dfrac{d \iint \vec{E} \cdot d\vec{S}}{dV} =4 \pi\ k\ \dfrac{q_{\text{ enclosed}}}{dV}=4 \pi\ k\ \dfrac{dq}{dV}$$

But this is not equal to $$4 \pi\ k\ \lambda = 4 \pi\ k\ \dfrac{dq}{dl}$$, i.e. this expression does not contain line charge density.

But my book says $$\nabla \cdot \vec{E}$$ at source points is always $$4 \pi\ k$$ times charge density.

• Total charge density will be - $\rho = \delta(y) \delta(z) \lambda$ .So $\rho = \frac{dq}{dV} = \delta(y) \delta(z) \frac{dq}{dl}$(or $dX$ more accurately). This is what you want,right? – Indigo1729 Nov 21 '18 at 9:05
• What is $\delta(y)$ and $\delta(z)$? What is $dX$? Can you explain in an answer? – N.G.Tyson Nov 21 '18 at 9:16
• You have asked several questions so far about Gauss's law for magnetism (though this one is about the ordinary Gauss's law) and all of them contain the same misconception. – knzhou Nov 21 '18 at 13:56
• Namely, Gauss's law for magnetism says there are no magnetic monopoles. But then you assert in all your other questions that a magnet is an object with magnetic monopoles at its two ends. (This is completely wrong.) Then you get confused when the two statements appear to contradict each other. – knzhou Nov 21 '18 at 13:57

Like Phillip Wood mentioned in his answer, a line charge would have infinite charge density along the line and zero outside it. However there is a way around this problem. What we can do is to introduce delta function (Dirac delta to be precise) $$\delta(x)$$ to solve this.

Basically a delta function,according to Physicists, is defined as $$\delta(x) = \begin{cases} \infty,& \text{if } x = 0\\ 0, & \text{otherwise} \end{cases}$$ Also , $$\int_{-\epsilon}^{+\epsilon}{\delta(x)\mathop{}\!\mathrm{d}x} = 1, \qquad \epsilon > 0$$

Using this we can define total charge density for line charge along $$z$$-axis as follows $$\rho(x,y,z) = \lambda \delta(x)\delta(y)$$ This is consistent with the observation that charge density is infinite along the line (i.e., $$x=y=0$$) and zero everywhere else.

To get line charge density along $$z$$-axis we integrate $$\rho$$ through all space at each $$z$$ $$\text{Line charge density} = \int_{x}\int_{y}\rho(x,y,z)\mathop{}\!\mathrm{d}x\mathop{}\!\mathrm{d}y=\int_{-\infty}^{+\infty}\int_{-\infty}^{+\infty}\lambda \delta(x)\delta(y) \mathop{}\!\mathrm{d}x\mathop{}\!\mathrm{d}y$$ Use the definition of delta function $$\text{Line charge density} = \lambda$$ This exactly what we expected.

Now you can try to integrate $$\rho$$ to get total charge (Ans: $$\int\rho \mathop{}\!\mathrm{d}x\mathop{}\!\mathrm{d}y\mathop{}\!\mathrm{d}z = l \lambda$$ where, $$l$$ is length of line element).

Thus the divergence can written as $$\nabla\cdot \mathbf{E} = 4\pi k \rho = 4\pi k \lambda \delta(x) \delta(y)$$ This what you wanted in the question.

To get the integral form $$\int \nabla\cdot\mathbf{E}\mathop{}\!\mathrm{d}V = \int 4\pi k \rho(x,y,z) \mathop{}\!\mathrm{d}x \mathop{}\!\mathrm{d}y \mathop{}\!\mathrm{d}z \\ \implies \oint \mathbf{E}\cdot\mathop{}\!\mathrm{d}\mathbf{S} = 4 \pi k \lambda l$$

Note:

The delta function is extremely useful. Imagine you have a point particle with charge $$q$$ at origin.
It will have charge density $$\rho(x,y,z) = q \delta(x)\delta(y)\delta(z)$$
Thus, Gauss' law will be $$\nabla\cdot\mathbf{E} = 4\pi k \rho = 4\pi k q \delta(x) \delta(y) \delta(y)$$ Integrating this (using property of delta function) gives

$$\oint \mathbf{E}\cdot\mathop{}\!\mathrm{d}\mathbf{S} = 4 \pi k q$$ Now let the surface be surface of sphere with radius $$R$$. Now, by spherical symmetry (the problem has no preferred direction: if you rotate a point charge it will still look the same) electric field will be function of distance from charge, $$r$$ only. Also because electric force is a central force, electric field will be along the radial direction (i.e., $$\mathbf{E} = |E(r)| \hat r$$).Thus

$$\oint \mathbf{E}\cdot\mathop{}\!\mathrm{d}\mathbf{S} = \oint |E(r)|\mathop{}\!\mathrm{d}A = |E| \oint_{sphere} \mathop{}\!\mathrm{d}A = 4\pi R^{2}|E| \\ \implies 4\pi R^{2}|E| = 4 \pi k q \\ \implies \mathbf{E} = \frac{k q}{R^{2}} \hat{r}$$

Just what you expected from a point charge!!

Even though there are simpler ways to see the obvious result above, it becomes extremely useful in complicated problems and is applied almost everywhere in Physics. Try exploring more about this!

• Thanks a million... Confusion cleared + got new information. By the way, can we say: $\lambda \delta(x) \delta(y)-\lambda \delta(x) \delta(y)=0$ at all points. At $x=y=0$, will not this become $\infty - \infty=$ undefined? Here it is said that dirac delta is a distribution and addition is defined on the set of all distributions. But how come addition/substraction be done with infinities? – N.G.Tyson Nov 21 '18 at 15:07
• Very interesting question! I believe it should be zero. Like I said above, I defined Dirac delta in a Physicists hand-waving way. Use another more mathematical definition of Dirac delta function(look up Wikipedia) - $\delta(x) = \frac{1}{2\Pi}\int_{-\infty}^{\infty}e^{ikx}dk$ and see for yourself that it turns out to be zero. I have to warn you though that this MAY be wrong. I am a physics undergrad and do not have the required Math background to answer confidently. – Indigo1729 Nov 21 '18 at 16:04
• Have you seen this question? If no, please tell what you think after reading that. – N.G.Tyson Nov 21 '18 at 16:06
• @fahee It isn't that you do addition or subtraction with infinities - you do so on distributions (also sometimes called "generalized functions"). It is a fully rigorous way to deal with the (apparent!) infinities in the Dirac delta, but it does involve a significant additional layer of complexity in the formalism. Among other things, it means that a bunch of equations (like $\nabla\cdot \mathbf E = \rho$) are generally only true "in the distributional sense", meaning that (cont.) – Emilio Pisanty Nov 21 '18 at 16:10
• (cont.) $\int \nabla\cdot\mathbf E(\mathbf r) \varphi(\mathbf r) \mathrm d\mathbf r = \int \rho(\mathbf r) \varphi(\mathbf r) \mathrm d\mathbf r$ for all functions $\varphi$ in some suitable set $\mathcal S$ (the "test function" space, generally a Schwartz space). If this is your first exposure to EM, I would strongly recommend that you file this in the Return Later column and focus on the physics for now. You can take this up again once you've got more analysis under your belt, but for now all you really need to know is that there does exist a rigorous backing for this formalism. – Emilio Pisanty Nov 21 '18 at 16:14

A line charge is a convenient fiction: the line (which has no thickness) is supposed to be charged uniformly all along its length. Because the line has no thickness, the charge density, $$\rho,$$ that is the $$\frac{dq}{dV}$$ that appears in the version of Gauss's law that you have quoted, is infinite all along the line. To side-step the difficulty we define $$\lambda,$$ the linear charge density, the charge per unit length of line. This will be finite.

This doesn't help you to apply Gauss's law to a point actually on the line. $$\rho$$ is infinite, so the divergence is infinite. But you can apply Gauss's law in the form you quoted to all points outside the line itself, because $$\rho$$ is zero at all these points.

More usefully, you can apply the integral from of Gauss's law to an imaginary cylindrical surface of radius r with the line of charges along its axis. This is because you know that for a cylinder of axial length $$l,$$ the charge contained is $$\lambda l.$$ Thus (with your notation for the constant) $$\iint \textbf{E}\cdot d \textbf {S} = 4\pi k \lambda l.$$ Because of the symmetry, $$\textbf{E}$$ is normal to the cylindrical surface and of the same magnitude all along and all round the surface, so the surface integral evaluates to $$4\pi r^2 lE$$.

• Thanks for clearing most of my confusion. My remaining confusion is as follows:You stated [This doesn't help you to apply Gauss's law to a point actually on the line. $\rho$ is infinite, so the divergence is infinite....] It seems that the same argument applies for a surface charge, $\rho$ will be infinite. Magnetic poles are located at end surfaces of the magnet. So the same argument also applies for magnetic poles. If Gauss divergence theorem can't be applied, then, from $\displaystyle\iint\vec{B}.\vec{dS}=0$, how can we conclude using Gauss divergence theorem that $\nabla \cdot \vec{B}=0$? – N.G.Tyson Nov 21 '18 at 12:54
• " It seems that the same argument applies for a surface charge, $\rho,$ will be infinite." But this time it doesn't have such dire consequences for the field strength as we approach the surface. Draw a gaussian box enclosing an area of the surface with surface charge density $\sigma$ per unit area, and you'll find that however close the sides of box parallel to the surface are brought to that surface, the field strength remains finite. – Philip Wood Nov 21 '18 at 14:11
• I strongly recommend the answer of Gautham A P, if you'd like a more sophisticated approach. In a nutshell, the $delta\ function$ allows you to continue working with charge density, $\rho,$ in the form of Gauss's law that you've been taught, and to apply it sensibly to point and line charges. The results that you get for the field strength are, of course, just the same using this approach, – Philip Wood Nov 21 '18 at 14:30