# Misunderstanding of the magnetic field

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.