GreensFunctionPrimer
GreensFunctionPrimer
Separation of variables is a great tool for working partial differential equation problems without
sources. When there are sources, the related method of eigenfunction expansion can be used, but
often it is easier to employ the method of Green’s functions. The general idea of a Green’s function
solution is to use integrals rather than series; in practice, the two methods often yield the same
solution form.
Students find the concept of a Green’s function solution to be hard to understand both because
the concept is abstract and because the required notation can be very confusing at first. One way
to work through these difficulties is to start by using Green’s functions to solve boundary value
problems for ordinary differential equations. Note that we are talking here about problems with
sources, not Sturm-Liouville problems.
u(0, t) = 0, u(L, t) = 0,
u(x, 0) = f (x).
As time goes to infinity, the effect of the initial condition should disappear and the temperature
achieve an equilibrium distribution. This equilibrium temperature will satisfy the problem obtained
from the original by dropping the time derivative term from the differential equation and dropping
the initial condition. If we fold K0 into Q by defining
Q(x)
q(x) =
K0
and use the prime symbol for x derivatives of the equilibrium temperature u(x), we get the problem
1
which gives us a well-defined antiderivative function. Note that we could have started the integral
somewhere other than 0, but we’ll see later that 0 was the most convenient place. Also, we could
have used any symbol other than x for the integration variable, as x has already been assigned to
be the independent variable for the problem (1).
We’ve found one antiderivative of q, but with no useful boundary condition we will still need
an integration constant so that our formula includes all antiderivatives. Thus, we have
Z x
0
−u = q(x0 ) dx0 − C. (3)
0
Here we have chosen to call the constant −C rather than C for convenience. As it stands, C
represents the unknown value of u0 at x = 0.
The left side and the first term on the right side are easy, giving us
Z xZ s
u(x) = Cx − q(x0 ) dx0 ds. (4)
0 0
2
Multivariable calculus books teach this topic, but they do so with artificial problems. We don’t have to reverse
the order of integration for real calculus problems if we set them up correctly the first time. Very strong students
can see this for themselves, so they get the idea that reversing the order of integration is busywork of no practical
importance. However, differential equations solutions with double integrals necessarily obtain the integrals with the
wrong integration order, as has happened here. We should use this example in multivariable calculus so that students
know the real importance of the technique of reversing the order of integration.
2
x0 x0
6 x0 = s 6 s = x0
x x
- -
x s x s
or Z L
1
C= (L − x0 )q(x0 ) dx0 .
L 0
Substituting this result into (5) yields
Z L Z x
x
u(x) = (L − x0 )q(x0 ) dx0 − (x − x0 )q(x0 ) dx0 , (6)
0 L 0
which is the solution for the equilbrium temperature problem. If we want to evaluate the solution
for a particular q, the simplest procedure is to first calculate the functions
Z x Z x
q0 (x) = q(x0 ) dx0 , q1 (x) = x0 q(x0 ) dx0 . (7)
0 0
For general understanding, we can also rewrite the formula (6) in a way that shows an interesting
symmetry, first moving factors x and L around to get
Z L Z x
1 1
u(x) = x(L − x0 ) q(x0 ) dx0 − L(x − x0 ) q(x0 ) dx0 ,
L 0 L 0
and then splitting up the first integral into a portion from 0 to x and a portion from x to L, and
then combining the two integrals on 0 to x. The resulting formula is
Z x Z L
1 1
u(x) = x0 (L − x) q(x0 ) dx0 + x(L − x0 ) q(x0 ) dx0 . (9)
L 0 L x
3
Solving the Model Problem with Superposition
Did you enjoy the first method of solving the problem? Integrating by brute force is unnecessarily
complicated. There is a more conceptual method based on the idea of superposition. If we break
q up into components on different intervals in x, we can find the resulting u for each component
separately and then add the results. This is only beneficial if we have an easier time obtaining the
solution for a component than for the full interval, and that only happens if we have infinitely-many
intervals of width 0.
It is natural to think of q as a function distributed over an interval in x. However, we can
instead think of it as an infinite sum of point sources using the Dirac delta function:
Z L
q(x) = δ(x − x0 ) q(x0 ) dx0 . (10)
0
Before we proceed, it is important to confirm that this equation is correct and to understand what it
says conceptually. To check its accuracy, note that the integrand is 0 everywhere except at x0 = x;
hence, we can replace the function q(x0 ) with the constant q(x).3 Thus,
Z L Z L Z L
δ(x − x0 ) q(x0 ) dx0 = δ(x − x0 ) q(x) dx0 = q(x) δ(x − x0 ) dx0 = q(x),
0 0 0
where we have used the basic property of the delta function to evaluate the last integral. To
interpret (10), think of δ(x − x0 ) as a unit point source at x = x0 and q(x0 ) dx0 as the strength of
this source. Thus, δ(x − x0 )q(x0 ) dx0 is a point source of appropriate strength located at x0 and
the distributed function q(x) is the infinite sum of all such point sources.
Now define the Green’s function G(x; x0 ) to be the response of the boundary value problem to
a unit point source located at x = x0 ;4 that is, G is the solution of
−u00 (x) = δ(x − x0 ), u(0) = 0, u(L) = 0. (11)
Once we have found the Green’s function, we will have the response to a unit point source at an
arbitrary location. Just as we can build q(x) by adding up products of the unit source δ(x−x0 ) and
the source strength q(x0 ) dx0 , we can build u(x) by adding up products of the unit-source response
G(x; x0 ) and the source strength q(x0 ) dx0 :
Z L
u(x) = G(x; x0 ) q(x0 ) dx0 . (12)
0
4
Step 1: Integrate the differential equation on the separate domains 0 < x < x0 and
x0 < x < L.
Equation (11) reduces to the trivial equation u00 = 0 on any interval that does not include x = x0 ;
hence, we can immediately write down the general solution on each of the intervals 0 < x < x0 and
x0 < x < L:
A + Bx, x < x0
u= . (14)
C + Dx, x > x0
In one extremely quick step, we have reduced the problem from a differential equation with bound-
ary conditions to an algebra problem for four unknown constants.
Summary
The Green’s function for any problem with a distributed source is the solution of the corresponding
problem with an arbitrary unit point source. Once the Green’s function is known, the solution of
the original problem can be computed by integrating the product of the Green’s function with the
source function. We’ve seen that this reduces the workload when applied to an ordinary differential
equation. In the context of partial differential equations, there will generally be no simple method
for finding the solution with a distributed source, but if the geometry is simple we will have little
difficulty in finding the Green’s function. In particular, the Green’s function method will always
work for the 1D heat equation. It is not generally used for the wave equation because the method
of characteristics is much more powerful.