The potential energy of a magnetic dipole in a magnetic field is given by the equation:
$U = -\vec{m} \cdot \vec{B}$
where $\vec{m}$ is the magnetic moment of the coil and $\vec{B}$ is the magnetic field.
In this case, the magnetic moment of the coil is
Show more…