Green's Functions: the Response to a Point Source

Press a single finger down on a stretched elastic string and it sags into a sharp tent — one crisp peak under your fingertip, straight lines running off to the fixed ends. Now imagine pressing with a whole handful of fingers at once, each with its own weight. The string's total shape is just the sum of all the individual tents, one per finger. That everyday fact is the entire idea of a Green's function: if you know how a system responds to a single sharp poke, you can build its response to any load at all, simply by adding up pokes.

This page is about that one move: solve an inhomogeneous equation by finding the response to a point source (a delta function) and superposing. The Green's function G(x; x') is that elementary response — the field at x produced by a unit point source sitting at x' — and the full solution is an integral of G against the actual source. It is the continuous cousin of "invert the matrix": where linear algebra writes \mathbf{u} = A^{-1}\mathbf{f}, a differential operator writes u = \int G\,f. This ties directly back to the eigenfunction expansions of the last page — we will see the two viewpoints are the same object seen from two sides.

The point source: a delta function

A "point source" — a unit of force, charge, or heat deposited at a single spot — is idealised by the Dirac delta \delta(x - x'). It is zero everywhere except at x = x', infinitely spiky there, and yet encloses unit area:

\delta(x - x') = 0 \text{ for } x \neq x', \qquad \int_{-\infty}^{\infty}\delta(x - x')\,dx = 1.

Its defining talent is the sifting property: integrated against any function, it plucks out that function's value at the spike,

\int_{-\infty}^{\infty} f(x')\,\delta(x - x')\,dx' = f(x).

And this is the crucial re-reading: that equation says any source f is itself a continuous pile of point sources — one delta at each location x', weighted by f(x'). If we can solve the equation for a single delta, linearity and this decomposition will hand us the solution for every f.

Defining the Green's function

Take a linear differential operator \mathcal{L} (say \mathcal{L} = -d^2/dx^2 for our string, or -\nabla^2 for electrostatics) and the inhomogeneous problem we actually want to solve, with some load f and homogeneous boundary conditions:

\mathcal{L}\,u(x) = f(x).

The Green's function G(x; x') is defined as the response to a unit point source at x', obeying the same boundary conditions:

Check the second line — it is a one-liner given the first. Apply \mathcal{L} (which acts on x, so it slides inside the integral over x'):

\mathcal{L}\,u = \int \mathcal{L}\,G(x; x')\,f(x')\,dx' = \int \delta(x - x')\,f(x')\,dx' = f(x).

The sifting property closes it. Find G once, and every source is solved by a single integral — no need to re-solve the differential equation for each new load.

The string's Green's function is a tent

Let us actually build one. A string of unit length is pinned at both ends, u(0) = u(1) = 0, and we push down at a single point x':

-\frac{d^2 G}{dx^2} = \delta(x - x'), \qquad G(0; x') = G(1; x') = 0.

Away from the source the right side is zero, so G is a straight line on each side of x' (since G'' = 0). It must vanish at both ends, so it rises linearly from 0 at the left, reaches a peak at the source, then falls linearly to 0 at the right — a tent. Matching continuity at x' and the unit "kink" that the delta forces in the slope (G' jumps by -1 across the source) fixes it completely:

G(x; x') = \begin{cases} x\,(1 - x'), & x \le x', \\[4pt] x'\,(1 - x), & x \ge x'. \end{cases}

Drag the source position x' below and watch the tent's peak follow your finger. Two things to notice: the peak height is x'(1-x') — largest when you press in the middle, smaller near the ends where the fixed supports are close — and the picture is perfectly symmetric under swapping x \leftrightarrow x', the reciprocity promised above.

Superposing tents to solve a real load

Now put the machine to work. Suppose the string carries a distributed load f(x') — its own weight, say. The deflection is just the integral of the tent against the load:

u(x) = \int_0^1 G(x; x')\,f(x')\,dx'.

For a uniform load f = 1 you can do the integral by hand (split it at x into the two pieces of the tent) and out drops the familiar sagging parabola

u(x) = \tfrac{1}{2}\,x\,(1 - x).

A hanging string under its own weight sags as a parabola — and we got it without ever re-solving a differential equation, just by adding up tents. That is the whole payoff: the Green's function is the differential operator's inverse, computed once and reused for every source you can dream up.

Beautifully — they are the same object in two languages. Since the eigenfunctions X_n of the operator form a complete orthogonal basis, you can expand the Green's function itself in them. Writing \mathcal{L}X_n = \lambda_n X_n, the delta's expansion and orthogonality give the spectral representation

G(x; x') = \sum_{n} \frac{X_n(x)\,X_n(x')}{\lambda_n}.

Look what this says. Inverting the operator (that is what G does) amounts to dividing each eigen-component by its eigenvalue \lambda_n — exactly as inverting a matrix means dividing by its eigenvalues in the eigenbasis. The symmetry G(x;x') = G(x';x) is now obvious from the formula. And you can see why a zero eigenvalue is trouble: it would put a 1/0 in the sum, the continuum echo of a singular, non-invertible matrix. The point-source picture and the eigenfunction picture are one idea wearing two hats.

A Green's function is glued to its operator, domain, and boundary conditions — it is not a universal formula. A frequent slip is to memorise "the Green's function is x(1-x')" and reach for it everywhere. But that tent belongs specifically to -d^2/dx^2 on [0,1] with fixed ends. Change any ingredient and G changes:

In short: there is a different Green's function for every (operator + domain + boundary conditions). Always derive it for the problem in front of you.

Superposition, numerically

You can watch the integral u(x) = \int_0^1 G(x;x')\,f(x')\,dx' reproduce the analytic sag. This sums the tent responses of a uniform load (f = 1) and compares the deflection at the midpoint x = \tfrac12 to the exact answer \tfrac12\cdot\tfrac12\cdot\tfrac12 = 0.125:

function G(x: number, xp: number): number { return x <= xp ? x * (1 - xp) : xp * (1 - x); // the tent } function deflection(x: number): number { // ∫₀¹ G(x,x')·1 dx', uniform load const N = 2000, dxp = 1 / N; let u = 0; for (let i = 0; i < N; i++) { const xp = (i + 0.5) * dxp; // midpoint sample of the source u += G(x, xp) * 1 * dxp; // superpose the tent for this point source } return u; } console.log(`u(0.5) numerically = ${deflection(0.5).toFixed(4)}`); console.log(`exact ½·x(1−x) at x=0.5 = ${(0.5 * 0.5 * 0.5).toFixed(4)}`);

Adding up point-source tents reproduces the sagging parabola exactly. That is a Green's function earning its keep: solve the impulse once, integrate, done.