[Physics] Ampere’s law and Biot-Savart law gives different terms for magnetic field in middle of a current running in a loop

electrostaticshomework-and-exercisesmagnetic fields

enter image description here

I would like if someone could clarify this issue for me:
When dealing with a current $I$ running in a loop with radius $R$ and looking for the magnetic field in the middle of the loop.
By using Ampere's law, I know that the current $I$ runs through a loop with the same radius $R$, we get that:
$$\oint_c\vec{B} \cdot d\vec{l} = \mu_0 I_{enc} $$

$$B= \frac{\mu_0 I}{2\pi R}$$

and when using Biot–Savart we get that
$$d\vec{l} \cdot \vec{r} = |d\vec{l}||\vec{r}|\sin(\frac{\pi}{2})$$ obtaining:
$$B = \frac{\mu_0 I}{2R}$$

Which is not the same result as with Ampere's law.
I obviously miss something, maybe I can't use Ampere's law?
Anyway, if someone could help me out here I would really appreciate it.
Thanks.

Best Answer

The Biot Savart law is

$${\bf B} = \frac{\mu_0}{4\pi} \oint \frac{ I\, d{\bf l} \times {\bf r}}{|{\bf r}|^3}$$

In this case $d{\bf l} \times {\bf r} = dl\,|r|$ directed along the loop axis and integrating around the closed loop leads to a B-field magnitude $ B = \mu_0\, I/2R$ as you suggest.

However, I think there is a problem with your application of Ampere's law. This is that $$ \oint {\bf B} \cdot d{\bf l} = \mu_0 I\, ,$$ where I is the current enclosed by the closed loop around which you do the line integral on the LHS.

Usually, to apply Ampere's law, you choose a loop to integrate over that has either a constant B-field, and/or with a direction that is either parallel or perpendicular to $d{\bf l}$ (so that the scalar product and/or line integral are much simplified). What loop have you done your integral around? Is the B-field constant along this path? I don't think so...