We know that any field can be constructed using its divergence and rotational. The divergence of the magnetic field is always zero. However its rotational is proportional to the current density. According to Ampere law, locally, outside of the current filament, the rotational of the magnetic field is zero, but its divergence is always zero. So that would mean that, outside, the magnetic field is zero. But of course it is not, since we know that magnetic field lines are circles surrounding the filament. What is wrong with this analysis?
4 Answers
You can reconstruct a vector field $\mathbf F$ from its divergence $\nabla \cdot \mathbf F$ and curl $\nabla \times\mathbf F$ and boundary conditions. More precisely, if $R$ is some bounded region on which $\mathbf F$ is twice continuously differentiable, then
$$\mathbf F = \nabla \Phi + \nabla \times \mathbf G$$
where $$\Phi(\mathbf r) = \frac{1}{4\pi} \int_R \frac{\nabla' \cdot \mathbf F(\mathbf r')}{|\mathbf r - \mathbf r'|}d^3 r' -\frac{1}{4\pi}\oint_{\partial R} \frac{\hat n' \cdot \mathbf F(\mathbf r')}{|\mathbf r - \mathbf r'|}dS$$ and $$\mathbf G(\mathbf r) = \frac{1}{4\pi}\int_R \frac{\nabla'\times\mathbf F(\mathbf r')}{|\mathbf r - \mathbf r'|}d^3 r' - \frac{1}{4\pi}\oint_{\partial R} \frac{\hat n' \times \mathbf F(\mathbf r')}{|\mathbf r - \mathbf r'|}dS$$
where $\partial R$ is the boundary of $R$, and $\hat n$ is the normal vector to the surface at the point $\mathbf r'$. If the fields fall off faster that $1/|\mathbf r-\mathbf r'|$, then this can be extended to an unbounded region.
In the static case, Ampere's Law says that $$\nabla \times \mathbf B = \mu_0 \mathbf J$$
but this is not continuous at the boundary of the wire. As a result, the Helmholtz theorem applies separately to the interior region within the wire and the region outside it. Reconstructing the magnetic field outside the wire requires you to know the value of the magnetic field at the surface of the wire.
To recover ${\bf B}$ from $\nabla\times {\bf B}$ and $\nabla\cdot {\bf B}=0$ you need to know $\nabla\times {\bf B}$ everywhere, not just at the point where you want to know ${\bf B}$
The statement that "We know that any field can be constructed using its divergence and rotational." is wrong (I assume that you mean "curl" when you say "rotational"). An easy counterexample are the following two fields
\begin{alignat}{3} \mathbf E_1 &= 2\mathbf {\hat i}\quad &&;\quad&&&\mathbf E_2=3\mathbf{\hat j}\\ \nabla \cdot \mathbf E_1&=0 \quad &&;\quad\nabla \cdot &&&\mathbf E_2 =0\\ \nabla \times \mathbf E_1&=0\quad &&;\quad \nabla \times &&&\mathbf E_2 =0 \end{alignat}
As you can see that the curl and divergence of both $\mathbf E_1$ and $\mathbf E_2$ are the same, yet $\mathbf E_1 \not\equiv\mathbf E_2$. So, there isn't any way of determining a vector field just from its curl and divergence.
There are two main points of confusion in your reasoning:
Any field can be decomposed as a sum of two fields: one with zero divergence and one with zero rotor.
You say "any field can be constructed using its divergence and rotational" which is kind of obscure to me.If a field has zero divergence and zero rotor, it can still be finite! It does not have to be zero, if its divergence and rotor are zero.
So to sum up, the magnetic field outside of the wire has zero divergence (as everywhere) and zero rotor, but it is finite.
-
1$\begingroup$ I think out of the existing answers, this one best addresses the confusion in the question. It seems to me that when the op writes "divergence" and "rotational" in the first sentence, he refers to the fact pointed out here - that a sufficiently nice field can be written as a sum of two fields, one with zero divergence and one with zero curl. But in the second instance when he uses "rotational", he means the curl of the field that we are decomposing. This second "rotational" is not equal to either of the two fields in the decomposition. +1 $\endgroup$– aekmrCommented Jun 8, 2020 at 10:01