---
title: Energy in C and L
heading: What's stored, and what's lost getting it there
eyebrow: C2 · Lesson 10 · Energy in C and L
xp: 40
---

::: hook
A capacitor stores energy in its electric field, and an inductor in its magnetic field. Both give it back: a camera flash dumps a capacitor's energy into a lamp in a millisecond, and a switching power supply passes energy through an inductor tens of thousands of times a second. There's a surprise in charging a capacitor from a battery, though. Whatever resistor you charge it through, exactly half the energy the battery delivers ends up as heat.

::: play
- A capacitor charges from a battery through a resistor. The curves show the energy delivered by the battery, the energy stored in the capacitor, and the energy turned to heat in the resistor, each as a fraction w of $CV^2$.
- When the capacitor is full, compare the stored energy with the heat. Now change R by a factor of ten. What changes, and what doesn't?
:::
:::

```sim plot
view: graph
x: t = 0..30 ms
y: w = 0..1
slider: R = 0.2..5 step 0.1 = 1 kΩ
slider: C = 1..5 step 0.5 = 2 µF
slider: V = 1..12 step 1 = 10 V
plot: 1 - exp(-t/(R*C)) | label: from the battery
plot: 0.5*(1 - exp(-t/(R*C)))^2 | color: ch2 | label: stored in C
plot: 1 - exp(-t/(R*C)) - 0.5*(1 - exp(-t/(R*C)))^2 | dashed | color: ch3 | label: heat in R
readout: τ in ms = R*C
readout: stored when full in mJ = 0.5*C*1e-6*V^2*1000
readout: heat when full in mJ = 0.5*C*1e-6*V^2*1000
```

::: predict
## A battery charges a capacitor to 10 V through a resistor. The capacitor ends up storing 1 J. How much energy did the battery supply?

- [ ] 1 J
- [x] 2 J
- [ ] It depends on the resistor
- [ ] 0.5 J

::: reveal
2 J. The battery pushes charge $Q = CV$ through its full voltage, delivering $QV = CV^2$, while the capacitor stores only $\frac12CV^2$. The other half heats the resistor, whatever its value: a smaller resistor means more current for less time, and the total heat comes out the same. Only charging with a source that rises gradually, or through an inductor, avoids that loss.
:::
:::

::: nameit
## Stored energy

**Capacitor.** Moving charge $dq$ onto plates already at voltage $v = q/C$ takes work $v\,dq$. Adding it up from empty:

$$W_C = \int_0^Q\frac{q}{C}\,dq = \frac12CV^2 = \frac{Q^2}{2C}$$

It lives in the electric field, at an energy density $\frac12\varepsilon E^2$ (B3.9).

**Inductor.** Building the current against the induced voltage $L\,di/dt$ takes power $vi = Li\,di/dt$. Adding it up:

$$W_L = \frac12LI^2$$

It lives in the magnetic field, at $B^2/2\mu$ (B6.8).

**Neither can change its energy instantly.** That's another way to see why a capacitor's voltage and an inductor's current are continuous: a jump would need infinite power.

**The 50% charging loss.** Charging a capacitor from 0 to $V$ through any resistance from a fixed source $V$:

- the source delivers $CV^2$;
- the capacitor stores $\frac12CV^2$;
- the resistance dissipates $\frac12CV^2$.

**Charge sharing.** Connect a charged capacitor to an equal uncharged one and charge is conserved: both end at $V_0/2$. The stored energy falls from $\frac12CV_0^2$ to $2 \times \frac12C(V_0/2)^2 = \frac14CV_0^2$: half is lost in the connecting wires' resistance (or radiated), however small it is.

**Typical values.** A 100 µF capacitor at 5 V stores 1.25 mJ; a camera flash's 1000 µF at 330 V stores about 54 J; a supercapacitor of 3000 F at 2.7 V stores 11 kJ. A power supply's 100 µH inductor at 5 A stores 1.25 mJ.
:::

::: example
## How much energy does a 1000 µF capacitor at 50 V hold?

::: solution
1. **Stored energy.**
   $$\begin{aligned} E &= \frac12CV^2 \\ &= \frac12 \times 10^{-3} \times 2500\ \text{J} \\ &= 1.25\ \text{J} \end{aligned}$$
2. **What that means.** It's enough to make a sharp spark if shorted.

**Answer:** 1.25 J, enough to make a sharp spark if shorted.
:::
:::

::: example
## How much energy does a 100 mH inductor carrying 2 A hold?

::: solution
1. **Stored energy.**
   $$\begin{aligned} E &= \frac12LI^2 \\ &= \frac12 \times 0.1 \times 4\ \text{J} \\ &= 0.2\ \text{J} \end{aligned}$$
2. **What that means.** The energy must go somewhere when the current is interrupted.

**Answer:** 0.2 J, which must go somewhere when the current is interrupted.
:::
:::

::: example
## A camera flash stores its energy in a 330 µF capacitor at 300 V and dumps it into the tube in about 1 ms. How much energy, and what peak power?

::: solution
1. **Stored energy.**
   $$\begin{aligned} E &= \frac12CV^2 \\ &= \frac12 \times 330 \times 10^{-6} \times 300^2\ \text{J} \\ &= 14.9\ \text{J} \end{aligned}$$
2. **Power during the flash.** Released in 1 ms, that's an average of about
   $$\frac{14.9\ \text{J}}{1\ \text{ms}} \approx 15\ \text{kW}$$
   from a pair of AA cells that can supply only a few watts.
3. **How the flash manages it.** A small converter charges the capacitor over a few seconds, and then it discharges all at once, trading time for power.

