Why is this vector field curl-free?

The curl in cylindrical coordinates is defined:

$$\nabla \times \vec{A}=\left({\frac {1}{\rho }}{\frac {\partial A_{z}}{\partial \varphi }}-{\frac {\partial A_{\varphi }}{\partial z}}\right){\hat {\boldsymbol {\rho }}}+\left({\frac {\partial A_{\rho }}{\partial z}}-{\frac {\partial A_{z}}{\partial \rho }}\right){\hat {\boldsymbol {\varphi }}}{}+{\frac {1}{\rho }}\left({\frac {\partial \left(\rho A_{\varphi }\right)}{\partial \rho }}-{\frac {\partial A_{\rho }}{\partial \varphi }}\right){\hat {\mathbf {z} }}$$

For vector fields of the form $\vec{A}=\frac{k }{\rho}\hat{\varphi}$ (plotted below), $A_z=A_\rho=0$ and $A_\varphi = k\rho^{-1}$, so the resulting field has zero curl. But choosing $k=\frac{\mu_o I}{2\pi}$ results in the correct solution for the magnetic field around a wire:

$$\vec{B}=\frac{\mu_o I}{2\pi R}\hat{\varphi}$$

This field cannot be curl-free because of Maxwell's equations, Ampere's law, etc. So I must have made a mistake somewhere: Why am I calculating this field to be curl-free? The vector $\hat \varphi$ is not defined at the origin, because the coordinate transformation $$(x,y) \mapsto (r,\varphi) = \left(\sqrt{x^2 + y^2}, \arctan(y/x)\right)$$ is singular there. Hence your field $\mathbf B$ is singular at the origin.

The theorem that $$\nabla \times \mathbf B = 0 \Rightarrow \oint_C \mathbf B \cdot d\mathbf r = 0$$ requires that the curve $C$ in the line integral be contractible to a point without passing through any singularities. This is not the case for the plane with the origin excluded when the curve winds around the origin.

The singularity of course arises because you have an infinitely thin wire. Try finding the magnetic field for a wire of thickness $R_1$ with uniform current density and taking the limit of $R_1 \to 0$ while the total current remains constant. The curl will be zero outside the wire, but diverge inside the wire, as Maxwell's equations dictate.

• I'm guessing this same reasoning can explain why $\frac{k}{r^2}\hat{r}$ (spherical coords) is divergence-free outside the origin but appears as the solution to Gauss' law with $Q_{enc}\neq 0$? – forky40 Jan 4 '17 at 19:27

There already are very good answers so I would just like to give some physical intuition why this vector field is curl-free even though it has non zero circulation.

We can make an analogy of the curl with an infinitesimally small paddle wheel in a fluid flow. We think of the vector field as a flow of the fluid and the paddle wheel plays the role of the curl. The direction of the curl is given by the axis of the paddle wheel and by the right hand rule. The magnitude of the curl is associated to the angular velocity of the paddle wheel.

If we put the paddle wheel in a fluid flowing accordingly to the given vector field, the fluid will push the paddles as in the figure below The vector field is strong at the bottom paddle (closer to the center) and weaker at the top one. The net result on this two paddles would be to rotate clockwise. However the fluid also pushes the left paddle downwards and the right paddle upwards. This counter clockwise rotation exactly cancels the clockwise one from the top and bottom paddle and the net result is that the paddle wheel does not rotate. This vector field is curl-free although it clearly has a non zero circulation.

That formula is valid outside the wire, where $J=0$. Maxwell 's equation says that $\nabla \times B = 0$ there.

However there is no scalar field whose gradient is $B$ around the wire. This is the typical case where you have an irrotational field which does not admit a (global) potential. Otherwise the integral of $B$ around the wire would be zero and this is not permitted by one of Maxwell's laws in integral form.

Inside the wire if $J$ is uniform, $I$ includes only the portion of current sourrouded by the considered line of $B$, so it depends on $r$, i.e., $I=I(r)$ and the formula changes producing $\nabla \times B \neq 0$.

1. OP's magnetic field $$\vec{B}~=~\frac{k }{\rho}\hat{\boldsymbol \varphi}, \qquad \rho~\neq~ 0,\tag{1}$$ in cylindrical coordinates $(\rho,\varphi,z)$ obeys (in a distributional sense) Ampere's circuital law (ACL): $$\mu_0 \vec{J}~\stackrel{(ACL)}{=}~ \vec{\nabla}\times \vec{B}~\stackrel{(1)}{=}~2\pi k ~\delta^2(x,y)\hat{\bf z},\tag{2}$$ with the current density given by a 2D Dirac delta distribution. The integral form of eq. (2) leads to $$\mu_0 I~\stackrel{(2)}{=}~2\pi k.\tag{3}$$

2. One quick way to check the second equality in eq. (2) is to regularize the magnetic field $$\vec{B}_{\varepsilon} ~=~\frac{k\rho }{\rho^2+\varepsilon }\hat{\boldsymbol \varphi},\tag{1'}$$ $$\mu_0 \vec{J}_{\varepsilon}~\stackrel{(ACL)}{=}~ \vec{\nabla}\times \vec{B}_{\varepsilon}~\stackrel{(1')}{=}~\frac{2k\varepsilon }{(\rho^2+\varepsilon)^2}\hat{\bf z},\tag{2'}$$ $$\mu_0 I_{\varepsilon}~\stackrel{(2')}{=}~\int_0^{\infty} 2\pi \rho~\mathrm{d}\rho ~\frac{2k\varepsilon }{(\rho^2+\varepsilon)^2} ~=~2\pi k,\tag{3'}$$ with a regulator $\varepsilon>0$, and take the limit $\varepsilon\to 0^+$. A rigorous distributional proof uses test functions similar to e.g. my Phys.SE answer here.