# Magnetic work and the first law of thermodynamics

We commonly encounter the first law of thermodynamics in the form $\mathrm{d}E = T\mathrm{d}S - p\mathrm{d}V + \mu\mathrm{d}N$, which notes the contribution of thermal, pressure-volume, and chemical work to the total energy respectively. More generally, we can write $$\mathrm{d}E = \sum_i f_i\mathrm{d}X_i,$$ where $f_i$ denotes a generalized force and $X_i$ a generalized displacement.

The pattern for all these types of work seems to be rather obvious---the generalized force is intensive, whereas the generalized displacement is extensive---but this fails when we try to take into account magnetic work, which contributes the term $-\mathbf{m}\cdot\mathrm{d}\mathbf{B}$, with $\mathbf{m}$ the magnetic moment and $\mathbf{B}$ the magnetic field (see Hill, Chandler, Blundell, etc.). Here the pattern is reversed: the magnetic moment $\mathbf{m}$ is extensive, whereas the magnetic field $\mathbf{B}$ is intensive!

• How can we rationalize the unusual form of the magnetic work term?

Blundell makes an argument for this for the case of electric dipoles; I summarize it here. The relevant work term here is the electrical work $-\mathbf{p}_\text{E}\cdot\mathrm{d}\mathbf{E}$, with $\mathbf{p}_\text{E}$ the electric dipole moment and $\mathbf{E}$ the electric field.

The potential energy of the dipole in the electric field is $-\mathbf{p}_\text{E}\cdot\mathbf{E}$. If the electric field changes, the potential energy changes by $\mathrm{d}(-\mathbf{p}_\text{E}\cdot\mathbf{E}) = -\mathbf{p}_\text{E}\cdot\mathrm{d}\mathbf{E}-\mathbf{E}\cdot\mathrm{d}\mathbf{p}_\text{E}$. However, the change in the electric field will also stretch the dipole, increasing its dipole moment and doing work $q\mathbf{E}\cdot\mathrm{d}\mathbf{l} = \mathbf{E}\cdot\mathrm{d}\mathbf{p}_\text{E}$, so the net work supplied to the system is $-\mathbf{p}_\text{E}\cdot\mathrm{d}\mathbf{E}$.

I am somewhat skeptical of this argument. It seems that I could repeat the argument for other types of work---say, $PV$ work---and conclude that I should also have a $V\mathrm{d}P$ term in my energy expression.

• Is this argument correct? If it is, why isn't there a $V\mathrm{d}P$ work term in the first law?

• What are the conditions under which this argument holds? Do the generalized force and generalized displacement have to interact with each other in a particular manner?

It also seems to me to be of limited applicability, because the convenient cancellation of magnetic-dipole and electric-dipole terms are not replicable for other, more complicated interactions.

• Is there a general, methodical approach for identifying the form of the terms in the first law for arbitrary types of work?
• In a way, magnetic work is an oxymoron. Magnetic force is perpendicular to velocity, hence it doesn't do work. – Ivan Neretin Nov 16 '17 at 8:12
• @Ivan_Neretin Of course, magnetic fields do work on spins, they just do not work on moving charges. – hyportnex Nov 16 '17 at 20:00
• Both are meaningful: $mdB$ is the work done on a dipole by changing the field, $Bdm$ is the work done on the field by changing the magnetization of the dipole. $B$ is closer in spirit to a potential, hence an intensive quantity, while piling more and more dipoles on top of each other is like having more matter, hence extensive. – hyportnex Nov 16 '17 at 20:14