Partial Differential Equations PDF
Partial Differential Equations PDF
Contents
1 PDE Generalities, Transport Equation, Method of Characteristics 1
1.1 PDE Generalities . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.2 Transport Equation . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.3 Method of Characteristics . . . . . . . . . . . . . . . . . . . . . . 3
1.4 Example: ut + 2ux = 0 . . . . . . . . . . . . . . . . . . . . . . . 3
1.5 Example: ut + xux = 0 . . . . . . . . . . . . . . . . . . . . . . . 4
1.6 Example: ut + (xu)x = 0 . . . . . . . . . . . . . . . . . . . . . . 5
i
5.4 Diffusion/Heat on the Half Line with Sources . . . . . . . . . . . 21
5.5 Waves on the Half Line . . . . . . . . . . . . . . . . . . . . . . . 22
6 Separation of Variables 24
6.1 Separation of Variables for the Heat Equation . . . . . . . . . . . 24
6.2 Sturm-Liouville Theory . . . . . . . . . . . . . . . . . . . . . . . 25
6.3 Heat IBVP with Constant Coefficients . . . . . . . . . . . . . . . 26
6.4 Wave IBVP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
8 Fourier Series 32
8.1 Least-Squares Approximation, Completeness . . . . . . . . . . . 32
8.2 Classical Fourier series . . . . . . . . . . . . . . . . . . . . . . . 34
8.3 Pointwise Convergence . . . . . . . . . . . . . . . . . . . . . . . 35
8.4 Solving PDE initial value problems . . . . . . . . . . . . . . . . . 36
8.5 Heat equation with source term . . . . . . . . . . . . . . . . . . . 38
9 Laplaces Equation 40
9.1 Some Facts from Vector Analysis . . . . . . . . . . . . . . . . . . 40
9.2 Heat Flow in Three Dimensions . . . . . . . . . . . . . . . . . . 40
9.3 Membrane Vibration . . . . . . . . . . . . . . . . . . . . . . . . 41
9.4 Laplaces Equation . . . . . . . . . . . . . . . . . . . . . . . . . 43
11 Greens Functions 55
11.1 Greens Function for One-Dimensional Equation . . . . . . . . . 55
11.2 Greens Function for Two-Dimensional Poisson Equation . . . . . 57
11.3 Greens functions from eigenfunctions . . . . . . . . . . . . . . . 60
ii
1 PDE Generalities, Transport Equation, Method of
Characteristics
how to classify PDEs
how to solve initial value problems for this equation using the method of
characteristics
The order of the ODE is the highest derivative order that appears in the equation.
For example, the Malthus population growth model
u0 (t) = ru(t)
The order of the ODE is the highest derivative order that appears. Linear and
homogenous PDEs are defined analogously to ODEs. Here are some examples of
1
two-variable PDEs that are used to model physical phenomena:
a b x
The net flux into the interval is (a, t)A (b, t)A. Let f (x, t, u) denote the
source term, that is, the rate (units: [quantity] [time] 1 [volume] 1 ) at which
substance density increases by processes other than flux, for example chemical
reaction. The rate of increase of the total amount of substance in the interval is
then
d b
Z Z b
u(x, t)A dx = (a, t)A (b, t)A + f (x, t, u)A dx,
dt a a
ut + x = f
2
should hold at every point in the region.
If we know the velocity c(x, t) (units: [length] [time]1 ) then the flux is
= cu. Substituting this constitutive equation into the conservation equation
gives the transport equation
ut + (cu)x = f. (1)
In an initial value problem for the transport equation, one seeks the function
u(x, t) that satisfies (1) and that satisfies u(x, 0) = u0 (x) for some given initial
density profile u0 .
The solution of the ODE (2) with initial value U (0) = u0 (k) determines the value
of u along the characteristic curve that intersects the x-axis at (k, 0), because
U (0) = u(X(0), 0) = u(k, 0) = u0 (k). The solution surface is the collection (or
envelope) of space curves created as k takes on all real values.
The Maple code PDEplot produces the graph of the solution
using
numerical
X(0) k
algorithms to solve the ODEs (23) with initial condition = .
U (0) u0 (k)
In simple enough cases, the ODEs can also be solved analytically by hand.
3
The characteristic ODE is X 0 = 2. The solution of x 2t = k
t
this ODE satisfying the initial condition X(0) = k is the
straight line X = 2t + k. The characteristic curve (in
this case: the line) through a given point (x, t) crosses
k x
the x axis at (k, 0) with k = x 2t.
The ODE describing the value of u along a charac-
teristic line is U 0 (t) = 0, i.e. the value is constant along the line. The solution
of this ODE satisfying the initial condition U (0) = u0 (k) is U (t) = u0 (k). The
solution of the PDE initial value problem is therefore u(x, t) = u0 (x 2t). In
2 2
particular, if u0 (x) = ex then the solution is u(x, t) = e(x2t) .
The solution of the PDE ut +2ux = 0 with ini-
2
tial profile u0 (x) = ex can be plotted in Maple
by the commands
> PDE:=diff(u(x,t),t)+2*diff(u(x,t),x)=0;
> with(PDEtools):
> PDEplot(PDE,[x,0,exp(-x2)],
x=-3..3,t=0..2); 0.8
2
0.6
The plot shows how the initial profile translates u(x,t) 1.5
0.4
to the right at constant speed without changing 1 t
shape. 0.2
0.5
-2 0 2 4 0
1.5 Example: ut + xux = 0 x 6
> PDE:=diff(u(x,t),t)
+x*diff(u(x,t),x)=0; 2
> PDEplot(PDE,[x,0,exp(-(x-3)2)], 0.8 1.5
t
x=0..6,t=0..2); 0.6 1
u(x,t) 0.5
0.4
0
4 0.2
40
30
20
10 x
0
The PDE solution spreads out as time advances,
and the surface height remains constant along the
characteristic curves, and so the total amount of
substance increases as time advances.
u(x,t)
> PDEplot(PDE,[x,0,exp(-(x-3)2)], 0.4 0.5
x=0..6,t=0..2); 0
40
0.2
30
The PDE solution spreads out as time advances, 20 x
10
and because there is no source term, the solu- 0
5
2 Models of Vibration, Diffusion and Heat Conduc-
tion; Ill-Posed Problems
how to derive the PDE for the vibrating string
how to derive the PDE for one-dimensional diffusion or heat conduction
how to model boundary conditions for these PDEs
some examples of ill-posed problems
6
Because the interval is arbitrary, this implies
0 utt uxx = 0
p
for all (x, t) in the solution domain. Denoting c = /0 , this can be written
utt = c2 uxx ,
Similarly, a flexible support at the other end can be modelled by the Robin condi-
tion
(t)ux (0, t) + ku(0, t) = 0.
ut + x = f.
ut (kux )x = f.
7
If the domain is of finite length, say x [0, l], then
it is necessary to specify boundary conditions. For ex-
g
ample, consider a tube whose end x = l is covered by
a thin permeable membrane, beyond which there is a
large well-stirred reservoir with given density g(t). Sup-
posing the flux through the membrane is proportional to the difference in densities
on its two faces, we have
where is the membrane permeability. Substituting Ficks law gives the Robin
condition
kux (l, t) + u(l, t) = g(t).
In the limiting case /k 0 (impermeable membrane, i.e. the tube end is closed)
this becomes the Neumann condition
ux = 0,
while in the limiting case /k (no membrane) we get the Dirichlet condition
u(l, t) = g(t).
models conduction, whereby heat flows from hot areas to colder areas. The ma-
terial parameter K(x) is called the heat conductivity. Combining the equations
gives the one-dimensional heat equation
c(T )t (KTx )x = f.
This is very similar to the diffusion equation, and is essentially identical to it when
c is constant.
Similarly to the diffusion equation, one can model a thin insulating layer be-
tween the end x = l and a region with given temperature T1 by a Robin condition
8
2.4 Ill-posed Problems
A mathematical model or problem often consists of a set of differential and alge-
braic equations. However, not all such sets of equations are useful models: the set
should have a unique solution, and the solution should be continuously dependent
on the available data. Such models are said to be well posed problems. Here are
some examples of PDE problems that, although they may appear to be all right
at first glance, are in fact ill-posed. Well-posed PDE problems will be presented
later in the course.
2. The BVP
uxx + uyy = 0
9
3 One Dimensional Wave Equation
general solution of one dimensional wave equation
models the transverse vibration of a long string whose ends are so far away that
they can be neglected. The PDE can be written as the sytem of first-order PDEs
c v = 0, +c u = v.
t x t x
The general solution (4) is the sum of a shape f that moves left at speed c and a
shape g that moves right with speed c, as shown here:
t x ct = l t
x + ct = k
l x k x
g f
x x
10
The general solution (4) indicates that information t
(about the local shape of the string) propagates at a finite range of influence
speed c along the characteristics. The displacement at a given
(x0,t0)
point in time and space (x0 , t0 ) can be deduced from values domain of dependence
lying in a cone-shaped domain of dependence of previous val-
ues; values outside this domain have no influence on the value x
of u(x0 , t0 ). Similarly, any point (x0 , t0 ) has a cone-shaped range of influence.
0 0
f0 = + , g0 = ,
2 2c 2 2c
which can be integrated to give
1 1
Rx )
f (x) = 2
(x) + 2c 0
() d + A
1 1
Rx (5)
g(x) = 2
(x) 2c 0
() d + B.
11
and initial velocity 0. dAlemberts formula (6) gives the solution as
1
u(x, t) = [(x + ct) + (x ct)].
2
This could be written more explicitly using a lot of if clauses, but such a formula
would be difficult for a human reader to interpret. A more geometric approach is
to decompose the initial shape according to (5) with A = B = 0, which gives the
left-moving shape f (x) = 21 (x) and the right-moving shape g(x) = 12 (x). The
solution is thus the sum of two hat functions, one moving to the left and the other
moving to the right, both at speed c (see Figure 1).
u
ct = 0
x
-1 1
u
ct = 0.5
x
-1.5 1.5
u
ct = 2
x
-3 -1 1 3
3.2.2 x
Example: Hammer blow
Consider
-1 1
the infinite-length string with zero initial displacement and initial veloc-
ity given by the step function
1 |x| 1
(x) = x
0 otherwise.
-1 1
The solution is the sum of two mirror-image ramp functions, one moving to the
left and the other moving to the right, both at speed c.
12
3.3 Energy and Uniqueness
Define the total energy E(t) of an infinitely long string as the sum of kinetic
energy and potential energy
1 1 2
Z Z
2
E= 0 ut dx + u dx.
2 2 x
Differentiating, we have
Z Z
0 1 1
E = 0 (2ut utt ) dx + (2ux uxt ) dx
2 2
Z
= (ut uxx + ux uxt ) dx = ut ux .
| {z }
(ut ux )x
If we assume that the support of and (i.e. the subset of the domain where they
are nonzero) is contained in a finite interval [a, b], it follows that u(x, t) is zero for
x outside the range of influence of [a, b]. Then E 0 is identically zero and the total
energy E remains constant in time.
Similarly, the total energy E(t) of a finite-length string is defined as
1 L 1 L 2
Z Z
2
E= 0 ut dx + ux dx.
2 0 2 0
If the string is assumed to be clamped at both ends, that is, u is assumed to be
subject to the homogeneous Dirichlet boundary conditions
u(0, t) = 0, u(L, t) = 0,
L
then ut (0, t) = 0 and ut (L, t) = 0, so that E 0 = ut ux = 0, and the total
0
energy remains constant.
The above principle of conservation of energy can be used to prove the unique-
ness of the solution of the initial value problem for the finite-length string with
Dirichlet boundary conditions. Let u and v be solutions of the initial-boundary
value problem, that is,
utt = c2 uxx
vtt = c2 vxx
u(x, 0) = (x) v(x, 0) = (x)
ut (x, 0) = (x) and vt (x, 0) = (x)
u(0, t) = h0 (t) v(0, t) = h0 (t)
u(L, t) = h1 (t) v(L, t) = h1 (t)
The energy of w at any time is equal to its energy at t = 0, which is zero, and
so wx 0, which implies that w is constant with respect to x. To satisfy the
boundary conditions, the constant must be zero. Thus w 0, that is, u v.
13
4 One Dimensional Diffusion Equation
Formula for the solution of the initial value problem
Example IVPs
Then Z
|u(x, t)| max |(x)| S(x , t) d = M, (11)
xR
| {z }
M
and so the improper integral (8) converges. Also,
Z
ux (x, t) = Sx (x , t)() d
1
Z
x (x)2
= e 4kt () d [ p = (x )/ 4kt
4kt 2kt
1
Z
2
= pep (x p 4kt) dp,
kt
and this integral converges because
Z
M 2 M
|u(x, t)| |p|ep dp = .
kt kt
14
Similarly, it can be shown that ut , uxx , uxt , and derivatives of higher orders all
exist, so u is smooth. It satisfies the diffusion equation because
Z
(ut kuxx )(x, t)) = (St kSxx )(x , t)() d = 0.
| {z }
=0
0.8
kt = 0.1
S
0.4
kt = 1
kt = 10
0
8 4 0 4 8
x
3. Any jump discontinuities in the initial shape or in its derivatives are in-
stantly smoothed out not like the wave equation.
4. If > 0 on a finite interval [a, b] and is zero elsewhere, we have u(x, t) > 0
for all x (no matter how large) and all t > 0 (no matter how small). Thus, in
this model, information has infinite speed of propagation not like the
wave equation.
5. A small change in the initial condition produces a small change in the solu-
tion. That is, if
ut = kuxx (x R, t > 0) vt = kvxx (x R, t > 0)
and
u(x, 0) = (x) v(x, 0) = (x),
6. The initial value problem has at most one solution. This can be proved by
setting = in the previous argument.
1
R The convolution of two functions f and g is denoted f g and is given by (f g)(x) =
f (x )g() d. Convolution is semilinear (i.e. (f ) g = (f g)), commutative (f g =
gf ), associative (f (gh) = (f g)h), and distributes over addition (f (g+h) = f g+f h).
15
7. The identity (10) can be interpreted in terms of the IVP: u 1 is indeed a
solution of the diffusion equation for 1.
4.3 Examples
Initial profile = step Solve the one-dimensional diffusion equation ut = kuxx
with initial condition
1
0 (x < 0)
u(x, 0) = Heaviside(x) = . x
1 (x > 0)
Write the solution using the standard function erf, which is defined as
1
Z u
2 p2
erf(u) = e dp.
0 3
x
3
1
Solution. The solution formula (8) gives
u(x, t) = ( S)(x, t)
Z
1 2
= ez /(4kt) (x z) dz
4kt
1
Z x
2
= ez /(4kt) dz [ p = z/ 4kt
4kt
Z x/4kt
1 2
= ep dp
Z 0 Z x/4kt
1 2 1 2
= ep dp + ep dp
0
1 1
= + erf(x/ 4kt).
2 2
1 kt = 0.1
kt = 1
kt = 10
u 0.5
0
8 4 0 4 8
x
u(x, 0) = (x) = ex .
16
Solution. The solution formula (8) gives
Z
1 2
u(x, t) = e(x) /(4kt) e d
4kt
Z
1 (x2kt)2
= e 4kt +ktx d
4kt
Z
(xkt) 1 (x2kt)2
= e e 4kt d
4kt
| {z }
=1
= (x kt),
that is, the initial shape translates to the right with speed k.
Z
0 1 2
f (x) = e kt ieix d
2
Z
1 i 2 kt ix 1 x 2 kt ix
= e e e e d
2 2kt 2 2kt
x
= f (x).
2kt
2 /(4kt)
Multiplying by ex gives the differential equation
2 /(4kt) x x2 /(4kt)
ex f 0 (x) + e f (x) = 0,
| {z2kt }
0
2
ex /(4kt) f (x)
17
2 /(4kt)
which has the solution ex f (x) = constant. The constant is determined by
the initial condition
Z
1 2 kt 1
f (0) = e d = .
2 4kt
x2
1
Thus f (x) = 4kt e 4kt , which coincides with the formula of the fundamental
solution given in (7).
18
5 Duhamels Principle; Half-Line Models
how to solve linear problems with source terms (Duhamels Principle)
u + Au = 0, (12)
where u(t) is a vector and A is a constant square matrix. The source operator
S(t) is a square matrix such that, for any vector , u(t) = S(t) is a solution
of (12) with initial condition u(0) = . It follows that
where I is the identity matrix. For example, the scalar IVP u + u = 0, u(0) =
has the solution u(t) = et , that is, the source operator is S(t) = et .
The following theorem shows how the general solution of the homogeneous
ODE can be used to solve the ODE with a source term.
Theorem 2 (Duhamels Principle) The function
Z t
u(t) = S(t )f ( ) d + S(t) (13)
0
19
R operator S(t) for this problem transforms
From this formula we see that the source
the function (x) into the function S(x , t)() d. Duhamels principle
thus gives the solution of the IVP with source term
ut kuxx = f (x, t), u(x, 0) = (x)
as
Z tZ Z
u(x, t) = S(x , t )f (, ) d d + S(x , t)() d. (14)
0
This models, for example, the ground temperature at depth x (on a flat planet!)
given an initial temperature profile and a surface temperature that is fixed at
zero.
To solve this initial-boundary value problem, we exploit the fact that the solu-
tion of the diffusion problem on the whole line is odd whenever the initial profile
is odd. We introduce the odd extension of , that is, the function on R given by
(x) (x > 0)
odd
(x) = (x) (x < 0) x
0 (x = 0)
20
The solution of the original initial-boundary value problem (15) is then the restric-
tion of u(x, t) to the half-line x > 0, that is,
Z
v(x, t) = Shalfline (x, , t)() d, (16)
0
where
Shalfline (x, , t) = S(x , t) S(x + , t)
Example Solve the IBVP (15) with initial profile (x) = 1. This models a
sudden drop in the surface temperature.
S OLUTION . The odd extension of the initial profile can be written as 1
1
kt = 0.1 kt = 1
kt = 10
v 0.5
0
0 2 4 6 8
x
21
Setting w(x, t) = y(x, t) h(t) yields the IBVP
which is of the same form as (17) so, using its solution and the results of the
example in section 5.3, we have
Z t Z Z
y(x, t) = h(t) h( ) Shalfline (x, , t ) d d h(0) Shalfline (x, , t) d
0 0 0
!
Z t
x x
= h(t) erf p h( ) d h(0) erf .
0 4k(t ) 4kt
Z x+ct
1 1
u(x, t) = [odd (x + ct) + odd (x ct)] + odd () d,
2 2c xct
2
Example The solution of the IBVP (18) with initial profile (x) = e(x3) and
zero initial velocity is
2 2
21 [e(x+ct3) + e(xct3) ] (x ct > 0)
v(x, t) =
1 [e(x+ct3)2 e(ctx3)2 ] (x ct < 0).
2
22
1
0
ct = 0 ct = 3
1
0 2 4 x 6 8
ct = 0.75 ct = 3.75
ct = 1.5 ct = 4.5
ct = 2.25 ct = 5.25
23
6 Separation of Variables
first steps in solving the heat and wave equation on an interval
where (x) = c(x)(x) > 0 and (x) > 0. This models heat flow in a pipe of
length l with fixed temperatures at the ends (Dirichlet boundary conditions).
Substituting a trial solution of the form u(x, t) = X(x)T (t) into the PDE
in (19) and rearranging gives
T0 (X 0 )0
= .
T X
The function on the left side of this equation is constant with respect to x and the
function on the right side is constant with respect to t, so they are both equal to a
constant, call it . We then have two ODEs, namely
T 0 + T = 0,
(X 0 )0 + X = 0, (20)
which, because of the boundary conditions in (19), has the boundary conditions
1. find numbers n and nonzero functions Xn that satisfy the BVP (2021);
Cn Xn (x)en t .
P
3. then u(x, t) = n
24
6.2 Sturm-Liouville Theory
Theorem 3 There are infinitely many pairs of numbers n (eigenvalues) and nonzero
functions Xn (eigenfunctions) that are solutions of problem (2021). The eigen-
values are real and positive, the eigenfunctions corresponding to distinct eigen-
values are -orthogonal, that is,
Z l
m 6= n (x)Xm (x)Xn (x) dx = 0,
0
and every eigenvalue has multiplicity 1, that is, the corresponding eigenfunction
is unique up to a multiplicative factor.
P ROOF. First, note that for any two eigenfunctions we have
0
(Xm Xn Xn0 Xm )0 = (n m )Xm Xn ;
this can be verified by expanding the left hand side then substituting the ODE.
Now, if (n , Xn ) satisfies (2021) then so does the complex conjugate pair (n , Xn ),
and so Z l l
(n n ) Xn Xn dx = (Xn0 Xn Xn0 Xn ) = 0,
0 0
Rl
and dividing this through by 0 |Xn |2 dx (which is > 0) leads us to the result
n n = 0, that is, the eigenvalues are real.
Next, if m 6= n ,
Z l
1 l
0
Xm Xn dx = (Xm Xn Xn0 Xm ) = 0,
0 n m 0
and so Xm and Xn are -orthogonal.
Next, multiplying the ODE (20) by X and integrating, we obtain
Z l Z l
0 0
X(X ) dx + X 2 dx = 0,
0 0
and the only constant that is consistent with the boundary conditions (21) is zero.
Finally, if (, X1 ) and (, X2 ) satisfy (2021), we have
(X10 X2 X20 X1 )0 = ( )X1 X2 = 0,
and so (X10 X2 X20 X1 ) = constant. The boundary condition (21) implies that
the constant is zero, so X10 X2 X20 X1 = 0. Then (X2 /X1 )0 = 0, so X2 /X1
is a constant, that is, the eigenfunctions corresponding to are identical up to a
multiplicative factor.
The proof of existence and infiniteness of number of eigenvalues is omitted.
25
6.3 Heat IBVP with Constant Coefficients
For the heat equation (19) with constant and , equation (20) has the general
solution p p
X(x) = A cos(x /k) + B sin(x /k),
where k = /. The boundary conditions (21) imply that A = 0 and that
p
sin(l /k) = 0.
p
This is satisfied when l /k = n for n Z, so we have the eigenvalues
n = k(n/l)2 for n {1, 2, . . .}. (The solution = 0 is rejected because the
general solution of X 00 = 0 is X(x) = E +F x, and the boundary conditions imply
E = 0 and F = 0.) The corresponding eigenfunctions are Xn (x) = sin( nx l
).
1 1
X1 X4
0 0
1 1
0 x/l 1 0 1
1 1
X2 X5
0 0
1 1
0 1 0 1
1 1
X3 X6
0 0
1 1
0 1 0 1
(x) = C1 sin( x
l
) + C2 sin( 2x
l
) + + Cn sin( nx
l
),
The solution tends to zero as time advances: all the heat eventually leaks out of
the ends of the tube. Note that the terms corresponding to larger n have wavier
shape and decay in time faster.
where 0 (x) > 0 and > 0. This models the small-amplitude transverse motion
of a taught flexible string with fixed ends.
26
Proceeding as for the heat equation, we assume a trial solution of the form
u(x, t) = X(x)T (t) and obtain two ODEs,
T 00 + T = 0,
which has the general solution T (t) = T (0) cos(t ) + 1 T 0 (0) sin(t ), and
the eigenvalue problem
X 00 + 0 X = 0, X(0) = 0, X(l) = 0.
This is a special case of (2021), so the results of Theorem 1 apply here also:
there are real positive eigenvalues 0 < 1 < 2 < with unique eigenfunctions
X1 (x), X2 (x), . . .. If the initial conditions are linear combinations of eigenfunc-
tions, that is, if
X X
(x) = An Xn (x) and (x) = Bn Xn (x),
n n
then the solution of (22) is a superposition of shapes whose amplitudes vary sinu-
soidally in time:
X p 1 p
u(x, t) = An cos(t n ) + Bn sin(t n ) Xn (x).
n
n
The factors n are called natural frequencies and have units [radians per time
unit].
In the case where 0 is constant, the eigenvalues are n = (nc/l)2 p and the
eigenfunctions are Xn (x) = sin(nx/l) for n {1, 2, . . .}, where c = /0 .
In this case, all the natural frequencies are integer multiples of the fundamental
q
frequency 1 = c/l = l 0 . From this formula we can explain various
musical phenomena associated with guitar or violin strings:
the note rises by one octave (i.e. the frequency is doubled) when the string
is clamped at its midpoint, because the clamping produces two vibrating
strings, each half the length;
the note rises when the string is tightened, because the tightening increases
the value of .
27
7 Numerical Solution of PDEs with Matlab
How to solve IBVPs in one spatial dimension using pdepe
(x, t, u, ux )ut = xm (xm f (x, t, u, ux ))x +s(x, t, u, ux ) (x (a, b), t (t0 , tfinal ])
pleft (a, t, u(a, t)) + qleft (a, t)f (a, t, u(a, t), ux (a, t)) = 0,
pright (b, t, u(b, t)) + qright (b, t)f (b, t, u(b, t), ux (b, t)) = 0
for t t0 , where qleft and qright are either identically zero or never zero.
Thus, the mathematical problem is completely defined by the specifying the
values m, a, b, t0 , tfinal and by the functions , f, s, pleft , qleft , pright , qright , .
Example 1 Consider the PDE 2 ut = uxx on 0 < x < 1 and 0 < t 2 with
boundary conditions
u(0, t) = 0, ux (1, t) = et
and initial condition u(x, 0) = sin(x). This models for example the tempera-
ture in a rod with c = 2 and K = 1 that is insulated along its length, its left
end maintained at constant zero temperature, and flux at the right end given by
Kux (1) = et (the negative sign implies that heat flows out of the rod at this
end).
The specification of the problem for solution by pdepe is
m = 0, a = 0, b = 1, t0 = 0, tfinal = 2,
(x, t, u, ux ) = 2 , f (x, t, u, ux ) = ux , s(x, t, u, ux ) = 0,
pleft (a, t, u(a, t)) = u(a, t), qleft (a, t) = 0,
pright (b, t, u(b, t)) = et , qright (b, t) = 1,
(x) = sin(x).
The exact solution for this problem can be obtained by the method of separation
of variables:
u(x, t) = et sin(x).
28
Example 2 Consider the PDE
where
5ux x (0, 0.5] 1000eu x (0, 0.5]
f (x, t, u, ux ) = , s(x, t, u, ux ) =
ux x (0.5, 1) eu x (0.5, 1)
The boundary conditions are ux (0, t) = 0 and u(1, t) = 1, and the initial condition
is
0 x (0, 1)
(x) =
1 x = 1.
The specification of the problem for solution by pdepe is
m = 2, a = 0, b = 1, t0 = 0, tfinal = 1,
(x, t, u, ux ) = 1,
pleft (a, t, u(a, t)) = 0, qleft (a, t) = 1
pright (b, t, u(b, t)) = u(b, t) 1, qright (b, t) = 0.
sol = pdepe(m,pdefun,icfun,bcfun,xmesh,tspan)
where
m is 0, 1 or 2,
[mu,f,s] = pdefun(x,t,u,ux)
icfun is a handle to a function that computes the initial condition , with calling
syntax
phi = icfun(x)
bcfun is a handle to a function that computes the boundary condition. Its calling
syntax is
[pleft,qleft,pright,qright] = bcfun(a,ua,b,ub,t)
where ua and ub are the values of u(a, t) and u(b, t). For m > 0 and
a = 0 the solver automatically uses the boundary condition ux (0, t) = 0
and ignores the values returned in pleft and qleft.
29
xmesh is a vector of points in [a, b] where the solution is approximated. The
solution interval end points a and b are xmesh(1) and xmesh(end),
the values of xmesh must be monotonically increasing, and the length of
xmesh must be at least 3.
tspan is a vector of time values where the solution is approximated. The start
and end times t0 and tfinal are tspan(1) and tspan(end), the values of
tspan must be monotonically increasing, and the length of tspan must
be at least 3.
x = linspace(0,1,20);
t = linspace(0,2,5);
sol = pdepe(0,@pdex1pde,@pdex1ic,@pdex1bc,x,t);
u = sol(:,:,1);
surf(x,t,u)
30
1
0.8
0.6
0.4
0.2
0
2
1.5 1
0.8
1 0.6
0.5 0.4
Time t 0.2
0 0 Distance x
The code to solve this example is pdex1 which you can run from the Matlab
command line. You can look at it using the command
edit pdex1
31
8 Fourier Series
How to approximate a function by a linear combination of orthogonal func-
tions
N
!2
Z b X
EN = (x) f (x) cn Xn (x) dx,
a n=1
Rb
P ROOF. We use the notation (f, g) = a
(x)f (x)Xn (x) dx (inner product)
p
and kf k = (f, f ) (2-norm). Then
X
EN = kf cn X n k 2
n
X X
= (f cm X m , f cn X n )
m n
X XX
2
= kf k 2 cn (f, Xn ) + cm cn (Xm , Xn )
n
|m n
{z }
X
c2n kXn k2
n
2 X
(f, Xn )2
2
X
2 (f, Xn )
= kf k + kXn k cn 2
2
,
n
kX n k n
kX n k
32
P ROOF. Substituting cn = (f, Xn )/kXn k2 into the last line of the previous proof
gives N 2 2 2
P
n=1 cn kXn k kf k . Because the sequence of partial sums is monotone
and bounded, the series converges and the limit satisfies (23). 2
We saw earlier that the eigenfunctions of a Sturm-Liouville problem corre-
sponding to distinct eigenvalues are -orthogonal. The eigenfunctions corre-
sponding to a single eigenvalue span a space of dimension at most 2, so one can
find an orthogonal basis of the space spanned by all the eigenfunctions. The fol-
lowing result, whose proof is omitted, tells about the convergence of the best least
squares approximation that uses this basis.
Rl
sin(nx/l) dx 2(1 (1)n )
cn = R l0 = ,
sin2 (nx/l) dx n
0
4
sin(x/l) + 13 sin(3x/l) + 51 sin(5x/l) + .
f (x) =
PN
Some partial sums sN (x) = n=1 cn sin(nx/l) are:
s1 s3 s5 s21
0
0 x/l 1
X 1 2
= .
n=1,3,...
n2 8
33
8.2 Classical Fourier series
The trigonometric basis functions 1, cos(x/l), sin(x/l), cos(2x/l), sin(2x/l),. . .
are 2l-periodic and orthogonal on(l, l), that is,
Z l
cos(mx/l) cos(nx/l) dx = 0 (m 6= n)
l
Z l
sin(mx/l) sin(nx/l) dx = 0 (m 6= n)
l
Z l
cos(mx/l) sin(nx/l) dx = 0
l
This can be verified using trigonometric identities; the first two orthogonality
results can also be derived using the orthogonality of eigenfunctions of distinct
eigenvalues for the Sturm-Liouville problem X 00 + X = 0 with periodic bound-
ary conditions, as in problem 5 of exercise set 6. Then, using the results
Z l Z l Z l
2
dx = 2l, cos (nx/l) dx = sin2 (nx/l) dx = l (n 1),
l l l
we find that the coefficients that minimize the mean square error of
N
X
1
sN (x) = a
2 0
+ an cos(nx/l) + bn sin(nx/l)
n=1
as an approximation of f are
1 l
Z
an = f (x) cos(nx/l) dx (n 0),
l l
1 l
Z
bn = f (x) sin(nx/l) dx (n 1).
l l
These are the coefficients of the classical Fourier series, which by Theorem 3
converges in the mean square sense to f provided that kf k is finite. Parsevals
identity can be written
1 l
X Z
1 2 2 2
a +
2 0
an + b n = (f (x))2 dx.
n=1
l l
Example 2 The Fourier series coefficients of the function f (x) = x/l (l <
x < l) are
Z l
1 x
an = cos(nx/l) dx = 0 (n 0),
l l l
Z l
1 x 2
bn = sin(nx/l) dx = (1)n+1 (n 1).
l l l n
and so the Fourier series for f is
2
sin(x/l) 21 sin(2x/l) + 13 sin(3x/l) . . . .
34
Some partial sums sN (x) are:
1
s s s s
1 2 4 10
0
1
1 0 1
x/l
Parsevals identity for this example gives the interesting series
X 1 2
= .
n=1
n2 6
The above example illustrates the fact that the Fourier series of an odd-symmetric
function has only sine terms. Similarly, the Fourier series of an even function has
only cosine terms. These facts can be used to relate Fourier series with sine or co-
sine series. For example, the series in Example 1 extended to the interval (l, l)
is the Fourier series of the step function
1
1 l < x < 0 x
f (x) = 0 x=0 -l l
1 0 < x < l.
-1
1
5 3 1 1 3 5
x/l
This extended function is piecewise C1 , with a jump of 2 at every odd multiple of
35
l. According to Theorem 4, the Fourier series converges to the extended function
at every x. The oscillation near the jump that is seen in the partial sums (Gibbs
phenomenon) does not spoil the convergence because it becomes infinitesimally
narrow as the number of terms is increased.
Similarly, the function in Example 1 can be extended to a 2l-periodic odd
function:
1
1
5 4 3 2 1 0 1 2 3 4 5
x/l
N
sN (x) = (x > 0)
1 + N 2 x2 s2
2
converges pointwise to the zero function, but does not converge
in the mean-square sense because
s1
l Nl 1
N2
Z Z
1
ksN k2 > dx = N dy,
0 (1 + N 2 x2 )2 0 (1 + y 2 )2
R
and 0
(1 + y 2 )2 dy = /4, so ksN k . 0
0 1 x 2
Also, mean square convergence does not imply pointwise convergence. For
example, the function sequence
N |x| < 1/N 3 N
fN (x) = (x R) x
0 otherwise
-N-3 N-3
36
is
nx 2
X
u(x, t) = cn sin ek(n/l) t ,
n=1
l
where the cn are the Fourier coefficients of the initial profile,
Z l
2
cn = (x) sin(nx/l) dx.
l 0
is
X l
u(x, t) = An cos(nct/l) + Bn sin(nct/l) sin(nx/l),
n=1
nc
where the An and Bn are the Fourier coefficients of the initial profiles,
Z l Z l
2 2
An = (x) sin(nx/l) dx, Bn = (x) sin(nx/l) dx.
l 0 l 0
In particular, if (x) = 0 and (x) = 1 for 0 < x < l, we can use the coefficients
from Example 1 and obtain the solution
X 2(1 (1)n )l nct nx
u(x, t) = sin( ) sin( )
n=1
n2 2 c l l
2(1 (1)n )l
X
1 n(ct x) 1 n(ct + x)
= 2
cos( ) 2 cos( ) .
n=1
n2 2 c l l
The second formula has the same form as the general solution of the wave equation
f (x + ct) + g(x ct). A plot of a partial sum with a large number of terms shows
the time-periodic response:
37
0.1
0.1
1
0
x/l
1
ct/l
2 0
By the method of separation of variables, we have found that the source operator
S(t) for this problem transforms the initial profile (x) into the function
X (, Xn )
Xn (x)en t ,
n
kXn k2
is Z tX
(f ( ), Xn )
u(x, t) = 2
Xn (x)en (t ) d.
0 n
kX n k
Assuming that integration and summation commute, the solution can be written
as X
u(x, t) = un (t)Xn (x),
n
where Z t
un (t) = fn ( )en (t ) d (25)
0
with Rl
(f ( ), Xn ) 0
()f (, )Xn () d
fn ( ) = = Rl .
kXn k2 ()(Xn ())2 d
0
38
Here is an alternative derivation of
Pthe solution of (24). Substituting an as-
sumed solution of the form u(x, t) = m um (t)Xm (x) into the PDE gives
X X
(x)f (x, t) = (u0m Xm um (Xm0 0
))= (u0m + m um )Xm .
m m
each of which (with initial condition un (0) = 0) has the solution (25).
For example, for the constant-coefficient heat equation problem
we have
l
2(1 (1)n )
Z
2
fn (t) = sin(n/l) d =
l 0 n
0.1
P
and so u(x, t) = n=1 un (t) sin(nx/l)
with 0.05
39
9 Laplaces Equation
Vector Analysis facts
Membrane vibration
Laplaces equation
40
Letting n denote the unit normal vector Ron the surface D of the domain D, the
net flux out of the domain is given by D ~ n dA. Let f (x, t, u) denote the
source term, that is, the rate (units: [quantity] [time] 1 [volume] 1 ) at which
substance density increases by processes other than flux, for example chemical
reaction. The rate of increase of the total amount of substance in the interval is
then Z Z Z
d ~ n dA +
u(x, t) dV = f (x, t, u)dV.
dt D D D
Using the divergence theorem, the surface integral can be replaced by a volume
integral, yielding Z
ut + ~ f dV = 0.
D
~=f
ut +
~ = KT
models conduction, whereby heat flows from hot areas to colder areas. The ma-
terial parameter K(x) is called the heat conductivity. Substituting Fouriers law
into the conservation equation gives the three-dimensional heat equation
cTt (KT ) = f.
This equation is very similar to the diffusion equation, and is essentially identical
to it (except for notation) when c is constant.
41
Horizontal force balance: Let T (x, y, t) be
the tension (units [force] [length]1 ), as-
sumed to act tangentially along the mem-
brane. Let D be a domain in the xy
(horizontal) plane, let D be its bound-
ary curve, and let n denote the unit out-
ward normal vector (in the xy plane) on
D. Let un = n u denote the direc-
tional derivative of u in the direction n; then
= tan1 (n u) is the angle between n
and the tension vector. Because there is no horizontal motion, the vector sum of
the horizontal forces acting on the boundary must be zero, that is,
Z
T cos n dl = 0.
D
Then, for any constant vector a, we have
Z Z
a0 = a T cos n dl = (aT cos ) n dl
Z D D Z
= (aT cos ) dA = a (T cos ) dA,
D D
R
and since a is arbitrary, this implies D (T cos ) dA = 0. Because the domain
is arbitrary, this in turn implies (T cos ) = 0, so that T cos is constant with
respect to x and y, say
T (x, y, t) cos (x, y, t) = (t).
Mass conservation: Let (x, y, t) be the membranes mass per unit area (
may vary as the membrane deforms during the motion), and let 0 (x, y) be the
mass per unit area when the membrane is plane. If dA0 represents an area element
of deformed membrane and dA represents the same element when the membrane
is plane, then mass conservation requires that dA0 = 0 dA.
Vertical force balance: Consider a membrane piece whose projection onto the
xy plane is D. By Newtons law, the net vertical force on this piece is equal to the
time derivative of the momentum:
Z Z Z
d 0
ut dA = T sin dl = T cos tan dl
dt D
ZD D
Z
= u n dl = (u) dA.
D D
Using mass conservation gives
Z
(0 utt u) dA = 0,
D
which implies
0 utt u = 0.
p
Denoting c = /0 , this can be written
utt = c2 u,
which is the two-dimensional wave equation.
42
9.4 Laplaces Equation
If the source term in the diffusion equation is constant, then the steady state equi-
librium concentration is described by the diffusion equation with the time deriva-
tive terms removed:
(ku) = f.
When k is constant this reduces to the Poisson equation
u = F
where F = f /k. The Poisson equation with no source term is Laplaces equation
u = 0.
Similar equations arise as models of steady state heat flow. A membrane sub-
jected to a transversal static load f (x) is modelled by a two-dimensional Poisson
equation
u = f.
Laplaces and Poissons equations also arise as models of gravitational fields, elec-
trostatic fields, stationary fluid flow, brownian motion, and many other phenom-
ena.
Any function that satisfies Laplaces equation is called a harmonic function.
In one dimension, Laplaces equation is uxx = 0, so one-dimensional harmonic
functions are all of the form u(x) = A+Bx. Things get more interesting in higher
dimensions, however! The following results holds in the one, two, and three (and
higher!) dimensional versions of Laplaces equation.
Theorem 8 (Maximum Principle) If u is harmonic in a connected bounded open
set , and continuous in = , then the maximum value of u is attained on
the boundary .
Proof. Let > 0 and v(x) = u(x) + N 2
P
i=1 xi . If v has a maximum at a point
2v
x , the hessian matrix vxx = [ xi xj ] is negative semidefinite, which implies
2v
x2i
0 for every i. But
X 2v
v = = |{z}
u +2N > 0,
i
x2i
=0
43
Example 1 Find the maximum value of f (x, y) = x2 y 2 in the unit disk
x2 + y 2 1.
Solution. Because f = 0, the maximum occurs on the disk boundary. Using po-
lar coordinates, f = cos2 sin2 = cos(2) on the boundary, and the maximum
value is 1, attained at the points (x, y) = (1, 0) and at (x, y) = (1, 0). 2
u = f in connected bounded , u = h on .
The following result indicates that the laplacian is suitable for modelling isotropic
physical phenomena, in which there is no preferred direction. A rotation of the
coordinate axes corresponds to a linear transformation x0 = Bx with orthogonal
B (that is, B T B = I) and det(B) = 1. (An orthogonal B with det(B) = 1
models a rotation with reflection.)
Theorem 9 (Rotational invariance of laplacian) If u0 (x0 ) = u(B T x0 ) with or-
thogonal B then 0 u0 = u.
Proof. By the chain rule we have
u0 X u xl
=
x0i l
xl x0i
|{z}
bil
and
2 u0 X X 2u
= bil bjp = (Buxx B T )ij .
x0i x0j l p
x l x p
Then
44
Proof. Moving the origin to x0 , the mean value of u on the boundary of the three
dimensional ball is given by
R 2
u dA
Z Z
1
m(a) = D
= u(a, , )a2 sin d d.
A 4a2 0 0
1
From Greens first identity with v 4a2
and u = 0 we have
Z Z 2 Z
1
0= vu n dA = ur (a, , ) sin d d = m0 (a),
|x|=a 4 0 0
so that the mean value on the ball surface is independent of the balls radius.
Taking a 0 gives m = u(0). The proof for one and two dimensions is similar. 2
According to the maximum principle (Theorem 1), harmonic functions attain
their maximum on the boundary. Using the mean value property we can show that
the maximum is not attained inside the region, unless the function is constant.
R w that satisfy w =
Theorem 11 (Dirichlets Principle) Among all the functions
h on , the one that minimizes the energy E(w) = 21 |w|2 dV is har-
monic.
so E(w) E(u). 2
The Dirichlet principle motivates the Rayleigh-Ritz method for computing an
approximate solution of the Dirichlet problem of Example 2. Choose functions
w0 , w1 , . . . , wn such that w0 = h and w1 = = wn = 0 on , and consider
the linear combination w = w0 + c1 w1 + + cn wn . Then
Z n
! n
!
X X
E(w) = 21 w0 + ci wi w0 + cj wj dV
i=1 j=1
1 T 1 T
= 2
a b c+ 2
c Ac,
R R R
where a = |w0 |2 dV , bi = w0 wi dV , and Aij = wi wj dV .
This energy is minimized when c = A1 b, because
E(w) = 1
2
a bT (c A1 b + A1 b) + 21 (c A1 b + A1 b)T A(c A1 b + A1 b)
= 1
2
(a bT A1 b) + 21 (c A1 b)T A(c A1 b),
46
Solution. With w0 = (33xy)y and w1 = (33xy)xy
2
we have
u
Z 1 Z 33x
w0 w1 w0 w1 9 1
b1 = + dy dx =
0 0 x x y y 20
Z 1 Z 33x 2 2
w1 w1 3 0
A11 = + dy dx = 3
2
1
0 0 x y 2 y 1 x
0 0
3
c1 = b1 /A11 =
10
3
so the approximate solution is w0 w
10 1
= y(3 3x y)(1 0.3x).
47
10 Solving Two-Dimensional Laplace Equations
Laplace equation boundary value problems in a disk, a rectangle, a wedge,
and in a region outside a circle
1
(rur )r + (u ) = 0
r
A separation of variables trial solution u(r, ) = R(r)() gives
1 1
R00 + R0 + 2 R00 = 0
r r
which can be rearranged to
r2 R00 rR0 00
+ = .
R R
Equating both sides to the separation constant , we are left with two ODEs,
00 + = 0 (26)
and
r2 R00 + rR0 R = 0. (27)
For 6= 0, the general solution of (26) is () = A cos + B sin .
Substituting this into the periodic boundary conditions (0) = (2) and 0 (0) =
0 (2) gives the homogeneous equations
A(1 + cos(2 )) + B sin(2 ) = 0
A sin(2 ) + B (1 + cos(2 )) = 0
This system of equations has a nontrivial solution (that is, a solution other than
A =B = 0) if thedeterminant of the coefficient matrix is zero. The determinant
is 2 (1cos(2 )), and the nonzero values of that give a nontrivial solution
are n = n2 with n = 1, 2, . . .
For = 0, the general solution of (26) is () = A + B, and the only
nontrivial periodic solution is () = A (nonzero constant).
Consider now the equation (27). For 6= 0, a trial solution of the form R(r) =
r gives
(2 )r = 0,
which implies the solutions = = n. For = 0, (27) reduces to
r(rR0 )0 = 0, which has the general solution R(r) = c1 ln r + c2 .
48
Writing the solution as a linear combination of the solutions found above, we
have
X
u(r, ) = c1 ln r + c2 + (An cos n + Bn sin n)rn
n1
X
+ (An cos n + Bn sin n)rn (28)
n1
and the coefficents are determined by equating An an and Bn an with the Fourier
series coefficients of h:
Z X 1 Z
1 0 0 0 0 0
u(r, ) = h( ) d + h( ) cos n d cos n
2 n1
Z
1 0 0 0 r n
+ h( ) sin n d sin n (29)
a
X 2(1 (1)n ) r n
u(r, ) = 50+50 sin(n)
n1
n a
Plotting the sum of a large number of terms gives the above figure. 2
49
The series solution (29) for the Dirichlet problem in the disk can be written as
Z " #
1 X r n
u(r, ) = h(0 ) 1 + 2 cos n( 0 ) d0 (30)
2 n1
a
0
Letting z = ar ei( ) , the term in brackets can be written
X z z 1 z z 1 |z|2
1+ z n + z n = 1 + + = =
n1
1 z 1 z (1 z)(1 z) 1 + |z|2 (z + z)
1 (r/a)2
=
1 + (r/a)2 2(r/a) cos( 0 )
X 00 Y + XY 00 = 0, x
u=0 a
X 00 + X = 0 (31)
and
Y 00 Y = 0. (32)
For 6= 0, the general solution of (31) is X = A cos x + B sin x. Substi-
into the boundary conditions X(0) = 0 and X(a) = 0 gives A = 0
tuting this
and B sin( a) = 0, and the nonzero values of that give a nontrivial solution
are n = (n/a)2 with n = 1, 2, . . .. For = 0, the general solution of (31)
is X(x) = A + Bx, and there is no nontrivial solution satisfying the boundary
conditions.
The general solution of (32) with = (n/a)2 is Y (y) = A cosh(ny/a) +
B sinh(ny/a). The boundary condition Y (0) = 0 is satisfied by setting A = 0.
50
Writing the solution as a linear combination of the solutions found above, we
have X
u(x, y) = Bn sin(nx/a) sinh(ny/a)
n1
The coefficients are obtained by equating Bn sinh(nb/a) with the Fourier sine
series coefficients of g(x):
X 2 Z a
0 0 0 sin(nx/a) sinh(ny/a)
u(x, y) = g(x ) sin(nx /a) dx (33)
n1
a 0 sinh(nb/a)
Example 2 Find the steady-state temperature in a long prismatic tube with square
a a cross-section if the top face is kept at u = 1 and other three faces are kept
at u = 0.
Solution. The boundary function is g(x) = 1, whose Fourier sine series was found
in section 8 to be
X 2(1 (1)n )
g(x) = sin(nx/a).
n1
n
Plotting the sum of a large number of terms gives the above figure. 2
The solution for the general Dirichlet problem in the rectangle is found by
superposition of (33) and solutions of similar problems:
0
51
0
52
10.4 Dirichlet Problem in the region outside a circle
Consider the two dimensional Laplace equation in the region x2 + y 2 > a2 with
u = h on the boundary and u bounded at infinity.
We can proceed as in section 10.1 up to formula (28). To ensure the solution
is bounded at infinity, we set c1 , An and Bn to zero, leaving
X
u(r, ) = 21 A0 + (An cos n + Bn sin n)rn
n1
u0 u r a2
u0r0 = = = ur
r0 r r0 (r0 )2
and
1 0 0 1 a2 r r r 4 1
(r u r 0 )r 0 = ( u r ) r 0 = (ru r )r = (rur )r
r0 r0 r0 a2 r0 a r
and so
1 0 0 1 r 4
0 u0 = (r u 0
r r) 0 + (u 0
) = u.
r0 (r0 )2 a
Thus, if 0 u0 = 0 inside the circle then u = 0 outside it. The solution inside the
circle is (29) written with u0 and r0 , and applying the change of variables to this
solution gives (34). Similarly, the Poisson integral formula for the disk interior is
transformed to
Z
r 2 a2
1 0
u(r, ) = h( ) 2 d0 .
2 a + r2 2ar cos( 0 )
53
Find the streamlines for flow past a long circular cylinder of radius a whose
axis is the z axis, assuming the flow far from the cylinder to be constant in the x
direction, that is, = U y.
Solution. The stream function satisfies the two dimensional Laplace equation on
the exterior of the circle r = a. The radial component of the velocity is zero on
the cylinder boundary, that is, the cylinder boundary is a streamline, which gives
the boundary condition =constant (say, zero) for r = a. Substituting this into
the general solution (28) we find
c1 ln a + c2 = 0
An an + An an = 0
Bn an + Bn an = 0
so that
r X n a2n
(r, ) = c1 ln + r n (An cos n + Bn sin n)
a n1 r
a2
r
(r, ) = c1 ln + U 1 2 r sin .
a r
Here are streamlines for various c1 values, which correspond to different cylinder
clockwise rotation speeds:
c1 = 0 c1 = Ua
c1 = 2Ua c1 = 2.1Ua
The closely spaced streamlines correspond to regions of low pressure and indicate
the presence of a net lift force in the y direction (Magnus effect).
54
11 Greens Functions
11.1 Greens Function for One-Dimensional Equation
The Greens function provides a complete solution to a boundary value problem in
much the same way that an inverse matrix provides a general solution for systems
of linear equations. In this section the Greens function is introduced in the context
of a simple one-dimensional problem.
Some of the proofs use the identity
Z b
b
(uv vu ) dx = a uv 0 vu0 .
00 00
a
1. K is continuous;
Note that the three properties do not define a singularity function uniquely: if
K is a singularity function then so is K + H, where H(x, ) is any function with
continuous H and Hx and with LH = 0.
The Greens function G(x, ) for the operator L and the domain (a, b) with
Dirichlet boundary conditions is the singularity function that satisfies the homo-
geneous Dirichlet conditions G(a, ) = 0 and G(b, ) = 0. The Greens function
provides the solution to the boundary value problem with Dirichlet boundary con-
ditions:
+ +
b
= a uv 0 vu0 u() v 0 + vu0 ,
| {z } | {z } | {z }
0 1 0
55
00
The load (or source) function f in the differential equationP u cu = f
can be thought of as a superposition of point loads f (x) = (xR )f ()d,
where (x ) is concentrated at and has unit magnitude (i.e. dx = 1).
Then formula (35) represents the solution as a weighted sum of Greens functions,
where each G(, x) is the solution to u00 (x) = (x ). The Greens function
can thus be thought of as the response to a unit point load.
The Greens function also provides the solution of the boundary value problem
with nonhomogeneous boundary conditions:
Proof. Let y and be distinct points in (a, b) with y < , let u(x) = G(x, ) and
v(x) = G(x, y). Then
Z y Z Z b
00 00 00 00
0 = uv vu dx + uv vu dx + uv 00 vu00 dx
a y + +
y b
= a uv 0 vu0 + y+ uv 0 vu0 + + uv 0 vu0
+ +
b y
= a uv 0 vu0 y uv 0 vu0 uv 0 vu0 ,
| {z } | {z } | {z }
0 u(y) v()
leaving u(y) v() = 0, that is, G(y, ) G(, y) = 0. The proof for y > is
similar. 2
As a consequence of Theorem 2, we can rewrite formula (35) as
Z b
u(x) = G(x, )f () d.
a
56
and formula (36) as
K(x, ) = 21 |x |,
as can readily be verified. The Greens function for the interval (0, 1) can be
found by solving Hxx = 0 with boundary conditions
H(0, ) = K(0, ) and H(1, ) = K(1, ), then 0.25
G(x, ) = 21 |x | + 12 (x + ) x
(1 x) for < x 0
= 1
(1 )x for x < .
1
0 x
00 0
The solution of u = f satisfying u(0) = h0 and u(1) = h1 is given by
Z 1
u(x) = G(x, )f () d + G (x, 0)h0 G (x, 1)h1
0
Z x Z 1
= (1 x) f () d + x (1 )f () d + (1 x)h0 + xh1 .
0 x
This can be derived by writing Greens first identity twice, with u and v inter-
changed the second time, and subtracting.
A singularity function K(x, x0 ) of the operator is characterised by the
three properties
Z
0
1. For any fixed x , lim K(x, x0 ) dl = 0, where B0 denotes the radius-
0 B0
0
disk centred at x ;
Z
0
2. For any fixed x , lim K(x, x0 ) n dl = 1, where n denotes the
0 B0
outward unit normal to B0 ;
Note that these three properties do not define a singularity function uniquely:
if K is a singularity function then so is K + H, where H(x, x0 ) is any function
that is harmonic as a function of x.
57
A singularity function of is given by
1
K(x, x0 ) = ln |x x0 |. (37)
2
This assertion can be verified as follows. Without loss of generality we can take
x0 = 0. In polar coordinates, we have K = 1 2
ln r with r = |x|, which is
harmonic in R2 \ {0} (see section 9.4). Also,
1 2
Z Z
K dl = ln d = ln 0
B0 2 0
1 2 1
Z Z
K n dl = d = 1.
B0 2 0
The Greens function for and a domain with Dirichlet boundary con-
ditions is a singularity function that satisfies G(x, x0 ) = 0 for x . The
Greens function provides the solution to the Poisson equation with homogeneous
Dirichlet boundary conditions:
Theorem 15 If u = f in and u = 0 on then
Z
0
u(x ) = G(x, x0 )f (x) dA (x0 ). (38)
58
Proof. Let y and y0 be distinct points in , let B and B0 denote -radius disks
centred at y and y0 , and let u(x) = G(x, y0 ) and v(x) = G(x, y). Then
Z
0 = uv vu dA
\B0 \B
Z Z Z
= (uv vu) n dl
B B0
| {z }
0
Z Z
u(y) v n dl + vun dl
B B
| {z } | {z }
1 0
Z Z
uvn dl + v(y0 ) un dl,
B0 B0
| {z } | {z }
0 1
The singularity function (37) is called the free-space Greens function for Pois-
sons equation. It is a Greens function for Poissons equation with the boundary
1
condition u(x) |x| as |x| . The free-space Greens function doesnt satisfy
this boundary condition, but the boundary condition does ensure that the term
Z
(uv vu) n dl
59
The Greens function G((x, y), (0, 0.5)) for the half-plane and the unit-radius
disk are shown below.
0.4
0.3
0.3
0.2
G G 0.2
0.1
0.1
0 0
2 1
1 1
1 0
y 0.5
0
x y 0
x
0 1 1 1
The Greens function also provides the solution of Laplaces equation with
nonhomogeneous Dirichlet boundary conditions:
60
Consider the differential equation u00 = f with boundary conditions u(0) =
0, u(a) = 0. The associated eigenvalue problem is 00 + = 0 with the same
boundary conditions. The eigenvalues and eigenfunctions are
m2 2 mx
m = , m (x) = sin .
a2 a
P
Substituting a trial solution of the form m0 1 Am0 m0 (x) into the differential
equation, multiplying through by m (x), and integrating gives
Z a Z a
2 mx mx
Am m sin dx = f (x) sin dx,
0 a 0 a
| {z }
a/2
1
Thus the Am are m
the Fourier sine coefficients of f , and the solution at a point
(0, 1) is
" #
Z a X 2a mx m
u() = f (x) 22
sin sin dx.
0 m1
m a a
Comparing this with formula (35), we deduce the Greens function to be the term
in brackets, that is,
X 2a mx m
G(x, ) = 22
sin sin .
m1
m a a
When a = 1, this is the Fourier sine expansion of the Greens function presented
in section 1.
Next, consider the two-dimensional Poisson equation u = f on the do-
main (0, a) (0, b), with u = 0 on the boundary. The associated eigenvalue
problem is u + u = 0, with the same boundary conditions. Assuming a solu-
tion of the form u(x, y) = X(x)Y (y) yields, with 2 as separation constant, the
two eigenvalue problems
X 00 + 2 X = 0, Y 00 + ( 2 )Y = 0
61
1
Thus the Amn are mn the two-dimensional Fourier sine coefficients of f , and
the solution at a point x0 is
Z aZ b
0 0
u(x , y ) = f (x, y)G(x, y, x0 , y 0 ) dx dy
0 0
with
4ab X X 1 mx ny mx0 ny 0
G(x, y, x0 , y 0 ) = sin sin sin sin .
2 m1 n1 m2 b2 + n2 a2 a b b b
The Greens function G(x, y, a/2, a/4) for a square domain is plotted below.
0.3
G 0.2
0.1
0
1
1
y/a 0.25
0.5
x/a
0 0
62