3CO2 I Handout
3CO2 I Handout
Charles H. Patterson
Introduction
1 Introduction to PDEs, boundary conditions and initial conditions
2 Coordinate Systems and Differential Operators
Survey of PDEs in Physical Applications
3 Elliptic PDEs
Poisson and Laplace Equations
Solution by Integral Transform
Poisson Equation in 1-D
4 Finite Difference Method for Differential Operators
Liebmanns Method Applied to Poissons Equation
5 Parabolic PDEs
Computer Modelling of Fluids
Advection and Diffusion
Continuity Equation
Diffusion Equation
Schrdinger Equation as a Diffusion Equation
6 Method of Separation of Variables
Solving Inhomogeneous PDEs by Eigenfunction Expansion
7 Hyperbolic PDEs
1-D Wave Equation
8 Finite Difference Methods for parabolic and Hyperbolic PDEs
Explicit Method
Implicit Crank-Nicholson Method
9 Waves in Channels
10 Solution of Coupled Nonlinear Wave Equations by Finite Differences
Solitary Waves and the Korteweg deVries Equation
11 Classification of PDEs
12 Stability of Numerical methods for PDEs
Fourier Stability Method
Matrix Stability Method
Recommended Texts
Partial Differential Equations for Scientists and Engineers,
S.J. Farlow, Dover (1993) S-LEN 515.353 M23; 3
Partial Differential Equations for Scientists and Engineers,
G. Stephenson, Imperial College Press, (1996) 515.353 N8
Computational physics, problem solving with computers
R.H. Landau and M.J. Paez, Wiley (1997) 530.07 N7
2 Coordinate Systems and Differential Operators
Order, Class and Homogeneity of PDEs
The general form of a linear PDE in 2 independent variables is
G Fu u E u D u C u B u A
y x yy xy xx
+ + + + +
The coefficients A, B, C, etc. may be constants or variables.
The order of a pde is the order of the highest partial derivative present. For example,
xx t
u u
is second order.
In the general form above, u(x,y) is the dependent variable and x and y are the independent
variables.
Pdes are linear if no products of the dependent variable or its derivatives, or functions such
as sine involving the dependent variable, are present. Otherwise the pde is nonlinear.
Generally, linear pdes are much easier to solve, except for particular nonlinear pdes where
analytic solutions are known.
Pdes may be classified according to whether they are:
Hyperbolic B
2
> 4AC Vibrating systems, waves, etc.
Parabolic B
2
= 4AC Heat flow, diffusion, etc.
Elliptic B
2
< 4AC Equilibrium problems, electrostatics, etc.
Coordinate Systems and Differential Operators
Mathematical Methods in the Physical Sciences, M.L. Boas, 2
nd
Edition, pp 427 ff
Cylindrical Coordinate System
Scale Factors
Distance moved when a coordinate changes by an infinitesimal amount.
e e e s
k j i s
x x x s
System Coordinate l Cylindrica dz 1 d r dr 1 d
System Coordinate Cartesian dz 1 dy 1 dx 1 d
dx h dx h dx h d
z r
3 3 3 2 2 2 1 1 1
+ +
+ +
+ +
h
i
are the scale factors
Cartesian Vector Operators
Gradient u
z y x
u
,
_
z y x x x x Divergence
x
V
x
V
x
V
.
3 2 1
3
3
2
2
1
1
V
Laplacian
x
u
x
u
x
u
u
2
3
2
2
2
2
2
1
2
2
General Curvilinear Coordinates
+ +
i
2
i
2
i
2
3 3 2 2 1 1
3 2 1
dx h ds
h h h d
s Coordinate Orthogonal x x , x
e e e s
Vector Operators in General Curvilinear Coordinates
( ) ( ) ( )
1
1
]
1
,
_
,
_
,
_
1
1
]
1
3 3
2 1
3 2 2
1 3
2 1 1
3 2
1 3 2 1
2
3 2 1
3
2 1 3
2
1 3 2
1 3 2 1
i
i i
x
u
h
1
h h
x x
u
h
1
h h
x x
u
h
1
h h
x h h h
1
u
V h h
x
V h h
x
V h h
x h h h
1
V .
x
u
h
1
u
4 Finite Difference Approximations
Taylor Series Expansion Approximations to first and second derivatives of f(x)
The Taylor series expansion for a function of one variable about the point x is
) O(h (x) ' ' f
2!
h
(x) ' f h f(x) h) f(x
3
2
+ + + +
The notation ) O(h
3
indicates that the series, when truncated at the quadratic term in h,
contains errors that scale as h
3
and higher powers of h.
We can immediately obtain an approximation to the derivative of f(x) from the first two
terms of the expansion.
) O(h
h
f(x) h) f(x
(x) ' f
1
+
+
,
_
+ + + + + + + +
h
h
The vector notation for this expansion is
( )
j i
2
3
x x
y
x
k h
k
h
) O( . ) ( u .
2!
1
) ( u . ) u( ) u(
,
_
,
_
+ + + +
x h h
h h x h x h x h x
T
T T
Returning to the long-hand notation, the expansion of u(x,y) in the x direction is
) O(h y) (x, u
2!
h
y) (x, u h y) u(x, y) h, u(x
) O(h y) (x, u
2!
h
y) (x, u h y) u(x, y) h, u(x
3
xx
2
x
3
xx
2
x
+ +
+ + + +
If we subtract these two equations and rearrange to make u
x
the subject of the equation we
find that the central difference approximation to u
x
is
) O(h
2h
y) h, - u(x y) h, u(x
y) (x, u
2
x
+
+
We can also obtain forward and backward difference approximations which contain errors
of order O(h
1
) from the Taylor series expansion in either direction.
Computational Molecules
It is convenient to write the function u at points on a grid for numerical solution with
subscripted indices rather than arguments. Thus we make the equivalence
j 1, i
u k) y u(x,
+
+
k is the stepsize or distance between gridpoints in the y direction in the numerical solution.
Perversely, Farlow reverses the order of the arguments/indices in going over to the gridpoint
index. We will do the same to maintain consistency with Farlow. The indicial representation
of the first and second order partial derivatives is given below and illustrated by
corresponding computational molecules.
( ) ) O(h u - u
2h
1
y) (x, u
2
1 j i, 1 j i,
x
+
+
( ) ) O(k u - u
2k
1
y) (x, u
2
j 1, - i j 1, i
y
+
+
( ) ) O(h u 2u - u
h
1
y) (x, u
2
1 - j i, j i, 1 j i,
2
xx
+ +
+
( ) ) O(k u 2u - u
k
1
y) (x, u
2
j 1, - i j i, j 1, i
2
yy
+ +
+
Provided that the stepsizes in the two directions (h and k) are equal, then we obtain the
following approximation for the Laplacian operator in 2 dimensions
( ) ) O(h u 4 - u u u u
h
1
y) (x, u
2
j i, 1 - j i, 1 j i, j 1, - i j 1, i
2
2
+ + + +
+ +
.
Liebmanns Method
Example: Elliptic PDE with Dirichlet Boundary Conditions (p303 Farlow)
Consider the electrostatic problem where the potential is to be determined in a square region
of unit dimension in the xy plane. The potential on the boundary is sin(x) along the bottom
of the region and zero on the sides and top.
0 y 1, x 0 x) sin( y) u(x,
1 y 0 1, x
1 y 0 0, x
1 y 1, x 0 0 y) u(x, BC
1 y 0 1, x 0 0 u u PDE
yy xx
< <
< <
< <
< < < < +
When we apply the numerical approximation for the Laplacian operator to the problem, a set
of inhomogeneous linear equations (with dimension equal to the number of internal
gridpoints) is generated. For a large number of gridpoints, the number of equations
generated may require a very large amount of memory (especially so when the problem is in
3 dimensions or more). Fortunately a simple method known as Liebmanns method allows
even a very large system of equations to be solved.
The grid consists of points lying on the boundaries (boundary points, where values are
specified according to the Dirichlet boundary conditions) and internal points where we seek
the values of the potential. The method is very simple:
Step 1. Initialise values of the internal points
Step 2. Update each internal point using the approximation to the 2 dimensional Laplacian
given above. Repeat step 2 until the solution converges (ceases to change) to within some
specified tolerance.
8 Explicit and Implicit Methods of Finite Difference Solution
These marching methods can be applied to parabolic and hyperbolic PDEs. In explicit
finite difference methods each new value of the solution as time advances is given explicitly
in terms of values of the solution at earlier times. In implicit finite difference methods the
values of the solution as time advances are obtained by solving sets of linear equations
containing already determined values of the solution and several values yet to be determined.
Example: Heat Flow in 1-D Solved by Explicit Method (p309 Farlow)
Consider the problem of heat flow in 1-D where Dirichlet BC are used at one end of a bar of
unit length and mixed BC are used at the other end.
( )
1 x 0 0 u(x,0) IC
g(t) - t) u(1, - t) (1, u
t 0 1 t) u(0, BC
t 0 1, x 0 u u PDE
x
xx t
< <
< < < <
Discretise according to
k i t h, j x
i j
. h and k are the spatial and temporal stepsizes,
respectively, and j and i are integers denoting the particular space and time gridpoint.
Specification of BC
m ..., 2,3, i 1 u becomes 1 t) u(0,
i,1
( ) ( ) ( ) g(ik) g m; 2,3,..., i g - u - u - u
h
1
becomes g(t) - t) u(1, - t) (1, u
i
i n i, 1 - n i, n i,
x
h 1
g h u
u
i 1 - n i,
n i,
+
+
Approximation to PDE
( )
( ) u u 2 - u
h
1
by ed approximat is t) (x, u
u - u
k
1
by ed approximat is t) (x, u
1 j i, j i, 1 j i,
2
xx
j i, j 1, i t
+
+
+
Equating the two numerical approximations we obtain the following PDE approximation
( ) ( )
1 j i, j i, 1 j i,
2
j i, j 1, i
u u 2 - u
h
1
u - u
k
1
+ +
+
( )
1 j i, j i, 1 j i,
2
j i, j 1, i
u u 2 - u
h
k
u u
+ +
+ +
Algorithm
Step 1. Update internal points
Step 2. Update boundary points. Repeat steps 1 and 2 until required time has elapsed.
Example: Heat Flow in 1-D Solved by Implicit Method (p317 Farlow)
Consider the problem of heat flow in 1-D where Dirichlet BC are used at either end of a bar
of unit length.
1 x 0 1 u(x,0) IC
0 t) u(1,
t 0 0 t) u(0, BC
t 0 1, x 0 u u PDE
xx t
< <
< < < <
( ) ( ) ( )
1 j i, j i, 1 j i,
2
1 j 1, i j 1, i 1 j 1, i
2
j i, j 1, i
u u 2 - u
h
- 1
u u 2 - u
h
u u
k
1
FDE
+ + + + + +
+ + +
Rearrange so that all terms with timestep i+1 appear on the left hand side
( ) ( ) ( ) [ ] ( )
2
1 j i, j i, 1 j i, 1 j 1, i j 1, i 1 j 1, i
h
k
r
u r - 1 u r - 1 2 - 1 u r - 1 ru u r 2 1 u r -
+ + + +
+ + + + +
In an implicit method this set of equations is solved at each timestep. The number of
equations is the number of internal gridpoints at a single time. The time stepsize can be
larger in an implicit method and it can therefore be worth the extra computational work to
use an implicit rather than an explicit method.
Algorithm
Choose = 0.5 (Crank-Nicholson), h = 0.2, k = 0.08 => r = 2, r = 1, 1+2 r = 3, r(1- ) =
1. Number of space gridpoints, including 2 boundary grid points = 6. j ranges from 1 to 6, j
= 1, j = 6 are boundary points. At each time step the value of the solution at the four internal
grid points is solved for in terms of the value of the solution at the six (internal plus
boundary) grid points at the previous time step. The resulting system of linear equations for
the first time step is
,
_
,
_
,
_
1
1
1
1
u
u
u
u
u
u
.
1 3 1 0 0 0
0 1 3 1 0 0
0 0 1 3 1 0
0 0 0 1 3 1
26
25
24
23
22
21
Given the BC chosen in this problem, u
21
= u
26
= 0 and so the equations reduce to
,
_
,
_
,
_
1
1
1
1
u
u
u
u
.
3 1 0 0
1 3 1 0
0 1 3 1
0 0 1 3
25
24
23
22
These equations can be solved rapidly and effectively using the LU decomposition method.
9 Wave motion in channels
We derive coupled partial differential equations representing conservation of mass and
conservation of momentum for water in a channel of width, b. Approximate forms for the
conservation equations lead to the wave equation when the wave amplitude is small
compared to the mean water depth. We then investigate finite difference methods for solving
the coupled pdes in two dependent variables, the water velocity, u, and the height of the
water column, h. (See Mathematics for dynamic modeling, E. Beltrami, Academic Press
(1987), 125 ff ARTS 330.18 M79).
Conservation of mass
The continuity equation is applied to water in the channel which has width, b, height, h(x,t),
thickness, x, and is moving parallel to the x direction at velocity u(x,t). The water density
is .
Mass of slice = volume . density = b x h
( ) ( )
( )
Mass of on Conservati 0
x
u
h
x
h
u
t
h
0 t) u(x, t) h(x,
x
t) h(x,
t
0 t) u(x, t) h(x, x b
x
t) h(x, x b
t
Conservation of Momentum
If we consider a slice where the height of the slice varies within the slice, then there is a
pressure difference across the slice which tends to accelerate the slice in the x direction. We
must compute the pressure difference across the slice, recognize that this corresponds to a
force, F(x,t), and substitute this force into the conservation of momentum equation
t) F(x, momentum) (
dt
d
x
2
(t) x
1
(t) = x
In differentiating this integral with respect to time we must use Leibniz rule as the limits of
integration depend on the differentiation variable. Thus
steps) of details for sheet Tutorial (see
x) O( x
x
u
u
t
u
h dx t) u(x, t) h(x,
dt
d
find we relations these ng substituti
x) O(
x
t) , h(x
) x - (x t) , h(x t) , h(x
x) O(
x
t) , u(x
) x - (x t) , u(x t) , u(x (t) x
t) , u(x (t) x
t) , u(x t) , (t)h(x x - t) , u(x t) , h(x (t) x dx ) t) u(x, t) (h(x,
t
dx t) u(x, t) h(x,
dt
d
2
(t) x
(t) x
2
2
(t) x
(t) x
(t) x
(t) x
2
1
2
1
2
1
1
1 2 1 2
1
1 2 1 2
2
.
1
1
.
1 1
1
.
2 2
2
.
+
,
_
+
+
The water pressure at depth, h z, measured from the water surface is g (h z). The
pressure force averaged over a slice at (x
1
, t) is
( ) b dz z - t) , h(x g t) , F(x
t) , h(x
0
1 1
1
The difference in pressure force across a slice, of width x, by Taylor series expansion is
( )
2
2
t) , h(x
0
1
2
t) , h(x
0
1 1 2
x) O( x b
x
h
h g
x) O( x b dz
x
t) , h(x
g
x) O( x b dz z - t) , h(x
x
g t) , F(x - t) , F(x
1
1
+
+
1
1
1
]
1
+
1
1
1
]
1
d
d
The rate of change of momentum of the slice is
2
x) O( x
x
u
u
t
u
bh +
,
_
We now have two coupled, nonlinear pdes which can only be solved by numerically.
However, before proceeding to the numerical problem, we make an approximation which
shows that the solution to these equations is approximately the solution to the wave equation
under certain conditions.
Wave equation
Express the height of the water column as
h h
_
+
where
_
h
is the mean water height and
is small compared to h and that the wavelength is small compared to the wave
amplitude so that
<< h and
x
may be
neglected under these conditions. Then the mass and momentum conservation equations can
be approximated by
te) (approxima Mass of on Conservati 0
x
u
h
t
te) (approxima Momentum of on Conservati 0
x
g
t
u
_
Differentiation of the first equation wrt x and the second wrt t allows the equations to be
combined to give
_
_
h g ty ith veloci equation w Wave 0
x
h g
1
x
2
2
2
2
10 Solution of coupled, nonlinear pdes by finite difference method
We begin by considering an explicit finite difference scheme for the linear approximations to
the conservation equations. In finite difference schemes it is conventional to stagger the grid
for the independent variables. We update one of the variables and then substitute results
from that update into the other finite difference equation. These methods are therefore
known as leapfrog methods.
A central finite difference scheme yields
on Conservati Momentum 0
x 2
h h
g
t 2
u u
on Conservati Mass 0
x 2
u u
h
t 2
h h
i
1 - j
i
1 j
1 i
j
1 i
j
i
1 - j
i
1 j
1 i
j
1 i
j
_
+
Solving for the updates to h and u we obtain
( )
( ) on Conservati Momentum h h
x
t
g - u u
on Conservati Mass u u
x
t
h - h h
i
1 - j
i
1 j
1 i
j
1 i
j
i
1 - j
i
1 j
1 i
j
1 i
j
_
+
+
+
+
Both of these schemes require knowledge of the initial conditions at two separate times. They
also require boundary conditions in which one independent variable is specified at the left
hand boundary and the other at the right. Which appears on each side depends on the
staggering of the grid. In order to avoid the need to specify initial conditions at two different
times we can adopt a modified scheme where time derivatives are approximated using a
forward difference scheme. A forward finite difference scheme yields
on Conservati Momentum 0
x 2
h h
g
t
u u
on Conservati Mass 0
x 2
u u
h
t
h h
1 i
1 - j
1 i
1 j
i
j
1 i
j
i
1 - j
i
1 j
i
j
1 i
j
_
+
+
+
Solving for the updates to h and u we obtain
( )
( ) on Conservati Momentum h h
x 2
t
g - u u
on Conservati Mass u u
x 2
t
h - h h
1 i
1 - j
1 i
1 j
i
j
1 i
j
i
1 - j
i
1 j
i
j
1 i
j
_
+
+
+
+
+
+
2
2
<<
+
Neither Boussinesq nor Rayleigh obtained the wave equation that has sech
2
as its solution.
This step was taken by Korteweg and de Vries in 1895.
General Solution of the KdV Equation
The conventional form for the KdV equation is
0 u 6uu - u
xxx x t
+
Travelling wave solutions have the form
ct - x ) f( t) u(x,
c is the wave velocity
Substituting for u in the KdV equation we obtain
0 f 6ff - cf - +
Integrate twice wrt
( )
( )
( )
( ) B Af f
2
c
f f
2
1
B Af f
2
1
f - f
2
c
-
A f d f 3f - cf - f d
A f 3f - cf -
0 f 6ff - cf - d
2 3 2
2 3 2
2
2
+ + +
+ +
+
+
+
A and B are constants of integration. In order to have a localised traveling wave packet, we
impose boundary conditions:
f , f f,
all tend to zero as || goes to infinity. One way of
ensuring these conditions is to have A = B = 0. Solutions also exist at zeros of the
polynomial in f. The solution with A = B = 0 obeys
( ) ( ) c 2f f f
2 2
+
2
sech
2
c
- f
tanh sech - sech
d
d
e e
2
sech
( )
+
d
c
2
-
tanh c sech
2
c
-
tanh sech c
d becomes
c 2f f
df
2 2
2
c
x
c
2
o
+ t
o
2
x - ct - x (
2
c
sech
2
c
f
x
o
is the peak position at t = 0.
Korteweg and deVries solution to the water solitary wave equation
Korteweg and deVries showed that
,
_
+ +
,
_
1/2
t
U
3
UU U
3
2
h
g
2
3
U
U(,t) is the wave function,
,
_
+
,
_
XXX X
1/2
t
u
3
uu
h
g
2
3
u
In the moving frame,
, u
t
is zero and so
0 U
3
UU U
3
2
+ +
Integrate this equation twice wrt
to obtain
( ) 0 U U U 2
2
3 2
+ +
By substitution it is possible to verify that
x) ( sech ) U(
2
provided
2
4 and
2
2 -
( )
1
]
1
/h)t - (1 gh - x
2
1
sech t) u(x,
2
3
h
3
1
h
<<
,
_
,
_
+ +
,
_
,
_
+
Also
2
2
4h
3
The former of the last two results is a prediction of the result observed by Russell. Note that
the wave velocity of an infinitesimal wave is gh c or gh c
2
, and so the solitary wave
travels faster than the infinitesimal wave to an extent determined by , the wave amplitude.
Note that the half width of the wave is inversely proportional to
. In other words, taller
waves travel faster and are narrower.
Soliton properties of solutions to the Korteweg deVries equation
Linear combinations of solutions of linear differential equations are also solutions to the
parent differential equation. However, solutions to nonlinear differential equations do not
share this property. This is illustrated by the fact that the wave velocity in the solution to the
Korteweg-deVries equation appears both in the phase and the amplitude factors of the
solution. Simple scaling of the solution by a constant factor is not allowed. Solutions to the
Korteweg-deVries equation containing more than one solitary wave are possible, however.
The figure below shows two solitary waves moving to the right. The taller one, initially to
the left, moves faster as it has larger amplitude and eventually emerges to the right of the
smaller solitary wave. After the solitary waves have moved apart they have the same sech-
squared profile that they had before their collision. However, unlike simple linear
superposition of solutions of linear differential equations, solitary wave solutions of this type
have a shift in their path as a result of the collision, although their shapes are fully recovered
once they separate again. This type of behaviour is refereed to as a soliton property of the
solutions they have an essentially particle-like behaviour. When the initial conditions for
the Korteweg-deVries are very different from a solitary wave solution, the initial state breaks
up into a soliton train.
Two solitons colliding
Initial sin(kx) condition evolves into a soliton train after some time
http://www.usf.uni-osnabrueck.de/~kbrauer/solitons/soli1.html
http://www.math.h.kyoto-u.ac.jp/~takasaki/soliton-lab/gallery/solitons/index-e.html
11 Classification of PDEs
The general form for a second order pde is
G Fu u E u D u C u B u A
y x yy xy xx
+ + + + +
The coefficients A, B, C, etc. may be constants or variables. For many physical applications
with constant coefficients (A, B, C), it is possible to bring the pde to a canonical (or standard)
form which allows us to classify the pde and decide the appropriate way to solve it. The new
variables, and , which bring the pde to its canonical form are known as characteristic
coordinates. The number and type of these coordinates is decided by the sign of the
discriminant, B
2
4AC. From the theory of conic sections, a curve of the form
0 F y E x D y C xy B A x
2 2
+ + + + +
is a parabola, an ellipse or a hyperbola if the discriminant is zero, negative or positive,
respectively. Hence the nomenclature for the pde classes. The change of variables is carried
out as follows:
If the dependent variable u is a function of the characteristic coordinates (which in turn are
functions of the original coordinates, x and y) then the exact differential
du = u
d + u
d
u
x
= u
x
+ u
x
u
xx
= (u
x
+ u
x
)
x
By generating these derivatives and replacing them in the original equation we obtain
G u F u E u D u C u B u A + + + + +
with coefficients given by
G G F F
E D C B A E
E D C B A D
C B A C
C 2 ) ( B 2A B
C B A A
y x yy xy xx
y x yy xy xx
2
y y x
2
x
y y x y y x x x
2
y y x
2
x
+ + + +
+ + + +
+ +
+ + +
+ +
Suppose we choose the transformation such that A vanishes:
0 C B A
2
y y x
2
x
+ +
This is equivalent to the quadratic equation 0 C B A
y
x
2
y
x
+
,
_
,
_
with solution
2A
4AC - B B -
2
y
x
t
.
Along a characteristic coordinate line (i.e. = constant or = constant) d = 0 or d = 0.
d =
x
dx +
y
dy since = (x, y)
d =
x
dx +
y
dy since = (x, y)
Hence d = 0 implies
x
dx +
y
dy = 0 and
2A
4AC - B B -
dx
dy
-
2
y
x
+
and d = 0 implies
x
dx +
y
dy = 0 and
2A
4AC - B B -
dx
dy
-
2
y
x
+
+
4 C 2 ) ( B 2A B
y y x y y x x x
+ + +
Hence the pde in characteristic coordinates is:
ct) g(x ct) - f(x ) g( ) f( ) , u(
solution s Alembert' D'
0 u 4
+ + +
,
_
+ +
2
h
sin r 4 - 1
) e 2 - (e r 1 e
2 2
h i - h i 2 k
2 2
-
k
2 2
-
e
is the relative amount by which the analytic solution decays in a time step of length
k. The function on the right hand side is approximately equal to this quantity provided
certain conditions on h and k are met. By expanding the exponential and the sine in power
series we find that this condition is satisfied provided
1 h 1 k
2 2
<< <<
i.e. the spatial step size is much less than the wavelength and the temporal step size is much
less than the temporal decay constant.
Since
k
2 2
-
e
is the relative amount by which the analytic solution decays in a single time
step and this is approximated by
,
_
2
h
sin r 4 - 1
2 2
+ + + +
+ + + + +
Multiply by 2/r and rearrange to
j i, 1 j i, j i, 1 j i, j 1, i 1 j 1, i j 1, i 1 j 1, i
u
r
2
u - u 2 u - u
r
2
- u u 2 u + +
+ + + + + +
Adopt BC such that u
i,j
= 0 when j = 1 or j = n. The finite difference equation above may
then be represented as
V . B .V A
i 1 i
+
A = C 2/r I
B = - C 2/r I I is the 4x4 unit matrix
,
_
2 1 0 0
1 2 1 0
0 1 2 1
0 0 1 2
C
.B A P
V . P V . .B A V
1 -
i i
-1
1 i
+
Eigenvector decomposition of P
P possesses a set of eigenvalues and eigenvectors. If all eigenvalues of P are less than unity
then the solution will decay exponentially in time, otherwise it will grow exponentially in
time and may also oscillate as it grows.
n n n
v v . P
n
is the nth eigenvalue of P and
n
v is its nth eigenvector. The initial condition for the pde
can be decomposed into a linear combination of eigenvectors of P. Iteration of V
1
to find
V
i+1
shows that
( )
1
i
n
n
n
1 i
V V
+
From this equation, it is obvious that the solution will grow exponentially (rather than decay,
as it should) if the modulus of any of the eigenvalues exceeds unity.
It is possible to find the eigenvalues of P analytically and therefore find a condition which
determines whether the solution to the pde is stable or not.
v v . P
v v . B A
-1
v . A v . B
( ) 0 v . A B
I ) - (1
r
2
- I ) C(1 - A - B
I
r
2
- C - B I
r
2
- C A
+
Hence
v v . P
becomes
[ ]
1) (
1) - (
r
2
0 v . I - C
0 v . I
1) (
1) - (
r
2
C
0 v . I ) - (1
r
2
I ) C(1
+
1
]
1
1
]
1
+ +
Eigenvalues of P are related to eigenvalues of C by
r 2
r 2
n
n
n
,
_
,
_
h) sin(N
...
h) sin(2n
h) sin(n
v
n
By expanding
2
h n
sin r 2 1
2
h n
sin r 2 - 1
i
2
2
1
1
1
1
]
1
,
_
,
_
It can be shown that this leads to proper exponential decay of the solution.
Problem Sheet for PY 3CO2 Part I Partial Differential Equations
1. (F8.3) Solve
1 x 0 x) sin( u(x,0) IC
0 t) u(1,
t 0 0 t) u(0, BC
t 0 1, x 0 u - u u PDE
xx t
< <
< < < <
+ +
c is the wave velocity. Assume a solution of the form
)T(t) ( R(r) t) , u(r,
and
show that this leads to a solution in which R(r) satisfies
0 )R(r) n - (r (r) R' r (r) ' R' r
2 2 2 2
+ + Bessels Equation
and and T are given by
ct) ( cos D ct) sin( C T(t) ) (n Bcos ) sin(n A ) ( + +
2
and +n
2
are constants introduced in separating variables.
3. The finite difference approximation to
xx
u to order h
2
contains function values at x-h, x
and x+h. By including additional function values at x-2h and x+2h, obtain the finite
difference approximations to
x
u and
xx
u which are correct to order h
4
.
4. Find finite difference equations equivalent to the second order linear, wave equation .
5. Perform a Fourier stability analysis for the diffusion equation using the implicit finite
difference method and show that the point of instability is given by the condition
2
1
) 2 - (1 r
2
Hence explain why a larger time step can be used with the Crank-Nicholson method with =
c.f. the explicit marching method.
x i t
2 2
-
xx
2
t
e e t) u(x, solution u u PDE
2
-
is a constant introduced in separation of variables.
6. Derive the conservation of mass equation for the problem of waves of height, h(x,t),
moving in a narrow, flat channel
0
x
u
h
x
h
u
t
h
j
t
(x)
dx
d
7. Complete the steps in the derivation of the conservation of momentum equation in section
1.3 (Conservation of Momentum) omitted in the lecture handout. The rate of change of
momentum equation is
2
(t) x
(t) x
2
2
(t) x
(t) x
(t) x
(t) x
x) O( x
x
u
u
t
u
h dx t) u(x, t) h(x,
dt
d
is proved be o relation t desired The
x) O(
x
t) , h(x
) x - (x t) , h(x t) , h(x
x) O(
x
t) , u(x
) x - (x t) , u(x t) , u(x (t) x
t) , u(x (t) x
t) , u(x t) , (t)h(x x - t) , u(x t) , h(x (t) x dx ) t) u(x, t) (h(x,
t
dx t) u(x, t) h(x,
dt
d
2
1
2
1
2
1
1
1 2 1 2
1
1 2 1 2
2
.
1
1
.
1 1
1
.
2 2
2
.
+
,
_
+
+
8. Obtain the results
( )
xy xy y x x y y x y x xy
xx xx x x x x xx
u u u u u u
u u u u u u
+ + + + +
+ + + +
2 2
2
By differentiating x x x
u u u
+
wrt x and hence generate the transformation of the
second order pde in section 11 of the course.