# Homework Help: Deriving the energy of a magnetic dipole in a magnetic field

1. May 30, 2005

### trickae

For an undergraduate electrodynamics homework problem we were asked to derive the following:

(griffiths 6.21)

show that the energy of a magnetic dipole in a magnetic field B is given by -

U = -m.B

where
B is the magnetic field
and
m is the dipole moment.

I went about this by saying that the dipole will experiance a torque when its in the magnetic field that will effectivly move it through an angular displacement such that it points in the same direction as the magnetic field (the effective angle between them is 0 as they are now parallel to eachother)

so we get the following

N(torque) = m.B = m.B.sin(theta)

U = (intergral){B.m.sin(theta) d(theta)}
= -B.m.cos(theta) + C

or we can assume that its a definite integral from the bounds theta to pi/2
if we were to substitute pi/2 into the above solution we'd get

(bounds for the integral 0 to pi/2)

= -B.m.cos (0) + B.m.cos(pi/2)
= -B.m

However this would not be the electroynamics approach as i didn't use an of maxwell's equations, so how would i use the other approach?

2. May 30, 2005

### dextercioby

It is the correct way to do it.That potential energy comes from a force which creates a torque.

For the electromagnetic way to do it,use the dipolar approximation for the magnetic potential vector.

Daniel.

EDIT:Please,do not double post,okay ? If it's a HW question,ask it here.If not,use the other forums.

Last edited: May 30, 2005
3. May 30, 2005

### trickae

sorry for the double post i just needed a quick answer

but i'm stil unsure about using the dipole approximation for the magnetic potential vector, and also where to start from.

I beleive the method is similar to finding electric potential only we need a term to represent the magnetic field

I picked up jackson for a shortcut to the solution but got more confused. They brought in taylor exapansions to relate force and torque. Then by methods of tensor calculas (which is beyond me i'm only in second year) they got to the equation

F = (m X del) X B = grad(m.B) - m(del . B)

since del . B = 0
the lowest order force on a localized current distribution in an Ext B is
F = del(m.b)

and then jackson stated that
"The potential energy of a permanent magnetic moment (or dipole) in an external magnetic field can be obtained from either the force or the torque. If we interpret the force as the negative gradient of a petential energy U, we find

U = -m.B "

for a magnetic moment in a uniform field the torque canbe interpreted as the negative derivative of U with respect to the angle between B and m." (jackson, second edition p 18)

I think i might need to read up on faraday's law and see if i can get anywhere with this.

4. May 30, 2005

### dextercioby

Yes,that's what i had in mind.Dipolar expression of the magnetic potential and inserting it in the expression of the interaction lagrangian.

Daniel.

5. May 30, 2005

### trickae

i'm sorry you lost me with the lagrangian
- could you suggest some topics i should read up on to get the derivation
and are there any griffiths solutions sites or online ebooks that come with derivations. Griffiths is getting annoying where whenever theres a derivation theres a side note saying "The derivations are left as exercises - enjoy!"

After classes today i'll be borrowing feymans lecture notes to see if It can help with the elctrodynamic derivation.

thanks so far

6. May 30, 2005

### dextercioby

Did you follow a derivation with the electric part...?It should go the same.However,this time,u better know some simple tensor calculus.

Daniel.

7. May 31, 2005

### trickae

I got the solution but i was wondering what reason i should use to cancel out the Integration constant i used above. Feynman stated that theres additional energy that is used up when a loop of wire moves in a magnetic field and jackson sated that it is whats required to keep the current constant which in turn keeps the magentic dipole constant (??? p186) and both books have consequently stated that the integration constant can be assumed to be zero. But why?

Also since i did get the electrodynamic solution using tau = m X B should i still post it up just in case other people face the problem in the future?

And I'd like to add - Feynmans lectures on physics is by far the most comprehensible and readable book for electrodynamics i've come accross - it has no gaps which griffiths and jackson most comfortably and extensivly use to 'get their point accross'.
Is purcell worth picking up for the remainder of this course?

thanks alot dextercioby

8. May 31, 2005

### dextercioby

Yes,Berkeley's course is in the same explanatory style as Feynman.Basic stuff,if you compare it with Jackson,which,no doubt,is a graduate course.

Daniel.

9. Jun 2, 2005

### dextercioby

Here's my solution to the problem.

'Assuming a system of pointlike particles interact with the EM-field described by $\varphi,\vec{A}$,the Lagrangian of interaction in the noncovariant formalism is given by

$$\mathcal{L}_{int}^{\mbox{particles-field}}=\sum_{a}q_{a}\vec{v}_{a}\cdot\vec{A}\left(\vec{r}_{a}\right)$$ (1)

,where the electric interaction part has been neglected due to irrelevance to this specific problem.

The interaction potential energy is equal to the interaction Hamiltonian and equal to "-" times the interaction lagrangian

$$U_{int}^{\mbox{particles-field}}=-\sum_{a} q_{a}\vec{v}_{a}\cdot\vec{A}\left(\vec{r}_{a}\right)$$ (2)

Let's assume a Taylor expansion of the vector magnetic potential,allowing at most the linear term in the potential (the so-called dipolar approximation).

$$\vec{A}\left(\vec{r}_{a}\right)\simeq\vec{A}\left(\vec{0}\right)+\left(\vec{r}_{a}\cdot\nabla^{a}\right)\vec{A}\left(\vec{r}_{a}\right)\left|_{\vec{r}_{a}=\vec{0}}\right$$ (3)

Assuming a gauge in which the constant term to the magnetic potential is 0 (i.e.neglecting the polar approximation),one gets the interaction potential energy in the dipolar approximation:

$$U_{int}^{\mbox{particles-field,dipolar}}=-\sum_{a} q_{a}\vec{v}_{a}\cdot\left(\vec{r}_{a}\cdot\nabla^{a}\right)\vec{A}\left(\vec{r}_{a}\right)$$ (4)

,where i dropped the "taken at the origin",because it's understood by "dipolar".

The dipolar magnetic moment of a system of pointlike charges is

$$\vec{\mu}=\frac{1}{2}\sum_{a}q_{a}\left(\vec{r}_{a}\times\vec{v}_{a}\right)$$ (5)

Using tensor notation for (4) & (5),one gets

$$U_{int}^{\mbox{particles-field,dipolar}}=-\sum_{a} q_{a}v^{a}_{i}\left(x_{j}^{a}\partial_{j}\right)A_{i}$$ (4')

$$\mu_{i}=\frac{1}{2}\sum_{a}q_{a}\epsilon_{ijk}x_{j}^{a}v_{k}^{a}$$ (5')

From (5') one gets

$$\sum_{a} q_{a}v_{i}^{a}x_{j}^{a}=-\mu_{k}\epsilon_{kij}$$ (6)

And from (6) and (4'),one gets

$$U_{int}^{\mbox{particles-field,dipolar}}=\mu_{k}\epsilon_{kij}\partial_{j}A_{i} =-\vec{\mu}\cdot\vec{B}$$

Q.e.d.

U may wonder why i dropped the particle indices one the potential and the derivatives.Simple.Multipolar approximations assume the charged particles be concentrated around the origin,that's why we're dealing with local fields (magnetic,electric and potentials).

Daniel.

Last edited: Jun 2, 2005