It is a well-known effect the pulling of a magnetizable rod into a solenoid where a magnetic field is established. There are many practical applications of this effect, like the Bendix mechanism, relays, etc., but how it arises is hardly discussed. This effect is considered analogous to the pulling of a dielectric slab into a parallel plate capacitor. The similarity of these effects has been discussed by Boyer  , and is also discussed in some intermediate texts on electromagnetism  ,  ,  . There is, however, a difference about the supposed origin of these effects in the electric and magnetic cases. In the electric case the force acting on the dielectric slab is usually assumed to be caused by the non-uniform fringing field outside the capacitor,  ,  ,  ,  ,  , while in the magnetic case the fringing effects are explicitly neglected  ,  , and there is no explanation of its origin.
In the electric case, therefore, the force is explained as the action of the non-uniform fringing field on the dipoles of the dielectric slab. We have shown  that this force arises rather from the uniform field inside the capacitor transmitted through the Maxwell stresses. In the magnetic case we have a uniform magnetic field inside the solenoid, which can only align the magnetic dipoles. Therefore, we have the question of how this uniform field can exert a net force on the magnetic dipoles. This is the question we address in the present work. It is rather a conceptual question that we will answer applying the Maxwellian notion of electromagnetic stresses. We use a particular electromagnetic momentum balance equation derived elsewhere  from Maxwell’s equations.
We revise first (Section 2) the usual derivation of the magnetic force with energy methods. We find that the usual shortcut of copying the electric case by changing the fields
leads to a wrong sign in the magnetic force. We also discuss the arguments of Landau and Lifshits  (Section 3) to show that sometimes the magnetic fields analogous to and are rather and , respectively.
Our results point to the tension part of the magnetic stress tensor acting at the interface as the origin of this force (Section 4), explaining in this way how a uniform magnetic field can exert a net force on magnetizable matter. This constitutes a novel point of view that provides insights respect to the electromagnetic force, which is transmitted through stresses, as Faraday and Maxwell anticipated. In Section 5 we present a new force density, Equation (61), from which the magnetic force can be obtained. In Sections 6 and 7 we give theoretical support to this force density showing how it appears in a momentum balance equation. Our approach represents therefore a novel point of view that provides insights respect how the magnetic force arises.
2. Force on a Magnetic Rod inside a Solenoid with Constant Current I
The device is a solenoid of length L, with n turns per unit length, cross area and a constant current I circulating through it. A rod of magnetic material of permeability and magnetic susceptibility is partially introduced into the solenoid. A force appears that pulls the rod into the solenoid (Figure 1).
Figure 1. Cylindrical solenoid with a magnetizable rod partially inserted.
Usually this force is derived from the equation
where the sub-index I indicates that the process considered occurs with constant current I, hence the positive sign in this equation, and the magnetic energy is given by
(we follow Griffiths  and Purcell and Morin  and take the field as the magnetic field and as an auxiliary field).
Then, by expressing the field in terms of the current,
with the constitutive relations
one can find the known result for the force on the magnetic rod calculating the change in energy in displacing the rod a distance  ,  ,  . This force is
With this procedure it is irrelevant the fringing magnetic field outside the solenoid and what happens at the interface, as noted by Wangsness  and Reitz et al.  .
Now, when a magnetizable material is introduced into a magnetic field, the fields and change, and therefore also the energy changes. If initially there is a vacuum inside the solenoid, the fields are and , while after introducing the magnetizable material maintaining the current constant, the fields are and . Therefore, the change in energy is
This expression can be transformed in order to have a volume integral only over the volume V' occupied by the material. In the electrostatic case there is also a transformation from,  ,  , 
from which it is deduced that
In order to treat the magnetic case, Jackson  and Wangsness  propose the correspondence
in the electric case as expressed in Equation (10), obtaining
Following the steps that in the electric case lead from Equation (10) to Equation (11), they obtain
Jackson  and Wangsness  call the attention to the difference in sign with respect to the electric case as given in Equation (11). This difference in sign implies a wrong direction in the force. Wangsness  obtains the correct result because he does not use result Equation (15) to calculate the force.
It is worth noting that the correct result is obtained if in the electrostatic case, Equation (10), the correspondence and is made, obtaining
In order to see the consequences of this difference in sign of the change in energy it is convenient to calculate the force with (2) and (15). The equation for the magnetization is
where is Heaviside´s distribution. Then, from Equation (15), the constitutive relation (5), (6), and the fact that the field is constant inside the solenoid, even inside the magnetic rod, one obtains for the change in energy
When the gradient is taken using
the force results
After integration the final expression of the force is
that is, the negative of the correct result (7).
Therefore, the correct result ensues if in the electrostatic result (10) the substitution
is made. This points to the fact that in some cases the magnetic fields analogous to the electric fields are
while in others it is the correspondence Equation (22).
We have in this respect Stratton’s  observation:
“Whatever the analytical advantages of the electrostatic analogy may be, it is well to remember that the physical structure of a field due to stationary distributions of currents differs fundamentally from that of any configuration of electric charges.”
Landau and Liftshitz  (L & L in what follows) discuss the problem of electromagnetic fields in matter from a thermodynamic point of view and conclude that in the case of magnetostatics with constant currents the correct analogy is the later, Equation (22). They argue that
are free energy densities, not total energies, which is fundamental for the understanding of the interaction of electromagnetic fields and matter. In the next section we revise their arguments supporting the correspondence Equation (22).
3. Landau and Lifshitz Thermodynamic Analysis
It is convenient to review with some detail the procedure followed by Landau and Lifshitz  with which it is established that in this case the correct analogy is (22).
In the electric case they begin with the work necessary to increase the charge of the system by ,
This is the mechanical work performed by the electric field in bringing the charge from infinite to its final position. In terms of the electric fields this work is
Then the change in Helmholtz’s free energy, , is
Note the correspondence
Now, it is convenient to introduce a thermodynamic potential in which it appears instead of . This is done by means of a Legendre transformation
(quantities with asterisk represent densities).
The change of this free energy is
Therefore, the expressions for the infinitesimal changes in the quantities expressed in terms of the charges and potentials of the conductors are, respectively,
It is important to note the sign in Equation (32). We have then, besides Equation (27), the correspondence
In the magnetic case we have an analogous situation, but some care is necessary. We have instead of Equation (31) and Equation (32) the equations
and L & L point out that in macroscopic electrodynamics the role analogous to the currents is played by the potentials, not by the charges.
These authors  observe that
“It is useful to note that in macroscopic electrodynamics the currents (sources of the magnetic field) are mathematical analogues of potentials, not of charges (sources of the electric field). This is seen by comparing Formulaes (31.8) and (31.9) [our Equation (34) and Equation (35)] with the corresponding results for an electric field: [our Equation (31) and Equation (32)].
We observe that the charges and potentials appear in these formulae in the opposite order to the currents and potentials in Formulaes (31.8) and (31.9) [our Equations (34) and (35)].”
In this way the equivalent expressions to (25) and (30) are
And for the potential, or free energy, we have
With this approach they derive straightforwardly the correspondence (22), which implies that the analogy Equation (22) is correct, and therefore the correct expression for the change in energy is Equation (16).
4. Where Does the Force Acts?
The energy methods for calculating the force exerted by a uniform magnetic field inside a solenoid on a magnetizable rod, do not permit establish where and how the force acts. Also, in the analogous electric case of the force exerted on a dielectric slab partially inserted into a parallel plate charged capacitor, the energy method does not allow to establish where and how the force acts. In the electric case, it is said  ,  ,  ,  , and  that it is the non-uniform electrostatic fringing field acting on the dipoles of the dielectric what causes this force. In the magnetic case the fringing non-uniform magnetic field is explicitly neglected.
In order to establish clearly where and how the force arises, it is convenient to apply Maxwell’s magnetic stress tensor. The force in terms of this tensor is, 
where is the magnetic stress tensor.
and is a closed surface. The relevant surfaces for the calculation are flat surface around the interfaces formed by a parallels surfaces close to the interface, one inside the rod and other in vacuum.
Since for linear magnetic media the constitutive relation (5) implies that and are parallel and in the direction, the stress tensor becomes
where the unit dyad is
For the relevant surface we have the differential surface elements (Figure 2)
Figure 2. The figure shows the surfaces on which the stress tensor is integrated. The integral over the ribbon that closes the surface σ is zero.
With the tensor (41) and the surface elements (43), the expression (39) for the force results
We have also that
Then Equation (44) becomes, using Equation (43),
Now we take into account the boundary condition
which with the constitutive relation (5) implies that
and then Equation (46) can be written as
which can be rewritten as
or in the form
This is the correct known result, Equation (7).
We can then conclude that the force acts at the interface magnetic rod-vacuum inside the solenoid and arises from the Maxwell magnetic stress tensor. This “magnetic pressure” was introduced and discussed by Maxwell, thus confirming that the fringing field is irrelevant.
5. The Force Density
As in the electrostatic case, usually we do not deal directly with a force density; this is obtained as a gradient of an energy density and in this way the result Equation (7) is obtained. Now, what is the force density in terms of the fields or and the magnetization ?
What we want to explore is the possibility of a force density of type
analogous to the electric force density 
from which the known result for the capacitor follows.
In this case the magnetization depends only on z and is discontinuous at the interface. Since is in the direction of , which points in the z direction, we have
showing that we have here a different situation from that in the electrostatic case. However, if we consider the magnetic energy density analogous to that of the electrostatic field,
and calculate , then
With the vector identity for the gradient of a scalar product, the force density results
The last term is zero, as argued above, while the magnetostatic nature of the field and the absence of free currents imply
leaving only the two first terms; but the field is uniform, so that we are left only with the second term,
This force density is also unusual, expecting rather something like
analogous to the known electrostatic force on a dielectric in a non-uniform electrostatic field. In this case, the new force density Equation (61) results
which is not zero even in the case of a uniform field. Moreover, since
then from Equation (63) it follows that
as in the electrostatic case. Integrating this force density over any volume around the interface gives
Since the volume element is , where is the cross section of the magnetizable bar, we have
and the force on the magnetic bar of cross section is then
which is the known result,  ,  ,  , Equation (7), implying that the adequate force density is
We have then, as in the electrostatic case, a new force density that gives the correct result. The electrostatic and magnetostatic cases seem very similar, but the force densities differ in both cases. This motivates looking for a more general momentum balance equation that includes, in the magnetic case, the force density Equation (61). In the next section we search for such balance equation.
6. Momentum Balance Equation for Magnetic Materials
The question is if the momentum balance equation  , 
includes the new force density Equation (61). The magnetostatic force density is different from the electrostatic force density, but we can proceed as in the electrostatic case.
If only magnetostaic fields are involved, and there are not free charges and currents, Equation (71) transforms in
The constitutive relation
and the dyadic identity
permits to write the right member of Equation (72) in the form
Since we are dealing with the magnetostatic case without free current densities, we have
and from Equation (55),
Furthermore, the magnetic field and magnetization are in the z direction, so
which is the result we were looking for and agrees with the force density Equation (61). Then we have
7. General Balance Equation
We can conclude from the above results that the balance equation Equation (71) implicitly contains the new electric and magnetic force densities, and it is convenient therefore to rewrite it in a form where these force densities appear explicitly. This can be achieved gathering the result of Equation (79) and the analogous one for the electric part  , with which the balance Equation (71), can be written in the form
In this form the balance equation results very long, but there appear explicitly the new force densities. It is worthwhile to remember that the balance equation Equation (71) is a transformation of the Maxwell equations with linear materials, and therefore is as sound as these equations. Hence, the force densities appearing in this balance equation have a solid foundation on Maxwell’s equations.
We have calculated, in a novel and insightful way that allows a physical explanation, the well-known force that arises when a magnetizable rod is partially introduced into the magnetic field of a solenoid. Our approach is an alternative to the usual calculation with the gradient of an energy. The usual calculation does not give any insight about where the force acts and how it arises, while our method does give such insights. This novel calculation is based on the volume integration of a force density and the surface integration of a magnetic stress tensor. Though the force density may seem unfamiliar, it is part of a momentum balance equation derived directly from the macroscopic Maxwell equations. Indeed, these balance equations contain many force densities, for example the Helmholtz force density  , with which this magnetic force can also be calculated. This method leads to results that indicate that this force is exerted at the rod-vacuum interface, where the magnetic field is uniform, and has its origin in Maxwell’s magnetic stresses.
We also analyze the analogy with the electric case, used sometimes to calculate the force as a gradient of a magnetic energy. The proposed analogy consists in substituting in the electric case with and with . The analysis of this familiar effect shows that the classical theory of electromagnetism still contains interesting conceptual aspects that deserve attention.
*On sabbatical leave from Departamento de Física, División de Ciencias Básicas e Ingeniería, Universidad Autónoma Metropolitana, Unidad Iztapalapa, Av. San Rafael Atlixco No. 186 Col. Vicentina. Apartado postal 21-094, Cd. Mx. 04000.
 Boyer, T.H. (2001) Electric and Magnetic Forces and Energies for a Parallel-Plate Capacitor and a Flattened, Slip-Joint Solenoid. American Journal of Physics, 69, 1277-1279.
 Campos-Flores, I., Jiménez-Ramírez, J.-L. and Roa-Neri, J.-A.-E. (2018) How Does Arise the Force on a Dielectric Slab in a Parallel Plate Capacitor? Journal of Electromagnetic Analysis and Applications, 10, 131-142.
 Jiménez, J.L., Campos, I. and López-Mariño, M.A. (2011) A New Perspective of the Abraham-Minkowski Controversy. The European Physical Journal—Plus, 126, 50.