---
title: Voltage as the path integral of E
heading: Adding up the field along the way gives the voltage
eyebrow: B3 · Lesson 3 · Voltage as the path integral of E
xp: 40
---

::: hook
Lesson 2 went from voltage to field: the field is the downhill slope. Going back the other way, you add up the field along any path between two points, and the total is the voltage between them. For static charges every path gives the same answer, which is why a voltmeter's leads can take any route. When a magnetic field is changing nearby, they don't, and the voltmeter's reading depends on how its leads are routed. That surprise is the subject of course B6.

::: play
- A +1 nC charge sits at the origin. Two paths run from A to B: a straight one, and one that swings out and back by an amount you choose.
- The readouts add up $-\int\mathbf E \cdot d\mathbf l$ along each path. Compare them with $V_B - V_A$ from $kQ/r$.
- Change the bulge, and move B. Do the two paths ever disagree?
:::
:::

```sim plot
view: flow
x: x = -3..3 m
y: y = -2..2 m
slider: h = -1.5..1.5 step 0.1 = 1.2 m
slider: bx = 1..2.8 step 0.1 = 2.5 m
dx: 8.99*x/(x^2 + y^2)^1.5
dy: 8.99*y/(x^2 + y^2)^1.5
arrows: scaled
grid: 14
dot: 0, 0 | label: +1 nC
path: -1 + (bx + 1)*u, -1 + 0.5*u | over: u = 0..1 | work: W1 | color: ch2
path: -1 + (bx + 1)*u, -1 + 0.5*u + h*sin(pi*u) | over: u = 0..1 | work: W2 | color: ch1
dot: -1, -1 | label: A | color: ch3
dot: bx, -0.5 | label: B | color: ch3
readout: straight path, −∫E·dl (V) = -W1
readout: curved path, −∫E·dl (V) = -W2
readout: kQ/r_B − kQ/r_A (V) = 8.99/sqrt(bx^2 + 0.25) - 8.99/sqrt(2)
```

::: predict
## A static field's voltage between two points is measured along two different paths. What do you get?

- [x] The same voltage both times
- [ ] More along the longer path
- [ ] It depends on which path passes closer to the charge
- [ ] Zero along a curved path

::: reveal
The same. The electrostatic field is conservative: whatever you gain going one way you give back on the return, so the total depends only on the endpoints. That's what makes "the voltage at B" meaningful at all. If the curved path passes over the charge's hill, it climbs and descends, but the net is identical.
:::
:::

::: nameit
## From field to voltage

**The definition.** The voltage of B relative to A is minus the line integral of the field from A to B:

$$V_B - V_A = -\int_A^B \mathbf E \cdot d\mathbf l$$

Walking along the field, you go downhill: the voltage falls. Walking against it, it rises. Walking across it, nothing changes.

**Path independence.** For the field of static charges, every path from A to B gives the same answer (A9.25), so the integral defines a voltage at every point. Around any closed loop, $\oint\mathbf E \cdot d\mathbf l = 0$: Kirchhoff's voltage law.

**Worked examples:**

- **Uniform field** $E$ along $x$: $V(x) = V_0 - Ex$. Across plates a distance $d$ apart, $V = Ed$.
- **Point charge**: integrating $kQ/r^2$ in from infinity gives $V = kQ/r$, the potential of lesson 1.
- **Long line charge**: $\int \frac{\lambda}{2\pi\varepsilon_0r}\,dr$ gives $V_a - V_b = \frac{\lambda}{2\pi\varepsilon_0}\ln\frac{b}{a}$ between radii $a$ and $b$. There's no sensible zero at infinity for an infinite line, so only differences are used. That logarithm appears in the capacitance and inductance of every coaxial cable.

