# Magnetic Dipole

Gold Member
So I got a question on a E&M Midterm:

There is a line current of I at the origin going in the Z direction. There is a magnetic dipole of:
$$\vec{m}=m_r\hat{r}+m_\varphi\hat{\varphi}$$ located at $$(r,\varphi)$$. What is the force and torque on this magnetic dipole?

So I used the equations:
$$\vec{F}=-\nabla U=-\nabla(\vec{m}\cdot\vec{B})$$
$$\vec{\tau}=\vec{m}\times\vec{B}$$

I know from Ampere's law that the field is:
$$\vec{B}=\frac{\mu_0 I}{2\pi r}\hat{\varphi}$$

So, I reason that the angle between the field and the dipole is:
$$\theta=\frac{\pi}{2}-tan^{-1}(\frac{m_\varphi}{m_r})$$
Since the field is only in the $$\varphi$$ direction, I just drew a triangle.
Therefore, I got that:
$$\vec{F}=-\nabla(\vec{m}\cdot\vec{B})=-\nabla(mBcos(\theta))=-\nabla(\frac{\mu_0 I}{2\pi r}\sqrt{m_\varphi^2+m_r^2}sin(tan^{-1}(\frac{m_\varphi}{m_r}))=\frac{\mu_0 I}{2\pi r^2}\sqrt{m_\varphi^2+m_r^2}sin(tan^{-1}(\frac{m_\varphi}{m_r}))\hat{r}$$
$$\vec{\tau}=\vec{m}\times\vec{B}=mBsin(\theta)\hat{z}=\frac{\mu_0 I}{2\pi r}\sqrt{m_\varphi^2+m_r^2}cos(tan^{-1}(\frac{m_\varphi}{m_r}))\hat{z}$$

Unfortunately these are all wrong, as far as I can tell from looking at my Professor's solutions. What did I do wrong? =(

$$F_\varphi=-m_r\frac{B_\varphi}{r}$$
$$\tau_z=-rF_\varphi$$