To find the magnetic field energy we recall that the flux varies linearly with current Thus, when the flux is Φ for current i, we can write Φ = A i The total energy inclosed in the field, when the current is I, is
The characteristic factor 1/2 appears in this way.