You are on page 1of 11

PE281 Greens Functions Course Notes

Tara LaForce
Stanford, CA 7th June 2006
1 What are Greens Functions?
Recall that in the BEM notes we found the fundamental solution to the
Laplace equation, which is the solution to the equation
d
2
w
dx
2
+
d
2
w
dy
2
+ ( x, y) = 0 (1)
on the domain < x < , < y < . is the dirac-delta function
in two-dimensions. This was an example of a Greens Fuction for the two-
dimensional Laplace equation on an innite domain with some prescribed
initial or boundary conditions. The dierence between BEM and the method
of Greens functions is that we will be looking at PDEs that are suciently
simple to evaluate the boundary integral equation analytically.
The PDE we are going to solve initially is

2
u = 0 (2)
u|

= f (x, y) (3)
As in BEM we will start by applying the Green-Gauss Theorem two times
to get
(L(u) , G) =
_

G
2
ud =
_

_
G
u
n
u
G
n
_
ds+
_

u
2
Gd = 0 (4)
1
where n is the outward pointing normal and ds is the distance along the
boundary, counterclockwise. Since u is given on the boundary and
u
n
is not,
we will set G = 0 on .
_

_
f (x, y)
G
n
_
ds+
_

u
2
Gd = 0 (5)
Using the denition of the Greens function
2
Gd = ( x, y) gives
u(, ) =
_

_
f (x, y)
G
n
_
ds (6)
Some interesting things about this formulation
We have a negative sign in front of the boundary integral, this is because
we dened the point source so that u(, ) = ( x, y). This
sign convention is opposite what is used in Rubens notes, but it has
no impact on the nal answer.
We can now nd u at some arbitrary point (, ) just by integrating
f
G
n
around the boundary of the domain.
Because we are using the Greens function for this specic domain with
Dirichlet boundary conditions, we have set G = 0 on the boundary in
order to drop one of the boundary integral terms.
The fundamental solution is not the Greens function because this do-
main is bounded, but it will appear in the Greens function.
We want to seek G(, ; x, y) = w + g where w is the fundamental
solution and does not satisfy the boundary constraints and g is some
function that is zero in the domain and will allow us to satisfy the
boundary conditions.
We know from BEM notes that w =
1
2
ln r where r =
_
( x)
2
+ ( y)
2
2
2 Example of Laplaces Equation
Suppose the domain is the upper half-plan, y > 0. We know that G =
1
2
ln r +g and that g must satisfy the constraint that
2
g = 0 in the domain
y > 0 so that the Greens function supplies a single point source in the real
domain. We also know that along the line y = 0 g = w so that G(x, 0) = 0.
This equation can be solved by the method of images. This means that we
will introduce point sources outside of the domain to satisfy the boundary
conditions.
In this example a negative point source at (, ) will give g = w on
G(x, 0) = 0. The solution to
2
g = ( x, + y) will also satisfy the
constraint that
2
g = 0 since
2
g is nonzero only at the point source (, ),
which is not in the domain.
g =
1
2
ln
_
( x)
2
+ ( + y)
2
(7)
Now
G = g + w (8)
=
1
2
ln
_
( x)
2
+ ( + y)
2

1
2
ln
_
( x)
2
+ ( y)
2
(9)
=
1
4
ln
_
( x)
2
+ ( + y)
2
( x)
2
+ ( y)
2
_
(10)
so
u(, ) =
_

_
f (x)
G
n
(x, 0)
_
dx (11)
this can be multiplied out to show that
u(, ) = (12)
_

_
1
2
f (x)

_
( x)
2
+
2

1/2
+
_
( x)
2
+
2

1/2
_
( x)
2
+
2

1/2
_
dx(13)
3
=

_
f (x)
_
( x)
2
+
2

_
dx. (14)
We could have gotten this solution by Fourier transforms, but Greens func-
tions can also be used to nd solutions for many problems that cant be
solved by transform methods.
3 Example of Poissons Equation
Now we will look at Poissons equation on the same domain, which is given
by

2
u = (x, y) (15)
u|

= f (x, y) (16)
We start the problem by applying the Green-Gauss theorem twice to show
that
_

G
2
ud =
_

_
G
u
n
u
G
n
_
ds+
_

u
2
Gd =
_

G(x, y) d.
(17)
Once again we will choose G so that G(x, 0) = 0 in order to get rid of the
boundary integral that contains
u
n
. Putting in the denition of the Greens
function we have that
u(, ) =
_

G(x, y) d
_

_
u
G
n
_
ds. (18)
The Greens function for this example is identical to the last example because
a Greens function is dened as the solution to the homogenous problem

