An electromagnetic wave possesses energy from the electric and magnetic components. This w/u deals with the magnetic component of that energy by taking the example of a solenoid.

A solenoid is basically a conducting coil wrapped in a helix. When an electric current is run through the coil, it generates an opposing emf which must be overcome by the connected battery. Thus, the battery must do work to force a maximum current through the solenoid. This work is stored in the surrounding magnetic field. The circuit equation for a solenoid is

V= L(dI/dt) + RI

where I is the current flowing at a given time, V is the

voltage across the solenoid, R is its

resistance and L its

self-inductance.
The

power required at any instance in the circuit is given by the product VI. Simply integrating this over time will yield the

work done.

W= 1/2(LI_{o}^{2})+RI_{o}^{2}

The first term on the right hand side is the

inductively stored energy (i.e. that stored in the

solenoidal magnetic field) while the second term is the energy dissipated resistively. Thus we have

W_{inductive}=1/2(LI_{o}^{2})= U_{M}

where U

_{M} is the magnetic stored energy. In the case of an

ideal solenoid (one that is infinitely long) the inductance L can be expressed in terms of the cross-sectional radius r, the length d and the number of turns N of the solenoid

L=μ_{o}N^{2}πr^{2}d

where μ

_{o} is the

permeability of free space. In this case the magnetic field running through the solenoid is

B=μ_{o}NI

Combining the previous three equations and noting that πr

^{2}d is simply the volume of the solenoid V one arrives at

U_{M}=(B^{2}/2μ_{o})V

Finally, divide by volume to obtain the

magnetic field energy density, u

_{M}
u_{M}=B^{2}/2μ

The

permeability may be changed by putting a soft

iron core into the solenoid, greatly increasing the amount of magnetic energy that can be stored in the inductor.

See also electric field energy density and Poynting vector.

*Source:*

http://farside.ph.utexas.edu/~rfitzp/teaching/em1/lectures/node61.html (for a more rigorous derivation)