
$\Rightarrow \tau_{g r}=m g \sin \theta$
The magnetic moment of the coil $=\mu=\left(i \pi r^{2}\right)$
$\Rightarrow \tau_{m}=\pi r^{2} B \sin \theta$
$\pi i r^{2} B \sin \theta=m g r^{\prime} \sin \theta \Rightarrow B=m g / \pi i r$
Reason : Magnetic field energy density is proportional to square of current.