# Magnetic energy evaluation

How to evaluate magnetic energy when only vectors of magnetic induction B, and vector of magnetic field, H are known?

We know that in general, $$W_m=\int w_mdV$$

where wm is the density of magnetic energy that is defined as $$w_m=\int HdB$$

My question is, is it possible to evaluate magnetic energy Wm when only vectors B,H are known? If yes, what is the expression for magnetic energy in function of only B,H?

If the relation between H and B is linear (whether the medium is isotropic or not), the energy density of the magnetic field is $\tfrac{1}{2}$H⋅B.