**When it fails.** A changing magnetic field makes an electric field that circles around (Faraday's law), and then $\oint\mathbf E \cdot d\mathbf l \ne 0$. "The voltage between two points" then depends on the path, and a voltmeter's reading depends on how its leads are laid out. This is why probing a fast circuit with a long ground lead gives misleading results.
:::

::: example
## A uniform field of 200 V/m points along $+x$. What is the voltage of the point $(3, 4)$ m relative to the origin?

::: solution
1. **Only the $x$ part counts.** The $y$ part of the path is square to the field and adds nothing.
2. **Path integral.**
   $$\begin{aligned} V_B - V_A &= -\int\mathbf E \cdot d\mathbf l \\ &= -E\Delta x \\ &= -200 \times 3 \\ &= -600\ \text{V} \end{aligned}$$
3. **Other paths.** Any other path gives the same answer.

**Answer:** the point $(3, 4)$ m is at −600 V relative to the origin.
:::
:::

::: example
## How much does the potential change from 2 cm to 6 cm away from a 5 nC charge?

::: solution
1. **Difference of potentials.** The change is $V(6\text{ cm}) - V(2\text{ cm})$:
   $$\begin{aligned} \Delta V &= kQ\left(\frac{1}{0.06} - \frac{1}{0.02}\right) \\ &= 44.9 \times (16.7 - 50) \\ &= -1500\ \text{V} \end{aligned}$$
2. **Downhill.** Moving away from a positive charge goes downhill.

**Answer:** the potential falls by 1500 V, a change of −1500 V.
:::
:::

::: check
given: E = 1..9 int; d = 1 | 2 | 5 | 10
answer: -E*1000*d/100
unit: V
tolerance: 0.5%

## A uniform field of {E} kV/m points along $+x$. What is $V_B - V_A$ if B is {d} cm farther along $x$ than A?

::: right
Right. Along the field the voltage falls: $-E\,d$ = {answer}.
:::

::: misses
- [E*1000*d/100] Walking along the field is walking downhill: the voltage drops.
- [-E*d] Convert kV/m and cm to V/m and m.
- [any] Not yet. $V_B - V_A = -Ed$ for a step along the field.
:::
:::

::: check
given: Q = 1..9 int; ra = 0.1 | 0.2; rb = 0.5 | 1
answer: 8.99e9*Q*1e-9*(1/ra - 1/rb)
unit: V
tolerance: 1%

## How much higher is the voltage {ra} m from a {Q} nC charge than {rb} m from it?

::: right
Right. $kQ(1/r_a - 1/r_b)$ = {answer}.
:::

::: misses
- [8.99e9*Q*1e-9*(1/rb - 1/ra)] Closer to a positive charge is higher.
- [8.99e9*Q*1e-9*(1/ra^2 - 1/rb^2)] Voltage goes as $1/r$.
- [any] Not yet. Use $V = kQ/r$ at each distance.
:::
:::

::: check
given: lam = 1..9 int; a = 1 | 2; b = 5 | 10
answer: lam*1e-9/(2*pi*8.854e-12)*ln(b/a)
unit: V
tolerance: 1%

## A long wire carries {lam} nC/m. What is the voltage difference between {a} mm and {b} mm from it?

::: right
Right. $\frac{\lambda}{2\pi\varepsilon_0}\ln(b/a)$ = {answer}.
:::

::: misses
- [lam*1e-9/(2*pi*8.854e-12)*(1/a - 1/b)] Integrating $1/r$ gives a logarithm.
- [lam*1e-9/(2*pi*8.854e-12)*(b - a)] The field isn't uniform: integrate $\lambda/(2\pi\varepsilon_0r)$.
- [any] Not yet. Integrate the line charge's field from a to b.
:::
:::

::: check
given: E = 1..9 int; L = 10 | 20 | 50
answer: 0
unit: V
tolerance: 0.001

## In a static field, you walk a closed loop {L} cm around. What is $\oint\mathbf E \cdot d\mathbf l$?

::: right
Right. Zero: a static field is conservative.
:::

::: misses
- [any] Not yet. You end where you started, at the same voltage.
:::
:::

::: check
kind: choice

## A voltmeter's leads are rerouted around a transformer that's running. Its reading changes. Why?

- [ ] The voltmeter is faulty
- [x] The transformer's changing magnetic field makes the electric field's loop integral nonzero, so the reading depends on the path
- [ ] Voltage depends on the length of the leads
- [ ] The leads have resistance

::: right
Right. With changing magnetic flux through the loop formed by the leads and the circuit, "voltage between two points" depends on the path.
:::

::: misses
- [1] It's real physics, not a fault.
- [3] Length alone doesn't matter; the flux enclosed by the loop does.
- [4] A voltmeter draws almost no current, so lead resistance doesn't matter.
:::
:::

::: check
given: A = 10 | 50 | 200; x1 = 1 | 2; x2 = 3 | 5 | 10
answer: A*(1/x1 - 1/x2)
unit: V
tolerance: 0.5%

## Along a line the field points in +x with $E = A/x^2$, where $A$ = {A} V·m and $x$ is in meters. How much higher is the potential at x = {x1} m than at x = {x2} m?

::: right
Right. $V(x_1) - V(x_2) = \int_{x_1}^{x_2}E\,dx = A(1/x_1 - 1/x_2)$ = {answer}.
:::

::: misses
- [A*(1/x2 - 1/x1)] Potential falls along the field, so the point upstream is higher.
- [A*(x2 - x1)/x1^2] The field isn't uniform: integrate it.
- [any] Not yet. Integrate $A/x^2$ from {x1} to {x2}.
:::
:::

::: explain
## Why does "the voltage at a point" only make sense when the line integral of E is the same for every path?

::: model
A voltage assigns one number to each point, defined as minus the integral of the field from a reference point. If different paths gave different integrals, the same point would get different numbers depending on how you walked there, so no single value could be assigned. For the field of static charges the integral is path-independent, so the voltage is well defined; when changing magnetic fields are present it isn't, and voltages between points depend on the path taken.
:::
:::

::: practice

::: check
given: V = 10..100 step 10; d = 1 | 2 | 5
answer: V/(d/100)
unit: V/m
tolerance: 0.5%

## {V} V is across plates {d} cm apart. What is the field?

::: misses
- [V*d/100] $E = V/d$.
- [any] $E = V/d$.
:::
:::

::: check
given: Q = 1..9 int; r = 0.1 | 0.3 | 2
answer: 8.99e9*Q*1e-9/r
unit: V
tolerance: 1%

## How much work per coulomb does it take to bring a charge from far away to {r} m from a {Q} nC charge?

::: misses
- [8.99e9*Q*1e-9/r^2] That's the field; the work per coulomb is the voltage.
- [any] $V = kQ/r$.
:::
:::

::: check
given: E = 2..9 int; d = 1..5 int
answer: E*d
unit: V
tolerance: 0.5%

## Walking {d} m against a uniform {E} V/m field, by how much does the voltage rise?

::: misses
- [-E*d] Against the field is uphill: it rises.
- [any] $\Delta V = Ed$.
:::
:::
:::
