1. Introduction
The Green’s function method for solving Sturm–Liouville problems of the following form:
is described in many textbooks, for instance, references [
1,
2,
3,
4,
5,
6,
7,
8]. In this paper, we treat and contrast Green’s functions for Dirichlet and Neumann boundary conditions. Textbooks generally discuss the Dirichlet case in detail, but do much less with the Green’s function for the Neumann boundary condition, and what is said about the Neumann case often has mistakes of omission and commission.
The motivation for using a Green’s function,
, is that it satisfies homogeneous boundary conditions that makes it easier to solve for than the original problem, which has inhomogeneous boundary conditions. The application of Green’s second theorem (for simplicity, we have taken
. Our general conclusions also apply to the case with
, but some of the equations would be more complicated)
provides the solution to the original problem if
satisfies
In this case, implementing Equations (
1) and (
3) leads to
The two simplest boundary conditions for which the Green’s function method is applicable are the Dirichlet boundary condition for which the solution is given on all bounding surfaces, and the Neumann boundary condition for which its normal derivative is given.
For the Dirichlet boundary condition, the Green’s function satisfies the homogeneous boundary condition
for
on all bounding surfaces. This reduces Equation (
4) to
which is the solution to the Dirichlet problem once
is known.
The Neumann Green’s function satisfies the boundary condition,
where
is a unit vector normal to the surface of integration. This reduces Equation (
4) to
which is the solution to the Neumann problem once
is known.
The Neumann Green’s function differs from the Dirichlet in that the Neumann boundary condition for the solution
must satisfy the constraint
which follows from applying the divergence theorem to Equation (
1). This constraint applies to Neumann boundary conditions where
is specified. It does not apply to a Dirichlet boundary condition where
is specified on the surface, and the integral in Equation (
9) automatically satisfies the constraint. Most texts do not mention this important constraint on the Neumann boundary condition.
There are cases where the boundary condition is Neumann on some surfaces and Dirichlet on others. In those cases, the normal derivative of f on the Dirichlet surfaces will adjust to satisfy the constraint surface integral. But for pure Neumann boundary conditions, the constraint must be satisfied or no solution exists.
We review the Dirichlet Green’s function in the next section, the one-dimensional Neumann Green’s function in
Section 3, the three dimensional Neumann Green’s function in
Section 4, and a comparison of the three dimensional Dirichlet and Neumann Green’s functions in
Section 5. We summarize our conclusions in
Section 6.
2. One-Dimensional Dirichlet Green’s Function
We first review how a Dirac delta function arises when a function
, defined in the finite range
, is expanded in orthonormal Dirichlet eigenfunctions
of a Sturm–Liouville operator
. The eigenfunctions satisfy the differential equation
with homogeneous Dirichlet boundary conditions
A function
can be expanded in the Dirichlet eigenfunctions,
, as
with the expansion coefficients
given by
If Equation (
13) for the expansion coefficients is substituted into Equation (
12) for
, and the sum executed before the integral, we get
From the definition of the Dirac delta function by its sifting property,
for
x and
in the range
, we see that the delta function can be represented by a sum over Dirichlet eigenfunctions as
For example, for the simple case
the delta function is represented by
A Dirichlet Green’s function that satisfies the differential equation
and satisfies the homogeneous Dirichlet boundary conditions in the variable
can be formed from the Dirichlet eigenfunctions as
Acting on this Green’s function with the Sturm–Liouville operator
removes the denominator in the sum, leaving the delta function of Equation (
19). This shows that this is the appropriate Dirichlet Green’s function.
3. One-Dimensional Neumann Green’s Function
The above straightforward derivation for homogeneous Dirichlet boundary conditions is given in most texts, but a corresponding derivation for homogeneous Neumann boundary conditions is generally absent. Neumann eigenfunctions,
, satisfy the same differential Equation (
10) as the Dirichlet eigenfunctions, but have the boundary conditions
The expansion of the function,
, in Neumann eigenfunctions has a constant term corresponding to
, so the expansion is given by
The Neumann expansion coefficients
are given by the integrals
and
where
represents the average value of the function
over the interval
.
Now, putting Equations (
23) and (
24) into the expansion Equation (
22) results in
so the representation of the delta function in terms of Neumann eigenfunctions is
For the simple case of
with the eigenfunctions satisfying the homogeneous Neumann boundary conditions of Equation (
21) the delta function is represented by
A Neumann’s Green function can be formed using Neumann eigenfunctions of the operator
as the sum
This Green’s function satisfies the homogeneous Neumann boundary conditions
However, because of the constant term
in Equation (
27), the operation on
by
is
so the Neumann Green’s function satisfies a different differential equation than the Dirichlet Green’s function. This difference is not generally recognized in textbooks.
We now use the Green’s function
to find the solution of the differential equation
with the inhomogeneous Neumann boundary conditions
The boundary values must satisfy the constraint
which follows by using Equations (
1) and (
31) to integrate Equation (
31) once.
Green’s theorem in one dimension (or integration by parts) for this differential equation leads to
We used the boundary conditions (
29) to eliminate terms containing
at the endpoints. Then, using Equation (
30), we get
which constitutes the solution to the Sturm–Liouville problem for Neumann boundary conditions. The constant
, the average value of
, arises from the term
in Equation (
30).
Although we have used an expansion in eigenfunctions to give an heuristic derivation of the Green’s function for Neumann boundary conditions, any function satisfying the defining Equation (
30) with the boundary conditions of Equation (
29) will be a suitable Green’s function
. For example, a Neumann Green’s function for the problem
is given by
The term in and provides the term in , and also satisfies the homogeneous Neumann boundary conditions at and L. The terms x and term in provide a unit step in at so that the next derivative will give the delta function in .
We note that the Green’s function in Equations (
37) and (
38) is not symmetric with respect to
x and
. To show that a Neumann Green’s function need not be symmetric, we repeat the usual proof of symmetry here. Applying Green’s theorem to two Green’s functions,
and
, of a Sturm–Liouville operator
gives
The right-hand side of Equation (
39) vanishes for either Dirichlet or Neumann homogeneous boundary conditions.
For a Dirichlet Green’s function, with
, Equation (
39) reduces to
so it must be symmetric. However, for a Neumann Green’s function,
, and Equation (
39) reduces to
so a Neumann Green’s function is not required to be symmetric.
We do know, however, from the eigenfunction expansion in Equation (
28) that any Neumann Green’s function can be made symmetric. For instance, adding the term
to the Green’s functions Equations (
37) and (
38) will make that Neumann Green’s function symmetric without changing any of its actions. There is no need to do this, however, since the non-symmetric Green’s function is simpler, and either form will solve the original differential equation.
4. Three-Dimensional Neumann Green’s Function
In this section, we extend the one-dimensional results of the previous section to three dimensions. In three dimensions, we seek the solution of the differential equation
with the inhomogeneous Neumann boundary conditions on any bounding surface
where
is an almost arbitrary function specified on all surfaces. A solution to Equation (
42) exists only if the boundary conditions satisfy the constraint
This constraint follows by applying the divergence theorem to Equation (
42).
The Neumann Green’s function for this problem satisfies the differential equation
with the homogeneous boundary condition
on all surfaces. This Green’s function automatically satisfies the constraint
which follows by applying the divergence theorem to Equation (
45).
The extra term
in Equation (
45) is the 3D equivalent of the term
in Equation (
30), and also arises due to the constant term in any expansion using Neumann eigenfunctions.
The solution to Equation (
42) is given by
which follows from Green’s theorem, and Equations (
45) and (
46) for
. As in the 1D case,
is an arbitrary constant that equals the average value of
f in the volume. It will be removed with the mixed boundary conditions we discuss below.
5. Three-Dimensional Green’s Function Examples
In this section, we compare a three dimensional Green’s function with Neumann boundary conditions with a corresponding Dirichlet Green’s function.
We first consider the Dirichlet case of a conducting cube of dimensions,
with a constant potential,
, on the top face, with the other five sides grounded. For simplicity, we let
. This case is treated in a number of textbooks (see, for instance, Section 3.12 of [
2]).
The solution starts with the representation of the delta function in terms of three dimensional eigenfuctions of the operator,
,
Then, the equation (we are using Gaussian units, which just affects the coefficients of the sums below),
has the solution
where
is the eigenfunction of
.
The Dirichlet potential,
, inside the cube for no charge within the cube is
We now compare the Dirichlet case with a corresponding Neumann case for a uniform charge,
, on the top face, with the other five sides grounded.
Two sines on the upper face have been changed to cosines to satisfy the Neumann boundary conditions.
Then, the Neumann potential inside the cube is
The main difference between the two results is the factor n in the Dirichlet potential, and in the Neumann potential, which make the interior potentials quite different.