# Comprehending stated logical progression in thermodynamics

## Homework Statement

The idea is to describe work with a magnetized body within a solenoid. You have the equation of energy with field H by 1/8π∫H2dV where H=hi and h is a vector function of position.

Then you have if the work is changed dW/dt=d/dt[1/8π∫H2dV]

Then there is work in the creation of an elementary dipole within the body dm. the dipole has electron loop with current i' and area a, and the solenoid produces field h at the loop. If i' changes, the e.m.f. generated in solenoid is (h⋅a)di'/dt, so the battery must work at rate i(h⋅a)di'/dt.

Since solenoid field at loop is hi and by Ampere's theorem ai' is the magnetic moment:
dW/dt=H⋅dm/dt

Now here is where I start to get lost, but it kind of holds a little.
removing time derivatives and integrating over all space:
dW=d[1/8π∫H2dV] + ∫(H⋅dJ)dV

and here is where I get REALLY lost: where J is the intensity of magnetization (the magnetic moment dm of an element dV is JdV)

Can someone please explain that last step to me?