For a magnetostatic system of currents in free space, the stored energy can be found by imagining the process of linearly turning on the currents and their generated magnetic field, arriving at a total energy of: E = 1 2 ∫ ∫ J ⋅ ⋅ A d V where J is the current density field and A is the magnetic vector potential. This is analogous to the electrostatic energy expression 1 2 ∫ ∫ ρ ρ ϕ ϕ d V ; note that neither of these static expressions apply in the case of time-varying charge or current distributions.