# Is there a magnetic field that satisfies $\nabla \times B = 0$?

In electrostatics Maxwell's equations for the magnetic field are

$\nabla \cdot B = 0$ and $\nabla \times B = \mu_0 J$

Now, take $B = xi-yj$, where $i$ and $j$ are the usual unit vectors, then one can show that

$\nabla \times B = 0$

which consequently means that $J=0$.

But in Maxwell's equations, isn't that $J$ supposed to be the source of the magnetic field B?

Then how come $J$, the source of the magnetic field, is zero yet $B$ is not zero? What am I missing?

-

Maxwell's equation are local. That is the curl of $B$ at some point depends on the current at that point.

But "the current is the source of the magnetic field" is not local in that a current at $\vec{r}_1$ can create a magnetic field at $\vec{r}_2 \ne \vec{r}_1$.

So there is no conflict because the magnetic field can be caused by a current somewhere else, but restricted to rotation-free due to the lack of a local current.

-
I want to get this right, please correct me if I am wrong. So rotation of a magnetic field is due to a local current, but that magnetic field of which we are calculating its rotation could be due to other currents. If what I wrote is write that would mean that the J in maxwell's equation is not the source of that magnetic field in the same equation, right? But now there is an equivalent equation to $\nabla \times B=\mu_0 J$, namely its integral form, Ampere's law. In Ampere's law the enclosed current in the equation is necessarily the source of the magnetic field under the closed intergral!! –  Revo Dec 19 '11 at 20:35
So how come 2 equivalent equations, one in the integral form and the other is its differential form, in one equation J is not the source of B, while in the other I is the source of B? –  Revo Dec 19 '11 at 20:37
Think a bit about the nature of the divergence and the curl. They are evaluated locally (i.e. $\nabla \times B(\vec{r}) = \mu_o J(\vec{r})$, but they impose constraints on the field even in places where the RHS vanishes. Take a single, isolated point charge and the divergence equation for the electric field sets the field in all space up to a gauge. Local equations, but because they apply at all points, global effects. –  dmckee Dec 19 '11 at 21:03
Note that your magnetic field is unphysical. It goes to infinity as $x\to \infty$, for example.
If you say, for example, that there is a sphere of radius $R$ and that $B = 0$ on that sphere and $E = 0$ on it, and also that $J = 0$ in the sphere, then you will have $B = 0$ as the unique solution for the magnetic field in the sphere.