In cylidrical coordinates,the magnetic field around an infinite (thin) current-carrying wire is $\vec{B} =\frac{\mu_0I}{2 \pi r} \hat{\phi}$

Naiively computing the curl of this using Curl$\vec{B}$ = $\begin{vmatrix} \frac{1}{\rho}\hat{\rho} & \hat{\phi} & \frac{1}{\rho}\hat{z} \\ \frac{\partial}{\partial\rho} & \frac{\partial}{\partial \phi} & \frac{\partial}{\partial z} \\ B_\rho & \rho B_\phi & B_z \end{vmatrix}$ gives zero (taking $r = \rho$).

Plugging this into Stokes' theorem gives a contradiction: $$\int \nabla \times \vec{B} \cdot dS = \oint \vec{B} \cdot dl \neq 0$$

My question is: what's gone wrong and why? I'm not sure if my calculation of the curl was invalid (maybe it's supposed to give a delta function) or whether Stokes' theorem is inapplicable here.

Specifically, I'd like some advice on what areas of maths to read up on to fully understand this.

I'm actually a physics student and issues like this come up all the time (eg Aharanov Bohm effect). I'm hoping a good answer to this question will help other physics students know what maths they need to read up on to understand this.


I'm particularly interested in knowing the consistent correct maths to describe this situation.

Further Edit:

I think my question is really "is there an extension to Stokes' theorem when the function has poles?" and as a vaguely related question "how does Stokes' theorem generalise to spaces with points removed?". I'd love some direction on what area of maths this comes under.

Having reviewed some complex analysis, it looks like the whole theory should have a real analogue on 2D surfaces.


2 Answers 2


Stokes' theorem does not apply to a curve that encircles the infinite wire.
The issue is that the surface $S$ over which the surface integral on the LHS of your equation $$\int \nabla \times \vec{B} \cdot dS = \oint \vec{B} \cdot dl$$ is taken, necessarily contains a point of the wire, and $\vec{B}$ is singular at every point along the wire (where $r=0$ by definition).
So the hypotheses of Stokes' theorem ($\vec{B}$ is defined and has continuous first partials all along the surface $S$) are not satisfied.

  • 1
    $\begingroup$ Yeah ok, I figured this was probably where things are going wrong (because taking any closed loop not encircling the wire should give zero). What is the "correct" maths to be using here then? That's actually the half of the question I really care about - the consistent theory to describe what's happening. $\endgroup$ Dec 10, 2023 at 15:28
  • $\begingroup$ Eg is there a way of quantifying how poorly behaved $\vec{B}$ is at the origin and adding an extra piece to Stokes' theorem to account for the "hole"? $\endgroup$ Dec 10, 2023 at 18:41
  • 1
    $\begingroup$ @HarveyWilliams well, the physicists will say that the curl of $B$ is not zero, it's a delta function, and that makes the integral on the left nonzero. That's probably the patch you're looking for. But a mathematician will just say that Stokes' theorem doesn't apply. $\endgroup$ Dec 11, 2023 at 2:56

This is not wrong, but the kernel of field theories. There exists (distributional singular) fields with $\text{div} f=0$ and $\text{curl} v =0 $ that nevertheless have constant surface integrals

$$\int_{S^2} r^{-2} * r^2 d \Omega =4 \pi$$ $$\int_{S^1} r^{-1} * r d\phi = 2\pi$$

By linearity, the superposition of such fields by an integral with a smooth density of charges currents yields the solution of the Maxwell equations for such a static setting.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .