Sub topic 13
Energy stored in an inductor
This chapter assumes you know Faraday's law, Lenz's law and self-inductance with back emf from the earlier chapters. You should also be comfortable with Ohm's law, power as P = iV, and simple integrals. Here we find how much energy an inductor stores, where that energy sits, and what happens to it when the current stops.
Why an inductor stores energy
Lenz's law says a self-induced emf opposes any change in current. When you try to raise the current in a coil, the back emf pushes against you. The source must do work to overcome it, and that work does not vanish. It is stored in the magnetic field the current creates.
A resistor behaves differently. It turns electrical energy into heat that you cannot recover. An ideal inductor has no resistance, so every joule you put in is held in the field. You can get it back when the current falls.
Deriving U = ½LI²
For an ideal inductor with inductance L and current i, the back emf has magnitude L di/dt. While the current is rising, the source must supply a voltage of the same size to push the current through. The instantaneous power delivered to the inductor is:
- p = v i = L i (di/dt)
Power is the rate of energy transfer, so dU = p dt = L i di. The time dependence drops out. Only the change in current matters. Integrating from zero current to a final current I gives:
- U = ∫ L i di from 0 to I = ½ L I²
Three points follow from this result.
- U depends only on the present current, not on how fast you got there. A slow ramp and a fast ramp store the same energy.
- U is proportional to I². Doubling the current quadruples the stored energy. Reversing the current direction does not change it.
- The formula mirrors the capacitor result U = ½ C V². The inductor current plays the role of the capacitor voltage.
| Property | Capacitor | Inductor |
|---|---|---|
| State variable | Voltage V | Current I |
| Stored energy | ½ C V² | ½ L I² |
| Energy lives in | Electric field | Magnetic field |
| Cannot change instantly | Voltage | Current |
| Opposes change in | Voltage | Current |
Energy flow in an RL circuit
Connect an ideal battery of emf V in series with a resistor R and an inductor L. After you close the switch, the current rises as
- i(t) = (V/R)(1 − e^(−t/τ)), where τ = L/R
At every instant the battery power V i splits into two parts. The resistor dissipates i²R as heat, and the inductor absorbs L i (di/dt) into its field. Energy conservation requires V i = i²R + L i (di/dt), which is just Kirchhoff's loop rule multiplied by i.
At first di/dt is large, so most of the battery power goes into the field. Later di/dt shrinks toward zero. The inductor then absorbs almost nothing, and the resistor takes all the power.
The final current is I = V/R, so the stored energy approaches ½ L (V/R)². The resistor does not stop dissipating energy. It continues at V²/R, which is why the battery supplies more total energy than the inductor holds.
Checking it numerically
The script below simulates the charging of an RL circuit. It integrates the inductor power L i (di/dt) with the trapezoid rule and compares the result with ½ L I². It also confirms that the battery energy equals the resistor heat plus the stored energy.
import numpy as np
V = 12.0 # battery emf, V
R = 10.0 # resistance, ohm
L = 0.20 # inductance, H
tau = L / R # time constant, s
t = np.linspace(0, 10 * tau, 200001)
i = (V / R) * (1 - np.exp(-t / tau))
v_L = V * np.exp(-t / tau) # voltage across the inductor = L di/dt
def trapezoid(y, x):
return np.sum(0.5 * (y[1:] + y[:-1]) * np.diff(x))
e_inductor = trapezoid(v_L * i, t) # integral of L i di/dt
e_resistor = trapezoid(i**2 * R, t) # heat in the resistor
e_battery = trapezoid(V * i, t) # energy supplied by the battery
u_formula = 0.5 * L * i[-1] ** 2
print(f"integrated inductor energy: {e_inductor:.4f} J")
print(f"(1/2) L I^2: {u_formula:.4f} J")
print(f"resistor heat: {e_resistor:.4f} J")
print(f"battery energy: {e_battery:.4f} J")
print(f"battery - (heat + field): {e_battery - e_resistor - e_inductor:.2e} J")The two inductor energies agree at about 0.144 J. The battery supplies about 2.59 J in this window, so most of the energy ends up as heat. That fraction grows the longer you wait, because the field energy is capped while the heating is not.
Where the energy is: the magnetic field
The energy is not stored "in the wire". It is stored in the magnetic field in space. A long solenoid shows this clearly. Take a solenoid of length l, cross-sectional area A and n turns per unit length. Ignoring end effects:
- B = μ₀ n I inside the solenoid
- L = μ₀ n² A l
- U = ½ L I² = ½ μ₀ n² A l I²
Replace I with B/(μ₀ n) in the last expression:
- U = ½ μ₀ n² A l (B/(μ₀ n))² = B² A l / (2 μ₀)
The product A l is the volume of the interior. So the energy per unit volume is
- u_B = B² / (2 μ₀)
This is the magnetic energy density. We derived it for a solenoid, but it holds for any magnetic field in vacuum. For a general field distribution you integrate it over all space: U = ∫ (B²/2μ₀) dV. The same idea appears for electric fields, where u_E = ½ ε₀ E².
import math
mu0 = 4e-7 * math.pi # T m/A
n = 2000.0 # turns per metre
length = 0.25 # m
radius = 0.020 # m
current = 2.0 # A
area = math.pi * radius**2
volume = area * length
L = mu0 * n**2 * area * length
u_circuit = 0.5 * L * current**2 # (1/2) L I^2
B = mu0 * n * current
u_density = B**2 / (2 * mu0) # J/m^3
u_field = u_density * volume # density x volume
print(f"L = {L * 1e3:.3f} mH, B = {B * 1e3:.3f} mT")
print(f"energy from (1/2) L I^2: {u_circuit * 1e3:.4f} mJ")
print(f"energy from B^2/(2 mu0): {u_field * 1e3:.4f} mJ")
print(f"energy density: {u_density:.2f} J/m^3")Both routes give about 3.16 mJ. The agreement is the point of the exercise: the circuit view (L and I) and the field view (B and volume) describe the same energy.
Releasing the energy: switching off
Suppose the circuit carries a steady current I and you remove the battery while giving the current a path through a resistor R. The inductor cannot let its current drop to zero instantly, because that would need an infinite back emf. The field collapses, and the induced emf keeps the current flowing in the same direction (Lenz's law). The current decays as
- i(t) = I e^(−t/τ), with τ = L/R
The energy dissipated in the resistor is
- ∫ i² R dt from 0 to ∞ = I² R · (τ/2) = ½ L I²
This equals the energy that was stored. All of it goes into heat, as energy conservation requires.
If you open a switch with no alternative path, the current must fall to zero almost at once. The back emf L di/dt becomes very large, and it can exceed the breakdown voltage of the air gap or a transistor. The result is a spark or a damaged component. Circuit designers add a flyback diode across a relay coil or motor winding so the current has a safe path to decay through.
Common errors
- Writing U = L I² or forgetting the ½. The ½ comes from integrating L i di.
- Treating the stored energy as the total energy the battery supplied. The battery also feeds the resistor's heat.
- Assuming the inductor current can jump when you flip a switch. The current is continuous. The voltage across the inductor can jump.
- Using B²/(2μ₀) inside a magnetic material without adjustment. In a linear material, replace μ₀ with μ.
- Counting energy twice when two coils are coupled. For coupled coils the total includes a mutual term M I₁ I₂, and the signs depend on the current directions.
Exercises
Exercise
An inductor of 0.50 H carries a steady current of 3.0 A. (a) How much energy does it store? (b) The current is then diverted through a 100 Ω resistor. What is the initial voltage across that resistor, and what is the time constant of the decay?
Show answer
(a) U = ½ L I² = 0.5 × 0.50 × 3.0² = 2.25 J. (b) The current cannot change instantly, so it starts at 3.0 A and the initial voltage is I R = 3.0 × 100 = 300 V. The time constant is τ = L/R = 0.50/100 = 5.0 ms. The resistor dissipates a total of 2.25 J as the current decays.
Exercise
A region of space contains a uniform magnetic field of 1.0 T. What is the magnetic energy density, and how much energy is stored in a volume of 2.0 × 10⁻³ m³?
Show answer
u = B²/(2μ₀) = 1.0² / (2 × 4π × 10⁻⁷) ≈ 3.98 × 10⁵ J/m³. For 2.0 × 10⁻³ m³ the energy is about 3.98 × 10⁵ × 2.0 × 10⁻³ ≈ 7.96 × 10² J, or roughly 800 J.