# Stock's theorem and calculation of current density

1. Jun 3, 2013

Hi,

I'm trying to use stock's theorem with the following magnetic field -
$B=1/r\hat{\theta}$ on Cylindrical coordinate.

From one side I get -
$\nabla X B=0 = \mu \int\int J \cdot dA$, means that the current density is zero.

From the other side I get -
$\oint B \cdot dl = 2 \pi r \cdot 1/r = \mu I$
and hence
$I = 2 \pi / \mu$

So... How the current density could be zero?

Thanks,

2. Jun 3, 2013

### WannabeNewton

Hi adamp. Let me first show you a "simpler" example from electrostatics and hopefully from this example you can see what goes wrong in your calculation. Consider the Coulomb field of a point charge $E = \frac{q}{4\pi \epsilon_0} \frac{\hat{\mathbf r}}{r^{2}}$. If we naively calculate its divergence, we find that $\nabla\cdot E = 0$ hence by the divergence theorem $\int _{\Sigma}(\nabla\cdot E )dV = \int _{\partial \Sigma}E\cdot dA = 0$. But if we calculate the surface integral from the start we find that $\int _{\partial \Sigma}E\cdot dA = \frac{q}{\epsilon_0}$ so what's the deal?

The problem is that our system consists of a localized point source. Recall that $\nabla\cdot E = \frac{\rho}{\epsilon_0}$ so the divergence will vanish everywhere except at the localized point source because this is the only point in space where there is a charge. As such, when we calculated the divergence of the Coulomb field, we naively ignored what happens at $r = 0$ which is where the charge density "spikes up".

What we really have to do is represent the charge density in terms of a Dirac delta distribution i.e. $\rho = q \delta^{3} (\mathbf r)$. Consequently, $\nabla\cdot \frac{\hat{\mathbf r}}{r^{2}} = 4\pi \delta^{3}(\mathbf r)$ i.e. this will respect the statement of the divergence theorem: $\int _{\Sigma}(\nabla\cdot E)dV = \frac{q}{ \epsilon_0}\int _{\Sigma}\delta^{3}(\mathbf r) = \frac{q}{\epsilon_0} = \int _{\partial \Sigma}E\cdot dA$.

Can you now extrapolate from this and see what goes wrong in your calculation?

3. Jun 3, 2013

Hi,

Thank you very much for your response.

I still don't understand why when we are calculate $\nabla\cdot E$ we "naively" ignored what happens at $r=0$.
Is it comes up from the divergence definition?

4. Jun 3, 2013

### WannabeNewton

$\nabla\cdot E = \frac{q}{4\pi \epsilon_0}\frac{1}{r^{2}}\partial_{r}(r^{2}\frac{1}{r^{2}})$ we have a problem at $r = 0$ as you can see :)

5. Jun 3, 2013

So, can we say that it impossible to use the divergence for fields which are not defined at $r=0$ and we need to use stokes' theorem for getting the right answer using Path integral?

6. Jun 3, 2013

### WannabeNewton

No we can still use the divergence theorem as long as we include the dirac delta distribution, as I have done in post #2. The problem of things "spiking up" at $r = 0$ comes from us having a vanishing charge density everywhere in space except at a single point. The dirac delta distribution takes care of that.

In your case we have a vanishing current density at all points in space except for the infinitely thin current carrying wire along $r = 0$ (now in cylindrical coordinates); we again have a sudden "spiking up" problem. The situation is analogous to what I talked about in post #2.

7. Jun 3, 2013