(N/A) Consider a current-carrying loop of radius $R$ as shown in the figure.
The center of the loop is $O$ and the loop lies in the $YZ$-plane with its axis along the $X$-axis.
We wish to calculate the magnetic field at point $P$ on this axis at a distance $x$ from the center $O$.
According to the Biot-Savart law,the magnetic field $d \overrightarrow{B}$ due to a current element $I \overrightarrow{dl}$ is given by:
$d \overrightarrow{B} = \frac{\mu_{0}}{4 \pi} \frac{I \overrightarrow{dl} \times \vec{r}}{r^{3}}$
The magnitude is $|d \overrightarrow{B}| = \frac{\mu_{0}}{4 \pi} \frac{I dl r \sin \theta'}{r^{3}}$,where $\theta'$ is the angle between $\overrightarrow{dl}$ and $\vec{r}$. Since $\overrightarrow{dl} \perp \vec{r}$,$\sin \theta' = 1$.
Thus,$|d \overrightarrow{B}| = \frac{\mu_{0} I dl}{4 \pi r^{2}}$.
From the geometry,$r^{2} = x^{2} + R^{2}$,so $|d \overrightarrow{B}| = \frac{\mu_{0} I dl}{4 \pi (x^{2} + R^{2})}$.
The vector $d \overrightarrow{B}$ is perpendicular to the plane containing $\overrightarrow{dl}$ and $\vec{r}$. It can be resolved into two components:
$1$. The axial component $d B_{x} = d B \cos \theta$,where $\cos \theta = \frac{R}{r} = \frac{R}{\sqrt{x^{2} + R^{2}}}$.
$2$. The perpendicular component $d B_{\perp} = d B \sin \theta$,which cancels out due to symmetry for the entire loop.
Integrating the axial component over the entire loop (total length $2 \pi R$):
$B = \int d B_{x} = \int d B \cos \theta = \frac{\mu_{0} I}{4 \pi (x^{2} + R^{2})} \cdot \frac{R}{\sqrt{x^{2} + R^{2}}} \int dl$
$B = \frac{\mu_{0} I R}{4 \pi (x^{2} + R^{2})^{3/2}} \cdot (2 \pi R) = \frac{\mu_{0} I R^{2}}{2 (x^{2} + R^{2})^{3/2}}$