---
title: Green's functions
heading: Solve for one point source, then add up the sources
eyebrow: A12 · Lesson 43 · Green's functions
xp: 40
---

::: hook
Coulomb's law gives the potential of one point charge; add up point charges and you have the potential of any charge distribution. The impulse response of a circuit gives its output for one sharp kick; convolve and you have its output for any input. Both are the same idea, and for differential equations with boundary conditions it's called a **Green's function**: the response at x to a unit point source at s, with the boundary conditions built in. Find it once and every problem with the same operator and boundaries is an integral away. Electrostatics with grounded conductors, heat spreading from a hot spot, and the deflection of a loaded cable all work this way.
:::

::: play
- A string under tension, fixed at both ends, is pushed by a unit point force at s. Its shape is the Green's function $G(x, s)$: a tent, straight on each side of the load, since nothing pushes there.
- Move s: the tent's peak follows it, with height $s(1 - s)$ (times $1/T$, set to 1 here). It's tallest at the middle.
- The dashed curve is the response to a load spread evenly along the string: the sum of tents for every point, $\int_0^1 G(x, s)\,ds = x(1 - x)/2$.
:::
:::

```sim plot
view: graph
x: x = 0..1 m
y: u = 0..0.3
slider: s = 0.05..0.95 step 0.01 = 0.3 m
plot: step(s - x)*x*(1 - s) + step(x - s)*s*(1 - x) | label: G(x, s), a point load at s
plot: x*(1 - x)/2 | dashed | label: a uniform load
marker: x = s | label: s
readout: peak height G(s, s) = s*(1 - s)
readout: uniform load, center = 0.125
```

::: predict
## A unit load at s = 0.2 deflects the string at x = 0.7 by some amount. Where would a unit load have to go to give the same deflection at x = 0.2?

- [ ] At 0.2
- [x] At 0.7
- [ ] At 0.5
- [ ] At 0.8

::: reveal
At 0.7: $G(x, s) = G(s, x)$, so the effect of a load at s on the point x equals the effect of a load at x on the point s. This **reciprocity** holds for every self-adjoint problem, including the mutual capacitance and mutual inductance between conductors.
:::
:::

::: nameit
## The definition

For a linear operator $\mathcal L$ with boundary conditions, the Green's function solves $\mathcal L\,G(x, s) = \delta(x - s)$ with the same (homogeneous) boundary conditions. Then the solution of $\mathcal Lu = f$ is

$$u(x) = \int G(x, s)\,f(s)\,ds$$

## The string, or a 1D potential

For $-u'' = f$ on $(0, L)$ with $u(0) = u(L) = 0$:

$$G(x, s) = \begin{cases}\frac{x(L - s)}{L} & x \le s \\[4pt] \frac{s(L - x)}{L} & x \ge s\end{cases}$$

A string under tension T with load density q has $-Tu'' = q$, so $u = \frac1T\int G\,q\,ds$; a point force F at s gives $u = F\,G(x, s)/T$.

## Free space

| Equation | Green's function |
|---|---|
| Poisson in 3D, $-\nabla^2G = \delta$ | $\frac{1}{4\pi r}$: Coulomb's law, $\varphi = \frac{q}{4\pi\varepsilon_0 r}$ |
| Poisson in 2D | $-\frac{1}{2\pi}\ln r$: a line charge |
| heat in 1D, $G_t = \alpha G_{xx}$, $G(x, 0) = \delta(x)$ | $\frac{1}{\sqrt{4\pi\alpha t}}e^{-x^2/(4\alpha t)}$, with RMS width $\sqrt{2\alpha t}$ |
| a time-invariant ODE | its impulse response $h(t - \tau)$ |

## Images

A grounded plane at z = 0 is built into the Green's function by subtracting the free-space one for an image source at the mirror point: for a charge q at height h, $\varphi = \frac{q}{4\pi\varepsilon_0}\left(\frac{1}{\lvert\mathbf r - \mathbf r_q\rvert} - \frac{1}{\lvert\mathbf r - \mathbf r_q'\rvert}\right)$, which is zero on the plane.
:::

::: example
## A 1 m string under 100 N of tension carries a 10 N load at 0.3 m. Find the deflection under the load and at 0.6 m.

::: solution
1. **Under the load.**
   $$\begin{aligned} u &= \frac{F s(L - s)}{TL} \\ &= \frac{10 \times 0.3 \times 0.7}{100}\ \text{m} \\ &= 21\ \text{mm} \end{aligned}$$
