a
If we cu a thin pipe along its length then we get a conductor as given in quation.
consider a piece of small length $d\ell$ then current through this part is
$\mathrm{i}=\frac{\mathrm{I}}{\pi \mathrm{R}} \mathrm{d} \ell=\frac{\mathrm{I}}{\pi \mathrm{R}} \cdot \mathrm{R} \mathrm{d} \theta=\frac{\mathrm{I}}{\pi} \mathrm{d} \theta$
and magnetic field at $O$ due to this part of width
$\mathrm{d} \ell$ is $\mathrm{dB}=\frac{\mu_{0} \mathrm{i}}{2 \pi \mathrm{R}}=\frac{\mu_{0}}{2 \pi \mathrm{R}} \cdot \frac{\mathrm{I}}{\pi} \mathrm{d} \theta=\frac{\mu_{0} \mathrm{I}}{2 \pi^{2} \mathrm{R}} \mathrm{d} \theta$
similarly take element $d\ell$ on opposite side
so magnetic field at $O$ due to these two elements $=2 \mathrm{dB} \cos \theta$
$\therefore \mathrm{B}=2 \int_{0}^{\pi / 2} \mathrm{dB} \cos \theta=2 \int_{0}^{\pi / 2} \frac{\mu_{0} \mathrm{I}}{2 \pi^{2} \mathrm{R}} \cos \theta \mathrm{d} \theta$
$=\frac{\mu_{0} I}{\pi^{2} R}(\sin \theta)_{0}^{\pi / 2} \Rightarrow B=\frac{\mu_{0} I}{\pi^{2} R}$
