Green's Functions for Boundary Value Problems

Suppose a taut string is pinned at both ends. A load is distributed along its length. What is the shape of the string? A physicist's instinct is to first ask a simpler question. What shape does the string take if the load is concentrated at a single point? Once that "unit response" is known, the response to any distributed load can be assembled by superposition. This works because the underlying equation is linear. This unit response is the Green's function. The assembly process is an integral rather than a sum. This is because a continuum of point loads replaces a discrete collection. This idea — solve for a point source once, then integrate against the actual data — is one of the most powerful organizing principles in the analysis of differential equations. It converts a boundary value problem, which asks for a function satisfying constraints everywhere on a domain and its boundary, into an explicit integral formula. It also separates the two sources of difficulty in an inhomogeneous linear boundary value problem. These are the geometry and boundary conditions (encoded once and for all in the Green's function) and the specific forcing term (which enters only through an integral). The construction rests on two pillars already in hand. The first is Sturm-Liouville Theory, which supplies self-adjoint linear operators with well-behaved eigenfunctions. The second is Laplace's Equation and Harmonic Functions, which supplies the model elliptic problem. Green's functions were first perfected there by George Green himself. The Green's function unifies ordinary two-point boundary value problems and the Dirichlet problem for Laplace's and Poisson's equations. With suitable modification, it also unifies a wide class of self-adjoint elliptic boundary value problems. This article builds the Green's function from the ground up. It starts from the defining properties of a point-source response. It proceeds through a rigorous existence and uniqueness theorem for regular Sturm–Liouville problems. It ends with the explicit representation formula for solutions. It treats the ordinary differential equation case in full rigor. It sketches the partial differential equation case, setting the stage for later discussions of well-posedness.

Key takeaways
  • A Green's function G(x,s)G(x,s) is the response of a linear boundary value problem to a unit point source at ss.
  • It satisfies the homogeneous equation away from x=sx=s, the prescribed boundary conditions, continuity at x=sx=s, and a jump in derivative there.
  • For a regular Sturm–Liouville problem, GG exists and is unique precisely when the homogeneous problem has only the trivial solution.
  • Once GG is built, the solution of the inhomogeneous problem is the single integral u(x)=∫G(x,s)f(s) dsu(x) = \int G(x,s) f(s)\, ds.
  • The same idea generalizes to Laplace's/Poisson's equation, where GG combines a fundamental solution with a correction that fixes the boundary condition.
  • Symmetry G(x,s)=G(s,x)G(x,s) = G(s,x) reflects the self-adjointness of the underlying operator.
  • Key idea: encode geometry and boundary conditions once in GG; encode the forcing separately in an integral against GG.

Where this lives today

Green's functions are the computational backbone of quantum mechanics and quantum field theory, where the propagator (Green's function of the Schrödinger or Klein–Gordon operator) encodes how a particle created at one spacetime point evolves to another; Feynman diagrams are literally built from products and convolutions of Green's functions. In electromagnetism and acoustics, the Green's function for the Helmholtz operator gives the radiation pattern of a point source (an antenna element or a point acoustic driver), and antenna arrays or reflector antennas are analyzed by integrating this kernel against the source distribution. In structural engineering, the beam-deflection Green's function (the influence function for a point load) is a standard tool for computing deflections under arbitrary distributed loads, directly generalizing Example 1. In probability and stochastic processes, the Green's function of a diffusion generator is essentially the expected occupation density of a stochastic process before it exits a domain, linking directly to Brownian motion and potential theory. In numerical analysis, Green's functions underlie boundary element methods, which discretize boundary integrals rather than the whole domain, using exactly the fundamental-solution-plus-correction idea of Example 2. Finally, the existence theory here — non-resonance ⇒\Rightarrow unique bounded solution operator — is the ODE/PDE prototype for the general study of Well-Posedness of PDE Problems, where existence, uniqueness, and continuous dependence on data are examined systematically.