2. **At 0.6 m, past the load.**
   $$\begin{aligned} u &= \frac{F s(L - x)}{TL} \\ &= \frac{10 \times 0.3 \times 0.4}{100}\ \text{m} \\ &= 12\ \text{mm} \end{aligned}$$

**Answer:** the string deflects 21 mm under the load and 12 mm at 0.6 m.
:::
:::

::: example
## A 1 nC charge is 1 m above a grounded plane. What's the potential halfway down, directly below it?

::: solution
1. **Add the image.** Put the image, −1 nC, 1 m below the plane.
2. **The potential halfway down.**
   $$\begin{aligned} \varphi &= 8.988 \times \left(\frac{1}{0.5} - \frac{1}{1.5}\right)\ \text{V} \\ &= 12.0\ \text{V} \end{aligned}$$
3. **Without the plane.** It would be 18.0 V; the induced charge on the plane pulls it down.

**Answer:** the potential halfway down is 12.0 V.
:::
:::

::: example
## Solve $-u'' = 1$ on (0, 1) with zero ends by adding up point loads with the Green's function $G(x, s) = x(1 - s)$ for $x \le s$ and $s(1 - x)$ for $x \ge s$.

::: solution
1. **Add up point loads.** A uniform load is a point load at every s, each of strength ds, so
   $$u(x) = \int_0^1G(x, s)\,ds$$
2. **Split at s = x.**
   $$\begin{aligned} u &= \int_0^xs(1 - x)\,ds \\ &\quad + \int_x^1x(1 - s)\,ds \\ &= \frac{(1 - x)x^2}{2} + \frac{x(1 - x)^2}{2} \\ &= \frac{x(1 - x)}{2} \end{aligned}$$
3. **Check.** That's the parabola you'd get by integrating twice, with its largest value $\frac18$ at the middle.
4. **The general method.** The Green's function method does the same job for any load: once you have G, every right-hand side is an integral.

**Answer:** $u(x) = \frac{x(1 - x)}{2}$.
:::
:::

::: check
given: x = 0.2 | 0.3 | 0.4; s = 0.5 | 0.7 | 0.9
answer: x*(1 - s)
tolerance: 0.5%

## For $-u'' = \delta(x - s)$ on (0, 1) with zero ends, what's $G(\given{x}, \given{s})$?

::: right
Right. For $x \le s$, $G = x(1 - s)$ = {answer}.
:::

::: misses
- [s*(1 - x)] That's the branch for x past the load.
- [any] Not yet. $G = x(L - s)/L$ for $x \le s$.
:::
:::

::: check
given: F = 5 | 20; T = 50 | 200; s = 0.25 | 0.4; L = 1
answer: F*s*(L - s)/(T*L)*1000
unit: mm
tolerance: 0.5%

## A string of length {L} m under {T} N of tension carries {F} N at {s} m from one end. How far does it deflect under the load?

::: right
Right. $\frac{Fs(L - s)}{TL}$ = {answer} mm.
:::

::: misses
- [F*s*(L - s)/T*1000/2] No factor of ½ here: that's the uniform-load formula's.
- [any] Not yet. $u = F\,G(s, s)/T$.
:::
:::

::: check
given: q = 10 | 40; L = 1 | 2; T = 100 | 400
answer: q*L^2/(8*T)*1000
unit: mm
tolerance: 0.5%

## A cable of length {L} m under {T} N of tension carries a uniform load of {q} N/m. What's its sag at the middle?

::: right
Right. $\frac{qL^2}{8T}$ = {answer} mm.
:::

::: misses
- [q*L^2/(4*T)*1000] Integrate the Green's function over the whole load: $\int_0^L G(L/2, s)\,ds = L^2/8$.
- [any] Not yet. $u(L/2) = \frac{q}{T}\int_0^L G(L/2, s)\,ds$.
:::
:::

::: check
given: q = 1 | 4; h = 1 | 2
answer: 8.988*q*(1/(h/2) - 1/(3*h/2))
unit: V
tolerance: 0.5%

## A {q} nC charge is {h} m above a grounded plane. What's the potential halfway between it and the plane, directly below it?

::: right
Right. With the image charge: {answer} V.
:::

::: misses
- [8.988*q/(h/2)] Include the image charge −q at {h} m below the plane.
- [any] Not yet. $\frac{q}{4\pi\varepsilon_0}\left(\frac{1}{h/2} - \frac{1}{3h/2}\right)$.
:::
:::