**Answer:** the capacitor stores 14.9 J and releases it at about 15 kW.
:::
:::

::: check
given: C = 1 | 10 | 100 | 1000; V = 5 | 12 | 50
answer: 0.5*C*V^2/1000
unit: mJ
tolerance: 0.5%

## How much energy does a {C} µF capacitor store at {V} V?

::: right
Right. $\frac12CV^2$ = {answer}.
:::

::: misses
- [C*V^2/1000] There's a factor of ½.
- [0.5*C*V/1000] Square the voltage.
- [any] Not yet. $W = \frac12CV^2$.
:::
:::

::: check
given: L = 10 | 100 | 470; I = 0.5 | 2 | 5
answer: 0.5*L*I^2
unit: µJ
tolerance: 0.5%

## How much energy does a {L} µH inductor store carrying {I} A?

::: right
Right. $\frac12LI^2$ = {answer} (µH × A² gives µJ).
:::

::: misses
- [L*I^2] There's a factor of ½.
- [0.5*L*I] Square the current.
- [any] Not yet. $W = \frac12LI^2$.
:::
:::

::: check
given: C = 10 | 47 | 100; V = 5 | 10 | 24
answer: 0.5*C*V^2/1000
unit: mJ
tolerance: 0.5%

## A {C} µF capacitor is charged from 0 to {V} V through a resistor from a {V} V source. How much energy is dissipated in the resistor?

::: right
Right. Half of what the source delivered: $\frac12CV^2$ = {answer}, whatever the resistance.
:::

::: misses
- [C*V^2/1000] That's what the source delivered in total.
- [0] The resistor heats while the current flows.
- [any] Not yet. Source gives $CV^2$, capacitor keeps $\frac12CV^2$.
:::
:::

::: check
given: C = 10 | 100 | 470; V1 = 5 | 10; V2 = 12 | 24
answer: 0.5*C*(V2^2 - V1^2)/1000
unit: mJ
tolerance: 0.5%

## How much energy does it take to charge a {C} µF capacitor from {V1} V to {V2} V?

::: right
Right. $\frac12C(V_2^2 - V_1^2)$ = {answer}.
:::

::: misses
- [0.5*C*(V2 - V1)^2/1000] Energy goes as $V^2$: subtract the squares.
- [any] Not yet. Difference of the stored energies.
:::
:::

::: check
given: C = 10 | 100; V0 = 10 | 20
answer: 0.25*C*V0^2/1000
unit: mJ
tolerance: 0.5%

## A {C} µF capacitor at {V0} V is connected to an identical uncharged capacitor. How much energy is lost?

::: right
Right. Both end at $V_0/2$, storing $\frac14CV_0^2$ together; the other {answer} is lost.
:::

::: misses
- [0] Charge is conserved, but energy isn't: half is lost.
- [0.5*C*V0^2/1000] That's all the starting energy. Half remains.
- [any] Not yet. Final energy $2 \times \frac12C(V_0/2)^2$.
:::
:::

::: check
kind: parts
given: C = 100 | 330 | 1000; V = 50 | 300; t = 1 | 10

## A {C} µF capacitor at {V} V is discharged in about {t} ms.

::: part
answer: 0.5*C*1e-6*V^2
unit: J
tolerance: 0.5%

### How much energy does it hold?

::: misses
- [C*1e-6*V^2] The energy is $\frac12CV^2$.
- [any] $\frac12CV^2$.
:::
:::

::: part
answer: 0.5*C*1e-6*V^2/(t*1e-3)/1000
unit: kW
tolerance: 0.5%

### What average power does the discharge deliver?

::: misses
- [any] Energy over time.
:::
:::
:::

::: check
kind: derivation
vars: C = 0.000001..1, V = 1..500, L = 0.0001..1

## A capacitor C at V and an inductor L.

::: step
answer: C*V^2/2

### What energy does the capacitor hold?
:::

::: step
answer: V*sqrt(C/L)

### What current must the inductor carry to hold the same energy?
:::

::: right
Right. That's the peak current when an LC circuit swaps its energy back and forth.
:::
:::

::: explain
## Why is half the energy lost when a capacitor is charged from a fixed voltage source, whatever the resistance?

::: model
The source pushes each bit of charge out at its full voltage, so delivering the total charge $CV$ costs $CV^2$. But the capacitor's voltage starts at zero and rises to $V$, so it only stores the average, $\frac12CV^2$. The difference is the voltage across the resistor times the current, summed over the charge. A smaller resistor gives a larger current for a shorter time, and the two effects cancel exactly, so the resistor always takes $\frac12CV^2$.
:::
:::

::: practice

::: check
given: C = 1 | 2 | 5; V = 2 | 4 | 6
answer: 0.5*C*V^2
unit: µJ
tolerance: 0.5%

## {C} µF at {V} V. Stored energy, in µJ?

::: misses
- [C*V^2] Include the ½.
- [any] $\frac12CV^2$.
:::
:::

::: check
given: L = 1 | 10; I = 1 | 3
answer: 0.5*L*I^2
unit: mJ
tolerance: 0.5%

## {L} mH carrying {I} A. Stored energy, in mJ?

::: misses
- [L*I^2] Include the ½.
- [any] $\frac12LI^2$.
:::
:::

::: check
given: k = 2 | 3 | 4
answer: k^2
tolerance: 0.5%

## A capacitor's voltage is raised {k} times. By what factor does its stored energy grow?

::: misses
- [k] Energy goes as $V^2$.
- [any] $k^2$.
:::
:::
:::