2
u = 0 and both of these examples have the same homogeneous problem.
Putting G into the equation gives
u(, ) =

_
f (x)
_
( x)
2
+
2

_
dx + (19)
4
1
4
_

0
_

(x, y) ln
_
( x)
2
+ ( y)
2
( x)
2
+ ( + y)
2
_
dxdy (20)
4 Example of Laplaces Equation on the Quar-
ter Plane
Finally we will consider Laplaces equation on the 1/4 plane with mixed
boundary conditions. The PDE we would like to solve is

2
u = 0 (21)
u(x, 0) = f (x) (22)
u
n
(0, y) = h(y) (23)
(24)
Just like in the last two examples we will use the Green-Gauss theorem to
get
_

G
2
ud =
_

_
G
u
n
u
G
n
_
ds+
_

u
2
Gd = 0 (25)
implementing the boundary conditions for the 1/4 plane gives
_

G
2
ud =
_
0

_
G
u
n
u
G
n
_

x=0
dy + (26)
_

0
_
G
u
n
u
G
n
_

y=0
dx +
_

u
2
Gd = 0 (27)
(28)
where the limits on the integral over y are switched so that we can evaluate
the boundary counterclockwise. In this problem we will choose G so that
G(x, 0) = 0 in order to get rid of the boundary integral that contains
u
n
, just
like before. But in the integral over y we need to choose G so that
G
n
= 0
5
on the boundary x = 0 because we know the value of the ux across the
boundary, but not the value of u. Inserting the Greens function we get
u(, ) =
_

0
Gh(y)|
x=0
dy
_

0
f (x)
G
n

y=0
dx. (29)
Now G = w+g and w =
1
2
ln r as before. In the last examples we introduced
a negative point source at (, ) in order to enforce G(x, 0) = 0. This will
also work here:
G =
1
2
ln
_
( x)
2
+ ( + y)
2

1
2
ln
_
( x)
2
+ ( y)
2
+ bdry terms
(30)
Since a negative image point source worked to force a constant G boundary,
it makes sense that a positive image point source will force
G
n
= 0 on the
x = 0 boundary. By inspection you can see that we will need two image point
sources. One to counteract the point source at (, ) in the domain, and one
to counteract the image point source at (, ) that ensures the boundary
condition at y = 0 is being met. This means that the Greens function for
this PDE is
G =
1
2
ln r
1
+
1
2
ln r
2

1
2
ln r
3
+
1
2
ln r
4
=
1
2
ln
_
r
2
r
4
r
1
r
3
_
(31)
r
1
=
_
( x)
2
+ ( y)
2
(32)
r
2
=
_
( x)
2
+ ( + y)
2
(33)
r
3
=
_
( + x)
2
+ ( y)
2
(34)
r
4
=
_
( + x)
2
+ ( + y)
2
(35)
(36)
and u is given in Eq. 29. In this example we have traded the original PDE
for two integrals along the boundaries. These can be integrated analytically
as long as h(y) and f(x) are suciently simple for the integrals to exist.
6
5 The Freespace Greens Function for the Dif-
fusion Equation
The diusion equation is an example of a nonself-adjoint operator. The
operator L is given by:
L(u) =
u
t
Du (37)
and an example of a diusion equation problem with mixed boundary con-
ditions is
u
t
Du = F (x, t) (38)
u(a) = u
a
(39)
u (b)
t
= q
b
. (40)
In order to simplify the derivation assume that D = 1 and F = 0 and that we
have one-dimensional ow. We need to know the freespace Greens function
of the operator L. As before we multiply by the weighting function w and
integrate over the domain
_

u
t


2
u
x
2
wd = 0 (41)
= [0, ] [, ] (42)
in this example is a semi-innite domain in t because negative time is not
physically meaningful. Both of the terms in Eq. (42) must be integrated by
parts in order to nd the adjoint operator of L. This gives
_

uwd

T
t=0

_
t
_

u
w
t
ddt (43)

_
t
_

(u n) wdsdt +
_
t
_

(w n) udsdt +
_
t
_

2
wuddt(44)
7
=
_

u(T, x) w(T, x) d
_

u(0, x) w(0, x) d (45)


+
_
t
_

(w n) u (u n) wdsdt
_
t
_

u
_
w
t
+
2
w
_
ddt(46)
= bdry terms
_
t
_

u
_
w
t
+
2
w
_
ddt. (47)
Assuming that we can set all of the boundary terms to zero by some combi-
nation of intitial and boundary conditions and constraints on w the adjoint
operator, L

of the diusion operator is

