## Magnetic dipole moment energy question

Hello, I have this problem. I calculated the dipole energy of a dipole moment in an external field using the equation $U_m=\frac{1}{2}\int\vec{A}\vec{J}dr^3=\frac{1}{2} \vec{\mu}.\vec{B}$ however when the force on a dipole is calculated using $\int\vec{J}\times\vec{B}dr^3$ the formula obteined for the energy is $-\vec{\mu}.\vec{B}$
I don't understand the difference, are they supposed to be defferent?
 Recognitions: Homework Help Science Advisor The 1/2 in your first equation arises because the integral is over all current distributions. The 1/2 takes care of double counting that takes place in that case. The B field in the second equation is due to only external currents (not part of mu), so the 1/2 does not arise. The + sign in the first equation is due to the fact that the current is kept constant by an EMF source that provides energy to keep the current constant. Then, the force is given by +grad U. In the second equation, no energy is supplied, so F= -grad U. Each case thus gives the same force. You can look at
 Thanks, I will take a look