:::quiz[If a student solves u′′+u=fu''+u=f on [0,π][0,\pi] with u(0)=u(π)=0u(0)=u(\pi)=0 for arbitrary continuous ff using an "ordinary" Green's function formula, the error is...]

  • No error; the formula always works for linear ODEs
  • Ignoring that the homogeneous problem has a nontrivial solution sin⁡x\sin x, so no such GG exists and solvability requires f⊥sin⁡xf\perp \sin x ✓
  • The formula only fails if ff is negative somewhere
  • The formula only fails if pp is not smooth

Ask the tutor: How does the Green's function construction change for singular Sturm–Liouville problems, such as Bessel's equation on (0,∞)(0,\infty)?

DefinitionGreen's Function for a Regular Sturm–Liouville Boundary Value Problem

Let LL be the linear differential operator

Lu=ddx ⁣(p(x)dudx)+q(x)u,x∈[a,b],Lu = \frac{d}{dx}\!\left(p(x)\frac{du}{dx}\right) + q(x) u, \qquad x \in [a,b],

with p∈C1[a,b]p \in C^1[a,b], p(x)>0p(x) > 0 on [a,b][a,b], q∈C[a,b]q \in C[a,b] real-valued, and consider the boundary value problem

Lu=f(x),B1[u]=0,B2[u]=0,Lu = f(x), \qquad B_1[u] = 0, \qquad B_2[u] = 0,

where B1,B2B_1, B_2 are linearly independent separated homogeneous boundary conditions at x=ax=a and x=bx=b respectively (e.g. B1[u]=α1u(a)+α2u′(a)B_1[u] = \alpha_1 u(a) + \alpha_2 u'(a), B2[u]=β1u(b)+β2u′(b)B_2[u] = \beta_1 u(b) + \beta_2 u'(b)). A Green's function for this problem is a function G(x,s)G(x,s) defined for (x,s)∈[a,b]×[a,b](x,s) \in [a,b]\times[a,b] such that, for each fixed s∈(a,b)s \in (a,b): 1. (Homogeneous equation) G(x,s)G(x,s) satisfies LxG(x,s)=0L_x G(x,s) = 0 for x≠sx \neq s, and GG is C2C^2 in xx on [a,s)[a,s) and on (s,b](s,b]; 2. (Boundary conditions) B1[G(⋅,s)]=0B_1[G(\cdot,s)] = 0 and B2[G(⋅,s)]=0B_2[G(\cdot,s)] = 0; 3. (Continuity) G(x,s)G(x,s) is continuous at x=sx = s, i.e. G(s−,s)=G(s+,s)G(s^-,s) = G(s^+,s); 4. (Jump condition) the xx-derivative has a prescribed jump at x=sx=s:

∂G∂x(s+,s)−∂G∂x(s−,s)=1p(s).\frac{\partial G}{\partial x}(s^+,s) - \frac{\partial G}{\partial x}(s^-,s) = \frac{1}{p(s)}.

Equivalently, GG solves, in the sense of distributions, LxG(x,s)=δ(x−s)L_x G(x,s) = \delta(x-s) together with B1[G]=B2[G]=0B_1[G]=B_2[G]=0.

Intuition

Think of the string again: pin it at x=ax=a and x=bx=b, and pluck it with a unit point force at x=sx=s. On each side of ss the string is unloaded, so it must be a straight line (or, for a general Sturm–Liouville operator, a solution of the homogeneous equation) satisfying the boundary condition on that side. At x=sx=s the string cannot tear, so the two pieces must meet continuously; but the point force produces a kink — a jump in slope proportional to the force divided by the tension p(s)p(s). These four requirements (homogeneous away from ss, correct boundary behavior, continuity, prescribed jump) pin down G(x,s)G(x,s) completely, provided the unforced, unloaded string cannot itself sag into a nonzero shape satisfying both boundary conditions (i.e., the homogeneous problem is non-resonant). Once G(x,s)G(x,s) is known, superposition does the rest. A distributed load f(s) dsf(s)\,ds over [s,s+ds][s, s+ds] produces, by linearity, a deflection G(x,s)f(s) dsG(x,s) f(s)\, ds at the observation point xx. Summing over all point loads gives the total deflection as an integral, u(x)=∫abG(x,s)f(s) dsu(x) = \int_a^b G(x,s) f(s)\, ds. This is exactly analogous to how a discrete linear system Au=fA\mathbf{u} = \mathbf{f} is solved by u=A−1f\mathbf{u} = A^{-1}\mathbf{f}: the Green's function is the integral kernel of the inverse operator L−1L^{-1}.

:::svg[The Green's function as a "tent" solving −u′′=δ(x−s)-u'' = \delta(x-s) on [0,1][0,1] with u(0)=u(1)=0u(0)=u(1)=0] x G 0 1 s=0.65 peak = s(1−s) slope = (1−s) slope = −s

Central results

TheoremExistence, Uniqueness, and Representation via the Green's Function

Let p∈C1[a,b]p \in C^1[a,b] with p>0p>0 on [a,b][a,b], q∈C[a,b]q \in C[a,b], and consider the regular Sturm–Liouville boundary value problem

Lu:=(pu′)′+qu=f(x),B1[u]=0, B2[u]=0,(∗)Lu := (pu')' + qu = f(x), \qquad B_1[u]=0,\ B_2[u]=0, \tag{$\ast$}

with f∈C[a,b]f \in C[a,b] and B1,B2B_1,B_2 linearly independent separated homogeneous boundary conditions as above. Assume the associated homogeneous problem

Lu=0,B1[u]=0,B2[u]=0(H)Lu = 0, \qquad B_1[u] = 0, \qquad B_2[u]=0 \tag{H}

has only the trivial solution u≡0u \equiv 0. Then:

(a) There exists a Green's function G(x,s)G(x,s) satisfying properties (1)–(4) of the Definition, and it is unique.

(b) GG is symmetric: G(x,s)=G(s,x)G(x,s) = G(s,x) for all x,s∈[a,b]x,s \in [a,b].

(c) For every f∈C[a,b]f \in C[a,b], the unique solution of (∗)(\ast) is

u(x)=∫abG(x,s) f(s) ds.u(x) = \int_a^b G(x,s)\, f(s)\, ds.
Proof

We use the classical method of variation via homogeneous solutions matched at x=sx=s, which is the standard constructive technique for regular Sturm–Liouville problems; no circular appeal to the representation formula is made anywhere in the construction.

Step 1: Existence, via explicit construction. Because (H) has only the trivial solution, the following two claims hold. Claim 1. Let y1y_1 solve Ly1=0Ly_1 = 0 with B1[y1]=0B_1[y_1]=0, chosen not identically zero (such y1y_1 exists: impose B1[y1]=0B_1[y_1]=0 as one linear condition on the two-dimensional solution space of the homogeneous ODE, leaving a one-dimensional family; pick any nonzero member). Similarly let y2y_2 solve Ly2=0Ly_2=0 with B2[y2]=0B_2[y_2]=0, y2≢0y_2 \not\equiv 0. Claim 2. y1y_1 and y2y_2 are linearly independent. If not, y2=c y1y_2 = c\, y_1 for some constant c≠0c \neq 0 (both nonzero), and then y1y_1 itself would satisfy both B1[y1]=0B_1[y_1]=0 and B2[y1]=c−1B2[y2]=0B_2[y_1] = c^{-1}B_2[y_2] = 0, making y1y_1 a nontrivial solution of (H) — contradicting our hypothesis. Hence y1,y2y_1, y_2 are linearly independent solutions of Ly=0Ly=0. Since p>0p>0 and p∈C1p\in C^1, the ODE Ly=0Ly=0 is a regular linear second-order equation, so its Wronskian

W(x)=y1(x)y2′(x)−y1′(x)y2(x)W(x) = y_1(x) y_2'(x) - y_1'(x) y_2(x)

is nowhere zero on [a,b][a,b] (Abel's identity: (pW)′=0(pW)' = 0 since y1,y2y_1,y_2 solve the same self-adjoint equation, so p(x)W(x)≡p(x)W(x) \equiv constant c0c_0; if c0=0c_0=0 then W≡0W\equiv 0 on the interval where p>0p>0, forcing linear dependence, a contradiction). Thus p(x)W(x)=c0≠0p(x)W(x) = c_0 \neq 0 for all xx. Now define

G(x,s)={y1(x)y2(s)c0,a≤x≤s,y1(s)y2(x)c0,s≤x≤b.G(x,s) = \begin{cases} \dfrac{y_1(x) y_2(s)}{c_0}, & a \le x \le s, \\[2mm] \dfrac{y_1(s) y_2(x)}{c_0}, & s \le x \le b. \end{cases}

We verify properties (1)–(4): (1) Homogeneous equation. For x<sx<s, G(x,s)=y1(x)⋅(const in x)G(x,s) = y_1(x)\cdot(\text{const in } x), and Lxy1=0L_x y_1 = 0, so LxG=0L_xG=0; similarly for x>sx>s. Each branch is C2C^2 in xx since y1,y2∈C2y_1,y_2 \in C^2. (2) Boundary conditions. For xx near aa (so x≤sx \le s, assuming s>as>a), G(x,s)=y1(x)y2(s)/c0G(x,s) = y_1(x)y_2(s)/c_0, a constant multiple of y1y_1; since B1B_1 is linear and B1[y1]=0B_1[y_1]=0, B1[G(⋅,s)]=y2(s)c0B1[y1]=0B_1[G(\cdot,s)] = \frac{y_2(s)}{c_0}B_1[y_1] = 0. Symmetrically, near x=bx=b, G(x,s)G(x,s) is a multiple of y2y_2, so B2[G(⋅,s)]=y1(s)c0B2[y2]=0B_2[G(\cdot,s)] = \frac{y_1(s)}{c_0}B_2[y_2] = 0. (3) Continuity at x=sx=s. Both branches equal y1(s)y2(s)/c0y_1(s)y_2(s)/c_0 at x=sx=s, so G(s−,s)=G(s+,s)G(s^-,s)=G(s^+,s). (4) Jump condition. Compute

∂G∂x(s+,s)−∂G∂x(s−,s)=y1(s)y2′(s)c0−y1′(s)y2(s)c0=W(s)c0=p(s)W(s)c0 p(s)=1p(s),\frac{\partial G}{\partial x}(s^+,s) - \frac{\partial G}{\partial x}(s^-,s) = \frac{y_1(s)y_2'(s)}{c_0} - \frac{y_1'(s)y_2(s)}{c_0} = \frac{W(s)}{c_0} = \frac{p(s)W(s)}{c_0\, p(s)} = \frac{1}{p(s)},

using c0=p(s)W(s)c_0 = p(s)W(s). This is exactly the required jump. So GG as constructed satisfies (1)–(4); existence is proved.

Step 2: Uniqueness. Suppose G1,G2G_1, G_2 both satisfy (1)–(4) for the same problem. Fix s∈(a,b)s\in(a,b) and set h(x)=G1(x,s)−G2(x,s)h(x) = G_1(x,s) - G_2(x,s). On [a,s)[a,s) and (s,b](s,b], Lxh=0L_xh = 0 by linearity of LL. At x=sx=s, hh is continuous (both GiG_i are), and the jump in h′h' is (1p(s)−1p(s))=0\left(\frac1{p(s)}-\frac1{p(s)}\right)=0, so hh is actually C1C^1 across ss; since hh also solves the linear ODE Lh=0Lh=0 on each side and matches value and derivative at ss, standard ODE uniqueness (Picard–Lindelöf, applicable since p∈C1p\in C^1, p>0p>0, qq continuous) shows hh extends to a single C2C^2 solution of Lh=0Lh=0 on all of [a,b][a,b]. Moreover B1[h]=B1[G1(⋅,s)]−B1[G2(⋅,s)]=0B_1[h]=B_1[G_1(\cdot,s)]-B_1[G_2(\cdot,s)]=0 and likewise B2[h]=0B_2[h]=0. So hh solves the homogeneous problem (H), and by hypothesis h≡0h\equiv 0. Hence G1=G2G_1=G_2.

Step 3: Symmetry. From the explicit formula, for x≤sx\le s: G(x,s)=y1(x)y2(s)/c0G(x,s) = y_1(x)y_2(s)/c_0, while for s≤xs \le x (relabeling the roles), G(s,x)=y1(s)y2(x)/c0G(s,x) = y_1(s)y_2(x)/c_0 if s≤xs \le x. Take x≤sx \le s; then in G(s,x)G(s,x) we have "first argument ss, second argument xx" with x≤sx \le s, which by definition of GG (with the roles of variable/parameter swapped, xx playing the role of the parameter and ss the variable, s≥xs\ge x) gives G(s,x)=y1(x)y2(s)/c0G(s,x) = y_1(x) y_2(s)/c_0. This matches G(x,s)G(x,s) exactly. The symmetric case x≥sx \ge s is identical by swapping labels. Hence G(x,s)=G(s,x)G(x,s)=G(s,x) for all x,sx,s.

Step 4: The representation formula. Define u(x)=∫abG(x,s)f(s) dsu(x) = \int_a^b G(x,s) f(s)\,ds using the GG from Step 1; split as

u(x)=y2(x)∫axy1(s)f(s)c0 ds+y1(x)∫xby2(s)f(s)c0 ds.u(x) = y_2(x)\int_a^x \frac{y_1(s) f(s)}{c_0}\,ds + y_1(x)\int_x^b \frac{y_2(s) f(s)}{c_0}\,ds.

This is precisely the classical variation of parameters formula for the second-order linear ODE Lu=fLu=f; we verify it directly rather than citing it as a black box. Differentiate using Leibniz's rule:

u′(x)=y2′(x)∫axy1fc0 ds+y2(x)y1(x)f(x)c0+y1′(x)∫xby2fc0 ds−y1(x)y2(x)f(x)c0.u'(x) = y_2'(x)\int_a^x \frac{y_1 f}{c_0}\,ds + \frac{y_2(x) y_1(x) f(x)}{c_0} + y_1'(x)\int_x^b \frac{y_2 f}{c_0}\,ds - \frac{y_1(x) y_2(x) f(x)}{c_0}.

The last two extra terms from differentiating the limits cancel exactly, leaving

u′(x)=y2′(x)∫axy1fc0 ds+y1′(x)∫xby2fc0 ds.u'(x) = y_2'(x)\int_a^x \frac{y_1 f}{c_0}\,ds + y_1'(x)\int_x^b \frac{y_2 f}{c_0}\,ds.

Differentiate again similarly:

u′′(x)=y2′′(x)∫axy1fc0ds+y2′(x)y1(x)f(x)c0+y1′′(x)∫xby2fc0ds−y1′(x)y2(x)f(x)c0.u''(x) = y_2''(x)\int_a^x \frac{y_1f}{c_0}ds + \frac{y_2'(x) y_1(x) f(x)}{c_0} + y_1''(x)\int_x^b \frac{y_2f}{c_0}ds - \frac{y_1'(x) y_2(x) f(x)}{c_0}.

Now apply L=(p ⋅′)′+q⋅=p (⋅)′′+p′(⋅)′+q(⋅)L = (p\,\cdot')' + q\cdot = p\,(\cdot)'' + p'(\cdot)' + q(\cdot) to uu; the integral terms combine to give (since Ly1=Ly2=0Ly_1=Ly_2=0)

Lu(x)=(∫axy1fc0ds)Ly2(x)+(∫xby2fc0ds)Ly1(x)+p(x)⋅f(x)(y2′(x)y1(x)−y1′(x)y2(x))c0Lu(x) = \left(\int_a^x \frac{y_1 f}{c_0}ds\right) Ly_2(x) + \left(\int_x^b \frac{y_2 f}{c_0}ds\right)Ly_1(x) + p(x)\cdot \frac{f(x)\left(y_2'(x)y_1(x) - y_1'(x)y_2(x)\right)}{c_0}
=0+0+p(x)⋅−f(x)W(x)c0⋅(−1)=p(x)W(x)c0f(x)=f(x),= 0 + 0 + p(x) \cdot \frac{-f(x) W(x)}{c_0} \cdot(-1)= \frac{p(x)W(x)}{c_0} f(x) = f(x),

using p(x)W(x)=c0p(x)W(x)=c_0 from Step 1. So Lu=fLu=f. For the boundary conditions: at x=ax=a, the first integral ∫aa(⋯ )=0\int_a^a(\cdots) = 0, so u(a)=y1(a)⋅(something)u(a) = y_1(a)\cdot(\text{something}) and u′(a)=y1′(a)⋅(something)u'(a) = y_1'(a)\cdot(\text{something}) — precisely, uu restricted near aa is a scalar multiple (depending on ff) of y1y_1 plus zero, so B1[u]=(that scalar)⋅B1[y1]=0B_1[u] = (\text{that scalar})\cdot B_1[y_1] = 0. Symmetrically B2[u]=0B_2[u]=0 at x=bx=b since the second integral vanishes there and uu becomes a multiple of y2y_2. Thus uu solves (∗)(\ast). Uniqueness of this solution follows because if u1,u2u_1,u_2 both solve (∗)(\ast), w=u1−u2w=u_1-u_2 solves the homogeneous problem (H), hence w≡0w\equiv 0 by hypothesis. This proves part (c), completing the proof. ■\blacksquare

∎
CorollaryGreen's function and the inverse operator

Under the hypotheses of the Theorem, the solution map f↦uf \mapsto u of (∗)(\ast) is a bounded linear integral operator on C[a,b]C[a,b] with kernel GG; that is, L−1L^{-1} (restricted to the boundary conditions B1,B2B_1,B_2) is exactly integration against GG. Since GG is continuous on the compact square [a,b]2[a,b]^2 (each branch is a product of continuous functions, and the two branches agree at x=sx=s by property (3)), GG is bounded, so

∥u∥∞≤(b−a) ∥G∥∞ ∥f∥∞,\|u\|_\infty \le (b-a)\, \|G\|_\infty \, \|f\|_\infty,

giving a quantitative stability estimate for the solution in terms of the data ff.

Worked examples

Example 1 — asymmetric boundary conditions and non-constant loading. Solve

u′′=f(x),u(0)=0,u′(1)+u(1)=0,f(x)=x,x∈[0,1].u'' = f(x), \qquad u(0) = 0, \qquad u'(1) + u(1) = 0, \qquad f(x) = x, \quad x\in[0,1].

Here p≡1p\equiv 1, q≡0q\equiv 0, B1[u]=u(0)B_1[u]=u(0), B2[u]=u′(1)+u(1)B_2[u] = u'(1)+u(1). Homogeneous problem check. u′′=0⇒u=c1+c2xu''=0 \Rightarrow u = c_1 + c_2 x. B1[u]=c1=0B_1[u]=c_1=0. Then u=c2xu=c_2 x, and B2[u]=c2+c2=2c2=0⇒c2=0B_2[u] = c_2 + c_2 = 2c_2 = 0 \Rightarrow c_2=0. So only the trivial solution — the hypothesis of the Theorem holds, and GG exists uniquely. Building y1,y2y_1,y_2. Take y1(x)=xy_1(x) = x (satisfies y1(0)=0y_1(0)=0). Take y2(x)=1−xy_2(x) = 1 - x; check B2[y2]=y2′(1)+y2(1)=(−1)+0=−1≠0B_2[y_2] = y_2'(1) + y_2(1) = (-1) + 0 = -1 \ne 0 — wrong choice, try again: we need y2′(1)+y2(1)=0y_2'(1)+y_2(1)=0. Try y2(x)=2−xy_2(x) = 2 - x: then y2′(1)+y2(1)=−1+1=0y_2'(1)+y_2(1) = -1 + 1 = 0. Good, so y2(x)=2−xy_2(x) = 2-x. Wronskian. W(x)=y1y2′−y1′y2=x(−1)−1(2−x)=−x−2+x=−2W(x) = y_1 y_2' - y_1' y_2 = x(-1) - 1(2-x) = -x - 2 + x = -2. Since p≡1p\equiv1, c0=p W=−2c_0 = p\,W = -2. Green's function.

G(x,s)={y1(x)y2(s)c0=x(2−s)−2=−x(2−s)2,x≤s,y1(s)y2(x)c0=s(2−x)−2=−s(2−x)2,x≥s.G(x,s) = \begin{cases} \dfrac{y_1(x) y_2(s)}{c_0} = \dfrac{x(2-s)}{-2} = -\dfrac{x(2-s)}{2}, & x \le s,\\[2mm] \dfrac{y_1(s) y_2(x)}{c_0} = \dfrac{s(2-x)}{-2} = -\dfrac{s(2-x)}{2}, & x \ge s. \end{cases}

Check continuity at x=sx=s: both give −s(2−s)/2-s(2-s)/2. ✓. Check jump: ∂xG(s+,s)=−−s2=s2\partial_xG(s^+,s) = -\frac{-s}{2}=\frac{s}{2}... let's compute carefully. For x>sx>s, G=−s(2−x)2=sx2−sG=-\frac{s(2-x)}{2} = \frac{s x}{2} - s; so ∂xG=s2\partial_x G = \frac{s}{2}. For x<sx<s, G=−x(2−s)2=x(s−2)2G = -\frac{x(2-s)}{2} = \frac{x(s-2)}{2}; so ∂xG=s−22\partial_xG = \frac{s-2}{2}. Jump =s2−s−22=22=1=1/p(s)=\frac{s}{2} - \frac{s-2}{2} = \frac{2}{2}=1 = 1/p(s). ✓ (since p≡1p\equiv1). Solution.

u(x)=∫0xG(x,s) s ds+∫x1G(x,s) s ds=∫0x(−s(2−x)2)s ds+∫x1(−x(2−s)2)s ds.u(x) = \int_0^x G(x,s)\,s\,ds + \int_x^1 G(x,s)\,s\,ds = \int_0^x \left(-\frac{s(2-x)}2\right) s\,ds + \int_x^1\left(-\frac{x(2-s)}{2}\right)s\,ds.

First integral:

−2−x2∫0xs2 ds=−2−x2⋅x33=−x3(2−x)6.-\frac{2-x}{2}\int_0^x s^2\,ds = -\frac{2-x}{2}\cdot\frac{x^3}{3} = -\frac{x^3(2-x)}{6}.

Second integral:

−x2∫x1(2s−s2) ds=−x2[s2−s33]x1=−x2[(1−13)−(x2−x33)]=−x2[23−x2+x33].-\frac{x}{2}\int_x^1 (2s - s^2)\,ds = -\frac{x}{2}\left[s^2 - \frac{s^3}{3}\right]_x^1 = -\frac{x}{2}\left[\left(1-\tfrac13\right) - \left(x^2 - \tfrac{x^3}{3}\right)\right] = -\frac{x}{2}\left[\frac23 - x^2 + \frac{x^3}{3}\right].

So

u(x)=−x3(2−x)6−x2(23−x2+x33)=−2x3−x46−x33+x32−x46.u(x) = -\frac{x^3(2-x)}{6} - \frac{x}{2}\left(\frac23 - x^2 + \frac{x^3}{3}\right) = -\frac{2x^3 - x^4}{6} - \frac{x^3}{3} + \frac{x^3}{2} - \frac{x^4}{6}.

Combine: −2x36+x46−x46−x33+x32=−x33−x33+x32=x3(−23+12)=x3(−16)=−x36-\frac{2x^3}{6} + \frac{x^4}{6} - \frac{x^4}{6} - \frac{x^3}{3} + \frac{x^3}{2} = -\frac{x^3}{3} - \frac{x^3}{3} + \frac{x^3}{2} = x^3\left(-\frac23 + \frac12\right) = x^3\left(-\frac16\right) = -\frac{x^3}{6}. So u(x)=−x3/6+u(x) = -x^3/6 + nothing else? Let's recheck: the x4x^4 terms canceled entirely, leaving u(x)=−x36u(x) = -\dfrac{x^3}{6}. Direct check. If u=−x3/6u=-x^3/6, then u′′=−xu''=-x. But we need u′′=xu''=x! There's a sign slip — let's recheck by direct integration instead, as a cross-check on the whole computation. Direct solving: u′′=x⇒u′=x2/2+A⇒u=x3/6+Ax+Bu'' = x \Rightarrow u' = x^2/2 + A \Rightarrow u = x^3/6 + Ax + B. u(0)=0⇒B=0u(0)=0 \Rightarrow B=0. u′(1)+u(1)=(1/2+A)+(1/6+A)=2/3+2A=0⇒A=−1/3u'(1)+u(1) = (1/2+A) + (1/6+A) = 2/3 + 2A = 0 \Rightarrow A = -1/3. So

u(x)=x36−x3.u(x) = \frac{x^3}{6} - \frac{x}{3}.

This is the correct answer via direct integration; comparing to the Green's function computation, the sign error traces to the definition c0=p(s)W(s)c_0=p(s)W(s) used with the correct-sign jump — the jump condition requires ∂xG(s+,s)−∂xG(s−,s)=1/p(s)=1\partial_xG(s^+,s)-\partial_xG(s^-,s) = 1/p(s) = 1 which we verified holds, and the construction is provably correct by the Theorem, so the arithmetic error is in the final integral evaluation. Redoing the second integral:

−x2[23−x2+x33]=−x3+x32−x46.-\frac{x}{2}\left[\frac23 - x^2+\frac{x^3}{3}\right] = -\frac{x}{3} + \frac{x^3}{2} - \frac{x^4}{6}.

First integral again: −x3(2−x)6=−2x36+x46=−x33+x46-\frac{x^3(2-x)}{6} = -\frac{2x^3}{6}+\frac{x^4}{6} = -\frac{x^3}{3}+\frac{x^4}{6}. Sum: (−x33+x46)+(−x3+x32−x46)=−x3+x3(−13+12)+x4(0)=−x3+x36.\left(-\frac{x^3}{3}+\frac{x^4}{6}\right) + \left(-\frac{x}{3}+\frac{x^3}{2}-\frac{x^4}{6}\right) = -\frac{x}{3} + x^3\left(-\frac13+\frac12\right) + x^4(0) = -\frac{x}{3} + \frac{x^3}{6}. So correctly, u(x)=x36−x3u(x) = \dfrac{x^3}{6} - \dfrac{x}{3}, matching the direct-integration check exactly (the earlier combination step mis-copied a term). This agreement confirms the Green's function construction and the representation formula.

Example 2 — Poisson's equation on a disk via the method of images (sketch of the PDE analogue). Consider −Δu=f-\Delta u = f in the unit disk D={(x,y):x2+y2<1}⊂R2D=\{(x,y): x^2+y^2<1\}\subset\mathbb R^2, with u=0u=0 on ∂D\partial D. Write points as x,s∈D\mathbf{x}, \mathbf{s} \in D. The free-space fundamental solution of −Δ-\Delta in two dimensions is

Φ(x,s)=−12πln⁡∣x−s∣,\Phi(\mathbf x,\mathbf s) = -\frac{1}{2\pi}\ln|\mathbf x - \mathbf s|,

satisfying −ΔxΦ(x,s)=δ(x−s)-\Delta_{\mathbf x}\Phi(\mathbf x,\mathbf s) = \delta(\mathbf x - \mathbf s) but not vanishing on ∂D\partial D. To correct the boundary behavior, reflect s\mathbf s to its inverse point s∗=s/∣s∣2\mathbf s^* = \mathbf s/|\mathbf s|^2 (for s≠0\mathbf s\ne 0) and set

G(x,s)=−12πln⁡∣x−s∣+12πln⁡(∣s∣ ∣x−s∗∣).G(\mathbf x,\mathbf s) = -\frac1{2\pi}\ln|\mathbf x-\mathbf s| + \frac1{2\pi}\ln\left(|\mathbf s|\,|\mathbf x - \mathbf s^*|\right).

One verifies directly: (i) for x≠s\mathbf x\ne \mathbf s in DD, the correction term is harmonic in x\mathbf x (since s∗∉D\mathbf s^*\notin D), so −ΔxG=δ(x−s)-\Delta_{\mathbf x} G = \delta(\mathbf x-\mathbf s) inside DD; (ii) on ∣x∣=1|\mathbf x|=1, using ∣x−s∗∣=∣x∣∣s∗−x/∣x∣2∣⋯|\mathbf x - \mathbf s^*| = |\mathbf x||\mathbf s^{*}-\mathbf x/|\mathbf x|^2|\cdots, a direct computation with ∣x∣=1|\mathbf x|=1 gives ∣x−s∗∣=∣s∣−1∣x−s∣|\mathbf x-\mathbf s^*| = |\mathbf s|^{-1}|\mathbf x - \mathbf s|, so

G(x,s)∣∣x∣=1=−12πln⁡∣x−s∣+12πln⁡(∣s∣⋅∣s∣−1∣x−s∣)=0.G(\mathbf x,\mathbf s)\Big|_{|\mathbf x|=1} = -\frac1{2\pi}\ln|\mathbf x-\mathbf s| + \frac1{2\pi}\ln\left(|\mathbf s|\cdot |\mathbf s|^{-1}|\mathbf x-\mathbf s|\right) = 0.

Thus GG vanishes on ∂D\partial D as required, and it is the Green's function for the Dirichlet problem on the disk, playing exactly the same role as the ODE Green's function: the solution of −Δu=f-\Delta u = f, u∣∂D=0u|_{\partial D}=0 is

u(x)=∫DG(x,s) f(s) dA(s).u(\mathbf x) = \int_D G(\mathbf x,\mathbf s)\, f(\mathbf s)\, dA(\mathbf s).

This is the method of images construction underlying Laplace's Equation and Harmonic Functions, and it is the two-dimensional analogue of the matched-branch construction of Example 1: a fundamental (point-source) solution plus a homogeneous correction chosen to enforce the boundary condition.

Counterexampledropping the non-resonance hypothesis

Consider u′′=f(x)u'' = f(x) on [0,π][0,\pi] with periodic-looking but resonant boundary conditions

u(0)=0,u(π)=0.u(0) = 0, \qquad u(\pi) = 0.

Wait — check the homogeneous problem: u′′=0u''=0, u=c1+c2xu=c_1+c_2x, u(0)=c1=0u(0)=c_1=0, u(π)=c2π=0⇒c2=0u(\pi)=c_2\pi=0\Rightarrow c_2=0. This case is non-resonant (matches Example 1's structure), so instead take the genuinely resonant example: consider

u′′+u=f(x),u(0)=0,u(π)=0.u'' + u = f(x), \qquad u(0) = 0, \qquad u(\pi) = 0.

Here p≡1p\equiv1, q≡1q\equiv1. The homogeneous problem u′′+u=0u''+u=0 has general solution u=c1cos⁡x+c2sin⁡xu = c_1\cos x + c_2\sin x. Impose u(0)=c1=0u(0)=c_1=0. Then u=c2sin⁡xu=c_2\sin x, and u(π)=c2sin⁡π=0u(\pi) = c_2\sin\pi = 0 automatically, for every c2c_2. So the homogeneous problem has the nontrivial solution family u=c2sin⁡xu=c_2\sin x: the non-resonance hypothesis of the Theorem fails. Consequences: the Theorem's construction breaks down at the very first step. Attempting to build y1y_1 (solving the ODE with B1[y1]=0B_1[y_1]=0) forces y1=sin⁡xy_1 = \sin x up to scale; attempting y2y_2 (with B2[y2]=0B_2[y_2]=0) also forces y2=sin⁡xy_2=\sin x up to scale, since u(π)=0u(\pi)=0 likewise selects multiples of sin⁡x\sin x. Thus y1y_1 and y2y_2 are linearly dependent, the Wronskian W≡0W\equiv 0, and the formula G=y1y2/(pW)G = y_1y_2/(p W) has a zero in the denominator: no Green's function of the required type exists. Moreover, the inhomogeneous problem u′′+u=fu''+u=f, u(0)=u(π)=0u(0)=u(\pi)=0 is not always solvable, and when it is solvable, the solution is not unique (one may add any multiple of sin⁡x\sin x). Concretely take f(x)=sin⁡xf(x) = \sin x: multiplying the ODE by sin⁡x\sin x and integrating by parts twice shows a solvability (Fredholm alternative) condition ∫0πf(x)sin⁡x dx=0\int_0^\pi f(x)\sin x\, dx = 0 is necessary; here ∫0πsin⁡2x dx=π/2≠0\int_0^\pi \sin^2x\,dx = \pi/2 \ne 0, so no solution exists at all. This shows precisely what fails without the non-resonance hypothesis: existence of a genuine point-source Green's function, existence of solutions for arbitrary ff, and uniqueness all fail simultaneously. (When solutions do exist, e.g. for ff orthogonal to sin⁡x\sin x, one instead needs a modified Green's function orthogonal to the resonant mode — a refinement beyond the basic construction given here.)

Scope, edge cases & common traps

SituationWhat happens
Homogeneous problem has only trivial solutionTheorem applies; unique GG exists, symmetric, representation formula holds
Homogeneous problem has nontrivial solutions (resonance)No ordinary Green's function; Fredholm alternative governs solvability; need modified Green's function
p(x)→0p(x) \to 0 at an endpoint (singular Sturm–Liouville)Construction must be redone with a "bounded/regular at singular endpoint" condition replacing a boundary condition
Self-adjoint elliptic PDE (e.g. Poisson) instead of an ODEPoint source δ(x−s)\delta(\mathbf x-\mathbf s) replaced by fundamental solution plus boundary correction; same logical skeleton
Non-self-adjoint boundary conditions (mixed, non-separated)GG generally loses the symmetry property G(x,s)=G(s,x)G(x,s)=G(s,x)

The mathematician behind it

Origins · 1 minGeorge Green and how this was discovered
GG
George Green
1793–1841 · self-taught miller and mathematician, Nottingham, England

Green worked as a miller with almost no formal education, yet in 1828 privately published An Essay on the Application of Mathematical Analysis to the Theories of Electricity and Magnetism. In it he introduced what are now called Green's functions and Green's theorem, developing potential theory to solve boundary value problems in electrostatics. He entered Cambridge as an undergraduate at age 40 and was later elected a Fellow of Gonville and Caius College, but he died before his work achieved the recognition it deserved; it was largely rediscovered and popularized by William Thomson (Lord Kelvin) after Green's death.

History
- 1828: Green privately publishes his Essay, introducing the function later named after him and Green's theorem, motivated by electrostatic potential problems.
- 1833–1839: Green publishes further papers at Cambridge on hydrodynamics, optics, and elasticity, refining the potential-theoretic techniques.
- 1845–1850s: William Thomson (Lord Kelvin) recovers copies of the Essay and champions Green's methods, embedding them in mainstream potential theory.
- Late 1800s: Green's function methods are absorbed into the theory of linear ordinary and partial differential equations, formalized alongside Sturm–Liouville theory.
- 1900s: The framework generalizes to distributions and fundamental solutions of general linear differential operators, extending Green's original electrostatic picture to arbitrary self-adjoint elliptic and hyperbolic problems.
Why must the homogeneous problem have only the trivial solution for a Green's function to exist?

The construction builds GG from two homogeneous solutions y1,y2y_1,y_2, each tailored to one boundary condition, and divides by their Wronskian. If the homogeneous problem has a nontrivial solution, that solution must simultaneously satisfy both boundary conditions, forcing y1y_1 and y2y_2 to be proportional — collapsing the Wronskian to zero. Dividing by a zero Wronskian is undefined, so the formula for GG breaks down entirely, not just numerically but structurally: there is no function with all four defining properties. This is precisely the content of the Fredholm alternative: existence of a Green's function is equivalent to invertibility of the associated linear operator, which fails exactly at resonance.

Is the Green's function the same as the fundamental solution of an ODE?

They are closely related but not identical. A fundamental solution of LL solves LΦ=δL\Phi = \delta on the whole line (or space) with no boundary conditions imposed, so it is generally not unique (you can add any homogeneous solution). The Green's function additionally enforces the specific boundary conditions B1,B2B_1,B_2 of the given domain, which typically pins down a unique function once non-resonance holds. In the disk example, Φ(x,s)=−12πln⁡∣x−s∣\Phi(\mathbf x,\mathbf s)=-\frac1{2\pi}\ln|\mathbf x-\mathbf s| is the fundamental solution, while GG adds an image-charge correction to also satisfy u∣∂D=0u|_{\partial D}=0.

Does every boundary value problem have a Green's function?

Only if the associated homogeneous problem has no nontrivial solution — the "non-resonance" condition in the Theorem. If it does have a nontrivial solution, the operator LL (restricted to functions satisfying B1,B2B_1,B_2) is not injective, hence not invertible, and no true point-source Green's function exists in the classical sense. In that resonant case, solvability of Lu=fLu=f becomes conditional (an orthogonality requirement via the Fredholm alternative), and one instead constructs a modified or generalized Green's function orthogonal to the resonant eigenfunction.

How does the Green's function relate to eigenfunction expansions from Sturm–Liouville theory?

If {ϕn}\{\phi_n\} are the orthonormal eigenfunctions of LL (with the same boundary conditions) with eigenvalues λn≠0\lambda_n \ne 0, then formally

G(x,s)=∑n=1∞ϕn(x)ϕn(s)λn,G(x,s) = \sum_{n=1}^\infty \frac{\phi_n(x)\phi_n(s)}{\lambda_n},

which converges (in an appropriate sense) to the same GG built from y1,y2y_1,y_2. This bi-orthogonal series representation is the Sturm–Liouville-theoretic counterpart of the explicit two-branch formula, and it exhibits directly why GG fails to exist when some λn=0\lambda_n=0 (a zero eigenvalue means resonance), matching the counterexample.

Why is symmetry G(x,s)=G(s,x)G(x,s)=G(s,x) useful, beyond elegance?

Symmetry reflects that the solution operator L−1L^{-1} is self-adjoint whenever LL (with its boundary conditions) is self-adjoint, which underlies spectral theorems guaranteeing real eigenvalues and orthogonal eigenfunctions in Sturm–Liouville theory. Practically, symmetry cuts the work of tabulating GG in half, and it guarantees, via general spectral theory, that GG itself has a real, discrete eigenvalue/eigenfunction expansion. It also underlies reciprocity theorems in physics (e.g., the response measured at xx due to a source at ss equals the response at ss due to an identical source at xx), a statement of experimental reciprocity in acoustics, elasticity, and electromagnetism.

How does this generalize beyond one-dimensional ODE boundary value problems?

The identical logical skeleton — homogeneous away from the source, correct boundary condition, matching/jump at the source — generalizes to elliptic PDEs (Laplace, Poisson, Helmholtz) in any dimension, where the "jump condition" becomes a prescribed singularity matching the fundamental solution near x=s\mathbf x = \mathbf s, and to time-dependent problems (heat and wave equations), where the Green's function additionally encodes propagation in time subject to initial conditions. The construction in Example 2 for the disk is the direct higher-dimensional analogue of the ODE construction, replacing "two homogeneous solutions matched at a point" with "a fundamental solution corrected by a harmonic function to fix the boundary."

What goes wrong numerically or practically if one ignores non-resonance?

If the boundary value problem is near-resonant (homogeneous problem has a solution with a very small but nonzero associated eigenvalue), the Green's function still exists but becomes very large in norm, since GG's eigenfunction expansion has a term ϕn(x)ϕn(s)/λn\phi_n(x)\phi_n(s)/\lambda_n with tiny λn\lambda_n. This means small changes in ff can produce enormous changes in the solution uu — a near-loss of the stability estimate in the Corollary. This is a preview of the broader theme of Well-Posedness of PDE Problems: existence and uniqueness alone are not enough; one wants solutions to depend continuously and boundedly on the data, and near-resonance is exactly where that continuous dependence degrades.

Before this

Where this leads