_
w
t
+
2
w
_
. (48)
The freespace Greens function is the solution to the negative diusion equa-
tion with a point source

w
t

2
w ( x, t) = 0 (49)
on the two or three-dimensional domain . In this example we have changed
sign convention on the delta function from the last example. The reason for
this is that the sign convention L

(w) + = 0 is typically used in the deriva-


tion of the boundary element method, while the sign convention L

(w) = 0
is typically used in the method of Greens functions. As with the various con-
ventions used in Fourier transforms, both are correct. In Greens functions
both conventions result in exactly the same answer. (verify this for yourself)
The one-dimensional case of equation (49) can be solved using a Fourier
transform on x

w
t
+ s
2
w ( t) e
is
= 0 (50)
where s has been used to denote the transform variable instead of the cus-
tomary in order to avoid confusing w and . Equation (50) can be solved
using the integrating factor e
is
2
t
e
s
2
t
w

t
= e
is
_

t
e
s
2
t
( t) dt (51)
8
e
s
2
t
w

t
=
_
0 t >
e
is
e
s
2

t <
(52)
w = e
is
e
s
2
(t)
H ( t) (53)
this can be inverted to nd
w =
H ( t)
_
4 ( t)
exp
_
( x)
2
4 ( t)
_
. (54)
Going back to the original equation we have that
u(, ) = lim
T
_

u(x, T) G(x, T) d
_

u(x, 0) G(x, 0) d (55)


+
_
t
_

(G n) u (u n) Gdsdt (56)
where G = w + g is the Greens function for a particular problem.
As in the Laplace equation example we can choose to solve for the correct
Greens function for a specic set of boundary conditions.
6 Example of the Diusion Equation on the
Half-Space x > 0
Suppose
u
t


2
u
x
2
= 0 (57)
= (0 < x < ) , (0 < t < T) (58)
u(x, 0) = u
o
(x) (59)
u(x, T) = u
T
(x) (60)
lim
x
u(x, t) = 0. (61)
The rst two boundary terms mean that u = 0 on . Since we dont know
u n =
du
dx
on the boundary we will make G = 0 on . This means that
G(0, t) = 0 since the domain in semi-innite. Now
9
u(, ) = lim
T
_

u(x, T) G(x, T) d
_

u(x, 0) G(x, 0) d (62)


where once again G = w+g and g is some function that is zero everywhere in
the domain and makes G(0, t) = 0. Like the Laplace equation we will solve
this by the method of images. In this case we are trying to force G(x, t) = 0
on the line x = 0 for all t > 0. A negative point source at (, ) will work
so
g =
H ( t)
_
4 ( t)
exp
_
( + x)
2
4 ( t)
_
(63)
and
G = w + g =
H ( t)
_
4 ( t)
_
exp
_
( x)
2
4 ( t)
_
exp
_
( + x)
2
4 ( t)
__
. (64)
7 Diusion Equation on a Bounded Interval
Suppose we want to solve the same equation as in the last example, except
that now = [0, L]. and u(L, t) = 0. Since we dont know
du
dx
on the
boundary we will make G = 0 on . This means that G(0, t) = 0 and
G(L, t) = 0 since the domain in bounded.
Initially we need to introduce a negative point source at (, ) in order to
enforce G(0, t) = 0. This creates a ux across the boundary at x = L. In
order to balance this ux, a negative point source at (2L , ) must be
introduced. The new point souce now creates ux across the boundary at
G(0, t) and must be balanced by a positive point souce at (2L + , ).
We must continue in this way for an innite number of point sources. The
nal Greens function of this problem is given by
G =
H ( t)
_
4 ( t)
(65)
10
_

L=
L=
exp
_
(2L + x)
2
4 ( t)
_

L=
L=
exp
_
(2L x)
2
4 ( t)
__
and
u(, ) =
_
L
0
u
o
(x)G(x, 0) dx
_
L
0
u
T
(x)G(x, T) dx (66)
8 Summary
In the method of Greens functions we take PDEs that cant be solved by
transforms and
Integrate them by parts (apply the Green-Gauss theorem in 2D) two
times so that we are left with bdry terms +
_

(G)ud
Find the freespace Greens function w that satises L

(w) = 0.
Use the method of images to nd the Greens function G = w + g for
a given set of initial and boundary conditions.
Plug the function G bac into the integral and integrate to nd u at an
arbitrary point (, ) or (, ).
We can nd u at any point in the domain this way.
References
[1] Greenberg, M.D. Foundations of Applied Mathematics, Prentice-Hall,
Inc., Englewood Clis, NJ, 1978.
[2] Juanes, R. PE281 Course Notes, Stanford University, 2003.
11

You might also like