c
$\mathrm{B}_{\mathrm{m}}=\frac{\mu_{0} \mathrm{nI}}{2}\left[\cos \theta-\cos \left(180^{\circ}-\theta\right)\right]$
$=\frac{\mu_{0} \mathrm{nI}}{2}(\cos \theta+\cos \theta)$
$=\mu_{0}$$nIcos $$\theta,$ where $\cos \theta=\frac{\ell / 2}{\sqrt{\mathrm{r}^{2}+(\ell / 2)^{2}}}, \mathrm{n}=\frac{\mathrm{N}}{\ell}$
$=\mu_{0} \frac{\mathrm{N}}{\ell} \mathrm{I} \frac{(\ell / 2)}{\sqrt{\mathrm{r}^{2}+\ell^{2} / 4}}=\mu_{0}\left(\frac{\mathrm{N}}{\ell}\right) \mathrm{I} \frac{\ell}{\sqrt{4 \mathrm{r}^{2}+\ell^{2}}}$
$=\frac{\mu_{0} \mathrm{NI}}{\sqrt{4 \mathrm{r}^{2}+\ell^{2}}}$