::: check
given: D = 12 | 35; t = 0.1 | 1 | 10
answer: sqrt(2*D*1e-4*t*1e-6)*1e6
unit: µm
tolerance: 0.5%

## Carriers injected at one spot diffuse with D = {D} cm²/s. What's the RMS width of the spreading cloud after {t} µs?

::: right
Right. $\sqrt{2Dt}$ = {answer} µm.
:::

::: misses
- [sqrt(D*1e-4*t*1e-6)*1e6] The heat kernel's spread is $\sqrt{2Dt}$; the 2 comes from its $4Dt$.
- [any] Not yet. The heat kernel has RMS width $\sqrt{2Dt}$.
:::
:::

::: check
kind: choice

## Which of these is a Green's function?

- [ ] A circuit's step response
- [x] A circuit's impulse response
- [ ] A circuit's frequency response
- [ ] A circuit's transfer function's poles

::: misses
- [1] A step isn't a point source; the step response is the Green's function integrated.
- [3] That's the Green's function's Fourier transform.
- [4] Poles describe it, but the Green's function is the response itself.
:::
:::

::: check
kind: parts
given: q = 1 | 5; h = 0.1 | 0.5

## A {q} nC charge is {h} m above a grounded plane. The induced charge density is $\sigma(\rho) = -\frac{qh}{2\pi(\rho^2 + h^2)^{3/2}}$.

::: part
answer: -q/(2*pi*h^2)
unit: nC/m²
tolerance: 0.5%

### What is σ directly below the charge, in nC/m²?

::: misses
- [-q/(4*pi*h^2)] The image doubles the field at the plane.
- [any] Put ρ = 0.
:::
:::

::: part
answer: -q/(2*pi*h^2*2^1.5)
tolerance: 0.5%

### What is it at a distance {h} m along the plane from that spot?

::: misses
- [-q/(4*pi*h^2)] The denominator is $(2h^2)^{3/2}$.
- [any] Put ρ = h.
:::
:::
:::

::: check
kind: derivation
vars: h = 0.5..2, x = -2..2, y = 0..0.4

## A charge sits at height h above a grounded plane y = 0. Its image is at −h.

::: step
answer: 1/sqrt(x^2 + (y - h)^2) - 1/sqrt(x^2 + (y + h)^2)

### In units of $\frac{q}{4\pi\varepsilon_0}$, what is φ at (x, y)?
:::

::: step
answer: -2*h/(x^2 + h^2)^1.5

### In the same units, what is $E_y = -\partial\varphi/\partial y$ on the plane?
:::

::: right
Right. The field meets the plane at right angles, and $\sigma = \varepsilon_0E_y$ is the induced charge, which totals −q.
:::
:::

::: explain
## Why is Coulomb's law enough to find the potential of any charge distribution in free space?

::: model
Poisson's equation, $-\nabla^2\varphi = \rho/\varepsilon_0$, is linear, so the potential of a sum of sources is the sum of their potentials. Any charge distribution can be cut into tiny pieces, each a point charge $\rho\,dV$, and Coulomb's law gives each piece's potential: $\frac{\rho\,dV}{4\pi\varepsilon_0 r}$, which is exactly the free-space Green's function times the source. Adding up the pieces is the integral $\varphi = \int\frac{\rho(\mathbf r')}{4\pi\varepsilon_0\lvert\mathbf r - \mathbf r'\rvert}dV'$. With conductors present, the Green's function changes (images, for simple shapes), but the method stays the same.
:::
:::

::: practice

::: check
given: x = 0.1 | 0.35; s = 0.6 | 0.8
answer: x*(1 - s)
tolerance: 0.5%

## $G(\given{x}, \given{s})$ on (0, 1)?

::: misses
- [any] $x(1 - s)$.
:::
:::

::: check
given: q = 15 | 60; L = 1.5 | 3; T = 200 | 500
answer: q*L^2/(8*T)*1000
unit: mm
tolerance: 0.5%

## Mid sag: {q} N/m over {L} m at {T} N?

::: misses
- [any] $qL^2/(8T)$.
:::
:::

::: check
given: D = 10 | 25; t = 0.5 | 5
answer: sqrt(2*D*1e-4*t*1e-6)*1e6
unit: µm
tolerance: 0.5%

## RMS spread after {t} µs, D = {D} cm²/s?

::: misses
- [any] $\sqrt{2Dt}$.
:::
:::
:::
