7 Green's Functions For Ordinary Differential Equations
7 Green's Functions For Ordinary Differential Equations
One of the most important applications of the δ-function is as a means to develop a sys-
tematic theory of Green’s functions for ODEs. Consider a general linear second–order
differential operator L on [a, b] (which may be ±∞, respectively). We write
d2 d
Ly(x) = α(x) 2
y + β(x) y + γ(x)y = f (x) , (7.1)
dx dx
where α, β, γ are continuous functions on [a, b], and α is nonzero (except perhaps at a
finite number of isolated points). We also require the forcing term f (x) to be bounded in
[a, b]. We now define the Green’s function G(x; ξ) of L to be the unique solution to the
problem
LG = δ(x − ξ) (7.2)
that satisfies homogeneous boundary conditions29 G(a; ξ) = G(b; ξ) = 0.
The importance of the Green’s function comes from the fact that, given our solution
G(x, ξ) to equation (7.2), we can immediately solve the more general problem Ly(x) = f (x)
of (7.1) for an arbitrary forcing term f (x) by writing
! b
y(x) = G(x; ξ) f (ξ) dξ . (7.3)
a
since the Green’s function is the only thing that depends on x. We also note that the
solution (7.3) constructed this way obeys y(a) = y(b) = 0 as a direct consequence of these
conditions on the Green’s function.
The important point is that G depends on L, but not on the forcing term f (x). Once
G is known, we will be able write down the solution to Ly = f for an arbitrary force
term. To put this differently, asking for a solution to the differential equation Ly =
f is asking to invert the differential operator L, and we might formally write y(x) =
L−1 f (x). Equation (7.3) shows what is meant by the inverse of the differential operator L
is integration with the Green’s function as the integral kernel.
– 85 –
Our construction relies on the fact that whenever x #= ξ, LG = 0. Thus, both for
x < ξ and x > ξ we can express G in terms of solutions of the homogeneous equation. Let
us suppose that {y1 , y2 } are a basis of linearly independent solutions to the second–order
homogeneous problem Ly = 0 on [a, b]. We define this basis by requiring that y1 (a) = 0
whereas y2 (b) = 0. That is, each of y1,2 obeys one of the homogeneous boundary conditions.
On [a, ξ) the Green’s function obeys LG = 0 and G(a, ξ) = 0. But any homogeneous
solution to Ly = 0 obeying y(a) = 0 must be proportional to y1 (x), with a proportionality
constant that is independent of x. Thus we set
Similarly, on (ξ, b] the Green’s function must be proportional to y2 (x) and so we set
Note that the coefficient functions A(ξ) and B(ξ) may depend on the point ξ, but must be
independent of x.
This construction gives us families of Green’s function for x ∈ [a, b] − {ξ}, in terms
of the functions A and B. We must now determine how these two solutions are to be
joined together at x = ξ. Suppose first that G(x, ξ) was discontinuous at x = ξ, with
the discontinuity modelled by a step function. Then ∂x G ∝ δ(x − ξ) and consequently
∂x2 G ∝ δ " (x−ξ). However, the form of equation (7.2) shows that LG involves no generalized
functions beyond δ(x − ξ), and in particular contains no derivatives of δ-functions. Thus
we conclude that G(x, ξ) must be continuous throughout [a, b] and in particular at x = ξ.
However, integrating equation (7.2) over an infinitesimal neighbourhood of x = ξ we
learn that
! ξ+" " # ! ξ+"
∂2G ∂G
α(x) 2 dx + β(x) dx + γ(x)G dx = δ(x − ξ) dx = 1 . (7.7)
ξ−" ∂x ∂x ξ−"
We have already seen that G(x, ξ) is continuous, and all three coefficient functions α, β, γ
are bounded by assumption, so the final term on the lhs contributes zero as we make the
integration region infinitesimally thin. Also, since G is continuous, ∂x G must be bounded
so the term β∂x G also cannot contribute as the integration region shrinks to zero size.
Finally, since α is continuous we have
! ξ+" $ % % &
∂2G ∂G %% ∂G %%
lim α(x) 2 dx = α(ξ) − . (7.8)
"→0+ ξ−" ∂x ∂x %x=ξ+ ∂x %x=ξ−
To summarize, we must glue the Green’s functions (7.5) & (7.6) according to the conditions
– 86 –
These are two linear equations for A and B, determining them to be
y2 (ξ) y1 (ξ)
A(ξ) = and B(ξ) = , (7.11)
α(ξ)W (ξ) α(ξ)W (ξ)
where
W (x) ≡ y1 y2" − y2 y1" (7.12)
is known as the Wronskian of y1 and y2 . Note that the Wronskian is evaluated at x = ξ in
equation (7.11).
To conclude, we have found that the solution G(x, ξ) of LG = δ(x−ξ) obeying G(a, ξ) =
G(b, ξ) = 0 is given by
y1 (x)y2 (ξ)
a≤x<ξ
α(ξ)W (ξ)
G(x; ξ) =
y (x)y1 (ξ)
2 ξ<x≤b (7.13)
α(ξ)W (ξ)
1
= [Θ(ξ − x) y1 (x)y2 (ξ) + Θ(x − ξ) y2 (x)y1 (ξ)]
α(ξ)W (ξ)
– 87 –
while the jump condition gives
where we note that α = −1. Solving these two equations for A and B gives the Green’s
function
1
G(x; ξ) = [Θ(ξ − x) sin(1 − ξ) sin x + Θ(x − ξ) sin(1 − x) sin ξ] (7.19)
sin 1
Using this Green’s function we are immediately able to write down the complete solution
to −y "" − y = f (x) with y(0) = y(1) = 0 as
! !
sin(1 − x) x sin x 1
y(x) = f (ξ) sin ξ dξ + f (ξ) sin(1 − ξ) dξ. (7.20)
sin 1 0 sin 1 x
where again only the second term for G in (7.19) contributes in the first integration region
where ξ > x, while only the first term for G contributes to the integral over the region
ξ < x.
as a ‘summation’ (or integral) of individual point source effects, each of strength f (ξ), with
G(x; ξ) describing the effect at x of a unit point source placed at ξ.
To illustrate this with a physical example, consider again the wave equation for a
horizontal elastic string with ends fixed at x = 0, L. If y(x, t) represents the small vertical
displacement transverse to the string, we found that T ∂x2 y = µ ∂t2 y. Also including the
effect of gravity acting in the vertical direction leads to
∂2y ∂2y
T − µg = µ (7.22)
∂x2 ∂t2
for x ∈ [0, L] with y(0) = y(L) = 0. Here, T is the constant tension in the string and µ is
the mass density per unit length, which may vary with x.
When the string is at rest, its profile obeys the steady state equation
∂2y µ(x)g
= , (7.23)
∂x2 T
whose solution describes the shape of a (non–uniform) string hanging under gravity. We’ll
be interested in these steady state solutions. We consider three cases. Firstly, suppose µ is
a (non–zero) constant then equation (7.23) is easily integrated and we find the parabolic
shape
µg
y(x) = x(x − L) . (7.24)
2T
that obeys y(0) = y(L) = 0.
– 88 –
In the second case, suppose instead that the string itself is very light, but that it has a
metal bead attached at a point x = ξ. We treat the bead as a point mass m, and assume
it is not too heavy. To find its location, let θ1 and θ2 be the angles the string makes on
either side of the bead. Resolving forces vertically, the equilibrium condition is
where the small angle approximation sin θ ≈ tan θ will hold provided the mass m is suffi-
ciently small. (Note also that y < 0 since the bead pulls the string down.) Thus the point
mass is located at (x, y) = (ξ, y(ξ)) where
mg ξ(ξ − L)
y(ξ) = . (7.26)
T L
Since the string is effectively massless on either side of the bead, gravity does not act there,
so the only force felt by the string at x #= ξ is the (tangential) tension. Thus the string
must be straight either side of the point mass and so
x(ξ − L)
mg L
for 0 ≤ x < ξ,
y(x) = × (7.27)
T ξ(x − L)
for ξ < x ≤ L
L
gives the steady–state shape of this string.
We obtained this answer from physical principles; let’s now rederive it using the Green’s
function. For the case of a point mass at x = ξ, we take the mass density to be µ(x) =
m δ(x − ξ) so that the steady–state equation becomes
∂2y mg
2
= δ(x − ξ) . (7.28)
∂x T
The differential operator ∂ 2 /∂x2 is a (very simple) self–adjoint operator and the rhs is a
forcing term. We look for a Green’s function G(x, ξ) that obeys
∂2G
= δ(x − ξ) (7.29)
∂x2
subject to the boundary conditions G(0, ξ) = G(L, ξ) = 0. Following our usual procedure,
we have the general solutions
on either side of the point mass. The boundary conditions at 0 and L enforce B(ξ) =
D(ξ) = 0, and continuity (the string does not break!) at x = ξ fixed C(ξ) = A(ξ)ξ/(ξ − L).
Finally, the jump condition on the derivative (with α = 1) gives A(ξ) = (ξ − L)/L. Thus
our Green’s function is
x(ξ − L)
for 0 ≤ x < ξ,
G(x, ξ) = L (7.31)
ξ(x − L)
for ξ < x ≤ L.
L
– 89 –
Rescaling this Green’s function by mg/T gives exact agreement with the string profile
in (7.27).
For our final case, we now imagine that we have several point masses mi at positions
xi ∈ [0, L]. We can simply sum the solutions to obtain
- mi g
y(x) = G(x, xi ) . (7.32)
T
i
To take the continuum limit we can imagine there are a large number of masses mi placed
at equal intervals xi = iL/N along the string, with i ∈ {1, 2, . . . , N − 1}. Setting mi =
µ(ξi )∆ξ where ξi = i∆ξ = iL/N , then by Riemann’s definition of integrals, as N → ∞
equation (7.32) becomes
! L
g µ(ξ)
y(x) = G(x, ξ) dξ . (7.33)
0 T
If µ is constant this function reproduces the parabolic result of case 1, as you should check
by direct integration. (Exercise! – take care with the limits of integration.)
– 90 –
7.4 Equivalence of eigenfunction expansion of G(x; ξ)
For self–adjoint differential operators, we have now discovered two different expressions for
the Green’s function with homogeneous boundary conditions. On the one hand, we have
1
G(x, ξ) = [Θ(ξ − x) y1 (x)y2 (ξ) + Θ(x − ξ) y2 (x)y1 (ξ)] (7.36)
α(ξ)W (ξ)
as in equation (7.13). On the other hand, in section 2.6 we showed that the Green’s function
for a self–adjoint operator could be written as
∞
- 1
G(x, ξ) = Yn (x) Yn∗ (ξ) (7.37)
λn
n=1
in terms of the eigenfunctions {Yn (x)} and eigenvalues {λn } of the Sturm–Liouville oper-
ator.
Incidentally, we derived (7.37) in section 2.6 without any mention of δ-functions, but
it may also be quickly derived using the eigenfunction expansion
∞
-
δ(x − ξ) = w(x) Yn (x) Yn∗ (ξ) (7.38)
n∈Z
and for this to agree with δ(x − ξ), so that the expansion (7.39) obeys the defining equation
LG = δ(x − ξ) for the Green’s function, we need
1 ∗
Ĝn (ξ) = Y (ξ) (7.41)
λn n
.
as can be checked by multiplying both sides of w(x) n∈Z Ĝn (ξ) λn Yn (x) = δ(x − ξ) by
Ym∗ (x), integrating from a to b and using the orthogonality of the Sturm–Liouville eigenfunc-
tions with weight function w. Thus we have recovered the eigenfunction expansion (7.37)
of the Green’s function. Note that the expression (7.37) requires that all eigenvalues λn be
non–zero. This means that the homogeneous equation Ly = 0 — which is the eigenfunction
equation when λ = 0 — should have no non–trivial solutions satisfying the boundary con-
ditions. The existence of such solutions would certainly be problematic for the concept of
a Green’s function: If such solutions exist, then the inhomogeneous equation Ly = f does
not have a unique solution, because if y is any solution then so too is y + y0 . The operator
L is thus not invertible, and the Green’s function cannot exist. This is just the infinite
– 91 –
dimensional analogue of the familiar situation of a system of linear equations M u = f with
non–invertible coefficient matrix M. Indeed a matrix is non–invertible iff it has nontrivial
eigenvectors with eigenvalue zero.
Since the Green’s function is the unique solution to LG(x, ξ) = δ(x − ξ) that obeys
G(a, ξ) = G(b, ξ) = 0, it must be that the two expressions (7.36) and (7.37) are the same.
To see that this is true, we first notice that for a self–adjoint operator (in Sturm–Liouville
form) the first two coefficient functions in
∂2 ∂
L = α(x) 2
+ β(x) + γ(x)
∂x ∂x
are related by β = dα/dx. In this case, the denominator α(ξ)W (ξ) in equation (??) for
the Green’s function is necessarily a (non–zero) constant. To show this, note that
d
(αW ) = α" W + αW = β(y1 y2" − y2 y1" ) + α(y1 y2"" − y2 y1"" )
dx (7.42)
= y1 Ly2 − y2 Ly1 = 0 .
G(x, ξ) = Θ(x − ξ) cos x sin ξ + Θ(ξ − x) sin x cos ξ − cot 1 sin x sin ξ . (7.47)
– 92 –
Viewing x as the independent variable and ξ as a parameter, we expand this function as a
Fourier sine series
∞
-
Θ(x − ξ) cos x sin ξ + Θ(ξ − x) sin x cos ξ − cot 1 sin x sin ξ = ĝn (ξ) sin nπx . (7.48)
n=1
– In contrast to the boundary value problem, we now apply both initial conditions to
this solution. That is, we enforce
and since y1 and y2 are linearly independent, the determinant of the matrix (the
Wronskian) is non-zero. Thus the only way to impose both initial conditions is to set
A = B = 0. This implies that G(t, τ ) = 0 identically whenever t ∈ [a, τ )!
– 93 –
– For t > τ , again construct the Green’s function as a general solution of the homoge-
neous equation, so G = Cy1 (t) + Dy2 (t).
– Finally, we apply the continuity and jump conditions at t = τ . Since G = 0 for t < τ
we obtain
Cy1 (τ ) + Dy2 (τ ) = 0
1 (7.54)
Cy1" (τ ) + Dy2" (τ ) =
α(τ )
where, as usual, α(t) is the coefficient of the second derivative in the differential
operator L. These simultaneous equations determine C(τ ) and D(τ ), thus completing
the construction of the Green’s function G(t; τ ).
We can again use our Green’s function to solve the forced problem (7.51) as
! ∞ ! t
y(t) = G(t, τ ) f (τ ) dτ = G(t, τ ) f (τ ) dτ . (7.55)
t0 t0
Here, in the second equality we have used the fact that G(t, τ ) vanishes for τ > t. This
equation shows that the solution obeys a causality condition: the value of y at time t
depends only on the behaviour of the forcing function for earlier times τ ∈ [t0 , t].
As an example, consider the problem
d2 y
+ y = f (t), y(0) = y " (0) = 0 (7.56)
dt2
with initial conditions y(0) = y " (0) = 0. Following our procedure above we get
where we’ve chosen the basis of linearly independent solutions to be {cos(t − τ ), sin(t − τ )}
purely because they make it easy to impose the initial conditions. Continuity demands
that G(τ, τ ) = 0, so C(τ ) = 0. The jump condition (with α(τ ) = 1 then enforces D(τ ) = 1.
Therefore, the Green’s function is
Again, we see that this solution knows about what the forcing function was doing only at
earlier times.
– 94 –
7.6 Higher order differential operators
We briefly mention that there is a natural generalization of Green’s functions to higher
order differential operators (and indeed to PDEs, as we shall see in the last part of the
course). If L is a nth -order ODE on [a, b], with n > 2 then the general solution to the
forced differential equation Ly = f (x) obeying the homogeneous boundary conditions
y(a) = y(b) = 0 is again given by
! b
y(x) = G(x; ξ) f (ξ) dξ , (7.60)
a
– 95 –