Apparant contradiction in magnetic vector potential of current loop

I'm studying electromagnetism and I came upon an apparant contradiction in the calculation of the magnetic field above the center of a current loop.

The setup is given in the image, I want to calculate the magnetic field in a point above the center of the loop, at height $$z$$. When this is done with Biot-Savart, you get a non zero value for $$B(z)\hat{z}$$

I want to calculate it by first calculating the vector potential $$A$$ and then taking the curl of it. However when it is done in this way:

$$A = \frac{\mu_0 I}{4 \pi} \oint \frac{d\vec{r}}{|\vec{r}-\vec{r}'|}$$

But this distance in the denominator is a constant, in the case of the loop with constant radius $$R$$. And thus the whole integral evaluates to $$0$$, so the resulting vector potential $$A$$ is also zero, and we get no magnetic field $$B$$.

How is this possible?

• don't you want to integrate over $d{\bf r'}$, which is where the current is. You may also want to write ${\bf A}({\bf r})$ to clear it up.
– JEB
Apr 6, 2023 at 23:15

The $$\vec {dr}$$ should be $$\vec{dr'}$$. Then the curl acts only on the $$\vec r$$ in the denominator.