Discrete Numerical Methods in Physics
and Engineering
Donald Greenspan Computer Sciences Department and Academic Compu...
39 downloads
833 Views
6MB Size
Report
This content was uploaded by our users and we assume good faith they have the permission to share this book. If you own the copyright to this book and it is wrongfully on our website, we offer a simple DMCA procedure to remove your content from our site. Start by pressing the button below!
Report copyright / DMCA form
Discrete Numerical Methods in Physics
and Engineering
Donald Greenspan Computer Sciences Department and Academic Computing Center University of Wisconsin Madison, Wisconsin
1974
ACADEMIC PRESS, INC. A Subsidiary of Harcourt Brace Jovanovich, Publishers
COPYRIGHT 0 1974, BY ACADEMIC PRESS, INC. ALL RIOHTS RESERVED. NO PART OF THIS PUBLICATION MAY BE REPRODUCED OR TRANSMITTED IN ANY FORM OR BY A N Y MEANS, ELECTRONIC OR MECHANICAL, INCLUDING PHOTOCOPY, RECORDING, OR A M ! INFORMATION STORAGE A N D RETRIEVAL SYSTEM, WlTHOUT PERMISSION IN WRITINQ FROM THE PUBLISHER.
ACADEMIC PRESS, INC.
111 Piftb Avenue, Now Yak. New York lo003
United Kingdom Edirion published by ACADEMIC PRESS, INC. (LONDON) LTD. 24/28 Oval Road, London W 1
Library of Congress Cataloging in PobUeaUoll Data
Greenspan, Donald. Discrete numerical methods in physics and engineering. (Mathematics in science and engineering, v. 107) Bibliography: p. 1. Nmerical analysis. 2. Mathematical physics. 3. Engineering mathematics. I. Title. 11. Series.
eA297.672
515 ' * 62s
73-18463
ISBN 0-12-300350-~
AMS (MOS) 1970 Subject Classification: 65-01 PRINTED IN TRE UNI'IZD STATES OF AMER-
Preface
The development of the high-speed digital computer has had, and continues to have, a revolutionary effect on modern applied science. Immediate evidence is avdable in the form of a large number of computer-generated numerical solutions of fundamental, unsolved systems of mathematical equations. The diversity of fields being affected includes lunar and planetary astrodynamics, wave diffraction, shock waves, laminar flow of liquids, free-surface fluid flow, weather prediction, thermodynamics, elasticity, electrostatic and gravitational potential, optimal control, n-body problems, vibration theory, molecular interaction, quantum theory, and relativistic collapse. Less obviously, there have been natural, qualitative changes in related mathematical models and theories. This book attempts to develop a broad spectrum of applications that can be formulated as problems in differential equations in the real domain. Existing analytical theories and techniques will be summarized appropriately so that the reader will understand when he should not use a computer. For those problems which cannot be solved analytically, we will develop finite difference, computeroriented -numerical methods for approximating solutions. Indeed, if a computer algorithm is defined as a finite sequence of computer operations designed to yield an approximate solution of a given mathematical problem, then this book is concerned primarily with the development of computer algorithms. In this connection,it must be understood that the immense power of the modern digital computer lies in its ability to perform arithmetic operations and to store and retrieve numbers with exceptional speed. In order to develop in the reader the intuition which will enable him to devise sound, economical methods for his own particular problems, heuristic
ix
X
PREFACE
arguments are emphasized throughout. Sources for the precise mathematical foundations are referenced appropriately for the reader with a mathematically oriented background. Finally, a few words are in order about the emphasis on difference techniques. It is at times possible, of course, to utilize a continuous method of approximation which, by some criterion, is superior to a finitedifference method. Nevertheless, I have never seen an appropriate difference method fail where a continuous method works, and I have seen difference methods work where continuous methods have failed. The latter is especially noticeable in studies of the Navier-Stokes equations. This tremendous breadth of applicability and its inherent structural simplicity are what make difference methods so exceptionally valuable in any direct, numerical approach to problems of applied, scientific interest.
Acknowledgments
For their generous permission to quote freely from my previous book, Lectures on the Numerical Solution of Linear, Singular, and Nonlinear Dvferential Equations, 0 1968, I wish to thank Prentice-Hall, Inc., Englewood Cliffs, New Jersey. Also, since this book is being published by a photo-offset process from an original manuscript, credit for the typing should be given to Patricia Hanson and for the illustrations to Martha Fritz.
xi
CHAPTER I NUMERICAL SOLUTION OF ALGEBRAIC AND TRANSCENDENTAL SYSTEMS
1.1
Introduction The arithmetical operations performed by modem digital com-
puters are exactly t h o s e of classical algebra.
For t h i s reason, we
will be concerned primarily i n t h i s book with two b a s i c problems: that of approximating a differential equation by a n algebraic or transcendental equation, and that of solving systems of algebraic or transIt is to t h e latter problem t h a t we turn first.
cendental equations.
1.2
Matrices and Linear Systems The general linear algebraic system of n equations in the n
unknowns x1 ,x2,.
..
, x c a n b e written i n t h e form n
allxl t a 1 2 x 2 ta13x3 t (1.1)
aZlxl t a Z 2 x 2t aZ3x3t
.=
t a
lnXn = bl
t aZnxn = b 2
x t a n 3 x 3 t - * -t a nn xn = b n
a n l X l tan2 2
If the matrices x, b and A a r e defined by
1
=(;:I,
ALGEBRAIC AND TRANSCENDENTAL SYSTEMS
X
b
X =
X
n
bn
a l l a12
. “2.2. . . a
A =[a:l
n l an2
aij
... a ***
a
nn
then it follows from the b a s i c laws of matrix operation that system (1.1) can be written compactly a s
Equivalent forms (1.1) and (1.3) will be used interchangeably, a s
is convenient. Let us assume that A is nonsingular, so that for given A and b , x in (1.3) exists and is unique.
Indeed, the components
of the vector x c a n be given explicitly by Cramer’s rule i n terms
of determinants.
However, if one attempts t o evaluate these deter-
minants and thereby find the exact numerical values of x1,x2,.
.., x
n’
then Cramer’s rule, though reasonable for n = 2 , 3 , and 4, becomes readily intractible for increasing values of n , and other methods must be used.
Since we will be interested in relatively large values
of n , let u s , a t the outset, introduce several characteristic properties which many applied problems have in common, and which will enable u s t o solve system (1.1) both quickly and efficiently.
MATRICES AND LINEAR SYSTEMS
3
Definition 1.1 System (1.1) is said t o be diagonally dominant i f and only if
with strict inequality holding for at least one value of i
.
Example The system
4x t 2x t 2x = 1 1 2 3
x 1
3
2
-
~ x = 6 3
x t x t2x = o 1
2
3
is diagonally dominant.
2 Definition I. System (1.1) is said t o be mildly diaqonally dominant if and only if
i = 1,2
,...,n ,
with strict inequality holding for at least one value of i.
ALGEBRAIC AND TRANSCENDENTAL SYSTEMS
4 Example The system
5x t 4x2 1
- 3x3 = 0
x -3x 1 2
-
x -4x
t4x =1 3
1
2
x = o 3
is mildly diagonally dominant, but not diagonally dominant. Definition 1.3 System (1.1) is said t o be tridiagonal if and only if a l l the elements of matrix A are zero except aii, a i = 1,2
,...,n;
j = 1,2
,...,n-1.
1,1+1
Exa mple The system =1
4x t x 2 1
x
1
- 3x2 t 7x3 x2 t 3x
3
=o
- x4
= -1
x t x - x 3 4 5 = O
x4 - 2 x 5 = 1 is tridiagonal.
and a j+l,
I
where
MATRICES AND LINEAR SYSTEMS
In Definition 1.3
, the
5
term tridiagonal is appropriate because ,
in matrjx form (1.3) , A h a s the particular representation
a a
11 21
a a a
12
22
32
a a a
0
23
33 43
a a
34
44
a
45
A =
0
a
n-1 ,n-2
a a
n-1 ,n-1 n,n-1
in which a l l elements are zero except those on the main diagonal and on the diagonals j u s t above and j u s t below the main diagonal.
1.3
Gauss Elimination In terms of computer capability like that of the UNIVAC 1108,
an efficient method for solving many systems when n is relatively small, s a y n 5 400, is the method of Gauss elimination, which will be described i n complete generality after the following illustrative example.
6
ALGEBRAIC AND TRANSCENDENTAL SYSTEMS
Exa m d e Consider the system
-
(1.4)
x t4x 1 2
(1.5)
x -2x - 3 x t x = 4 1 2 3 4
(1 6 )
4x
1
-
(1.7)
x t x = 2 3 4
x t2x 2
X
3
-
x = 2 4
-4x = o . 4
2
Because , in (1.6), the coefficient of x
1
is in absolute value greater
than the absolute value of each of the other coefficients in (1.6), this equation is written separately. (1.6)
4x1-
x2t2x 3
Thus,
-
x = 2 . 4
N e x t , add suitable multiples of (1.6) t o each of (1.4), (1.5) and
(1.7) t o eliminate the x1 terms in (1.4), (1.5) and (1.7).
In t h i s
way, (1.4), (1.5) and (1.7) reduce t o
(1.4')
17 3 5 3 -x --x t -x - 4 2 2 3 4 4 - 2
(1.5')
7 --4x2
(1.7')
X
2
7 -Tx3
' -x45 4
7 -- 2-
- 4x4
= 0.
._ N e x t , because in (1.4') the coefficient of x
. iI I
2
is in absolute value
greater than the absolute value of each of the other coefficients in
GAUSS ELIMINATION
7
(1.4'), this equation is written separately. (1.4')
'4'
- x2 -
;x3 3
4x4
t 5
7
= 3
Thus
.
N e x t , add suitable multiples of (1.4') t o each of (1.5') and (1.7') t o eliminate the x
2
terms in (1.5') and (1.7').
In t h i s way (1.5') and
(1.7') reduce t o 30 70 +-x - -70 17 3 1 7 4 - 17
(1.5")
--x
(1.7")
6 -x
17 3
-
73 -x
-
17 4 -
--176
Because in (1.5") the coefficient of x3 is i n absolute value greater than the absolute value of each of the other coefficients in (1.5"), this equation is written separately.
(1.5")
70 17 3
--x
+
Thus,
70 - 17 4 - 1 7 '
30 -x
Next, add a suitable multiple of (1.5") t o (1.7") t o eliminate the x term in (1.7").
In t h i s way, (1.7'') reduces t o
(1. 7'7
29 --x 7
- 0.
4 -
Thus, system (1.4)-(1.7) h a s been transformed into the equivalent system (1.6), (1.4'), (1.5"),
(1.7"'), that i s , t o
3
ALGEBRAIC AND TRANSCENDENTAL SYSTEMS
8
(1.6)
x
4 x 1
2
17 4 2
-x
(1.4')
-
3 -x
2 3
70 -.-x 17
(1.5")
x
t 2 x 3
3
5 3 - 4 4 - 2
+-x
30 - -70 17 4 - 1 7
+-x
--x29
(1. 7"')
- 2 4 -
7 4
= 0.
Finally, the latter system is solved by backward substitution, t h a t
is, from (1.7"') one h a s x = 0; substitution of x = 0 into (1.5") 4
4
yields x = -1; substitution of x = 0 , x = -1 into (1.4') yields 3 4 3
x - 0; and substitution of x = 0 , x = -1, x = 0 into (1.6) yields 2-
4
3
2
x = 1, and the original system (1.4)-(1.7) is solved. 1
Note t h a t , usually, one would simplify a n equation like (1.5") t o read - 7 x 3 t 3 x4 = 7 ,
if one were working with only pencil and paper.
However, t h i s w a s
not done because a digital computer would have divided through and rounded, so that the coefficients would have been finite decimals, and not fractions. The method illustrated i n the above example will now be given
a general formulation. Method of Gauss Elimination Frcm system (1.1) select a n equation i n which t h e coefficient
9
GAUSS ELIMINATION of x
1'
say a
kl
is i n absolute value greater than or equal t o t h e
absolute value of any other coefficient in t h e equation. j
f k , add the multiple -a, /akl 11
equation for e a c h of j = 1 , 2 , .
Then, for
of the kth equation t o the jth
..
,k-2,k-1, k t l , k t 2 , .
..
,n.
Set the
kth equation a s i d e and consider t h e remaining (n - 1 ) equations, which
-
contain only the (n 1) unknowns x2,
, xn'
X3""
Select from these
an equation in which the coefficient of x2 is in absolute value greater than or equal t o the absolute value of any other coefficient in the equation.
Add suitable multiples of t h i s equation t o the re-
-
maining (n 2) equations so t h a t i n e a c h resulting equation the x coefficient is zero.
Set a s i d e the equation whose x
2
2
coefficient is
-
-
non-zero and consider the remaining (n 2) equations i n the (n 2) unknowns x3, x4,.
..,xn.
In the indicated fashion continue, if
possible, the elimination process until, i n a finite number of s t e p s , there results a system of equations of the form
c1 lxl t c1 2x2t c13x3 t'
c22x2t c23x3 t' c
tCl,n-lxn-l t c
x
tc
x
tc
2,n-1 n-1
x t**.tc
33 3
tc
3,n-1 n-1
.
x =c
In n
1
x =c
2n n
2
x =c
3n n
3
c x =c nn n n
which is equivalent t o (1. 1 ) , and in which cii f 0 , i = 1 , 2 , .
..,n.
10
ALGEBRAIC AND TRANSCENDENTAL SYSTEMS
...
Finally, by back-substitution, find xn, x ~ - ~ ,,x3 , x2, x1 from (1. 8).
1.4
Tridiagonal Systems When system (1.1) is tridiaqonal and diaqonally dominant, its
solution exists and is unique (Geiringer). For such s y s t e m s , the Gauss elimination method usually c a n be applied efficiently on a computer like the UNIVAC 1108 for n up to, approximately, 2000, and c a n be codified precisely a s follows.
Y2,*"'
'n- 1
Generate
B, ,B,,
...,Bn
and y l ,
from
Next generate z l , z2,.
..,
z
n
from
Finally, generate the solution x 1 (1.14)
x = z n n
(1.15)
%=
zk
I
- %t1 yk '
X2'.
..,xn
from
k = n-l,n-2,...,3,2,1
0
TRIDIAGONAL SYSTEMS
11
The backward substitution process of the general Gauss e l i m i nation procedure i s seen clearly from (1.14) and (1.15). Example Consider the tridiagonal system
-2x
x
1 1
t
x
= 1
2
- 2x2 +
= o
x3
x -2x 2
3
t x
x -2x 3
= o
4 4
t
x = o 5
x -2x 4 5
=o.
Then,
(1.16) (1.17) (1.18)
a l l = a22
a
12
= a
21
= a33 = a44 = agS - -2
= a = a 23 32 = a 3 4 = a43 = a45 = a54 =
b =1, b = b = b = b =O. 2
1
3
From (1.9)-(1,11) it follows that
B,
= -2
yI =
l/pl
=
- -21
4
5
ALGEBRAIC AND TRANSCENDENTAL SYSTEMS
12
2 =-- 4 3 3 3 Y3 = 1/p3 = 4
p =-23
(--)
--
p4 =
-2
- (--)43 = --45
Y4 = 1/B4 =
p5 =
-2
-74
- (--)45
=
--65
.
N e x t , (1.12)-(1.13) yield
z1 =
1 -TI
z
2
=
1 -3,
z3 =
1 -2,
z4 =
1 1 -5, z5 = - a .
Finally, (1.14)-(1.15) imply 1
x5 =
-a
x =
1 2 2 - -31 - (-p-;) = -3
2
x
1.5
2 1 5 - - -21 - (-3) (-5) = -6
1 -
.
The Generalized Newton's Method Consider now a n extraordinarily powerful iterative technique
for solving important classes of
both linear and
called t h e generalized Newton's method.
nonlinear systems
When applied to linear
s y s t e m s , t h i s method is known i n the literature are s u c c e s s i v e relaxation (SOR).
over-
GENERALIZED NEWTON'S M E T H O D
13
First, suppose one wishes t o determine a real root of a single equation i n a single unknown, say
(1.19)
f(x) = 0
where f is continuously differentiable , but not necessarily linear.
Let the graph of (1.20)
Y = f(x)
be a s shown in Figure 1.1.
Of course, the problem of determining the
real roots of (1.19) is equivalent t o that of finding the real zeros of
Y
Figure 1.1
14
ALGEBRAIC AND TRANSCENDENTAL SYSTEMS
(1.20) , that is, of finding where the graph of (1.20) meets the X-axis. We shall try to do the latter a s follows. be a zero of f(x). Since
;;
is, in general, unknown, make a n initial guess at it, s a y , x").
If
A s shown i n Figure 1.1, let
f(x(0)) = 0 , then the problem is solved. In a l l likelihood, however, f(x(0)) f 0.
Then try t o get a new approximation, x"), t o
is better than x(O) a s follows.
Set y(O) = f ( x(0)).
( ~ ( ~ ) , y ( the ~ ) )slope , of the tangent line ,l")
;; which
A t the point
t o f(x) is f' (x(0))
and the equation of Q ( l )is
L e t x ( l ) be the point where ,l(') meets the X-axis, so that (x('),O) satisfies (1.21).
Thus,
Assuming that Q ( l )is not parallel t o the X-axis, so that f' (x(0)) # 0, one h a s from (1.22) that (1.23) If f(x(1)) = 0 , then the problem is solved. prove on approximation x ( l ) a s follows.
If f(x(1)) f 0 , try t o i m -
Set y(') = f(x(11) and let
be the tangent line t o f(x) at (x('),y(')). section of it follows that
If x(')
is the inter-
with the X-axis, then, a s in the development of (1.23),
GENERALIZED NEWTON'S METHOD
(1 24)
X
(2) =
15
f(X(l))
,
f
f
0
.
f '(X(l))
Again, if f(x(2)) = 0 , then the problem is solved.
..,
construct x ( ~ x ) ,( ~ ) , .
If f(x(2)) f 0,
in the same spirit a s x ( l ) and x ( ~ were )
constructed. After n t 1 s t e p s , the real number x ( n t l ) is determined by the formula
(1.25)
The iterative procedure described above is called Newton's method and the recursion formula (1.25) is called Newton's formula. Under suitable conditions (Ostrowski, Rall (Z)),Newton's method can be used t o approximate a real root t o a very high degree of accuracy. Of course, it would be of value to have a method which yields a real root in fewer iterations than those of Newton's method. For this reason, instead of constructing the line Q ( l ) shown in Figure 1.1, let u s try t o determine a line through (x( O ) ,y(O)) which intersects the X-axis c l o s e r t o
than x ( l ) . Such a line would
have a n equation of the form
for the line wculd differ from R ( l ) only in slope.
Setting y = 0
16
ALGEBRAIC AND TRANSCENDENTAL SYSTEMS
and x = x ( l ) i n (1.26) y i e l d s
(1.27)
and j u s t a s Newton's formula (1.25) w a s developed by f i r s t considering (1.23), so from (1.27) would follow t h e recursion formula
(1.28) For notational simplicity, set
LU
1 =T
, so t h a t
(1.28) becomes
(1.29) which is c a l l e d t h e generalized Newton's formula. In (1.29) t h e c o n s t a n t
a,
is c a l l e d a n over-relaxation factor,
and t h e modified Newton's method which u s e s (1.29) i n place of (1.25)
is called t h e generalized Newton's method.
Of c o u r s e , Newton's
formula r e s u l t s from (1.29) for t h e s p e c i a l choice
Example Approximate a positive root of
x3 +J3
2 - zx = v
by t h e generalized Newton's method.
3
a,
= 1.
GENERALIZED NEWTON'S METHOD
17
Solution For t h i s simple example, the generalized Newton's formula is
Approximating
fi
by 1.7, setting
(o
= 1 . 3 and x(O) = 2.0
, and
rounding t o one decimal place, one has from (1.30) that
Since x
=
further iteration will continue t o yield the approxi-
mation x = 1.4. 1.6,
Repeating the above, but with w = 1 , yields x
(1) -
-
x(') = 1.4, x ( ~=) 1.4, which requires one more step than did
the choice
(U
= 1.3.
The exact solution is x = f i
, which
each cf
the above results approximates correctly t o one decimal place, Suppose next that one h a s t o solve the two equations i n two unknowns
x)=O
(1.31)
f ( X
(1.32)
f(x x)=O. 2 1' 2
1 1' 2
Then a natural generalization of (1.29) which we shall u s e for system (1.31)-(1.32) is
18
ALGEBRAIC AND TRANSCENDENTAL SYSTEMS
(1.33) axl
(1.34)
ax
2
It is important t o note that in (1.34) the result x ( ~ + ' ) , not 1
x ' ~ ) 'is used t o calculate x ( * + ~ ) .Thus, new data is being utilized 1
2
a s soon a s it becomes available. Example 1 Consider the linear system
2x1
x1
- x2 = - 2xz = -3 , -3
the exact solution of which is x = -1, x2 = 1. Set
f ( X
x ) = 2x1
1 1' 2
f (x x ) = 2 1' 2
-
x2 + 3
x1 - 2 x 2 t 3 .
Then (1.33) and (1.34) take the forms
GENERALIZED NEWTON'S METHOD
19
(1.36)
For initial g u e s s x(O) = x(O) = 0 and for o = 1 , it follows from (1.35) 1 2 and (1.36) t h a t
--33 32 '
(1) one h a s x(O) 2 = 0, x2 -3 4 ' ,(2) 2 -15 - 16'
while, for x("'), 2
x ( ~ =) 63 which a r e converging to t h e correct respective values x = 2
1
64'
-1, x = 1. 2
Example 2 Consider t h e transcendental system
-e
x1
-x t3x t 3 = 0 1
2
e X 2 t x -2x t 1 = 0 , 2 1 the exact solution of which is not known. fl(X1'X2)
= -e
x1
Set
- x1 t 3xz t 3
x2 f ( x x ) = e t x2 - 2 x 1 t 1 . 2 1' 2
ALGEBRAIC AND TRANSCENDENTAL SYSTEMS
20
For t h i s system, the generalized Newton's formulas reduce to
For x(O) = x(O) = 0 and 1 2
(u
= 1.5, (1.37) and (1.38) imply
(1.39)
x(l)= 0
- 1 . 5 [ e 0 t 0 - 3 - 0 - 3 ] / [ e 0 t 11 = 1.5
(1.40)
x):
- 1.5[e 0 t 0 - Z(1.5) t l ] / [ e 0 t 11 = 0.75.
1
= 0
The results (1.39) and (1.40) would then be inserted into (1.'37) and (1.38) t o produce x(') 1
and x ( ~ ) and , the iteration would continue 2
in the indicated recursive fashion. Finally, let u s extend (1.33) and (1.34) t o the mc.st general system which can occur.
Suppose one has to solve t h e system
1(x1' x 2' x 3 I . .
.
(1.41)
f
(1.42)
f (x x x I . . . 2 1' 2' 3
(1.43)
f 3 (x1 'X2'X3'...'\,l'\)
(1.44)
fk-l (x1' x 2' x 3'
(1.45)
f (x ,x ,x ' . . . I k 1 2 3
'%I
= 0
'%I
= 0 = 0
. . . ' \ - l , ~= '0 r(-l'q
= 0
GENERALIZED NEWTON'S METHOD
21
Then the generalized Newton's formulas for (1.41)-(1.45)
(1.46)
(1.47)
ax
2
(1.48) ax3
(1.49)
(1.50)
are
ALGEBRAIC AND TRANSCENDENTAL SYSTEMS
22
the application of which, t o system (1.41)-( 1.45), will be called the generalized Newton's method for systems.
1.6
Remarks Though the methods presented in t h i s chapter will be adequate
for a l l the applied problems t o be considered in future chapters, a t
times greater economy can be obtained from other methods.
In t h i s
connection, the interested reader would benefit from a n examination of the gradient method, line over-relaxation, Hockney's method, the Peaceman-Rachford method, matrix inversion, the Crout method, general iteration, the square root method, and the method of postmultiplication (see, e. g.
, Forsythe,
Froberg, Goodwin, Hockney,
Kunz , Ostrowski, Varga). It is worth noting that, a t present, a good choice for
o)
i n the
generalized Newton's method c a n be determined, or general, only by experimentation i n the range 0 < o)
o)
< 2 (S. Schechter). A choice of
different from unity often c a n increase the convergence rate apprec-
iably (Varga). Finally, note that when one has t o solve a system of equations,
it is rarely possible to determine, a priori, when a n iteration will converge and yield a solution.
But, the fact that a certain vector &
a solution, no matter how one produced it, c a n , and should, always be verified by direct substitution into the given system.
23
EXERCISES
Exercises 1.
Show that reordering the equations of system (1.1) may change a nondiagonally dominant system into a diagonally dominant one.
2.
Show that every diagonally dominant system is mildly diagonally dominant.
3.
Determine which of the following systems are diagonally dominant.
(a)
13x1 t 4 x
2
x1t5x
x2
-
x
t
x3
-
x4 --
- 6x3 t 2~ 4
0 8
x - x t x t 7 x 2 3 4 1
0
1
3x 1
-
=
o
=
o
x - 3 x t x 2 3 4 -
0
x
2
x -3x 1
2
t
x
x
(c)
- 12
4 -
=
2~
(b)
-
2
3
t x
4x
1
-
x
2
-
x
3
3
- 3x4
=
3
- 3x4
= 11
x - 4 x t x t x 1 2 3 4 -
0
0
x + x - 4 x t x --5 1 2 3 4 3x1 t x
2
t
x -4x - -8 3 4 -
ALGEBRAIC AND TRANSCENDENTAL SYSTEMS
24
4x
(d)
x
1 1
- 3x2
= o
- 4x2 t 3x3 x - 4x t 3x4 2 3 x
3
t x3
2x1
x t2x 1
x t x 1 2
3
t2x t
= 0
= 3/4 t
2
= 1
x5 -- 8/15
4
x1 t x t 2x3 t x
- 4x5
t
t x
2
= o
- 4x 4 t 3x5 x4
(e)
= 1
x
4
x t 2~ 4
- 7/10
5 -
= 7/12
-
5 -
77/60
-
4 . 2 3 1 ~ ~0 . 1 3 7 ~t~0 . 0 2 9 ~t~0 . 0 2 0 ~=~3.210
(f)
- 0 . 3 3 2 ~-~0 . 1 1 5 ~4 = -1.001 0 . 4 1 5 ~ - 1.447x - 5.137X t 2 . 0 1 4 ~=~7.394 1 2 3
- 1 . 0 3 1 ~ t~ 4 . 3 9 7 ~ 2
-
-
1 . 9 7 4 ~ ~2 . 1 0 6 ~t~0 . 8 4 7 ~ ~7 . 1 3 0 ~= ~-5.214.
4.
Determine which systems in Exericse 3 a r e mildly diagonally dominant.
5.
Determine which systems in Exercise 3 are tridiagonal.
6.
If possible, solve e a c h system i n Exercise 3 by Gauss
elimination. 7.
Check your answers.
Prove formulas (1.9)-( 1.15).
EXERCISES
8.
25
Solve systems (b) and (d) of Exercise 3 by formulas (1.9)Check your answers.
(1.15).
9.
For each of the systems which follow, and for each of the choices cu = 1.8, 1.4, 1.0, 0.6, and 0.2, find x (4) x(4) 1 ' 2
and x ( ~ by ) the generalized Newton's method with x (0)1 3
x(O) = x(O) = 0. In each c a s e where the system can be solved 2
3
exactly, compare the approximate solution with the exact solution and indicate which choice of w seems most preferable.
(a)
5~ t x 1 2
3
~- 8 3 -
x - 8 ~t x3 = 0 1
2
3 x t 2x2 1
- 7x3
= 0
X
(b)
x t x t x 1
2
3
=-e X
x t x t x =-e 1 2 3
x t x t x 1
(c)
2
3
X
=-e
1
2 3
2 . 6 6 ~t~1 . 0 6 ~ t 1 . 0 9 ~ - 0.60 2 3 1 . 0 6 ~t~2 . 6 6 ~t~1 . 0 9 ~ =~ 2.26 0 . 2 4 ~t~1 . 2 4 ~ t 2 . 7 8 ~ = -1.13 2 3
.
CHAPTER I1 APPROXIMATE SOLUTION OF PROBLEMS FOR ORDINARY DIFFERENTIAL EQUATIONS
2.1
Introduction In t h i s chapter attention will be directed t o t h e study of or-
dinary differential equations of t h e form
Y" = f ( x , y , y ' )
.
Such equations a r e fundamental in t h e formulation of dynamical models. The prototype problems a s s o c i a t e d with (2.1) are t h e i n i t i a l value prob-
l e m , in which one must find a solution of (2.1) for x 2. a which satisfies initial conditions of the form
and t h e boundary value problem, in which one must find a solution of (2.1) on a 5 x 5 b which satisfies boundary conditions of t h e form (2.3)
y ( a ) = a , y(b) = B, a < b
.
In addition to initial and boundary value problems, we w i l l show how to apply initial value techniques t o approximate periodic solutions of equations for which auxiliary conditions a r e
given completely.
The determination of a n exact solution of a problem defined by (2.1) and (2.2)
, or by
(2.1) and (2.3)
26
, is
dependent upon o n e ' s
GRID POINTS AND DIFFERENCES
27
ability t o construct a n a l y t i c a l solutions of (2.1) , and very few gen-
eral analytical methods a r e available for t h i s purpose.
In t h e case
when (2.1) is of t h e s p e c i a l linear form
then, indeed, solutions c a n b e obtained by means of elementary functions when P and Q a r e c o n s t a n t and R(x) is of a n elementary form (see, e . g . ,
Greenspan ( l ) ) ,and i n terms of s e r i e s by t h e method
of Frobenius when P(x), Q(x) are rational functions of t h e form
where a 1,
@,, a2,p,,
7, m a r e c o n s t a n t s (see, e.g.,
Greenspan
(1)). If (2.1) is nonlinear, or if it is l i n e a r but not of t h e type d e s cribed above, then n o general analytical method usually exists for constructing solutions, but, indeed, some s p e c i a l trick technique may exist.
Such techniques a r e catalogued, for example, in Kamke.
Only after such efforts t o find a n analytical solution have failed d o e s one then turn to t h e computer and to numerical methods, which will be studied in the remainder of t h i s chapter. 2.2
Grid Points and Differences Fundamental t o t h e development of numerical methods for
both initial and boundary value problems are t h e concepts of grid
28
ORDINARY DIFFERENTIAL EQUATIONS
points and differences, which are formulated a s follows. For Ax a positive constant, set Ax = h and x = a , x = 0 n
a t nAx, n = 1 , 2 , 3 , .
.., where the number of values which
have may be either finite, or infinite.
The symbol G[a, h ] will be
used consistently t o denote the ordered set of points x 0 ,
x4,.
n can
.. , which is called a set of grid points with grid s i z e
8
x28 x3#
h.
It
is only on such point sets that we will consider approximations t o a continuous, exact solution y(x) of a n initial or boundary value prob-
lem. The approximation t o y(x) a t
k = 0,1,2
5
will be denoted by yk,
,... .
With regard t o difference approximations for first and second order derivatives, the following elementary, but b a s i c , formulas are now recalled:
(2.5)
~'(x)-"y(x)-~(x-h)Vh
, (two-point backward formula)
(2.6)
Y'(x)-[Y(x+~)-Y(x-~)~/(~~)
, (two-point central formula)
(2.7)
y'(x)- [-3y(x)t4y(xth)-y(xt2h)~(2h), (three-point forward formula)
(2.8)
y1(x)-[3y(x)-4y(x-h) ty(x-2h)y(2h) , (three-point backward formula)
(2.9)
2 y"(x)- [y(xth)-2y(x)ty(x-h)y(h )
, (three-point central formula).
TAYLOR SERIES 2.3
29
The Method of Taylor Series
Let u s consider initial value problems first and assume throughout that f , in (2. l ) , is of such a nature that the solution always ex-
ists and is unique. One of the older methods for approximating a solution of (2.1)(2.2) is the method of Taylor series.
In the p a s t it h a s not been highly
regarded because it requires extensive symbol manipulation in the determination of high-order derivatives.
However, since symbol man-
ipulation is now advancing a s a computer science discipline, the Taylor series method is returning t o a position of stature, and is described a s follows.
Let y(x) be the solution of (2.1)-(2.2) and assume that y(x) and y'(x) have Taylor expansions of the form
(2.11)
h2 y'(x+h) = Y ' ( x t)h y " ( x ) t-y"'(x) 2 hn ( n t l ) +,?y
hntl
4 3 h i v h v t-y (x)t z y (x)t . 0 . 3!
tG (nt2)(u),
Let G[a,h] be a set of grid points.
x < 1 ~ .< x t h.
Then, from (2.10),
ORDINARY DIFFERENTIAL EQUATIONS
30
5 n
t
hntl y @ ) ( a )t -
(ntl)!
~ ( ~ ~ " ( ae <) ,4 < a t h .
By discarding the remainder term in (2.12) w e call
a n nth order approximation t o y ( a t h ) , a n d , from (2. l l ) , t a k e
(2.14)
3 hn ( n t l ) h2 h iv (a) t o *t--Y y ' = y ' ( a ) t h y " ( a ) t - y " ' ( a ) t -y (a) 1 2 3! n!
.
In (2.13) and (2.14), t h e v a l u e s of y(a) and y ' ( a ) a r e t a k e n from ( 2 . 2 ) while t h e v a l u e s of y " ( a ) , y " ' ( a ) ,
...
, y ( n t l ) ( a ) a r e obtained
from (2.1) and from s u c c e s s i v e differentiation of: (2.1). structing y
1
After con-
and y ' one then g e n e r a t e s i n a n analogous fashion 1'
a n d y; y2 and y ' from y and y ' 2 1 1' y 3
from y
so forth, until one terminates t h e procedure.
2
and yi, and
The nth order Taylor
s e r i e s method may be summarized, t h e n , by t h e recursion formulas
(2.15)
-
(2016)
n
h2 h3 yktl= y t h y ' t - y " t - y " ' + . . . k k 2 k 3 ! k +
k
t Lny!( " k) ;
3 hy" + -y"' h2 +h yi v .+ k 2 k 3! k
k = 0,1,,..
.+ Lnyn! ( nkt l ) :
k = O,l,...
where derivatives of order two and higher a r e obtained from (2 1) and from s u c c e s s i v e differentiation of (2.1) assumed to be exact.
, and where
(i) is e a c h yk
,
TAYLOR SERIES
31
EXamDle
For h = 0.3, find y o, y1 , and y2 by means of a third order Taylor s e r i e s approximation for the initial value problem
- ,2
(2.17)
y" = y2
(2.18)
Y(0) = 0 , Y'(0) = 1
.
Solution Since a = 0 and h = 0.3, the grid points of interest a r e a = x = 0 , x = 0.3, x = 0.6. 0 1 2 (2.19)
From (2.18)
yo = 0 , y' = 1. 0
Since third-order Taylor s e r i e s approximations a r e sought, (2.15) and (2.16) t a k e t h e forms
Also, from (2.17), (2.22)
2 2 y"=y -x
(2.23)
y"' = 2yy'
(2.24)
y
iv
- 2x
2 = 2(y') t 2yy"
- 2.
32
ORDINARY DIFFERENTIAL EQUATIONS
Now, for k = 0 , one h a s from (2.19) and (2.22)-(2.24) t h a t 2 2 y = 0, Y b = 1 , y;; = yo - x o = 0 , y; 0 iv
Yo
2
= 2(yb) t 2y 0y"0
y = 0.3, 1
- 2x0 = 0 ,
- 2 = 0,
which, upon substitution i n t o (2.20) and (2.21) (2.25)
= 2y y' 0 0
y' = 1 1
, implies
.
Next, for k = 1, one h a s from (2.22)-(2.25) t h a t 2 y 1 = 0.3, y; = 1 , y; = y1
- x12 = 0 , y"'1 = 2y1y; - 2x1 = 0 ,
iv 2 y1 = 2(y;) t 2y 1y"1
-
2 = 0,
which, upon substitution i n t o (2.20) and (2.21) yields (2.26)
y2 = 0.6,
and t h e example is complete.
y' = 1 , 2
Note t h a t t h e numerical s o l u t i o n , s u g g e s t s
t h a t t h a t exact solution is y = x. 2.4
Runge-Kutta Methods Runge-Kutta methods a r e , perhaps , t h e m a t popular of t h e
numerical methods for i n i t i a l value problems b e c a u s e of their simplic i t y , relatively high accuracy, and broad applicability.
It is onl)
in such s p e c i a l cases as when m a c c u r a c y is required from .-I grid sizes, a s is t h e case i n problems in astromechanics, t h a t existing
RUNGE-KUTTA METHODS
33
Runge-Kutta techniques may have little value.
These methods d o not
require the symbol manipulations inherent i n the method of Taylor series, but instead make u s e of values of f ( x , y , y ' ) for x & i n G[a,h] t o yield approximations a t points of G[a, h].
Of course, since
f ( x , y , y ' ) is known for many other values of x, it is reascnable not to discard such a large amount of available data.
For intuitive reasons, we will d i s c u s s Runge-Kutta methods first for the simple first order equation
and then show how t o extend the results i n a completely natural way to (2el). The following simple method which c a n be used t o approximate a solution of the initial value problem defined by (2.27) and
12.28)
y(a) = a
was devised by Euler in 1768. from
On G[a,h], generate yk; k = 1 , 2 , .
..
34
ORDINARY DIFFERENTIAL EQUATIONS
where (2.30) is derived from the approximation
(2.31) of (2.27).
Though Euler's technique has a firm mathematical b a s i s ,
it is relatively uneconomical in the s e n s e that t o obtain a desired accuracy, one must choose h much smaller than is necessary in other methods.
To improve on (2.31), consider the more general
formula
where
!3 , ,6 , y and 0 1
b are parameters t o be determined.
that should y have a value like 1 / 2 , then
\
t yh would
Note
not be a
grid point, and such a possibility now exists because of the form of (2.32). In equivalent form, (2.32) can be rewritten a s
If f can be written a s a Taylor expansion in two variables, s a y , a s
then, substitution into (2.33) and recombination, implies that
RUNGE-KUTTA METHODS
and substitution of (2.36)-(2.38) i n t o (2.35) y i e l d s
35
ORDINARY DIFFERENTIAL EQUATIONS
36
Consider now how t o choose parameter values Po,
B, , 7 , 6
in (2.34) so that t h e numerical approximation yk t l and the exact value y(xktl) agree i n their Taylor expansions through a s many terms as possible.
If we wish t o construct a formula which agrees
through the h2 terms, at l e a s t , then, assuming yk = y(\),
one
finds by setting corresponding coefficients of (2.34) and (2.39) equal that
System (2.40) h a s a n infinite number of solutions, one of which is
B,=O,
(2.42)
1
1
B 1 = l , 7 = ; , 6=,f(%,yk).
Substitution of (2.41) and (2.42) into (2.33) yields, respectively, the Runge-Kutta formulas
Formulas (2.43) and (2.44) are called second order approximations because they agree with Taylor expansion (2.35) through terms of order h
2
.
RUNGE-KUTTA METHODS
37
For convenience in programming, Runge-Kutta formulas are usually written in the following form, a s illustrated for (2.43):
Example Consider the initial value problem Y' = x - Y , > . y ( o ) = 1.
Then (2.45) h a s the particular form
For h = 0.1 k = 0,1,...,9
, y 0 = 1 , the
numerical solution generated by (2.46) for
is
yo = 1.000,
y1 = 0.910,
y2 = 0.838,
y = 0.782, 3
y = 0.742, 4
y5 = 0.714,
y6 = 0.699,
y7 = 0.694,
y8 = 0.700,
y = 0.714, 9
7 ~0.737. 10
ORDINARY DIFFERENTIAL EQUATIONS
38
In g e n e r a l , a Runge-Kutta approximation of
x. <
y' = f ( x , y ) ,
(2.47)
1-
X l X
i +1
is a formula of the form (2.48)
Y i + l = yi
where x < i-
+ h [ a l f ( c l , q l ) + a2f(6,2,q2) + * * ' + akf(ck#?k)]t
4j < - xi+l' j
= 1,2,.
..
,k. Of c o u r s e , (2.30), (2.43), and
(2.44) a r e s p e c i a l cases of (2.48).
A large number of other Runge-
Kutta formulas have been developed. 1
+
= yi t :(kO
yi+
For example, Heun showed t h a t
3k2)
k = h f ( x y.) (2.49)
0
i'
1
h
kg yi t < )
k1= h f ( x i
+,;
k =hf(x.
$2h7yi, +-)2kl 3
2
1
approximates (2.35) through terms of order h3, while Kutta showed that 1 = yi +-(k 6 0
(2.50)
+ 2kl + 2k2 + k 3)
k - hf(x. 11
+,; h
k = hf(x. 2 1
h kl $5, yi +y)
Yi
kg +y)
RUNGE-KUTTA METHODS
39
approximates ( 2 . 3 5 ) through terms of order h4.
For additional for-
mulas of order h5, h 6 , h7 and h8, see Fehlberg, Lawson, Luther and Konen, and Sarafyan. A t present, no Runge-Kutta formula of 8
order h9 is known, while the correctness of certain O(h ) formulas
is difficult to verify. Because Kutta's formula ( 2 . 5 0 ) provides an excellent balance of simplicity, high-order accuracy and economy, we will concen-
trate on it.
However, the development t o follow can be extended t o
any of the various Runge-Kutta formulas available. Consider again ( 2 . 1 ) , that is y " = f(X,YIY')
(2.51)
In ( 2 . 5 1 ) , set y' = v so that ( 2 . 5 1 ) is equivalent t o the system
(2.52)
i
y' = v
v' = f(x,y,v)
.
But ( 2 . 5 2 ) is only a particular form of the more general system
(2.53)
with (2.54)
40
ORDINARY DIFFERENTIAL EQUATIONS
Now, j u s t as (2.50) is a fourth order approximation of (2.47),
so it follows i n t h e same way t h a t 1 yitl = Y t - (k t 2kl t 2k2 t k ) i 6 0 3
(2.55)
1 v = v t-(mot2m t 2 m t m ) , it1 i 6 1 2 3
where k = hF(x , y , v ) 0 i i i k
1
mo = hG(xi,Yi,Vi) 1
h y t-, kl v t -ml ), k2 = hF(x t-, i 2 i 2 i 2
a r e t h e Kutta formulas for system (2.53).
1
2
i
m = h G ( x i t hy l y i t kyl , v i tm y l) 2
Finally, from (2.54) it
follows t h a t t h e Kutta formulas for system 12.52) are h t ml t m ) yitl = yi t hv t - ( m 1 6 0 2 (2.56)
1 v = v t-(m t2ml t 2 m t m ) it1 i 6 0 2 3
where (2.57) h
vi h
ty,vi t m0 t
(2.58)
m 1 = h f ( xi t-, yi 2
(2.59)
m = hf(xi 2
(2.60)
m3 = h f ( x i t l I yi t vih t
tz,h yi
mO 2‘”it2’
rn = hG(x. t-, h y t-kg
= hF(xi t;,h yi t-kg v +-)#mO 2’ i 2
4, vi t m y) l
t-vih t moh 2
mlh
7, vi
t m2)
.
RUNGE-KUTTA METHODS
41
For initial value problem (2.1)-(2.2), one knows, from (2.2) and (2.52), both yo and v t o determine m o l ml
These are used first in (2.57)-(2.6@)
0'
, m Z l m3,
y1 and v 1 from (2.56).
which are used i n turn t o generate
Next, substitution of y1 and v1 into
generates new values mo, m l , m2, m
(2.57)-(2.60)
used t o generate y
2
and v
from (2.56).
2
3'
which are
In the indicated recursive
fashion, the process continues and one generates y3,y4,. V3""
*
, vn'
Example Consider the initial value problem y" t y' t y = 1
+ X I
y(0) = 0 , y'(0) = 1
which, in system form, c a n be reformulated as y' = v v'=l+x-y-v y(0) = 0, v(0) = 1
.
Thus ,
x 0 = o , y o = o , v0 = 1 and f(x,y,v) = 1 t x - y - v .
,
.. ,yn
and
ORDINARY DIFFERENTIAL EQUATIONS
42
For h = 0.5, let u s show how to generate y l , vl, y2 and v (2.56)-(2.60).
First, t h e n , let i = 0 i n (2.57)-(2.60),
2 by
so t h a t
m = (0.5)f(0,0,1) = 0 0
m
1
= ( 0 . 5 ) f(-,1 -, 1 1) = 0 4 4
1 1 m Z = (0.5)f(- -, 1) = 0 4' 4
1 m = (0.5)f(-1 -, 1) = 0 .
2' 2
3
From (2.56), it follows t h a t 1 1 (0 t y 1 = 0 t ( -2) ( 1 ) t 12
v = l t 1
-16
oto)
=
z
1
(0+2*0+2'0t0)=1.
so t h a t
Next, let i = 2 in (2.57)-(2.60), 1 2
1 2
mo = ( 0 . 5 ) f ( - , -, 1 ) = 0 m = ( 0 . 5 ) f ( - 3, 1
4
3 -, 4
1) = 0
3 m2 = (0.5)f(-,3 -, 1) = 0
4
4
m = ( 0 . 5 ) f ( l , 1, 1) = 0 . 3
From ( 2 . 5 6 ) , it follows finally t h a t 1 1 y 2 = z t p t-1 ( O t O t O ) = I 12
v
2
1 = 1 t ~ ( O t 2 . 0 t 2 * O t O =) 1 .
Note, incidentally, t h a t the approximations y 1 and y 2 coincide
NONLINEAR PENDULUM
43
precisely, a t the grid points, with the solution y = x of the given, rather trivial, initial value problem only because second and higher order derivatives of t h i s e x a c t , continuous solution are a l l identically zero.
2.5
The Nonlinear Pendulum L e t u s consider next an applied, nontrivial problem of long-
standing interest and show how t o solve it numerically by means of (2.56)-(2.60). Consider a pendulum, a s drawn i n Figure 2.1, which has mass m centered a t P and is hinged a t 0. Assume that P is constrained t o move on a circle whose radius is R and whose center is 0. Let 8 be the angular measure, in radians, of the pendulum
deviation from tk vertical.
The problem is that of describing the
motion of P after its release from an initial position of rest. It is known from laboratory experimentation that the motion of the pendulum is damped and that the length of time between consecutive swings decreases. Analytically, we reason a s follows.
Assume that the motion
of P is determined by Newton's dynamical equation
(2.61 1
F = ma.
ORDINARY DIFFERENTIAL EQUATIONS
44
Circular Thus,
arc
NP
has
Re,
length
so that
d2 a = ,(Re) dt
= 1;.
(2.61) becomes F =
(2.62)
..
mRe.
In considering the force F which a c t s on P, let F
1
be the gravita-
tional component , so that
F1 =
(2.63)
- mgsin 8 , g>O,
let F2 be a damping component of the form
(2.64)
F = 2
-ce,
c > 0 , c a constant,
and assume that t h e s e are the only forces whose effects are significant.
Then,
F = -mgsin 8
- c0,
so that (2.62) readily reduces t o
(2.65)
..
e t - ect + 9 s i n e = 0 .
ma
R
The problem, then, is one of solving (2.65) subject to the given initial conditions
(2.66)
NONLINEAR PENDULUM
45
Figure 2.1
For illustrative purposes, let u s consider the strongly damped pendulum motion defined by
(2.67)
ij +. ( 0 . 3 ) e t sin 8 =
(2.68)
e(o) =
o
~ / 4 , e(o) = 0.
N o analytical method is known for constructing the exact solution of
this problem.
Numerically, then, set t = x and
(2.56)-(2.60) with A t = h = 0.01.
8 = y and solve
The computation was carried out
in double precision on the UNIVAC 1108 for 15000 t i m e s t e p s , that is, for 150 seconds of pendulum motion, with a total computing t i m e of
two seconds.
The first 1 5 . 0 seconds of pendulum oscillation is shown
46
ORDINARY DIFFERENTLAL EQUATIONS
in Figure 2.2, where t h e peak, or extreme, values 0.75462, -0.47647, 0.29335, -0.18156, 0.11259, occur at the times 0 , 3.28, 6.49, 9.68, 12.86, respectively.
The t i m e required for the pendulum t o travel from
one peak t o another decreased monotonically and damping w a s present during t h e entire 150 seconds of motion. Any attempt t o linearize (2.67) results in a solution which either does not damp out, & h a s a constant t i m e interval between successive swings, or both (see e , g . , Greenspan (13)).
2. 6
Instability From the computing point of view, a set of calculations which
results in overflow is called unstable.
Mathematically , there are
several formulations of the concept of instability.
When instability
occurs, one must check first for machine and program errors.
If neither
is present, one must then try t o apply mathematical a n a l y s i s t o the algorithm t o find the source, or sources, of the trouble.
Two of the
more common mathematical sources of instability will be explored now by means of illustrative examples. Consider, first, the initial value problem
IN STABILITY
47
0.7
0.3
0
-0.3
-0.7
1 I
I
1
1
2.5
5.0
7.5
I
I
1
10.0 12.5 15.0
Figure 2.2
y' = -1oy, y(0) = 1
(2.69)
,
the exact solution of which is
(2.70)
-1 ox y = e
This solution t e n d s to zero a s x g o e s to infinity and is a l w a y s positive.
Suppose t h a t one a p p l i e s Euler's method with
approximate t h e solution of (2.69). Then
Ax = 1 . 0 t o
ORDINARY DIFFERENTIAL EQUATIONS
48
(2.71)
Yi+l
(2.72)
Yo=l
i = 0,1,2,...
= -9yi, I
from which it follows that Yl = -9, Y2 = (-9)
2
, Y3 =
(-9)
3 I
Y4 = (-9)
Rather quickly, t h i s iteration results i n overflow. stability, let u s proceed a s follows.
4
,...
I
Yn = (-9)
n , . O .
To analyze the in-
For arbitrary Ax, Euler's method,
applied t o (2.69), yields
Thus , y1 = y (1 -1OAx) = (1 -1OAx) 0 y2 = y l ( l - 1 O A x ) = (1 - 1 O A x ) y = (1 3
(2.74)
2
- lOAx) 3
yn = (1 - l O A x j For instability, the sequence
n
.
I ynl , n = 0 , l , 2 , .
.,
must exceed the
largest number i n one's computer, which, assuming that a l l computations are exact, can happen only if
I 1 - 1OAxl
instability, Ax must b e chosen t o satisfy 11
Ax 5 0.2.
> 1. Thus, t o avoid
- lOAxl
L 1 , or ,
Thus, for example, for Ax = 0.01, Euler's formula for
(2.75) becomes
.
INSTABILITY
49
and iteration with y = 1 yields the bounded sequence 0
which, like (2.70), is positive and decreasing. Now, i n the above example it w a s assumed that computations were exact.
Let
US
show next how computations which are inexact Suppose one is given the differ-
can a l s o be a source of instability.
ence equation (2.77)
2Yit2
- 5Yitl
+ Yi
= 0, i = o , l , 2 1 . . . ,
with initial data
(2.78)
y = 0.5, 0
and is asked t o generate y
(2.79)
2
y
,y 3 , y 4
5 yit2=;yit1
-Yi'
1
= 0.25
,
,... . Then, from (2.77) and (2.78), i = o,l,21...
I
and y 2 = 1i , y 3 = - '1 16 from which it follows that y
n
-
=';I
Y 4 = ~ 1' " . ' Y
0 a s n-
nt1
1
n
. However, suppose
that in-place of doing exact calculations I as above , one duplicates what a digital computer does and allows roundoff error t o be introduced in the following simple way: round off all given data and results of a l l arithmetic operations t o one decimal place.
Thus,
ORDINARY DIFFERENTIAL EQUATIONS
50
initially one h a s (2.80)
Yo
= 0.5
(2.81 )
yl
= 0.3
,
a n d , from ( 2 . 7 7 ) ,
n-4 yn=2 ,1123, which r e s u l t s quickly i n overflow. t h i s time proceeds as follows. (2.82)
yi = A
i
,
The a n a l y s i s of t h e instability
Let
A a c o n s t a n t , i = 1,2,...
be substituted i n t o (2.77), so t h a t
For X f 0 , t h e latter equation implies
,
51
INSTABILITY
- 5x t 2 = 0
2x2
the roots of which a r e
x1 -- 2 , x 2 = -12 . In analogy with the construction of t h e general solution of a second order linear differential equation , one h a s t h a t (2.83) is a solution of (2.77) for any c o n s t a n t s c
and c
1
2'
Now, (2.78)
1 implies t h a t c = 0 , c = -, so that ( 2 . 8 3 ) reduces to 1 2 2 it1
y. =
(2.84)
1
1 (z)
, i = 0,1,2,
... .
Formula ( 2 . 84) is t h e well-behaved solution generated first by using e x a c t calculations.
But, when calculating with t h e rounding procedure
described above, so t h a t t h e initial conditions are (2.80)-(2.81), ( 2 . 8 3 ) yields (2.85)
1 i (2) 30
y. = I
The term
1 i (2) 30
i
+ 1g4 y1 ) . i
i n (2.85) soon dominates t h e term
1 4(I)and results 30 2
in a n overflow which is due strictly t o roundoff error. Thus, we have illustrated two unstable c a l c u l a t i o n s , one of which c a n be corrected by decreasing t h e grid s i z e , t h e other of which
ORDINARY DIFFERENTIAL EQUATIONS
52
cannot be so corrected.
For nonlinear problems instability a n a l y s i s
often is not possible, and the method of decreasing the grid size is usually the first s t e p one t a k e s i n trying t o eliminate instability which
is not due t o programming or machine error. The problem of instability is fundamental i n the study of any initial value problem.
Hence, it h a s received extensive attention
and the interested reader should examine such topics a s pointwise, local, strong, weak, and stepwise instability, and the intimate relationships between convergence and stability in such texts a s Hildebrand (2).
2.7
Periodic Solutions of van der Pol's Eauation Though periodic solutions of nonlinear differential equations
have long been of interest in applied science, the application of c l a s s i c a l mathematical techniques h a s limited inquiry largely t o questions relating, for example, t o existence and uniqueness of such solutions (see, e.g.,
Cesari). Let u s show then how t o apply numerical
methods t o approximate periodic solutions of a c l a s s i c a l oscillation equation, the van der Pol equation, (2.86)
..
2 . x-X(l-x )xtx=O; X > O ,
where differentiation is with respect t o t and where
h is a con-
PERIODIC SOLUTIONS stant.
53
The choice of the variables x and t in (2.86) is for con-
sistency with the extensive literature on t h i s equation. Since it is known that (2.86) has a unique periodic solution for each X, we consider the problem as that of determining the constant a for which the solution of the initial value problem defined by (2.86) and
is periodic.
For t h i s purpose, let T = T(X) represent the period of
the solution which is sought and note (Clenshaw) that x(T/2) = -a, i(T/2) = 0
(2.88)
.
Since Runge-Kutta formulas were applied in Section 2.5, for variety let us show how t o apply a n eighth-order Taylor s e r i e s method t o the present problem.
where, from (2.86),
For t h i s purpose set
ORDINARY DIFFERENTIAL EQUATIONS
54
L e t x ( ~=) n t 1, n = 0 , 1 , 2 , . 0 For e a c h such x ( ~ generate, ) in order, sequence ~ (n) k + k~ =, 0,1,2,... 0
The method proceeds a s follows.
from (2.87), (2.89), (2.90).
..,lo.
Initially, e a c h of t h e s e s e q u e n c e s will be
a decreasing sequence and will d e c r e a s e from t h e given positive value
PERIODIC SOLUTIONS
55
down through negative values.
Terminate each iteration when
that is, when each sequence stops decreasing, and record
Of course , K depends on n.
The finite sequence Sn, n = 0 ,1,2 ,
...
, l o , will be a n increasing sequence which, initially, is negative.
From the first condition of (2.88) , we seek t o find a negative xK(n) so that Sn is zero.
With t h i s in mind, let n = u be the first value
of n €or which
Then set a = x ( ~ and ) T/2 = KAt. 0 approximates a.
Thus, x ( ~ )is an integer which 0
To compute a one decimal place refinement of this
approximation, set x r ’ = 0.0 t xo
, X 0( l )
= 0.1 t x y ,
0.2 +x~),...,~(’~) = 1.0 + x r ) , andrecycle. 0
found
’!x
xt’
= 2.2,.
xo (2) -
Thus, if o n e h a d
= 2 , one would recycle with x r ’ = 2.0, xr’ = 2 . 1 ,
..
, x ( ~ O ) = 3.0.
0
From the resulting one decimal place
refinement, one c a n , in the indicated fashion, construct a two decimal place refinement, a n d , in the same manner, a j-decimal place refine-
ment, where the magnitude of capability.
j
is limited only by one’s computer
ORDINARY DIFFERENTIAL EQUATIONS
56
On the UNIVAC 1108, the following approximations for a and T/2
were generated by the method of t h i s section with A t = 0.001: h = 0.1
01
= 2.000
T/2 = 3.148
X = 1.0
a = 2.009
T/2 = 3.335
X = 10
a = 2.014
T/2 = 9.538.
The graphs of the approximate periodic functions are’ shown i n Figure 2.3.
A l l computations were done in double precision and the total
computing t i m e was under 30 minutes.
-It
Figure 2.3
BOUNDARY VALUE PROBLEMS 2.8
57
ADDroximate Solution of Boundary Value Problems Unlike the solution of a n initial value problem, the solution of
a boundary value problem, when it exists, need not be unisue.
Thus,
for example, any function of t h e form y = c s i n x, where c is a constant, is a solution of the boundary value problem defined by y" t y = 0 , y(0) = ~ ( n=) 0.
Hence, in studying the approximate solution of boundary
value problems, let u s consider first, for simplicity, the linear problem defined by
y(a) = a, y(b) = B, a .:b ,
(2.92)
where P(x), Q ( x ) , R(x) are continuous on a 5 x 5 b, and let assume ,
US
addition , that Q(x) 5 0 , a c x c b
(2.93)
,
which is sufficient t o imply t h a t the solution of (2.91)-(2.92) exists and is unique (see, e. g.
, Keller).
Problem (2.9 1)-(2.93) can be discretized by replacing the interval a 5 x 5 b , which c o n s i s t s of an infinite number of points, by a
finite G[a,h] set whose terminal point is x = b, and by replacing the second order differential equation (2.9 1 ) by a second order difference equation.
To d o t h i s , divide a 5 x
into n equal parts,
ORDINARY DIFFERENTIAL EQUATIONS
58
e a c h of length Ax = (b-a)/n
< xn = b ,
by t h e set a = xo < x < x 1 2
..
where x. = a t jAx, j = 0 , 1 , 2 , .
, n , and substitute (2.9) and a n y
l
one of (2.4)-(2.8) i n t o (2.91) t o obtain a n approximating difference
...,xn-1
equation at x1 ,x2,x3 ,
Thus, using (2.6), which is popular
currently, one would have
- 2Yi+
Yi-l
Yitl
-t
mi) 'it1 - 'i-1
t Q(xi)yi= R(xi), i = l , 2 , . . . , n - l ,
2Ax
(Ax)
or, equivalently, 2
-
(2.94)
Y ~ [ Z- ~ P(xi)Ax] t yi[-4 t 2(Ax)
Q(xi)]-t yitl
[Z -t
F"xi)Ax]
.
2 = Z ( A x ) R(x); i = l , Z , . . . , n - l i
From (2.92), it follows that if one writes down, i n order, e a c h of equations (2.94)
, as will
be illustrated next, there r e s u l t s a tri-
-
diagonal linear system of (n 1) equations i n the ( n - 1) unknowns yl ,y z ,
..., . ynml
A solution of t h i s system constitutes a n approxi-
mate solution of problem (2.91)-(2.93) at x1 ,x2,..
., x ~ .- ~
Example 1 Consider t h e relatively simple boundary value problem
- y = 1,
O<x<3
(2.95)
y"
(2.96)
y(0) = -1, y(3) = -1
.
BOUNDARY VALUE PROBLEMS With Ax =
x1 = 0.5,
-12 '
X
2
59
divide 0 5 x 5 3 into six equal parts so that x = 0, 0
= 1 , x = 1.5, x = 2 , x = 2 . 5 , and x 6 = 3. 3 4 5
Sinceno
approximation for y' must be made , (2.97) is approximated by the difference equation
(2.97)
or , equivalently , by
Using the given boundary values , the tridiagonal system that results
for i = 1 , 2 , 3 , 4 , 5 is 5 -
1 - 4
9
Y1
(2.99)
'4Yz Y2
4-
Y3
9 '4Y3 +
4
-1 - 4
Y4
Y3 - t y , +
Y5
v -9 .
y4
4y5
=
-41
5 - -
-
4
'
the exact solution of which is y1 = y2 = y = y4 = y5 = -1. 3
It is
not surprising, because of the simplicity of the problem, that the numerical solution happens t o coincide with the exact solution, y = -1 , a t the grid points,
It is W t J m D o r t a n t to note, however, with regard
60
ORDINARY DIFFERENTIAL EQUATIONS
to t h e matrix of s y s t e m (2.99)
, that the
coefficient of yi in (2.98)
yields t h e main diagonal e n t r i e s , t h a t of yi- 1 yields t h e e n t r i e s j u s t below t h e main diagonal, and t h a t of y j u s t above t h e main diagonal.
it1
yields t h e entries
These observations also extend to
(2.94).
Example 2 Consider t h e general linear bcundary value problem (2.91)(2.93) and let (2.91) b e approximated by (2.94).
If a 5 x 5 b is
divided i n t o n e q u a l p a r t s , as i n Example 1 , it follows t h a t (2.94) yields a tridiagonal l i n e a r system.
It is not at all obvious, however,
t h a t t h i s system h a s a unique solution.
Let u s see if t h e system c a n
be made diagonally dominant so t h a t we c a n have t h i s assurance.
From (2.94)
(2.100)
I
we wish to have
1-4 t 2(aX)’Q(xi)I 2 12 t A x P ( x i ) I t 12 -AxP(xi)I
For t h o s e v a l u e s of Ax which s a t i s f y both (2.101)
2
- (AX) P(xi) > 0 ,
condition (2. 100) reduces to
2 t (AX) P(xi) > 0 ,
.
61
BOUNDARY VALUE PROBLEMS
- z ( A x ) Q(x,) ~ 2
(2.102)
Since Q(xJ 5 0 ,
(2. 102) is valid.
o
.
Thus, it is sufficient t o satisfy
(2. 10 1), or, equivalently,
Ax I P(xi) I < 2 If M is any upper bound for
I P(x)I
.
on a 5 x 5 b , so that
IP(x)l L M , a l x t b , then a sufficient condition t o assure diagonal dominance is, finally,
A x < 2/M.
( 2 . 103)
Example 3 Consider the general linear boundary value problem (2.91)-(2.93) again.
In Example 2 it was shown that if one approximates (2.91) by
(2.94) and if one wishes t o have diagonal dominance, then the number of parts into which one divides a I x I b is no longer arbitrary. US
Let
show now how (2.91)-(2.93) can be approximated somewhat less
accurately, but in a fashion that one is free t o divide the interval into an arbitrary number of parts and still obtain diagonal dominance. pose that (2.91)is approximated a t each point xi, a s follows. Approximate y" by (2.9). examine P(x ). i
i = 1,2,
To approximate y'
Sup-
. . . , n - 1, , first
If P(x ) > 0 , u s e forward difference approximation i -
(2.4), while i f P(x.) < 0 , use backward difference approximation (2.5). 1
62
ORDINARY DIFFERENTIAL EQUATIONS
Thus, if P(x ) > 0 , there r e s u l t s i -
or, equivalently,
while if P(x ) < 0 , there results i
Yi-l
- 2Yi -t Y i t l (Ax)
t P(Xi)
yi
- yi-l Ax
t Q(x )y = R(xi), i i
or, equivalently,
Such a n approach always yields diagonal dominance of t h e resulting system, for it is the coefficient of y
i
which determines t h e main
diagonal elements of the resulting linear system.
The scheme pre-
sented i n t h i s example is called a forward-backward technique.
-
With regard to Examples 1 3 , above, note that SOR is known to converge for a l l initial g u e s s e s and for all o i n the range 0
when the system which results is diagcnally dominant
(see, e. g.
, Varga).
Though results for determining the optimum co
are known, t h e s e are usually nonconstructive, so that in practice one usually selects a set of cuts in the range 0 < co < 2 , lets e a c h
BOUNDARY VALUE PROBLEMS
63
run for, s a y , fifteen iterations with a zero initial vector, and then chooses that
CD
which seems t o be giving the most rapid convergence.
To extend the i d e a s presented thus far t o nonlinear problems,
consider the general nonlinear boundary value problem
Y(a) = a, y(b) =
(2.105)
B; a < b ,
where a , b , a, 8 are c o n s t m t s and f ( x , y , z ) h a s continuous first order partial derivatives for all y, for a l l z , and for x in the range a 5 x 5 b.
For convenience, we will assume that
(2.106) where M is a positive Constant. Boundary value problem (2.104)-(2.106) h a s a unique solution (see, e.g.,
Keller). Moreover, when (2.104) h a s the linear form
(2.91), the first condition of (2.106) is exactly (2.93). Problem (2.104)-( 2.106) is descretized by replacing the interval a
<x 5 b
by a finite G[a,h] set, a s in the linear c a s e , and by
approximating differential equation ( 2 . 104) by a difference equation which u s e s ( 2 . 6 ) and ( 2 . 9 ) , that is, by
64
ORDINARY DIFFERENTIAL EQUATIONS
One writes down, i n order, each of (2.107) for i = 1 , 2 , . . . , n - l , which, by (2.105), results in a system of nonlinear algebraic or
...,yn-l.
transcendental equations in y l , y2 ,
A solution of t h i s
system constitutes a n approximate solution of (2.104)-(2.106) on the
...,x
grid points x1 ,x2 ,
n-1
Example For the one dimensional radiation equation y"
(2.108)
- ey= o ,
consider the boundary value problem with y(0) = y(1) = 0.
The prob-
l e m h a s a unique solution which can be approximated a s follows. Divide
0 5 x 1. 1 into three equal parts by the points xo = 0 ,
1 x = - x -1 3 ' 2-3'
x = 1. Approximate (2.108) by 3
Thus ,
- 18yl t 9y2 - eY1 = o 9y1 - 18y2 t 9y3- e Y2 = 0 , 9y0
so that, inserting the boundary conditions, one h a s
REMARKS
65
eY1 t 18y1 e
y2
t 18y2
- 9y2 = o
- 9Yl
= 0.
This system is similar t o that solved by (1.37) - (1.38). The iteration t a k e s the particular form (k) (ktl) = y r ) Y1
(ktl) = yf' Y2
-
-
(k)
reY1 t 184:) - 9 ~ f ) Y [ , ~ ' t 181 (k) (k) w[e y2 t 18yf)- 9 y r t 1 ) / [ey2 t 181 ,
(u
and can be executed e a s i l y on a high speed digital computer. Note that the nonlinear system generated by the numerical method of t h i s section can be proved t o have a unique solution only for a l l sufficiently small
Ax (Bers) and that the resulting equations
can always be solved by the generalized Newton's method for a l l w in some proper subset of the range 0 <
(u
< 2 (S. Schechter). For
a variety of sufficient conditions which a s s u r e that numerical solutions of both linear and nonlinear problems converge t o the analytical solutions a s Ax + 0 , see Keller.
2.9
Remarks There exist a variety of other discrete methods which can be
of value in the numerical solution of initial value problems.
General
ORDINARY DIFFERENTIAL EQUATIONS
66
categories include numerical integration multistep methods.
predictor-correctorl and
There also exist valuable special methods for
s p e c i a l prcblems, like those relating t o stiff equations and t o second order equations which d o not contain y'
.
Finally, note that often
one c a n conveniently solve a boundary value problem by a n initial value technique and a n initial value problem by a boundary value technique.
(General reading sources for the above material are
Collatz ( l ) ,Fox (1,2),Greenspan ( 4 , 6 ) , Hamming, Henrici, Noble, Ralston, and Todd).
67
EXERCISES Exercises 1.
Develop error estimates for approximations (2.4)-(2.9).
2.
Find y 1 , y2, and y3 by the method of Taylor series for each
of the following initial value problems. series approximation with h = 0.5.
U s e a third order
Whenever possible, find
the exact solution of the problem and compare it with the numerical solution.
3.
(a)
y" t y = 0 , y ( 0 ) = 0 , y'(0) = 1
(b)
y"
(c)
Y"
(d)
y" = y
(e)
y" = e , y(0) = 1 , y'(0) = 0
(f)
2 y" t (y') = x,
(9)
y" t 3y'
(h)
y"
t y
2
3
tx
2
,
y(0) = 1 , ~ ' ( 0 =) 0 y(0) = 1 , y'(0) = 1
y(0) = 1 , ~ ' ( 0 =) 0
y(-1) = 0 , y ' ( - l ) = 1
- cosy = 0 ,
y(0) = 1 , y'(0) = -1
= e y , ~ ( 0 =) 1 , y'(0) = 2
.
Show that Heun's formula approximates (2.35) through terms of order h
4.
- 3y' t 2y = 0 , - 4y' = x2 - 2,
3
.
Find y 1 , y 2 , and y3 for e a c h initial value problem of Exercise 2 using Kutta's formulas (2.56).
5.
Consider the following initial value problems: (a)
Y' = 'Y,
Y(0) = 1
(b)
y'
(c)
Y ' = -1oooy,
= -1OOy,
~ ( 0 =) 1
y(0) = 10
.
68
ORDINARY DIFFERENTIAL EQUATIONS
For what v a l u e s of
6.
Approximate t h e periodic solution of van d e r Pol's equation for'each of
7.
Ax will Euler's method be u n s t a b l e ?
X = 0.001,
X = 5.0,
X = 20.0.
Find a n approximate solution with h = 0.2 following boundary value problems.
for e a c h of t h e
Whenever possible , find
the exact solution of t h e problem and compare the numerical solution with it. y"
-y
= 0,
y" t 3y'
7T
y(0) = 1 , y(;)
- 4y = 0 ,
= 0
y(0) = 0 , y(1) = 1
- 5y' -t 4y = x2 2x t 1, y(0) = 1, y(1) = -1 2 y - 3 x 9 - y = x , y(0) = 1 , ~ ( 5 0 =) -1 2 y" - (25 - x)Y' - y = , y(0) = 1 , y(20) = -1 2 y" - 4xy' -t (4x - 2)y = 0 , y(0) = 1 , y(1) = 0
y"
J
'1
X
y" = y y"
t X I y(1) = 1 , y(2) = -1
- 3xy'
y" = e y"
3
Y
,
- 4xy'
- y3 = 0 ,
y(1) = 1 , y(2) = 0
y(0) = 1 , y(1) = 0 = ey, y(0) = 1 , y(2) = -1.
CHAPTER I11 NUMERICAL SOLUTION OF ELLIPTIC BOUNDARY VALUE PROBLEMS
3.1
Introduction The natural generalization of a second order ordinary differ-
ential equation is a second order partial differential equation, which can be defined in two dimensions as follows.
On a plane point set
R, the equation
subject t o the restriction that a t each point of R
(3.2)
a
2
2
2
t b +c f 0 ,
is called a second order, quasilinear partial differential equation. In the special c a s e when
then (3.1) is called linear if
69
ELLIPTIC EQUATIONS
70
while it is called mildly nonlinear if f
2
f(x,y,u)
.
We will consider no second order equation more complex than ( 3 . 1 ) . It is convenient for both practical and theoretical reasons t o categorize various second order partial differential equations a s follows. A t a given point of definition in the plane, equation ( 3 . 1 ) , in analogy with the conic sections, is said t o be elliptic
if
b2-ac<0
,
parabolic if
b'
- ac = 0 ,
hyperbolic i f
b2
- ac >
0
,
Example 1 A t each point i n the plane, the equation (3.3)
is elliptic.
This equation is called the potential equation, or
Laplace's equation , and is the prototype elliptic partial differential equation. Example 2 A t each point i n the plane, the equation
(3.4)
71
INTRODUCTION
is parabolic.
This equation is called the
heat equation
and is the
prototype parabolic partial differential equation.
Example 3 A t e a c h point i n the plane, the equation
(3.5)
is hyperbolic.
This equation is called the wave equation and is the
prototype hyperbolic partial differential equation.
Example 4 At e a c h point i n the plane, the minimal surface, or s o a p f i l m ,
equation
is elliptic, s i n c e
Example 5 A t e a c h point in the plane consider the g a s dynamical equation
72
ELLIPTIC EQUATIONS
where c
0
is the speed of sound.
Then
L e t the nonnegative number M I called the Mach number, be defined
Then, 4 0
b 2 - a c = c [M
2
- 11.
Thus, i f M < I, equation ( 3 . 7 ) is elliptic and the corresponding flow
is called subsonic: if M = 1, equation (3.7) is parabolic and the corresponding flow is called sonic: and, if M > 1, equation ( 3 . 7 ) is hyperbolic and the corresponding flow i s called supersonic. Often it will be of value t o u s e the notation
LAPLACE'S EQUATION
so that, for example
73 ( 3 . 7 ) can be written in the following, more com-
pact form: 2
(co
2 - ux)uxx - 2uxuY uXY t
-
2 2 (co u )u = 0 Y YY
.
Note that the character or type of any second order quasilinear partial differential equation is determined completely by the coefficients of its second order terms. Elliptic equations will be studied in this chapter, parabolic equations in Chapter 4 and hyperbolic equations in Chapter 5. A more general approach t o hyperbolic equations in terms of systems will be developed in Chapter 7.
3.2
Boundary Value Problems for the Laplace Equation L e t us begin the study of elliptic equations by considering the
simplest such equation, that is, Laplace's equation ( 3 . 3 ) . Alternate ways of writing t h i s equation are
= t uYY = o
u (3.8)
Au=O
v 2u = o . Any solution of Laplace's equation is called a harmonic function and the special properties of harmonic functions because cf their impor-
ELLIPTIC EQUATIONS
74
tance in the study of gravitation and potential theory, have been studied in great detail.
One such property, for example, is the
=-
min property, which c a n be stated a s follows: if R is a bounded, simply connected region whose boundary is S, and if u is harmonic on R and continuous on R t S , then u t a k e s on its maximum and its minimum values on S.
That the max-min property for harmonic
functicns is reasonable c a n be seen from the following example. sider the particular function u = x2
Con-
- y2, which is everywhere con-
tinuous and harmcnic, and whose graph is the saddle surface shown in Figure 3.1.
L e t Q be the point on the surface whose coordinates
are (1 ,0 , l ) .
Then the intersection of the surface with the plane whose
equation is y = 0 is a parabola P
1'
which opens upward, while the
intersection cf the surface with the plane whose equation is x = 1
is a parabola P
2'
which opens downward (see Figure 3.1).
This
opposition of concavities is commcn t o a l l nonconstant harmonic functions because (3.3) implies that uxx = -u definiticn.
YY
a t each point of
But, point Q in Figure 3.1 cannot be either a maximum
or a minimum point, since in any neighborhood of it there are points on the surface which are relatively higher and other points which are relatively lower.
Thus, if u = x2
- y2
is defined only on a bounded,
simply ccnnected point set R and on its boundary S, then no maximum or minimum value of u c a n occur on R, from which the max-min property follows immediately.
LAPLACE'S EQUATION
75
For other harmonic functions , like u = 10 , the maximum and minimum values
are attained
on R, but they are a l s o a t t a i n e d on S.
Thus, the max-min property, i n general, d o e s not preclude a harmonic function attaining extreme values on both R and S. The most meaningful types of problems for elliptic equations , from both the physical and the mathematical points of view, are boundary value problems, and the simplest such problem is the Dirichlet problem, which is formulated for the Laplace equation a s follows. Dirichlet Problem L e t G be a bounded point set whose interior R is simply connected and whose boundary S is piecewise regular, that i s , is piecewise continuously differentiable. tinuous on
s, then the
If f(x,y ) is given and con-
Dirichlet problem for the Laplace equation is
that of finding a function u ( x , y ) which is (a)
defined and continuous on R t S ,
(b)
identical with f ( x , y ) on S , and
(c)
harmonic on R .
Example The problem of determining a function u ( x , y ) such that: (a)
u is continuous at each pcint ( x , y ) whose co2
2
ordinates satisfy x t y 5 25;
ELLIPTIC EQUATIONS
76
(b)
2 u coincides with f ( x , y ) = x-y a t e a c h point ( x , y ) 9 whose coordinates s a t i s f y x2 t yz = 25; and
(c)
u is harmonic at e a c h point ( x , y ) whose coordinates satisfy x2
f
y2 < 25,
is a Dirichlet problem. Geometrically, the Dirichlet problem can be interpreted a s follows.
Since f ( x , y ) is defined only on S and is continuous on
S, the graph of f ( x , y ) is a closed s p a c e curve (see Figure 3.2).
In the Dirichlet problem, one is a s k e d to find a function u(x, y) which is harmonic on R and whose graph, which is a surface over R t S , contains the s p a c e curve f and h a s t h i s curve for its boundary.
That the solution of the Dirichlet problem exists and is unique h a s been proved by a variety of methods, including subharmonic and superharmonic functions , Green's functions , finite differences, Dirichlet's principle , integral equations and conformal mapping (see,
e. g. , Courant , Friedrichs and Lewy; Courant and Hilbert; Garabedian; Greenspan ( 2 ) ; Kellogg; Petrovsky).
The analytical determination of
u ( x , y ) , however, is a f a r more difficult problem than that of establishing its existence and uniqueness.
If S is a rectangle, then
the solution c a n be constructed a s a Fourier s e r i e s (Churchill, Greenspan ( 2 ) , Petrovsky) , while if S is a circle or a n e l l i p s e , then
LAPLACE'S EQUATION
77
U
Y
Figure 3.1
Figure 3.2
ELLIPTIC EQUATIONS
78
the solution can b e constructed a s a Poisson integral or a Fourier s e r i e s (Churchill, Greenspan (2), Petrovsky, Royster). Also, any problem for which a n explicit conformal map can be given which t a k e s R onto a rectangular, circular, or elliptic region c a n be solved i n
closed form (Nehari). Beyond t h e s e cases, the prob1em.s involved i n constructing u d o not seem t o be amenable t o existing general analytical techniques. But, unfortunately, even in the few cases where a solution c a n be produced a s a Fourier s e r i e s or a s a n integral, one may
not be
able
to evaluate the solution at a point of interest because the s e r i e s may be slowly convergent, or b e c a u s e a n integrand may not have a n antiderivative. Because it is known that the Dirichlet problem always h a s a unique solution, b e c a u s e i n mcst problems the solutions cannot be given i n closed form, and b e c a u s e in those problems which have closed form solutions the solutions can rarely be evaluated at a particular point of interest, we will seek to develop a n algorithm for the approxi-
mate solution of the Dirichlet problem.
For the present, we ccnclude
t h i s section by d i s c u s s i n g other kinds of boundary value problems which are of interest with regard tc elliptic equations. In the statement of the Dirichlet problem, if one were t o replace the boundary values u = f ( x , y ) on S by normal derivative values
79
LAPLACE’S EQUATION au = g ( x , y ) , then the an
resulting problem is called a Neumann problem,
and such problems, i n general, have a n infinite number of solutions, any two of which differ only by a n additive constant (Courant and Hilbert).
In the statement of the Dirichlet problem, if one prescribes
function values u = f ( x , y ) on a nonempty, proper subset of S and normal derivatives
au = g(x,y) an
on the remainder of S , then the re-
sulting problem is called a Mixed Type or Robin problem, which, in general, h a s a unique solution (Courant and Hilbert).
A final type
problem which is intimately a s s c c i a t e d with the propagation of waves
is the exterior Dirichlet problem, which is formulated precisely a s follows.
Exterior Dirichlet Proble m L e t G be a bounded point set whose interior R is simply con-
nected and whose boundary S i s piecewise regular. exterior of G.
Let R * be the
If f ( x , y ) is given and continuous on S , then the
exterior Dirichlet problem for the Laplace equation is that of determining a function u ( x , y ) on R* t S which is (a)
defined and continuous on R” t S
(b)
harmonic on R*
(c)
identical with f ( x , y ) on S , and
(d)
bounded on R:i< t S
.
ELLIPTIC EQUATIONS
80
It is known that the exterior Dirichlet problem h a s a unique solution (Courant and Hilbert) , but no general analytical technique is available a t present for constructing the solution.
3.3
Difference Equaticn ADDrOXhatiOn of Laplace's Equation In developing a numerical method for the Dirichlet problem, it
will be important t o have a difference equation approximation of the Laplace equation, and t h i s will be developed first.
For h > 0 and
for 0 < h i I h;
(3.9)
i = 1,2,3,4,
let the points (x,Y) I (x+hl,Y) , (x,Y th2) , (x-h3 ,Y) , (x,y-h4) be numbered 0 , 1, 2 , 3 , 4, respectively, as shown in Figure 3.3.
a point numbered i , denote u by u
i'
At
and let u s try t o determine
parameters ao, al, a2, a3, a4 such that at (x,y) (3. 10)
u
xx t u yy c a 0u 0 t a 1u 1 t a 2u 2 t a 3u 3 t a 4u4 '
Since there are five parameters a
i'
one would, in general, seek
five independent relationships from which they can be determined. Substitution into (3.10) of Taylor expansions about (x,y) for ul, U2'
U3'
u4 and regrouping of terms implies
LAPLACE DIFFERENCE APPROXIMATION
(3.11)
81
u t u - u (a t a l t a 2 t a 3 t a 4 ) t u ( h a - h a ) xx YY 0 0 x 1 1 3 3 t Uy(h2a2
- h4a4) t 51 uxx(hfal
1 2 2 +-u (h a t h4a4) 2 YY 2 2
t hia3)
4
3 1 [O(aihi)] .
+
1 Setting corresponding coefficients of (3.1 1) e q u a l , one finds
a t
a t
alt
0
2
a = o
a t 3
4
=o
- h a 3 3
hlal
h a 2 2
(3.12)
- h a 4 4
+
2 h3a3
=o = 2
2 + h a = 2 ,
h 2b 2 2
4 4
the unique solution of which is
(3.13)
a0 = -2[-
1
1
h2hqI'
'1'3
2 a1 = hl (hl t h 3 )
a2
2 - h2(h2+h4) '
2 2 a3 = h3(hl t h 3 ) ' a4 - h4(h2th4)
Substitution of (3.13) i n t o (3.10) implies, then, t h a t at ( x , y ) (3.14)
u
=
t u
3
YY
-2[-
1
1
uO h2h4
hlh3
hl (hl t h 3 )
c
u
1
t
2 h2(h2thdu2
4
t
h3(hlth3)
u
3
t
u
h4(h2th4) 4
t
1
[O(hi)l
82
ELLIPTIC EQUATIONS 4
[
lim [O(h.)] = 0 , it follows from (3.14) that the approxi1 h-+O 1
Since mation
u
(3.15)
=
t u
YY
t
is reasonable.
1 hlh3
[-
--2
1
h2hq l U O
u
hl (hl t h 3 ) I
t
2
h2(h2th4)u2
2
u t h3(hl t h 3 ) 3 h4(hZth4) '4
From (3.15), the difference equation apprcximation of
Laplace's equation which we will u s e is
(3.16)
-21-
1 hlh3
t
1
2 hl(hl th3) u1
hZhqluO
2 h2(h2th4) '2
2
h3(hl t h 3 ) u3
2
h4(h2th4) u4 =
In the important s p e c i a l c a s e when h = h = h = h = h , (3.16) 1 2 3 4 reduces t o
(3.16a)
-4u
0
t u
1
t u
2
t u
3
t u
4
=o.
Note that the numbering 0 , 1 , 2 , 3 , 4 is nct e s s e n t i a l t o the form of (3.16).
Thus, if 0 , 1 , 2 , 3 , 4 were replaced by 11, 5 , 3 ,
6 , 9 , respectively, then (3.16) need be altered only by replacing u o l u l , u2, u3, u4 with u l l
, u5, u3'
u6, u
9'
respectively.
Note
a l s o that (3.16) implies the existence of a discrete max-min property. This can be seen readily from the special form (3.16a), which, re-
LATTICE POINTS
83
written a s uo = (ul t u2 t u3 t u4)/4 ' implies that uo is the arithmetic mean of ulI u2' u3' u4, so that min [u1,u2,u3,u41 I U o I m a x [ u
'U2'U3
,u41
Finally, it is important t o realize that (3.16) is a n algebraic equation which approximates differential equation (3.3), and that the method used in its derivation will apply equally well for differential equations of various types in a n arbitrary number of dimensions.
3.4
Interior and Boundary Lattice Points Consider next discretizing the point set G = R t S given in
the statement of the Dirichlet problem.
1'I
h2
Figure 3.3
For illustrative purposes,
ELLIPTIC EQUATIONS
84
if R and S are a s shown in Figure 3.4(a), then we wish t o replace R by the finite set Rh, which is shown a s the set of crossed points
in Figure 3.4(b), while we wish t o r e p l a c e S by the finite set Sh, which is shown a s the set of circled points in Figure 3.4(b). finite sets can be defined precisely a s follows.
R
Figure 3.4(a)
These
85
LATTICE POINTS
Figure 3 . 4 ( b )
Let
(x,;) be an arbitrary, but fixed, point in the plane, and
let h be a positive ccnstant called the grid size.
-
(x t ph, 7 t qh) , p = 0 ,+1,+2,.
..,q = 0
,+1,+2,.
The set of points
.., is
called a set
2 t ph
of planar grid points.
The set of vertical l i n e s x =
horizontal l i n e s y =
t qh is called a planar lattice.
and of
Those planar
grid points which are a l s o pcints of R are called interior lattice, or grid, points and are denoted by F$.
Let the set of pcints which
S and the planar lattice have in common be denoted by S" and set h GE =
% t St.
The four neighbors of a point ( x , y ) in
%
are defined
86
ELLIPTIC EQUATIONS
t o be those four points in G" which are c l o s e s t to ( x , y ) in the h e a s t , north, w e s t , and south directions. G" which c o n s i s t s of each point of h
%
Let Gh be that subset of and its four neighbors.
Finally, the boundary l a t t i c e , or grid, points, denoted by S are h' defined by S = G h h-%' Example Consider the quadrilateral with vertices ( 0 ,0) , (7,O), (2,5) and ( 0 , 4 ) , a s shown in Figure 3 . 5 , whose intericr is R and whose boundary is S.
Set
(2,;)
= (0,O) and h = 2.
Let S1, S2'
s3/ and
denote the four s i d e s of the quadrilateral, a s shown in Figure 3 . 5 .
S
4
Then the points of crossed in Figure 3 . 5 .
are ( 2 , Z ) , ( 2 , 4 ) and (4,Z) and have been The points of SE are a l l of the points in S 1
and S2 and the four circled and one squared pcint of S
3'
points of Sh are ( 2 , 0 ) , ( 4 , 0 ) , ( 0 , 2 ) , ( 5 , 2 ) , ( 4 , 3 ) , (0,4),
The (3,4)
and (2,5), which are circled in the figure. 3.5
The Numerical Method We formulate now the basic algorithm for approximating the
solution of the Dirichlet problem. Method D For fixed h > 0 and fixed (Z,y) , construct
%
and Sh'
Suppose Rh c o n s i s t s of m points and S c o n s i s t s of n points. h Number t h e points of 1
-m
%
i n a one-to-one fashion with the integers
i n such a way that the numbers are increasing from left t o
NUMERICAL METHOD
87
right on any horizontal line of the lattice and increasing from botton t o top on any vertical line of the lattice.
Number the points of Sh
in a one-to-one fashion, and i n any order, with the integers m t 1 , m t 2,.
..,m
t n.
Step 1.
A t each point of S set h'
If (x,y) is numbered k , then t h i s is equivalent, in subscript notation , to
Step 2.
A t each point ( x , y ) of R , , beginning with the one
numbered 1 and continuing consecutively through the one numbered m, write down the Laplace difference analogue
(3.17)
where ( x t h l ,y) , (x,y t h 2 ) , (x-hg ,y) , (x,y-h ) are the neighbors of 4
(x,y).
In so doing, if any neighbor is a point of S then replace h'
the corresponding u value by the known value of f determined i n
88
ELLIPTIC EQUATIONS
Step 1.
In practice, each equation should be written in subscript
notation, a s demonstrated in (3.16), so that there results a linear
, u2,.
algebraic system Gf m equations in the m unknowns u Step 3.
Solve the algebraic system generated in Step 2.
Step 4.
Let the discrete function u i = 1 , 2 , . , i'
.,m
is defined only on F$ t Sh, represent on
% t Sh
0
'Um'
t n, which
the approximate
solution of the given Dirichlet problem.
Example Let S be the quadrilateral with vertices (0 ,0) , (7,0), (Z,5) and ( 0 , 4 ) , which is shown in Figure 3.5. S.
Set
Let R be tk interior of
On R t S consider the Dirichlet prcjblem with f ( x , y ) = x
(?,y)
= (0,O) and h = 2 , a s i n the previous example.
in Figure 3.6, the points of S are numbered 4-11. h
(3.18)
%
2
- y2.
A s shQwn
are numbered 1-3 while those of
Following the directions of Step 1 I one h a s
u =4, u = 1 6 , u --4, u = 2 1 , u = 7, u =-16, 4 5 67 8 9 Ul0
= -7,
Ull
= -21.
Application of (3.17) a t t h e points numbered 1-3 in Figure 3.6 and substitution from (3.18) yields
NUMERICAL METHOD
(-1)u
(-2) u
1
2
89
t
1 1 (-4) t;1 (4) = 0 -u t -u t 4 2 4 3 4
t
2 2 2 ( 2 1 ) tl(lt2) 1 ( 1t 2 ) (7) 2(1+2)
2 (-2) u 3 t l ( l t 2 ) (-7)
-
+
2(1+2)(16) = 0
2 1(12+2)(-21) 2(1+2) (-16) +
11
9
4
5
Figure 3.6
2 + 2 ( 1 + 2 ) U 1= 0,
ELLIPTIC EQUATIONS
90
or equivalently, 1 t-u
(3.19)
-u
(3.20)
-u -2u 3 1 2
(3.21)
-U
1
4
2
1 t-u 4 3=O
1
1
3 1
= -24
-
2~ = 24. 3
The solution of (3.19)-(3.21) is u = 0 , u = 12, u = - 1 2 . 1 2 3
(3.22) Thus, u
i'
i = 1I 2
'... 11, as given by (3.18) and (3.22)
constitutes
the approximate solution of the given Dirichlet problem on F$, t Sh. Observe that t h e significance of the ordering i n Step 3 of Method D is that the linear algebraic system which r e s u l t s is diagonally dominant, since the main diagonal terms come from the coefficient of u(x, y) i n (3.17). The reasonableness of Method D as a numerical method follows from the known results (Greenspan (3)) that (a) the approximate solution always exists and is unique, (b) for a large c l a s s of problems the numerical solution converges to t h e analytical solution a s the grid size converges t o zero, and (c) the system of algebraic equations generated by Method D can be solved by SOR, with convergence a s sured for any initial g u e s s and for any
o)
in the range 0 co) c 2.
91
EXTERIOR PROBLEMS
Moreover, for certain classes of problems, one c a n even calculate the value of
(u
which will yield t h e m a x i m a l rate of convergence for
the SOR method (Warlick and Young).
Thus, for example, if a? b > 0,
and if S is a rectangle with vertices (0,O), (a, 0) , ( 0 , b) , and (a,b) , then
where
x=
1
7T
p o s - t cos A
and
a = Ah, b = Bh
3.6
.
Numerical Solution of the Exterior Dirichlet Problem Numerically, the exterior Dirichlet problem a l s o c a n be solved
easily i f one first transforms it into a n equivalent interior problem and then applies Method D.
This can be done a s follows.
For simplicity, let C b e a circle whose center is (0,O)and whose radius is unity.
Let L be any half-line which emanates from
the origin (see Figure 3.7).
If P(x,y) is any point on L which is
different from t h e origin, then the unique point Q(€,,t7) which
on L for
ELLIPTIC EQUATIONS
92
(3.23)
lOQl = 1
lOPl
is called the inverse point of P.
The mapping of a l l points of the
plane, other than the origin, into their inverse points, is called a n inversion mapping.
In effect, points inside C map into points out-
side C , points on C map into themselves, and points outside C map into points inside C.
Thus, any unbounded set outside C
maps into a bounded set inside C. The equations of inversion mapping can be developed e a s i l y a s follows.
A s shown in Figure 3.7
, let the
foot of the perpendicular
to the X a x i s through P b e P' and that through Q be Q'. by similar triangles , X
(3.24)
Lx-7
=-.
From (3.23) (3.25)
so that (3.26)
4
= ,2
X f
y2
2
2
, x f Y f o .
Similarly, by constructing perpendiculars t o the Y a x i s , (3.27)
Then,
93
EXTERIOR PROBLEMS
Figure 3 . 7
Formulas ( 3 . 2 6 ) and ( 3 . 2 7 ) are convenient for determining when x and y are given. and y t o one i n
4
and q
For transforming a given equation in x
and q, it is mcre convenient t o have ( 3 . 2 6 ) and
( 3 . 2 7 ) sclved for x and y in terms of
can be written in the form
(3.28)
4
4 and
q.
These formulas
ELLIPTIC EQUATIONS
94
(3.29)
Consider now the following well kncwn theorem (Petrovsky).
Theorem 3 . 1 L e t u(x,y) be the solution of the exterior Dirichlet problem. Without l o s s of generality, assume that (0,O) is in R.
Under in-
version, let R*+Ril
(3.30)
S+Si
(3.31)
(3.32)
i
i
Then v(4,n) is the solution of t h e Dirichlet problem on R t S with boundary values F , that is ,
(b)
i i v ( e , q ) is defined and continuous on R t S , and
The value of Theorem 3.1 is that it enables us t o apply Method
D t o a Dirichlet problem for v and then t o determine approximate values for u, the solution of the exterior problem, directly from (3.31).
95
GENERAL LINEAR EQUATIONS
3.7
Remark on Neumann and Mixed " m e Problems Method D extends e a s i l y t o mixed type problems (Greenspan
( 3 ) ), but in general with less accuracy.
However, rather than intro-
duce the pertinent new i d e a s now, we shall d o so when considering problems in which normal derivative boundary conditions are natural.
W e will not attempt t o d e a l with Neumann problems numerically because they are not well posed.
If one does have a Neumann problem,
however, it is important t o note that prescribing the solution at only one boundary point transforms the problem into one which is well posed.
3.8
The General Linear Elliptic Equation with Constant Coefficients In t h i s section, let u s consider those modifications of Method
D which are necessary when the Laplace equation is replaced by a
different linear elliptic equation.
The discussion will focus on equa-
tions which occur repeatedly in physical applications, If A , B , C , D, E l F are constants and G(x,y) is continuous, it is known (Courant and Hilbert, Greenspan (2)) that the partial
differential equation (3.33)
Aunt
2Bu
XY
t Cu
YY
t Du t Eu t F u t G(x,y) = 0, x Y
A2 t Bz t C2 f 0
ELLIPTIC EQUATIONS
96
c a n be simplified by a rotation of axes. When ( 3 . 3 3 ) is elliptic, one c a n , for example, eliminate the u
XY
term.
generality, let u s assume that B = 0.
Au
(3.34)
=
Thus, without l o s s of
Consider, t h e n ,
t CU t DU t EU t F u G(x,Y) ~ = 0 Y Y x Y
and assume that C>O,
A>O,
(3.35)
so that the equation is elliptic.
Further, for both practical and
theoretical r e a s o n s , it will be convenient at present t o assume that
which will a s s u r e (Courant and Hilbert) that any solution of ( 3 . 3 4 ) h a s certain properties, like a general max-min property, i n common with harmonic functions. To construct a difference approximation of ( 3 . 3 4 ) , consider the five-point arrangement shown i n Figure 3 . 3 and at (x,y) set
4 (3.37)
AU=tCu
YY
t Du t Eu t F u t G(x,y) X
Y
aiuit G(x,y).
G
0
Substitution of finite Taylor expansions about (x, y) into ( 3 . 3 7 ) and setting corresponding coefficients equal yields the system c i o t c i
1
t
a
2
t
a
3
+ a = F 4
GENERAL LINEAR EQUATIONS hlal
-
2 hlal
2 t h 3 a 3 = 2A
97
h a = D, 3 3
h
CI
2 2
-
h4a4 = E
2 2 h 2 a 2 t h 4 a 4 = 2C
,
,
the unique solution of which is
hl(hlth3)
1
a = 3
2C t Eh, a = 2 h2(h2th4) '
2A t Dh2a
a =
2 A - Dhl
2C- Eh a h3(hlth3) ' 4 - h4(h2th4) '
Because the truncation error goes to zero with h , the difference equation approximation of (3.34) is chosen t o be 4
(3.39)
where the ai are given by (3.38).
If one has a Dirichlet problem i n which the Laplace equation
is replaced by (3.34), then Method D need be modified only by replacing (3.17) with (3.39).
However, if one wishes assurance,
a priori, that the theoretical support available for Method D is a l s o available for the modified method, then (Greenspan (3)) one need only
select h small enough so that, in (3.38), one h a s (3.40)
a < 0, 0
i
> 0, i = 1,2,3,4.
98
ELLIPTIC EQUATIONS
From (3.38)
, a sufficient condition for (3.40) t o be valid is
Note that one c a n a l s o apply the forward-backward technique of Section 2.8 t o develop a difference analogue which, i n general, is less accurate, but which yields diagonal dominance for any grid size. This will, in f a c t , be done i n Chapter VII.
3.9
Extension t o Three Dimensions The numerical analysis developed thus far generalizes e a s i l y
and naturally t o linear problems i n any number of dimensions.
For
clarity, however, we shall give a detailed discussion and a significant application only for three dimensional problems for the Laplace equation. Let R be a bounded, three dimensional region and let S be its boundary.
Let f ( x , y , z ) be defined and continuous on S.
Then
the Dirichlet problem is that of finding a function u(x,y,z)- such that
(a)
u satisfies on R the Laplace equation u
=t
u
YY
t u
zz
=o,
(b)
u = f on S, and
(c)
u is continuous on R t S
.
THREE DIMENSIONAL PROBLEMS
99
Under several reasonable assumptions about S (Petrovsky), which, though quite general, are somewhat more restrictive than those for the two dimensional c a s e , it is known that the Dirichlet problem h a s a unique solution. As i n Methcd D, i n order t o approximate t h i s solution one need only construct , for h > 0 , three dfmensional, finite point sets
%
(interior grid points) in R and S h
(boundary grid points) in S, where in three dimensions each point of
%
h a s six neighbors (see Figure 3.8),
and then sclve the linear
algebraic system which results by applying at each point ( x , y , z ) of
\ (see the notation i n Figure 3.8) (3.42)
-2 (-
hlh2 t
1 h3h4
t-t-
1 h5h6 ' 0
t h e difference equation 2 u t hl (hl t h 2 ) 1 h2(hl t h 2 ) '2 2
u t u t h3(h3+h4) 3 h4(h3th4) 4 h5(h5th6) '5 2
h6(h5th6) u6 = Note that (3.42) is a natural extension of (3.16) and that (3.42) can be developed i n the same fashion a s was (3.16). The exterior Dirichlet problem c a n be formulated a s follows. Let R be a bounded, three dimensional region and let S be its boundary.
Let R" be the exterior of S and let f(x,y,z] be defined
and continuous on S.
Then the exterior Dirichlet problem is that of
ELLIPTIC EQUATIONS
100
finding a function u(x, y , z ) such that u s a t i s f i e s , on R", the Laplace equation u
xx t u yy
uzz
=o,
u = f on S, u is continuous on R* t S, and u is bounded on R" t S . Again (Courant and Hilbert) , it is known that, under rather general restrictions on S , the exterior Dirichlet problem h a s a unique solution.
THREE DIMENSIONAL PROBLEMS
101
Unfortunately, the method of Section 3.6, for transforming a n exterior problem into an interior problem, d o e s not extend, per se, in three dimensions.
With the following simple modification , how-
ever, it will extend. A s in (3.30)-(3.31)
, inversion
with respect t o a unit sphere in
three dimensions is given by
or,equivalently , by (3.44)
X
= x2ty2tz2 Consider now the following theorem (Petrovsky).
Theorem 3.2 Let u ( x , y , z ) be the solution of the exterior Dirichlet problem. Without l o s s of generality, assume that (O,O,O) is in R version, let
R*-*
R
,
S+Si,
and
. Under in-
ELLIPTIC EQUATIONS
102
Define v(4,n,v) and F(E,,n,v)
by
i
i
Then v(c,rl ,v) is the solution of the Dirichlet problem on R t S with boundary function F , that is i = 0 , on R
(a)
vE4 t vnn t v
(b)
i i v ( t , n , v ) is defined and continuous on R t S , and
(c)
v(4,n,v) = F(t,n,v),
vv
i
on S
.
With regard t o solving t h e three dimensional, exterior Dirichlet problem numerically by f i r s t applying a n inversion mapping, Theorem 3 . 2 implies t h a t u , v, f and F are related by
which are , indeed , different i n character from t h e two-dimensional relationships ( 3 . 3 1 ) and ( 3 . 3 2 ) .
3.10
The C l a s s i c a l Problem of Capacity Rather than merely give a trivial illustrative example of t h e
numerical solution of a three dimensional problem, let u s consider
CAPACITY
103
a physical problem which is of long standing interest, which is exceptionally difficult t o solve analytically, and which h a s applications in such diverse a r e a s as electron optics, antenna design, plasma dynamics, and electrostatics, that is, the problem of capacity. In the exterior Dirichlet problem, if one sets f(x,y,z) = 1 au an
and i f
is the outward normal derivative on S of the solution of
the resulting problem, then the capacity C of S is defined by the surface integral
(3.51 1 From, s a y , the electrostatic point of view, t h e capacity C of S is the total charge which, in equilibrium on S , r a i s e s the surface potential t o unity. Unfortunately, for any nonspherical surface, the exact value of C i s , in general, so difficult t o determine that even the capacity of the unit cube h a s become a quantity of great interest.
Mathema-
ticians have approached such problems by means of isoperimetric inequalities, while physicists and engineers have been prone t o apply infinite s e r i e s techniques.
The isoperimetric inequality approach re-
quires special results for each S and yields upper and lower bounds
104
ELLIPTIC EQUATIONS
for C which are rarely sharp.
The infinite series approach usually
requires extensive t a b l e s , which are different for each S, and which may have t o be so voluminous t o attain reasonable accuracy, that the method becomes impractical. We shall show next, then, hcw t o apply our numerical method in a completely general and efficient way to estimate the capacity of
any surface.
The key t o the method lies i n the known result (Greenspan
( 6 ) ) that if u and v are related by 3.49)
, then
C can be given a l s o
bY
c
(3.52)
= v(0
For illustrative purposes, let us show how to calculate the capacity of a unit cube. 1/2,
L e t S be the cube whose vertices are (1/2,
1/2)/ (1/2/ 1/2,-1/2),
( 1 h I -1/2, -1/2,
-1/2),
- l / a l (-1/2,
(V2, -lh, 1/2,
m,(-1/2,
1/21
-m,(-1/2, -m, l / Z ) I
a s shown i n Figure 3.9.
m), (-1/21
Then Sil the map of S under
inversion transformation (3.43) or (3.44) , is a completely symmetrical surface consisting of six partially spherical c a p s , the first octant of which is shown i n Figure 3.10.
(4’
t
n2 t Y’)-~/‘,
With boundary function F(C ,1? ,v ) =
the numerical method of Section 3.9 w a s applied
with grid size h = 0.045 and with
(u
= 1.94 on the UNIVAC 1 1 0 8 t o
yield , in only four minutes , the approximation
105
CAPACITY
C = v(O,O,O) = 0.661.
By means of isoperimetric inequalities the following upper and lower bounds have been obtained after some forty years of research (Polya and Szego, Greenspan (6)) 0.632 < C < 0.6626. For the calculations of the capacities of ellipsoids, l e n s e s
and toroids, see Greenspan (6)
. L
(--.,-a-
1 1 1) 2 2 2
) I (I-1, , '1)
L A -I)
(-L,L,-1)' 2 2
2
2 2
Figure 3.9
2
ELLIPTIC EQUATIONS
106
V
Figure 3.10
3.11
Mildly Nonlinear Problems We return now t o two dimensional problems, but begin the
study of nonlinear equations.
The three prototype problems of t h e
classes of elliptic e q u a t i r n s t o be considered are
MILDLY NONLINEAR PROBLEMS
t u
U
= e
(3.53)
u
(3.54)
u
(3.55)
( l t u )u - 2 u u u Y xx X Y X
xx
107
YY
= t uYY = u
(Radiation equation)
2
(Molecular interaction equation)
2
Y
2 t ( 1 t u )u
x YY
=0
(Soap f i l m equation)
Equations (3.53) and (3.54) are mildly nonlinear and will be studied
in t h i s section. Study of equation (3.55) will have t o be deferred until Chapter 6. Consider then the mildly nonlinear elliptic equation
= t u YY = F(x,Y,u)
(3.56)
u
.
We will assume that
-a F>
(3.57)
au -
0 ,
in order t o be assured that solutions of the Dirichlet problem for (3.56) exist, are unique, and have certain general properties in common with harmonic functions (Courant and Hilbert).
(Note im-
mediately that (3.53) s a t i s f i e s (3.57) but (3.54) does not.)
Method
D now need be modified only by replacing linear difference equation
(3.16) with nonlinear difference equation (3.58)
1 1 -2 [t-]u hlh3 h2h4
h3(hlth3)
0
u
t
3
2 hl(hlth3) u1 t
2 h2(h2th4) 2 '
2 h4(h2th4) u4 = F(x'y'uO)
'
108
ELLIPTIC EQUATIONS
and the resulting numerical method is mathematically respectable.
Example L e t S be the square with vertices (O,O), ( l , O ) , ( l , l ) , ( 0 , l )
On S , set f ( x , y ) = 0.
and let R be its interior. points of
% , a s shown in Figure
For h = 1/3, the
3.11, are numbered 1 , 2, 3, 4.
If the differential equation defined on R is (3.53) , then applica-
%
tion of (3.58) a t each point of
yields the ncnlinear system
U
e '-36u1
t 9u2 U
9ul
-e
=o
t 9u3
2 -36u2
9 u ~
t9u
t 9u3
-e
4
=o
U
4-36u 4 = 0 .
This system can be solved e a s i l y by the generalized Newton's method t o yield the numerical approximation. For more extensive examples, see Greenspan (6). It should be noted a l s o that the method outlined for (3.56) extends, but with several additional assumptions (Bers), t o
MILDLY NONLINEAR PROBLEMS
109
Y 4
Since equation ( 3 . 5 4 ) does not satisfy ( 3 . 5 7 ) , we will devise an alternative method for it.
This new method, incidentally, will
a l s o be applicable t o ( 3 . 5 3 ) , but with less efficiency than the method already devised.
It is important to note, f i r s t , however, that the
Dirichlet problem for ( 3 . 5 4 ) need
not have a
unique solution.
In
order t o consider a problem which does have a unique solution, physical considerations lead t o the requirement that the boundary function f ( x , y ) be non-negative on S.
It follows then (Pohozaev)
that the Dirichlet problem for ( 3 . 5 4 ) h a s a unique nonnegative solution.
Our attention, then will be directed toward solving the Dirichlet
ELLIPTIC EQUATIONS
110
problem for mildly non-linear equation (3.56) subject t o the conditions f ( x , y ) 2 0 on S
(3.59) and
-aF> o
(3.60)
if UL.0.
au -
Such problems have unique non-negative sclutions which can be approximated by discretizing Pohozaev' s analytical method , i n which he first reformulates the problem as a n integral equation and then applies a Banach space form of Newton's method t o solve the resulting integral equation iteratively.
The Pohozaev analytical
iteration formula for (3.56) is FU(x,y,u(n))u(ntl) = F(x, y ,
Au("'~)-
(3.61)
- Fu(x, y ,u (n))u(n)
n = 0,1,..., which, one should observe, represents a sequence of linear elliptic equations in u("').
The precise d e t a i l s of the method are now
given by means of a n illustrative example. Example Let S be the square with vertices (0,O), (1 ,0 ) , (1 ,1) and ( 0 , l ) , and let R be the interior of S.
On S define
I
111
MILDLY NONLINEAR PROBLEMS
f(X,Y)
= 1
and consider t h e Dirichlet problem for AU= U
2
.
For t h i s equation, (3.61) t a k e s the form
- 2u(n)u(nt1) = - [u'n'~ 2 ,
Au (ntl)
(3.62)
n = 0,1 ,2,.
In terms of the point arrangement shown in Figure 3.3
.. .
, a discretized
form of (3.62) is
2
=
For h =
-13'
2 (ntl) h4(h2th4) u4
- [uo(n)32 ,
n = 0,1,2,...
- 2u(n)u(n+l) 0
0
.
(3.63) reduces to
Next, the points of
\
are numbered as i n Figure 3.11.
Now (3.64) c a n be used as a n iterative formula only if U( O )
1
u(O) u(O) and u r ' are given. We choose t h e s e t o be the 2 , 3
112
ELLIPTIC EQUATIONS
numerical solution of the Dirichlet problem for the Laplace equation on R t S with the given f
.
Thus, u (O) u(O), u y ' 1 ' 2
and u(O) are 4
determined by Method D , and, in t h i s case, turn out t o be
(3.65)
N e x t , one applies (3.64) with n = 0 a t each point of €$, t o yield, with the aid of (3.65) , the four equations -38~:') t 9u") t 9u") = 2 3
t 913:)
=
-36~:)
t 9~:)
-38~:)
t 9 u y ) t 9u") = 2
- 19 - 19 - 19 .
(1) (1) (1) (1) The solution of t h i s system by SOR yields u1 , u2 , u3 , u4
.
Knowing t h e s e , one proceeds t o apply (3.54) with n = 1 at each point of
%
t o yield the system
- (36t2ul(1
- (36t2u2(1 - (36t2u3(1 - ( 3 6 t 2 u y ) ) u f ) t 9 t 9 t 9 u y ) t 9 u f ) = - [u4(1)] which, when solved by SOR, yields u1('1
, u(2) , u(2) ,
.
In the
113
MILDLY NONLINEAR PROBLEMS
indicated fashion, t h e iteration ccntinues until, for some value k , one h a s
and the approximate solution is taken t o be u (k)
(k) u(k) u(k) 3 , 4 '
1 au2
It is worth noting, finally, that the above method, based on solving
sequence of linear problems, h a s a firm mathematical b a s i s
(Greenspan ( 3 ) ) , and that t h e technique of studying a nonlinear equation a s a sequence of linear equations c a n be of exceptional value.
114
ELLIPTIC EQUATIONS
Exercises 1.
C l a s s i f y e a c h of t h e following partial differential equations as e l l i p t i c , parabolic, or hyperbolic at the point (0,O).
2.
(a)
uxx t 2u
(b)
u
(c)
u
(d)
u
xx
YY
- 2~YY = 0 - 2uY
=
-
xx
= 0
= 0
- 4 ~t u
(e)
3u
(f)
3uxx
XY
YY
= O
- 4uXY - 5uYY = 0 - 4uXY - 5uYY
t 8ux
- 9uY t 6u = 2 7 e X Y .
Determine, if p o s s i b l e , i n which portions of t h e plane e a c h of the following is e l l i p t i c , parabolic, and hyperbolic.
(a)
yuxx- u
(b)
u
(c) 3.
xx
YY
= 0 2
t XU
t (1 - y ) u Y y = 0 XY
2 ( I - u )u
xxx
- 2uxuy ux y t ( 1 - u Y2)uYY - 8ux = e
U
Let S b e t h e square whose vertices are (1/2, l / Z ) ,
(-1/2, -1/2) and (1/2, -1/2)
. (-1/2,1/2),
and let R b e t h e interior of S.
Show t h a t e a c h of t h e following functions is continuous on R t S , harmonic on R , and t a k e s on its maximum and minimum
values on S.
(a)
u = 5
(b)
u = 4y
(d)
2 2 u = x - y
(e)
u=
-7
y1 xy 2 --x3 6
(c) u = 7x (f)
=
- 4y - 2
xv3 - X3Y 6
e
EXERCISES
4.
115
Repeat Exercise 3 but let S be the unit c i r c l e , whose equation 2
2
is x t y = 1. 5.
With h = 2 and
(G,y ) =
(0,O), find t h e numerical solution of
the Dirichlet problem for which f ( x , y ) = x - 2y and S is t h e triangle whose vertices a r e ( O , O ) , ( 7 , O ) and (0,7). 6.
With h = 2 and
(2,y ) =
(0,O), find t h e numerical solution of
the Dirichlet problem for which f ( x , y ) = x
2
- y2
and S is the
rectangle whose vertices a r e (0,O), (5,O), ( 5 , 4 ) , (0,4).
7.
With h = 1/2 and
(G,!)
= ( O , O ) , find the numerical solution
of the Dirichlet problem for which f(x, y) = x2
-y
and S is
the circle of unit radius whose center is (1,l).
8.
L e t S b e t h e square whose vertices are ( l , l ) , ( 2 , 1 ) , ( 2 , 2 ) , ( 1 , 2 ) and let R be t h e interior of S.
Let f ( x , y ) = x - y3 on
S and consider t h e resulting Dirichlet prcjblem.
By a change
of variables, transform t h e problem into one in which the origin lies interior t o t h e region of interest.
9.
In e a c h of t h e following, transform the associated exterior Dirichlet problem into a n equivalent interior problem. 2
2
(a) S is t h e circle whose e q u a t i m is x t y = 1, f ( x , y ) = 1 2
2
(b) S is t h e circle whose equation is (x-2) t y = 1, f(x,y) = xy
2
ELLIPTIC EQUATIONS
116 2
2
(c) S is the ellipse whose equation is x t 4y = 1, f ( x , y ) = x t y (d) S is the square whose vertices are (1/2,1/2),
2
(1/2,-1/2),
(e) S is the rectangle whose vertices are (-1,-1), ( 4 , - 1 ) , (-1,6) (4,6); f ( x , y ) = s i n ( x t y ) .
10.
Solve exterior problem 9(d) numerically and compare your results ,2 y 2 with those of the exact solution = (x2+y2)2 *
11.
Prove that if (a) h l h i > 0 , i = 1 , 2 , 3 , 4 ,
-
FsO, (c) max[ ID1 /A,
12.
(b) A > 0, C > 0,
IEl / C ] c 2/h, then
If S is the unit cube whose vertices are (O,O,O), (1, O , O ) , (O,l,O),
(O,O,l), ( l , l , O ) , ( l , O , l ) ,
~ 0 , 1 , 1 ~( l, , l , l ) , and
if f ( x , y , z ) = x y t z 2 on S, then find the numerical solution
---
of the resulting Dirichlet problem using (x,y,z)= (O,O,O) and h = 2/5 13.
.
Find a relationship between the capacity and the radius of a n arbitrary sphere.
14.
Find the capacity of the ellipsoid whose equation is 2
9 t <
tz2=1.
EXERCISES
15.
117
Let S b e t h e unit square whose v e r t i c e s a r e (1/2,1/2), (1/2,-1/2), (-1/2,1/2),
(-1/2,-1/2),
let R b e t h e interior
Gf
S , and let
f ( x , y ) = 1 on S. For h = 1/3, find a numerical sclution of t h e resulting Dirichlet problem f o r e a c h of t h e following elliptic equations.
16.
U
(a)
Au = e
(b)
AU = u
(c)
AU =
LI
(d)
AU =
LI
2 3 4
.
Consider approximating (3.37) by t h e forward-backward scheme of Section 2 . 8 . D i s c u s s t h e advantages and disadvantages of such a technique.
CHAPTER IV NUMERICAL SOLUTION OF PARABOLIC DIFFERENTIAL EQUATIONS
Introduction
4.1
The prototype parabolic differential equation is the heat equation
u
xx
and we will examine it first. represents
time in the
= u
Y f
Because, physically, the variable y
problems t o be studied, we will set y = t and
examine the heat equation in its more customary form (4.1)
uxx
=
Ut
.
Two kinds of problems are of fundamental interest both mathematically and physically with regard t o (4.1).
These are the initial
value problem and the initial-boundary problem, which are defined a s follows.
In a n initial value problem for (4.1)
, one is given a func-
tion f(x) which is continuous for a l l values of x and one is asked t o find a function u(x, t) which is ( a ) defined and continuous for -Q)
<x<
m,
0 5 t ; (b) satisfies (4. 1 ) for
-m
<x<
m,
0 < t; and
(c) satisfies the initial condition u(x, 0) = f(x) at time t = 0 for
-
m
<x<
m.
In a n initial-boundary problem , one is given a constant
a > 0 and three continuous functions g (t), t 2 0; g 2 ( t ) , t 2 0; f(x), 1 118
INTRODUCTION
119
0 5 x 5 a , and one is asked t o find a f u n c t i m u ( x , t ) which is:
( a ) defined and continuous for t 1 0 , 0 5 x 5 a; (b) satisfies (4. 1 ) on 0 < x < a , t > 0; and (c) satisfies the initial and boundary conditions
u(x,O) = f ( x ) , O i x i a (4.2)
u(O,t) = g 1( t ) , t 1 0
(initial condition)
(boundary conditions).
u(a,t) = g2(t), t ? 0
A s shcwn in Figure 4.1, initial value problems are defined on a halfplane, while, a s shown in Figure 4.2, initial-boundary problems are defined on a semi-infinite strip.
t
Figure 4.1
PARABOLIC EQUATIONS
120
t
Figure 4.2
The solution of an initial value problem c a n be given by means of the Fourier integral, while that of an initial-boundary problem c a n be given in terms of Fourier s e r i e s ( s e e , e.g. ( Z ) , Petrovsky).
, Friedman,
Greenspan
However, because the methods for generating such
soluticns do not extend t o nonlinear problems, and because analytical solutions so given are not e a s i l y evaluated at particular points of interest, we turn next t o numerical methods.
For clarity we will con-
centrate on initial-boundary problems , though most of t h e i d e a s extend to the initial value problem also.
STABILITY 4.2
121
Stability Because, i n the initial-boundary problem, t can vary i n the
unbounded range 0 5 t <
m,
it is necessary t o study the possible
instability of any numerical method t o be devised.
It is a l s o of
interest t o note that one wishes t o allow great flexibility in the choice of grid s i z e A t , fcr in f a s t reaction type problems, like those related, for example, t o the release of nuclear energy, it is often necessary to choose A t relatively small i n order t o generate a physically meaningful numerical soluticn.
On the other hand, for slow reaction type
problems , like those related, for example , t o radioactive decay, technological and economic limitations require, a t present , the choice of a relatively large A t .
To allow for such possibilities, let us be-
gin in a flexible way by choosing grid s i z e s A x = h and A t = k which are not necessarily equal in magnitude.
The grid s i z e h is
determined by subdividing 0 1.x 1.a into n equal parts in the usual way.
If R is the set of points (x,t) whose ccordinates satisfy
0 < x < a , t > 0 , and if S is the boundary of R, then a choice of
h and k results in a rectangular set of grid pcints whose interior points
%
are shown a s crossed i n Figure 4.3
points Sh are shown as circled i n Figure 4.3.
and whose boundary Thcse g d d points
lie on the line whose equation is y = mk are called the mth grid points.
row of
PARABOLIC EQUATIONS
122
F i g u r e 4.3
F i g u r e 4.4
STABILITY
123
For the point arrangement shown i n Figure 4.4, consider, from (2.4) and (2.9) , the approximations
substitution of which into (4.1) yields the approximation u(x-h,t) (4.3)
- 2u(x,t) t u ( x t h , t ) h2
-- u ( x , t t k )
- u(x,tl
k
,
or , equivalently , u(x,ttk) = u(x,t) t
(4.3')
[u(xth,t) h2
In (4.3')
- Zu(x,t)
t u(x-h,t)].
, setting
x = -k
(4.4)
h2
yields finally (4.5)
u ( x , t t k ) = Xu(xth,t) t ( l - W ) u ( x , t ) t Xu(x-h,t)
,
which , in the numbering of Figure 4.4 c a n be written i n subscript notation a s (4.6)
u = 2
XUl
t (1- 2X)uo t xu
3'
A simple numerical method for approximating a solution of
initial-boundary problem (4.1)-(4.2) c a n be formulated now as follows, Fix h and k and construct
%
and Sh.
Apply (4.5), or
124
PARABOLIC EQUATIONS
(4.6), t o approximate u explicitly at each point of the first r o w of
%
using the known values of u given in (4.2).
Using (4.2) and
the numerical results generated for row 1 , approximate u explicitly a t each point of the second row of
%
by means of (4.5), or (4.6).
Continue in the indicated fashion t o approximate u explicitly a t each grid point of row k t 1 , k = 2 , 3 , .
..,
by applying (4.5), or (4.6), and
by making u s e of (4.2) and t h e numerical approximation generated on row k.
Example Consider the initial-boundary problem defined by (4.1) , a = 1, and u(0,t) = g l ( t ) = 0 u(x,O) = f(x) = x , 0 1.x 1. 1 u ( 1 , t ) = g (t) = 1 2
, 1 For h = k = -, construct 3
a s shown diagramatically in Figure 4.5.
%
and Sh, and number the points of
%
a s shown i n Figure 4.6.
Note finally that (4.5) and (4.6) can be written, respectively, as (4.5')
1 u ( x , t t-) = 3u(x+$,t) 3
(4.6')
u = 3u 2 1
- 5u(x,t) t 3u(x--3'1 t)
- 5u0 t 3u3 .
STABILITY
125
t
u(0,t) = 0
u(1,t) = 1
uxx = Ut
- x 0
u(x,O) = x
1
Figure 4.5 t
t
1
0 Figure 4.6
X
PARABOLIC EQUATIONS
126
Rounding a l l numbers t o one decimal place, one h a s , by applying (4.5'), or (4.6'), successively a t the points numbered 1-11 i n Figure 4.6, that 2 u = 3~(;,0) 1 u2
u
3
- 5 ~ (31- , 0 ) t 3 ~ ( 0 , 0 =) 3(0.7) - 5(0.3) t 3'0
-
1 - 3 ~ ( 1 , 0 ) 5 ~ (2- , 0 ) t 3U(-,O) = 3.1
-
= 3~ 2
- 5ul
3
3
1 3
t 3 ~ ( 0 , - )=
- 5(0.7)
= 0.6
t 3(0.3) = 0.4
- 1.8
-
1 u = 3 u ( l , 7 ) 5uZ t 3~ = 2.8 4 1
u - 3~ 54
- 5u3 t 3 ~ ( 0 32, - )= 17.4
- 5~4 t 3~3 = - 16.4 u = 3~ - 5~ t 3u(0,1) = - 136.2 7 6 5 2 u6 = 3 u ( l , - ) 3
u8= 3u(l,l)
- 5u6 t 3~5 = 137.2
4 u = 3Ug- 5u t 3 ~ ( 0 , 3 =) 1092.6 9 7 4 ul0 = 3 u ( l , - ) 3 ull = 3ulO
- 5u8 t 3~7 = - 1091.6
- 5u9
5 3
t 3 ~ ( 0 , - )=
- 8737.8
from which one suspects the development of instability, which must be studied now in some detail.
To begin with, it is important t o know t h a t , like harmonic functions, solutions of the heat equation p o s s e s s the max-min pro-
STABILITY
127
perty (Friedman). Any numerical solution which a l s o p o s s e s s e s t h i s property will be called physically reasonable. With this in mind, we define a numerical solution of a n initial-boundary problem for (4.5) , with continuous boundary d a t a , t o be stable i f and only if it is physically reasonable.
To develop a stability condition for (4.5)
, consider
the fol-
lowing intuitive argument. For a given initial-boundary problem , let
A x = a/2, A t = k, so that the points Figure 4.7.
a A t the point (-, 0), set u = 2
of Sh set u = 0. 1, 2 , 3 , . . .
of F$
and Sh are a s shown i n E
> 0. A t the remaining points
Then, application of (4.5) a t the points numbered yields
Now, to have stability,
since
from - t h e . max-min property that for
Thus ,
%
0
<
u IE
m = 1 ,2 ,3
on I
.. . ,
Sh' it follows
PARABOLIC EQUATIONS
128
L
U = E
a
F i g u r e 4.7
But, from (4.4), (4. 1 2 )
h > 0 , so that the stability condition becomes
o < x 5 -12 .
That (4.12) is i n fact the usual stability condition for (4.5) when the given analytical problem h a s a bounded solution h a s been established rigorously elsewhere (see, e.g., Wasow).
Collatz (1) Douglas, Forsythe and
METHOD I 4.3
- EXPLICIT
129
An Explicit Numerical Method From the discussion in Section 4.2, one c a n now formulate a s
an algorithm the following method for approximating t h e solution of initial-boundary value problem (4.1)-(4.2). Method I
- Explicit
Step 1
%
Fix Ax = h , A t = k , so t h a t h = 7 5 h 2 '
and Sh and number t h e points of
Step 2
Rh'
Apply (4.5) t o approximate u explicitly with the aid
of (4.2) at e a c h point of the first row of Step 3
Construct
Rh'
Using (4.2) and t h e numerical results generated on
row k , k 2 1 , approximate u explicitly at each point of row k t 1, k = 1,2,..., Step 4
by means of (4.5).
Terminate t h e computation when so desired.
Method I h a s a firm mathematical b a s i s (Forsythe and Wasow), but suffers from a low order of accuracy and relatively severe stability restrictions.
It is , however, conceptually and structurally simple.
If one wishes t o achieve greater accuracy for a given h , or eliminate the stability condition, then one c a n do either, but at t h e expense of having t o d o more work.
This l e a d s naturally t o the so-called
implicit methods, which will b e d i s c u s s e d next.
PARABOLIC EQUATIONS
130
4.4
An Implicit Numerical Method Suppose first that one wishes t o construct a method which is
stable f o r g h and k
. Such a method may be desirable, for ex-
ample, i f one h a s t o calculate for very long periods of t i m e .
If, s a y ,
one wishes t o have a numerical approximation a t t = 100 and one h a s t o choose h =
, then (4.12) implies that one must choose 100
A t = k t o satisfy
k5 1 2
2 (l) = 0.00005 100
.
To generate a numerical solution a t t = 100 would therefore require, using Method I , computation on a minimum of two million rows of points of
Rh'
Interestingly enough (Ames; Forsythe and Wasow) , condition (4.12) c a n be eliminated simply by replacing the point pattern shown
in Figure
4.4 by the one shown
i n Figure
4.8,
or, more precisely, by
Figure 4.8
METHOD I1
- IMPLICIT
131
replacing (4.3) with
It follows that (4.13) can be written equivalently a s
(4.14)
Xu(x-h,t)
- (1+2X)u(x,t) t X u ( x t h , t ) = -u(x,t-k),
where X is defined by (4.4). Using the numbering of Figure 4.8, (4.14) c a n be written in subscript notation a s Xu3
(4.15)
- (1t 2X)uo t xu1 = -u 4 ' X I let u s
Though the resulting computation will be stable for
show in an illustrative example that the additional work entailed is that of solving a tridiagonal, diagonally dominant system of linear algebraic equations for each row of grid points of
%'
Example Consider the initial-boundary problem (4. l ) , (4.7)-(4.9). 1 For h = -, k, = 1 , construct
€$ and
%
Since h = 25, application of (4.14) a t
5
a s shown in Figure 4.9.
S and number the points of h'
the points 1 , 2, 3 , 4 i n Figure 4.9 yields
PARABOLIC EQUATIONS
132
25~(0,1)
1 5 1 ~ t 25u2 = - u ( ~ , 0 ) 1
25ul
51u2 t 25u3 =
-u(y,O) 2
2
-
5111 t 25u = 3 4
3 -u(y,O)
25u3
-
4 51u4 t 25u(l,l) = -u(x,O) ,
25u
t
5 k
1
Figure 4.9
k
-
h
h
-X
or, equivalently,
(4.16)
i
- 5 1 ~t ~ 2 5 ~ 2
-
-
- -51
-
-
- -2
25ul
51u2 t 25u3 25u2
-
5 3 51u3 t 25u4 = - 5 2 5 ~ 3
-
-
511-1 - - 4 - 2 5 . 4 5
METHOD I1
- IMPLICIT
133
The solution of system (4.16)
, found readily by the
method of Section
1.4, is given approximately by
u = 0.029, 1
u = 0.059,
u2 = 0.052,
3
u = 0.045. 4
On the second row, the system generated by application of (4.14) at the points 5 , 6 , 7 , 8 is
-
25~(0,2)
51u5 t 25u6
=
-
=
- 0.029 - 0.052
t 25ug =
- 0.059
-
- 0.045
25u5
5 1 ~t 2 5 ~ 6 7 25u6
-
51u 25u
7 7
51ug =
,
the solution of which yields the numerical solution on the second
row.
The method continues in the indicated fashion. The method illustrated above is called a n implicit method be-
cause the numerical solution a t each point of a given row is generated implicitly i n the form of a tridiagonal system, which must then be solved t o yield explicitly the approximation a t each such point.
The
method can be described i n general by means of the following algorithm. Method I1 - Implicit Step 1
Fix A x = h, A t = k, construct
number the points of
%'
%
and Sh, and
PARABOLIC EQUATIONS
134
Step 2
Apply (4.14) a t each point of the first row of
Rh
and, with the aid of (4.2), generate a tridiagonal system of linear algebraic equations. Step 3
Solve the system generated by Step 2 t o yield,
explicitly, the numerical solution on the first row of Step 4
Apply (4.14) a t each point of row m of
Rh
Rh' and ,
with the aid of (4.2) and the numerical results of row m
m = 2, 3
,...
-1
I
generate and solve a tridiagonal system of
I
linear algebraic equations. Step 5
4.5
Terminate the calculations of Step 4 a s desired.
The Crank-Nicolson Method Since Method I1 h a s eliminated the stability restrictions of
Method I , the next problem is t o improve a l s o on the accuracy of
For t h i s purpose, note that the u s e of symmetry
the approximation.
in the construction of difference equations c a n lead t o better accuracy in the limited sense that the truncation error is of a higher order of magnitude than when symmetry is not used.
Thus , for example , the
error in approximation (2.4) is O(h) while that of (2.6), which u s e s 2
symmetry, is O(h ).
With t h i s notion a s a n intuitive guide, we
can modify Method I1 t o yield greater accuracy in the following simple way.
In place of the point pattern shown i n Figure 4.8
, consider t h e
CRANK-NICOLSON METHOD
135
expanded point pattern shown in Figure 4.10.
The center of symmetry
of the six points shown there is the point (x, t
A and is
a grid point.
- :),
which is labeled
If one w i s h e s , now, t o develop formulas
symmetrically about A , then note first that
(4.17) does u s e points symmetrically located about A.
and
ax'=I4 it is reasonable t o set 2 a u -
8x2 that is
Using (4.17)and (4.18) in (4.1) yields
h'=
Further, since
PARABOLIC EQUATIONS
136
(4.19)
or, equivalently, (4.20)
Xu(x-h,t)-Z(ltX)U(x,t) t X u ( x t h , t ) = -Xu(x-h,t-k)
- 2(1-X)u(x,t-k) -Xu(xth,t-k)
.
Using the numbering of Figure 4. 10, one c a n write (4.20) in subscript notation a s (4.2 1 )
Xug
- 2(1tX)uo +Xu1 -- -Xu7 - 2(1-X)u4 -Xug.
Formulas (4.20) and (4.21) are called the Crank-Nicolson formulas and, when these are used i n Method I1 i n place of (4.14) or (4.15) they do lead t o a n implicit method which is stable for a l l X and which has greater accuracy than Method 11. Thus,Method I11 is given a s follows.
CRANK-NICOLSON METHOD
I37
- Crank-Nicolson
Method I11
Implicit
The algorithm is that of Method I1 with t h e exception that (4.20) replaces (4.14).
Example Consider the initial-boundary problem (4.1)
,
(4.7)-(4.9).
h = -, k = 1 , construct 5
%
a s shown i n Figure 4.9,
Since X = 25, (4.20) h a s the form
1
and Sh and number the points of
For
%
2 5 u ( ~ - h , t )- 52u(x,t) t 2 5 u ( x t h l t )
(4.22)
-
= - Z ~ U ( X - h , t k) + ~ B u ( x , t - k )
- 25u(x t h , t - k ) .
If (x,t) is taken, consecutively to be the points numbered 1 , 2, 3, 4 i n Figure 4.9
-5
, then
2 5 ~ ( 0 , 1 ) 52u 25u
1
25u2 25u3
1
(4.22) yields t h e tridiagonal linear system
t2 5 ~ 2
=
2 ~t 25u3 2
=
- 521.13 t 25u4
=
1 2 - 2 5 ~ ( 0 , 0t) 4 (y, 0) - 2 5 ~ ( ? , 0 ) - 2 5 ~ (51- , 0 ) t 4 8 ~2( 50), - 2 5 ~3 (0)~ , 3 - 2 5 ~ 2( 7 , 0 t) 48u(y,O) - 2 5 ~4 (0)~ ,
- 52u4 t 2 5 u ( l , 1) = - 2 5 ~ (35- , 0 ) t 4 8 ~ (4? , 0 )- 25u(l,O) ,
or, more simply,
-
( - 5 2 ~ ~t 25u2
25ul (4.23)
-
-
52u2 t 2 5 ~ 3 25u2
1
-
-
-
5 2 ~t 2 5 ~= 3 4 25u3
-
- 5-2 - 5-4 - -65
.
3 52u4 = - 2 6 ~
138
PARABOLIC EQUATIONS
One now solves system (4.23) for u1 I u2, u3 u4 and continues t o row 2 I after which one continues t o row 3 and sc on. From the practical point of view, many numerical analysts consider the Crank-Nicolson method t o be the m c s t desirable of Methods 1-111.
4.6
Mildly Nonlinear Problems Methods 1-111 extend in a natural way t o mildly ncnlinear prob-
lems defined by (4.2) and u
(4.24)
= u t f(x,t,u)
x x t
.
To assure that solutions of (4.24) have a general max-min property and other important properties, we assume that If1 is bounded and
fuL 0.
(4.25)
The only modifications necessary in Methods 1-111 when (4.24) replaces (4.1) are that the difference equations used must be modified appropriately.
(4.26)
For Method I , one need only replace (4.5) with
u ( x , t t k ) = Xu(xth,t) t (l-BX)u(x,t) tXu(x-h,t) - k f ( x , t , u ( x , t ) ) .
For Method 11, one need only replace (4.14) with (4.27)
Xu(x-h,t)
- (1t2X)u(xIt)t X u ( x t h , t ) = -u(x,t-k)
tkf(~,t-k,~(~,t~k)
MILDLY NONLINEAR PROBLEMS
139
For Method 111, i n which symmetry w a s b a s i c , one c a n u s e either of the approximations (4.28)
f -f
(4.29)
f -f
1
2
= [f(x,t,u(x,t)) t f ( ~ , t - k , ~ ( ~ , t - k ) ] / 2
tt(t-k) u(x,t) t u(x,t-k) ) 2 , 2
= f(x,
.
Thus, Method I11 need b e modified only by replacing (4.20) with Xu(x-h,t)
(4.30)
- Z(ltX)u(x,t) t X ~ ( ~ t h , t ) - h ,t - k ) - 2(1- X ) U ( X , t - k) - XU(X t h , t - k)
= -XU(X
tkf where i = 1 or 2 and f
1'
i '
f
2
are given by (4.28) and (4.29).
With regard to stability, Methods I1 and I11 continue t o be stable, i n a specialized s e n s e , for all X , but Method I is s t a b l e only for sufficiently small X (Ames). From t h e point of view of a c t u a l computation, (4.26) is a s simple a s (4.5), and (4.27) is a s simple a s (4.14).
Indeed, one c a n
see from (4.27) t h a t t h e resulting system will be tridiagonal and will have t h e same coefficient matrix a s (4.14). a s simple a s (4.20)
, for
However, (4.30) is not
(4.20) y i e l d s a tridiagonal linear system,
while (4.30) yields a nonlinear system.
However, t h e generalized
Newton's method c a n be applied t o t h i s system b e c a u s e of assumption (4.25).
From t h e point of view of complexity, i n general, (4.29) is
140
PARABOLIC EQUATIONS
more cumbersome than (4.28)
, so that
(4.28) is often preferred.
l a s t point c a n be s e e n e a s i l y by comparing f
1
This
and f 2 in the simple
c a s e f = u5, for, i n the numbering of Figure 4.10, 1 2
fl = - ( u
5 5 t u ) 0 4
,
while f2 =
4.7
1 5 4 3 2 2 3 4 5 32 [uo t 5u0u4 t 1ouou4 t 1ou0u 4 t 5u 0u 4 t u 4 ] .
A Boundary Value Technique
Methods 1-111 appear, a t present, t o be completely adequate for approximating solutions of mildly nonlinear problems. called a n initial value , or step-ahead
Each is
, technique , because results
on one row are used t o generate results on the next row in a recursive fashion.
Inherent in such techniques is a n accumulation of the
effects of roundoff and truncation, a s one proceeds from row t o row. Because the structure and capabilities of future computers is difficult, a t present, t o predict , and because highly nonlinear prob-
lems are not uniformly accessible by any method, we will develop i n t h i s final section a boundary value technique for parabolic prob-
l e m s which does not suffer from the row-to-row error accumulation of initial value techniques.
The fundamental idea is t o determine,
a priori, the nature of u a s t
4 0 3 ,
assume these data on a row
BOUNDARY VALUE TECHNIQUE
t = T,
141
and then solve the resulting boundary value problem on the
truncated region
g:
0 5 x 5 a , 0 5 t 5 T , shown in Figure 4.11.
The
method proceeds then a s follows.
t
92
- x
a
f Figure 4.11
First , let u s construct a difference analogue of the differential ope rat or u
xx
-u
t'
Let ( x , t ) , ( x t h , t ) , ( x , t t k ) , ( x - h , t ) , ( x , t - k ) be numbered 0 , 1 , 2 . 3 . 4 . a s shown in Fiaure 4 - 1 2 . and set
(4.31)
(uxX-ut)lo
= a u t a u t a u t a u t a u 0 0 1 1 2 2 3 3 4 4'
142
2
,t 1
(x-!
41
(X,t+k)
h Y t )
3
(X+hYt)
7
0
4 " (xyt-k)
Figure 4.12
Substitution of finite Taylor e x p a n s i o n s about (x,t) i n t o ( 4 . 3 1 ) y i e l d s , after recombination of terms,
t u t ( k a 2 - k a 4 ) t u x x ( - ah2 + -h2 a 2 1 2
3
2 + k2 -2a )4 t O ( a i h 3 ) t O ( a l k 3 ) . + u ( k- a t t 2 2
Setting corresponding c o e f f i c i e n t s e q u a l implies a.
t
al t a 2 t a 3 t a
- 0 4 -
a
-
1
a a
- a
2
t a
1
a2
= o
a3
3
- _ 14 k 2 - - h2
t a4 = 0 ,
143
BOUNDARY VALUE TECHNIQUE the solution of which is
Hence, it is reasonable t o take the approximation
Note that (4.32) a l s o results e a s i l y if one substitutes central differences for u
xx
and u into u t xx
- ut o
Next, assume that a given parabolic equation of the type
-
ux x u t =
(4.33)
f(X,t,U,U
X
)
,
subject t o initial-boundary conditions (4.2) , h a s a solution a t t =
m,
that i s , a steady s t a t e solution, which is determined by the ordinary boundary value problem
(4.34)
u(0) = a , u ( a ) = B
(4.35)
,
where
(4.36)
l i m gl(t) = a , t.+w
l i m g (t) = B t+m
2
.
Then the algorithm for the approximate solution of the initial-boundary value problem defined by (4.2) and (4.33) can be given a s follows.
144
PARABOLIC EQUATIONS
Method IV
- Boundary Value Technique
Step 1
Divide 0 5 x 1.a into n equal parts, each of length
a Ax=;=h,
b y t h e points O = x < x < x < * - - < x = a . 0 1 2 n
Find either the exact solution, or by the method of Section 2.8, a n approximate solution of boundary value problem (4.34)(4.36).
Denote t h i s solution by
u ( x i , ~ ) , i = 0, 1 ,
(4.37)
Step 2
...,
Fix T > 0 and define
n.
as the rectangle with
vertices (O,O), (a,O), ( a , T ) , ( 0 , T ) and
a s its interior.
Divide 0 5 t 5 T into m equal parts, each of length
T h2 A t = - = k > - ( t h i s condition will be discussed l a t e r ) , m 2 and construct
fin
-
and Sh.
Number the points of
%
as
in Method D for elliptic problems. Step 3 (4.38)
Define u(x ,T) by i u(x T) = u(x ,a),i = l12,...,n-l i' i
I
so t h a t , from (4.2) and (4.38), u is now defined on a l l
-
of Sh. Step 4
A t each point of
Eh,
a s shown in Figure 4.12
I
write down, in order, the equation which results by applying
145
BOUNDARY VALUE TECHNIQUE 1 1 1 2 u(x,t) t -u(xth,t) - z U ( X , t t k ) t T u ( x - h , t ) -2 h h2 h
(4.39)
1
t-u(X,t-k) 2k
=
f(X,t,U(X,t),
-
u ( x t h , t ) u(x-h,tl 1, 2h
inserting t h e known boundary v a l u e s whenever possible. Step 5
Solve t h e system generated in Step 4 , by, s a y , t h e
generalized Newton’s method, to yield t h e numerical solution on
91.
Example 1 For a = 1 , consider t h e initial-boundary problem defined by - u =xu t x’
0 5 x 5 1
(4.40)
u
(4.41)
u ( 0 , t ) = g 1(t) = 0
(4.42)
u(x,O) = f(x)= x ,
0 5 x 5 1
(4.43
u(1,t) = g2(t) = e+,
tL
xx
,
tL0
o
.
The steady state form of (4.40) is (4.44)
du d ‘u & = 2 ‘X -
0,
dx
while a and B, defined i n (4.36), a r e , from (4.41) and (4.43), zero. (4.45)
Thus, the boundary conditions for (4.44) are u(0) = u(1) = 0
PARABOLIC EQUATIONS
146
1
Next set h = -, s o that 0 5 x 5 1 is divided into three equal 3 1 2 parts by the points x = 0 , x = - x = -, x = 1. Since the ana0
1
3
'
2
3
3
lytical solution of (4.44)-(4.45) is u(x) = 0 , we simply set
If the analytical solution of (4.44)-(4.45) were not known, then a n approximate solution would have been constructed by the method of Section 2.8.
-
-31 , so that \
Now, let T = 2 and k =
-
shown in Figure 4.13.
-
and Sh are a s
On Sh, one h a s , from (4.38), (4.41)-(4.43)
and (4.46),
5 u ( 0 , 2 ) = 0 , u(O,-) 3
4
= 0 , u(0,-)3 = 0 , u ( 0 , l ) = 0 , 1 3
2 3
u(0,-) = 0 , u(O,-) = 0 1 3
U(0,O) = 0 , u(-,O) = (4.47)
~(1,:)
t
U(,,Z) 2
1 2 2 7, U ( 7 , O ) = 7, U ( 1 , O )
--
--
2 1 1 = e 3 , ~(1,;) 2 = e 3
= 0 , u(-,2) 1 = 0 3
= 1,
BOUNDARY VALUE TECHNIQUE
Figure 4.13
147
PARABOLIC EQUATIONS
148
Approximation (4.39)
3 t -u(x,t 2
a s applied t o (4.40)
t a k e s the form
1 3x 1 1 - 3) = y [u(x t 5,t) - u(x - 7
I
t) ] I
or, equivalently i n the numbering of Figure 4.12 I
(4.49)
1 X 1 X -2u0 t (1 --)u - - u t (1 t - ) u t - u - 0. 6 3 6 46 1 6 2
Application of (4.49) a t each point of
%, with the known values
(4.47) inserted, yields the diagonally dominant linear algebraic system: 17
t - 18 u 2
2
- -l6 U4 +-u109
3
17 t-u - -1 u t -1u 1 8 4 6 5 6 1
-2u -2u
- -16 u 3 = - 1 18
1
-2u
- - -8 e-1/3 - 1.
1 -
9
9
=o
- al U + l9o u3 + -16u 2 -- - -98 .-2/3 17 -2u5 t -18 - u7 a1 u3 = 0 10 1 '2U6 - a l u t-u t-u - - -98 e-l 9 5 6 4 -2u4
U6
(4.50)
-2u
7
t
1 17 l u t-u t-u 1 8 8'; 9 6 5 = O
1 10 1 8 -4/3 -2u8-~ul0t-u t-u =--e 9 7 6 6 9 -2u -2u
9
17 1 t-u t-u 1 8 10 6 7
10
=o
10 1 8 -5/3 =--e t-u t-u 9 9 6 8 9
BOUNDARY VALUE TECHNIQUE
149
whose solution, when found by the generalized Newton's method, agreed with t h e analytical solution u = xe-t of (4.40)-(4.43)
t o at
least two, but usually more, decimal places. Before continuing t o the next example, note that in Example 1 , the particular choice of h,k and T resulted i n diagonal dominance of (4.50).
If one must choose T relatively large, then the condition
h2 k > - of Step 2, Method IV, would imply 2
-
(4.51)
h2
> -1
2k'
But, if (4.33) is linear, (4.39) would always yield a linear algebraic system which is, a t l e a s t , mildly diagonally dominant, independently In (4.50), the choice T = 2 actually resulted in
of the choice of T. diagonal dominance.
Example 2
For a = 1 , consider the initial-boundary problem defined by (4.41)-(4.43) and the non-homogeneous, nonlinear Burger's equation u
(4.52)
= u tuu
x x t
x
txe
-t
(1-e
-t
).
Proceeding a s i n Example 1 , but with h = k = - T = 10, a n d w i t h 10 ' the difference approximation (4.53)
-2u
t u
--210 u 2 + u 3 + c1u 4 = ~ U1 O ( U 1 - u 3 ) t [ x-te(1-e-t )]/loo
PARABOLIC EQUATIONS
150
E s u l t e d i n a nonlinear system of 891 algebraic equations which w a s solved on the UNIVAC 1108 in 8 seconds by the generalized Newton'! method with
(u
= 1.3
and with a zero initial vector.
solution agreed with u = xe
-t
The numerical
, the exact solution of the problem, t o
a t l e a s t five decimal places and, on the average, t o seven. For the mathematical theory which supports the viability of
Method IV, see Carasso and Parter.
EXERCISES
151
Exercise s 1.
Given the initial-boundary problem for u
= u
x x t
g (t)= 0 , g (t)= 1 , and f(x) = x 1 2
L
with a = 1 ,
, find the numerical
solution
by Method I on rows 1-10 for each of the following choices. (a)
h = 1/4,
k = 1/10
(b)
h = 1/4,
k = 1/20
(c)
h = 1/4,
k = 1/40
(d)
h = 1/4,
k = 1/80
.
Which of the above calculations are s t a b l e ? Which will lead, eventually, t o overflow? Which p o s s e s s the max-min property? 2.
For the initial-boundary problem given i n Exercise 1 , solve on rows 1 and 2 by Method I1 with h = 1/5, k = 1.
3.
For the initial-boundary problem given in Exercise 1 , solve on rows 1 and 2 by Method I11 with h = 1/55, k = 1.
4.
By the appropriate modification of each of Methods 1-111, and by Method IV, find numerical solutions a t t = 3 for the initial-boundary problem defined by
u
-t - u = x e (t-1),
x x t
O < x < 1, t > O
f(x) = 0 , 0 1.x 5 1
Compare your answers with the exact solution u = xte
-t
.
PARABOLIC EQUATIONS
152
5.
By the appropriate modification of each of Methods 1-111, and by Method IV, find numerical solutions a t t = 3 for the initial-boundary problem defined by u
- U
x x t
=arctanu, O<x O
f(x) = x, 0 5 x 5 1 g (t) = 0 ,
1
g2(t) = e
-t
,
t l 0
.
CHAPTER V NUMERICAL SOLUTION OF THE WAVE EQUATION
5.1
Introduction One can study the wave equation profitably either a s a second
order partial differential equation or a s a n equivalent system of two first order equations.
In t h i s chapter we will study it directly as a
second order equation i n the same spirit a s that of Chapters I11 and
IV. In Chapter VII, i n connection with g a s dynamical problems, we will study general hyperbolic systems, and that discussion will apply, i n particular, t o the systems approach to the wave equation. Since , physically, the variable y will represent t i m e , we will study the wave equation i n its more customary form u
(5.1)
xx
-u
-0.
tt -
Two kinds of problems are of fundamental interest both mathematically and physically with regard t o (5.1);
These are the Cauchy problem
and the initial-boundary problem, which are defined precisely a s follows.
A Cauchy problem for (5.1) is a n initial value problem i n
which one must find a function u(x,t) which is defined and continuous for - m < x <
00,
0 5 t; which s a t i s f i e s (5.1) for
and which satisfies the initial conditions
153
-m
<x<
m,
0 < t;
HYPERBOLIC EQUATIONS
154
(5.2)
u(x,O) =
(5.3)
ut(x,O) =
where f
1
and f
2
fl(X)'
f2(X),
-
-
03
< x <
OJ
< x <
are given functions of x
m
. An initial-boundary
problem is one i n which one is given a positive constant a and four continuous functions g ( t ), t 1.0; g 2 ( t ) , t 3 0; f l ( x ) , 0 5 x <- a; 1
f2(x), 0 < x < a , and one is asked t o find a function u ( x , t ) which
is continuous for t L 0, 0 <- x 5 a; satisfies (5. 1 ) for 0 < x < a , t > 0; and which satisfies the initial and boundary conditions (5.4)
u(x,O) = f l ( x ) ,
O t x ~ a initial conditions
(5.5)
ut (x,O) = f2(x),
As shown in Figure 5.1
0<x< a
, the Cauchy problem
is defined on a half-
plane, while, a s shown in Figure 5.2, initial-boundary problems are defined on a semi-infinite strip. The solution of the Cauchy-Problem c a n be given by means of the formula of D'Alembert, while that of a n initial-boundary problem c a n be given i n terms of Fourier s e r i e s (see, e. g.
, Courant and
Hilbert, Greenspan (2) , Petrovsky). However, the methods for generating such solutions d o not extend t o nonlinear problems, and ana-
CAUCHY PROBLEM
155
lytical solutions so given are usually not evaluated e a s i l y at particular points of interest.
We will turn then to numerical methods,
the development of which will be facilitated by first reviewing t h e
D 'Ale mbert f ormula. 5.2
The Cauchv Problem It is w e l l known (see, e. g.
, Greenspan
( 2 ) ) t h a t t h e solution
of the Cauchy problem c a n b e given by t h e D'Alembert formula
(5.8)
u(x,t) =
z1
xtt [f,(Xtt)
t f+x-t) t
Jx-t f2(r)drI '
Before studying (5.8) i n d e t a i l , let us outline how it c a n b e derived.
Figure 5.1
156
HYPERBOLIC EQUATIONS
t
uxx
-
Utt
= 0
Under the change of variables
(5.9)
c = x t t , T)=x-t
the wave equation is equivalent t o
(5.10)
u
4rl
= 0.
Integrating (5.10) yields , first I u4 = F 1 ( 0
I
,
157
CAUCHY PROBLEM
and , then ,
where F1, G2 are arbitrary differentiable functions.
Setting
yields
From (5.11), one h a s
From (5.11) and (5.12), it follows, with the aid of ( 5 . 2 ) , ( 5 . 3 ) and (5.9) that
From (5.13)
, then,
158
HYPERBOLIC EQUATIONS
By integration, (5.16) implies
Thus, from (5.11) and (5.17), u(x,t) = -[f 1 (xtt) t 2 1
Joxttfg(r)dr] t ;[fl(X-t) 1
- Jox-tf2(r)dr]
I
which reduces readily t o the D'Alembert formula (5.8).
Example Find the general solution of the Cauchy problem with fl(x) = x 2 -X f (x) = e 2
2
,
.
Solution By t h e formula of D'Alembert u ( x , t ) = T1[ ( X t t ) 2 t ( x - t ) t
(5.18)
sxtt
eer2 dr] ,
x-t
If one wishes to evaluate t h e solution of a Cauchy problem at
a particular point, then, one c a n do so either exactly, or, a t worst, approximately, if numerical integration is a necessity, from (5.8). Because of t h i s simple state of affairs, we will not pursue t h e Cauchy problem further, but, i n s t e a d , will merely make some observations about (5.8) which are fundamental i n the study of initial-boundary proble m s
.
159
CAUCHY PROBLEM
Suppose one is given a Cauchy problem and wishes t o know the solution a t a point
From (5.19)
1
- t 5x 5x t7
the point
and f
--
2
(Z,;).
(x,:)
From (5.8) I
determined completely by a
- -
only between the two points (x - t ,0) and The interval
is therefore called the interval of dependence for The region interior t o the triangle with vertices
(E t t' ,0), (G- t' ,0) is called through
shown i n Figure 5.3.
on the X-axis, a s shown i n Figure 5.3.
- -
x
,as
, it follows that u(G , i) is
knowledge of f
(it i , O )
(G,;)
and
( G t f,O)
the region of dependence. and the line through
(Elf)
(G,?),
The line and ( x - i , O )
are called the characteristics of the wave equation through
(&,f).
The equations of t h e s e characteristics are t
- -t = x - x,-
t
- -t = -(x - x)- .
Finally, it is important t o note that, a s a consequence of the above discussion, if one has to solve a Cauchy problem but has been given initial conditions only on 0
x 5 a , then one c a n only find the solu-
tion in the region of dependence determined by the point a a -), 2' 2
(-
@to).
a a that i s , in the triangle whose vertices are ( - -), 2'2
(G,;)
=
(0,O)and
HYPERBOLIC EQUATIONS
160
Figure 5.3
5.3
Stability
Let us begin to study initial-boundary problems by developing some intuition with regard t o difference approximations for the wave equation. Ax =
Divide 0 5 x 5 a into n equal parts, each of length
a = h. L e t A t = k be arbitrary, a t present. If R is the set n
of a l l points ( x , t ) whose coordinates satisfy 0 < x < a and t > 0 , and if S is the boundary of R, then construct the parabolic problem in Section 4.2.
%
and Sh a s for
161
STABILITY
Figure 5.4
By means of (2.9), and for t h e point arrangement shown i n Figure 5.4, consider f i r s t t h e elementary difference approximations
u
xx
(x,t) = [ u ( x - h , t )
u (x,t) = [u(x,t t k ) tt
- 2u(x,t) t u ( x t h , t ) ] / h 2 - 2u(x,t) t u ( x , t - k ) ] / k
2
,
so t h a t t h e resulting difference approximation for (5.1) is (5.20)
u(x-h,t)
- 2 ~ ( x , t t) u ( x t h , t l - u ( x , t t k ) - 2u(x,t) t u(x,t-k)= h2
o,
k2
or, equivalently, (5.21)
u ( x , t t k ) = 2u(x,t)
k2 - u(x,t-k) t 7 [u(x-h,t) - Zu(x,t) t u ( x t h , t ) ] . h
Now (5.21) is a n explicit formula for u ( x , t t k ) i n terms of values of
u on y = t 'and y = t
- k , that is, (5.21) is a n explicit formula for
162
HYPERBOLIC EQUATIONS
generating u a t any point of a row i n terms of values of u on the previous two rows. on the first row of
Thus, it d o e s not appear that (5.21) c a n be applied
s, but only on t h e second and higher rows. €$ with
t h i s reason, u is approximated on the f i r s t row of
For
the a i d
of (5.5) by using
or , equivalently
(5.22)
u ( x , k ) = u(x,O)
t kf2(x).
Consider now a simple illustrative example which will lead directly t o the desired stability condition for (5.21).
Consider the
initial-boundary problem defined by (5.1) and = x,
0 5 x 5 1
(5.23)
U(X,O)
(5.24)
u (X,O) = 1 , t
o<x< 1
(5.25)
u(0,t) = 0 ,
tzo
(5.26)
U(1,t)
= 1,
t,o
I
and let u s examine t h e consequences of setting h = of neglecting boundary conditions (5.25)-(5.26).
%
and Sh are shown i n Figure 5.5.
1 -, 6
k =
1 -, and 2
The grid points
163
STABILITY
t
t
I
Figure 5.5
X
From (5.22) and (5.23), one h a s the first-row approximation (5.27)
2 = -3 '
lJ
u2=;15
Next, u 7 , u8 and u
9
u3 = 1 ,
u4 =/;
7
u5 =
74
c a n be generated explicitly from (5.21) to
yield 7 = 2u2
- u ( 1y 1 0 )t 9 [ul - zu 2 t u3 ] = -34
U8
= 2u
- U ( 1~ ' 0 )t 9[uz - 2u 3 t u4 ] = -32
u
= 2u4
u
9
3
.
- u(;,2O)
t 9 [u3
- 2u4 t u5 ] = -53
HYPERBOLIC EQUATIONS
164
Note that u6 and u l 0 cannot be so approximated, because we a r e deliberately neglecting the given boundary data. From u 7 , u8, u9, then, one c a n generate, by (5.21)
u
-2u -u3t9[u7-2u t u ] = 2 . 13 8 8 9
But, now, since we considered only the initial conditions (5.23) and ( 5 . 2 4 ) , u c a n be determined only in the region of dependence deter-
mined by the point ('
'),
2' 2
that is, u c a n be determined only i n the
triangle whose vertices are (0 ,0) , (1,O) and point ('
')
2, 2
(i,$,.
Since the
is numbered 3 i n Figure 5 . 5 , it is somewhat unreason-
able that any numerical method would yield a n approximation for u a t the point numbered 13.
But this inconsistency is rectified e a s i l y
by insisting that
which will yield approximations only in the domain of dependence. We define, then, a numerical solution generated by (5.20) to be stable i f , for a l l initial data and for zero boundary conditions, it is bounded, and, if the slope of the line through (x,t tk) and (x- h , t )
is not greater then the maximum absolute value of the slopes of thi. characteristics through (x,t t k) , that is,
k r; 5
1. The latter i n e q m '
is, of course, equivalent t o ( 5 . 2 8 ) . Fortunately, (5.28) is a l s o the
METHOD I
- EXPLICIT
165
well-known (Forsythe and Wasow) stability condition for (5.21) when the given initial-boundary problem h a s a bounded solution.
5.4
An Explicit Method for Initial-Boundary Problems From the discussion in Section 5.3
, one
c a n now formulate i n
a precise fashion the following method for approximating the solution of initial-boundary problem (5. l ) , (5.4)-(5.7). Method I
- Explicit
Step 1
Fix Ax = h and A t = k so that stability condition
(5.28) is satisfied. points of
\
Construct
%
and Sh and number the
so that the numbers are increasing from left t o
right i n any row and increasing from bottom t o top vertically. Step 2
Apply (5.22) t o approximate u explicitly a t each
point of the first row of Step 3
%.
Apply (5.2 1) t o approximate u explicitly with the
aid of (5.4), (5.6), (5.7) and the results of Step 2 a t each point of the second row of Step 4
%.
Using (5.6), (5.7) and the numerical results for
rows k and k - 1, approximate u explicitly a t each point of row k t l , k = 2,3,4,..., Step 5
by means of (5.21).
Terminate t h e computation when so desired.
HYPERBOLIC EQUATIONS
166
Example Consider t h e initial-boundary problem defined by (5.1) and
(5.29)
u(x,O) = x ( l - x )
(5.30)
u (x,O) = 1
(5.31)
u(0,t) = 0
,
t,o
(5.32)
U(1,t) = 0
,
t,o.
,
t
For h =
1
4
and k =
1 *, -
0 5 x 5 1
o<x<1
and Sh are shown i n Figure 5.6.
R,
(5.22) one h a s
u
1
1
= u ( 4 , 0) t
1
p =
5 16
1 1 3 0) t - (1) = 2 8 8
u = u(-, 2
u
3
3 = u(-,
4
1 5 0) t - (1) = 8 16
Next, since (5.21) h a s t h e form
or, equivalently,
1 3 u ( x , t + k ) = - u ( x , t ) -u(X,t-k) t q [ U ( x - h , t ) t u ( x t h , t ) ] 2 it follows t h a t
From
- EXPLICIT
METHOD I
u
4
3 =-u 2 1 3 2 2
u =-u 5
167
- u ( 12 , 0) t q1[ u ( O , 81 ) t u 2 ]
=
1 1 - "(2, 0) +-[u t u3] 4 1
_- -1 5 =
U6
3 = ;u3
3 1 - u(4, 0) t -[u 4
u
3 =-u 2 4
- u1
2
1 t u ( l ,,)I
3 -
8
32
s3
while
u u
7
8
1
1
t - p o , 4) t us]
3 1 - u t-[u 2 5 2 4 4"6'
=-u
3 1 1 --u - u t-[u tu(l,;)] 9 - 2 6 3 4 5
and so forth.
t
_ -47
- 128
_ -33
- 64 - -47 - 128
168
5.5
HYPERBOLIC EQUATIONS
An Implicit Method for Initial-Boundary Problems Now t h a t a first method, Method I , h a s been constructed for
the solution of initial-boundary problems, one c a n proceed to try to develop more efficient methods.
A simple implicit method, c a l l e d
Method 11, which requires t h e solution of a tridiagonal system for e a c h row of grid points, but which is stable for a l l c h o i c e s of h and k , c a n be constructed as follows (Ames).
In t h e notation of Figure 5.7,
u s e t h e point (x,t) a s a c e n t e r of symmetry and substitute
u
xx
(x,t) = 1 ([u(x-h,ttk) - 2 u ( x , t t k ) + u ( x + h , t t k ) ] / [ h 2 ] 2 t [u(x-h,t-k)
- Zu(x,t-k)
t u(xth,t-k)]/[h 2 ]I
into (5.1) to yield
(5.33)
- 2(1 t Tkh2) U ( x , t t k ) t u ( x t h , t t k ) = - u(x-h,t-k) h2 h2 t 2 ( 1 t -) u(x,t-k) - u ( x t h , t - k ) - 4 - u(x,t). k2 k2
u(x-h,ttk)
In t h e notation of Figure 5.7,
(5.33) c a n be written more concisely
as (5.34)
u 6 - 2 ( 1 t ~h2) u z t u 5 = - u 7 t 2 ( 1t -h2 k2 1 u4
- u * - 4 h22 uo.
Essentially, the, s t e p s of t h e method are analogous to those of Method I, e x c e p t t h a t (5.33) r e p l a c e s (5.21).
A formal description proceeds
METHOD I1
- IMPLICIT
169
a s follows.
( x+h ,t+k )
(X+h,t-k)
7
a
4 Figure 5.7
Method I1
- Implicit
Step 1
Execute Steps 1 and 2 of Method I.
Step 2
With the aid of (5.4) , (5.6)
, (5.7) and the results
of Step 1 , apply (5.33) to generate a tridiagonal system in the unknown numerical approximations on the second row of
Rh' Step 3
Solve t h e tridiagonal system generated by Step 2
t o yield the numerical approximation on row 2 of Step 4
Rh'
Proceed inductively t o u s e the numerical approxi-
mations on rows k-1 and k, for k = 2 ,3,.
..,
by applying
(5.33) t o generate a tridiagonal system in t h e unknown
170
HYPERBOLIC EQUATIONS
numerical approximations on row k t 1 of R , , each of which is then determined by solving the resulting algebraic s ys te m
Terminate the process when so desired.
Step 5
Example Consider the initial-boundary problem defined by (5.1) and (5.29)(5.32).
Set h =
-14 '
shown i n Figure 5.6.
u
1
k = -, so that the grid points R 8
h
and Sh are a s
From (5.22) one h a s , a s i n the previous example,
- -5 1 - 1 6 '
u
- 32 - 8 '
u - - 5
3 - 1 6 '
For the given parameter choices, (5.34) becomes (5.35)
U6
- 1ou2 t u 5
-
= -u7 t 1 0 ~ u 4 8
-1
6 ~ ~ .
Considering first the points numbered 1 , 2, 3 i n Figure 5.6 to be the point ( x , y ) i n Figure 5.7 1 u(O,-)4
u
4
u
10u4 t u5
yields, i n order, by means of (5.35),
1 = -u(O,O) t lOu(4, 0)
1 - "(2, 0 ) - 16ul
- 1 05 ~t u6 = -u(-,41 0) t ~ O U (1Z , 0) - u(;, 3 0) - 16u2 - 10u6 t U( 1 , 4) 1 = -u(-, 1 0) t IOU(;,3 0) - u(1,O) - 16u3 ,
5
or, equivalently,
2
METHOD I11 - IMPLICIT
-lou
u
4 4
171
t
-
u
= -27/8
5
1ou t 5
u
5
-
u6 = -31/8
l0u6 = -27/8 ,
the solution of which is
u = 43/112, u5 = 13/28, u6 = 43/112. 4
One then proceeds to generate t h e solution on row 3 using (5.35), t h e given boundary conditions, a n d t h e approximations on rows 1 and 2, and so on.
5.6
A Second Implicit Method for Initial Boundary Problems
For a s p e c i a l class of problems, i n which the differential equa-
tion (5.l ) is satisfied on t h e X-axis and f
2
is given on 0 2 x 2 a , one
c a n m o d i f y Method I1 so t h a t one a l s o improves on the accuracy (in the order-of-magnitude s e n s e ) . The objective is t o improve upon (5.22), that
i s , upon the approximate solution on t h e very f i r s t row of R
h'
W e will
show how to d o t h i s by a n illustrative example, and then state the method formally. Example Consider t h e initial-boundary problem defined by (5.1) and 1 1 (5.29)-(5.32). Set h = -, k = -, so t h a t t h e grid points R and Sh 4 8 h
HYPERBOLIC EQUATIONS
172
are a s shown in Figure 5.6. at
1 1 1 (O,-g), , ,( -;I,
5.8.
-,(:
Construct a fictitious set of grid points
(l,-i),
1
3 i1) ,(i, - i1 ) ,
a s shown i n Figure
1 1 3 First, a t the three points (-, 0) , (-, 0), (-, 0) , taken i n turn 4 2 4
t o be the point (x,y) i n Figure 5.7, write down (5.33), which, in t h i s c a s e , t a k e s the form (5.35), t o yield 1 ~ ( 0 -) ,
- l0ul
U
1
- 1ou2 t u 3 = -uwl
2
1 - 1ou3 t u ( 1, 5) = -u-2
8
U
tu
2
= -u(O,
1 -5) t 10u-1 t 1ou-2
- u -2 - 1 6 u 1( ~0),
- ue3 - 1 6 u ( y , 0) 1
-
- 1 6 ~ 34( - ,0) .
1 8
t ~ O U - ~U ( 1, --)
From the given initial and boundary conditions, this system reduces to 1 '10Ul (5.36)
u
1
t
u2
-
l0u2 t u
2
= -u(O,-jf) t lou-l
-
u
3
= -u-l
-+ 1ou-2
1ou3 = -ue2 t
1 1 To eliminate u ( 0 , - g ) , u , ~ , u - ~ ,u - ~ , u( 1,--) 8
- u-2 -
- u-3 - 4 - u ( l , - i ) - 3. 1
in t h i s system,
utilize central difference approximations for initial condition (5.30) in the form
METHOD I11
- IMPLICIT
173
or, equivalently, (5.37)
1 u(O,--)8 =
--4'1
u-l = u1
- -41 ' u-2 = u2 -7'1
Substitution of (5.37) into (5.36) yields -2ou 2u
= -5
t 2u2
1
- 20u2
1
2u
2
t
2u3 = -6
-
20u3 = -5
the solution of which is
(5.38)
2
u1
= ? I
5 2 = -1 4 '
2
1
-z,
u-3 = u3 1 u(l,-;) 1 =
1 -4.
174
HYPERBOLIC EQUATIONS
One now continues with Step 2 of Method 11. Formally, t h e n , one c a n describe Method I11 a s follows.
Method I11
- Implicit
Modify Step 1 of Method I1 only i n t h e approximation on t h e first row of
%.
Do t h i s by applying (5.33) at e a c h grid point of t h e
form (mh, 0 ) , m = 1 ,2,.
..
,n
- 1; by using central differences for
u (mh, 0) t o eliminate approximations of u a t fictitious grid points t that is, at grid points not i n R
h
or Sh; and by solving t h e resulting
tridiagonal system.
5.7
Mildly Nonlinear Problems Methods I , I1 and I11 extend i n a natural way to mildly non-
linear problems defined by (5.4)-(5.7) u
(5.39)
xx
and
- u tt = f ( x , t , u ) .
The only modifications n e c e s s a r y occur when (5.39) replaces (5.1), and then one need only replace t h e difference equations accordingly. In Method I , t h e n , approximate (5.1) by
(5.40)
([U(x-h,t)
- Zu(x,t)
2
t u ( ~ t h , t ) ] / [ h 3)
- ( u ( x , t t k ) - 2u(x,t)
MILDLY NONLINEAR PROBLEM S
175
while, i n Methods I1 and 111, approximate (5.1) by any one of 1 ([u(x-h,t-k) 2
- Zu(x,t-k)
t [u(x-h,ttk)
-
t u(xth,t-k)]/[h
2
]
- Zu(x,ttk) t u ( ~ t h , t t k ) ] / [ 2h ]I
[u(x,ttk)
- 2u(x,t) t ~ ( ~ , t - k ) ] / 2[ ]k
(5.41)
f ( x ,t , u ( x , t ) ) f ( x , t , ( u ( x , t t k ) t u(x,t-k))/Z)
[ f ( x , t t k , u ( x , t t k ) ) t f(x,t-k ,u(xrt-k))]/2
.
Computational considerations a r e analogous to those described i n Section 4.6
, except that
stability conditions vary from problem to
problem and no meaningful , comprehensive results are available (Ames). of
5.8
On the computer, one merely experiments with the values
Ax and A t until one obtains reasonable results.
A Boundary Value Technique For the reasons listed i n Section 4.7 and 5.7
, we will
develop,
i n the spirit of Section 4.7, a boundary value technique for the initial-boundary problem for t h e wave equation. First, let us construct a difference analogue of the differential opera tor u
xx
-u
tt
HYPERBOLIC EQUATIONS
176
Since a boundary value technique is to be developed, it will be computationally convenient to construct a n analogue which is, at least, mildly diagonally dominant when h = k.
For t h i s purpose, let (x,t), ( x t h , t ) ,
b e numbered 0 , 1, 2 , 3, 4, r e s p e c t i v e l y ,
(x, t t k ) , (x-h, t ) , (x, t-k)
a s shown i n Figure 4 . 1 2 , and set
(5.42)
(uxx-u
tt
) [ ' = au + a u + a u + a u + a u 0 0
0
1 1
3 3
2 2
44'
Then, a s i n t h e development of (4.32), one f i n d s t h i s t i m e
a +a +a +a +a = O 0 1 2 3 4 a -a = O , 1 3
aZ - a4 =
a + a = -2
a +a
1
3
h 2 '
2
4
0
=--
2 k 2 I
t h e unique solution of which is
But, as observed previously, the diagonal elements of t h e resulting coefficient matrix w i l l be t h e numbers a would l i k e to have
0'
so t h a t , from (5.43), w e
BOUNDAHY VALUE TECHNIQUE
177
which i s , unfortunately, not valid when h = k. I t is natural, t h e n , to a s k if a n arrangement of points different from t h a t of Figure 4.12 c a n be u s e d to yield mild diagonal dominance when h = k. T o study t h i s q u e s t i o n , let t h e points ( x , t ) , ( x t h , t ) , ( x , t t k ) , ( x - h , t ) , ( x , t - k ) , (x,t-2k) be numbered 0 , 1 , 2, 3, 4, 9 , as shown i n Figure 5.9.
Consider a difference approximation of the wave
operator in t h e form
(5.44)
(uxx-utt)IO=au t a u t a u t a u t a u t a u 0 0 1 1 2 2 3 3 4 4 99'
2
3
I
(x,t+k)
1
Figure 5.9
HYPERBOLIC EQUATIONS
178
Substitution of Taylor expansions about ( x , y ) for u l , u2, u3, u4, u
9'
and setting corresponding coefficients equal in (5.44) yields the
system
a.
t
a a
1 t a 2 t a 3 t a
= o
- a3
1
a a
- a
2
4
-2a
2
9
= o = 2/h2
+ a 3
1
a
t a
the solution of which, in terms of a
so that
9 = O
4
0'
4
t 4 a
is
-
9 -
-2/k2
,
179
BOUNDARY VALUE TECHNIQUE ‘uXx -
(5.45)
Utt)
I
- - (3 2
-t
-)u 2 k2
0
t - u1 +-I,.t I 2u h2 1 3k2 2 h 3
In order t o have mild diagonal dominance, it is sufficient to require
or, equivalently, (5.46)
which
valid when h = k. Note, now, t h a t i f one a p p l i e s t h e difference analogue
(5.47)
-
(- 2 t
h2
- )2u k2
0
t 21u 1 t -u1 h 3k2 2
t 7 1U 3
t p3 u 4 - 34 u 9 = 0
h
for t h e arrangement of points shown i n Figure 5.9, then one h a s a n
%
algebraic equation for e a c h point of f i r s t row.
except t h e points of the
But t h i s is not unreasonable, b e c a u s e t h e derivative con-
dition (5.5) h a s not a s yet been considered and t h i s condition c a n be approximated, with t h e a i d of (2.7), a s follows. Sh of t h e form (mh,O), m = 1 , 2 , .
(5.48)
[-3u(mh,O) t 4u(mh,k)
A t e a c h point of
..
, n - 1 , approximate (5.5) by
- u(mh,2k)]/(2k)
= f2(mh).
With regard t o (5.48) note that,since (mh,k) is a point of the f i r s t row of Rh, t h e coefficient of u(mh,k) dominates t h e other coefficients.
HYPERBOLIC EQUATIONS
180
Finally, assume that a given hyperbolic equation of the type
u
(5.49)
xx
- utt
= f(x,t,u,ux,ut)
subject t o initial-boundary conditions (5.4)-(5.7)
t=
m
has a solution a t
which is characterized by the boundary value problem
(5.50)
u(0) = a ,
(5.51)
u(a) = B
,
where l i m g (t) = a 1
(5.52)
t - c m
,
lim
t+a,
g (t) = B 2
The algorithm for the approximate solution of the initial boundary problem defined by ( 5 . 1 ) , (5.4)-(5.7)
Method IV
c a n be given now a s follows.
- Boundarv Value Technique
Step 1 length
Divide
0 5 x 5 a into n equal parts, each of
a A x = - = h , by the points 0 = x < x < x < n 0 1 2
< x =a. n
Find either the exact solution, or by the method of Section 2.8, a n approximate solution on xo, xl, x2 ary value problem (5.50)-(5.52).
xl
,...,xn
Step 2
by u(xi,m), i = 0,1,2
Fix T > 0 and define
,..., x
n-1' xn of bound-
Denote t h i s solution a t xo,
,...,n . a s the rectangle with vertices
BOUNDAKY VALUE TECHNIQUE
(O,O), (a,O), (a,T), ( O , T ) , and 0
181
a s its interior.
Divide
T 1.t 1.T into m equals parts, each of length A t = =k
so that (5.46) is valid and construct the points of
-%
-%
-Sh.
and
m
Number
a s i n Method D for elliptic problems.
Define u(x ,T) by i
Step 3
(5.53)
U ( x i'
T) = u(xi,m); i = 1,2,...
,n-1
,
so that, by (5.4), ( 5 . 6 ) , (5.7) and (5.53) , u is known on
Step 4
A t each point of the first row of
order, and in subscript notation, (5.48). of
-
write down, i n
On the remainder
$, write down, i n order, the difference approximation
of (5.49). Step 5
Solve t h e system generated i n Step 4 by, s a y , the
generalized Newton's method t o yield the numerical solution
-
on Rh. Because the mechanics of the numerical method are almost identical to those described i n the examples of Section 4.7, we
182
HYPERBOLIC EQUATIONS
merely remark that several detailed, large scale examples are given
in Greenspan (6) and that, a s y e t , no mathematical theory h a s been established to support the validity of the method of this section.
5.9
Other Methods Because of the very extensive scientific interest in waves and
wave mechanics, a very large number of related numerical methods have been developed and are worthy of examination.
Classical methods
which a r e of m o r e than routine interest, like the method of characteristics, are summarized by A m e s .
An adaptation of the Runge-Kutta
method is given by R. H. Moore and a combination "integral-difference'' technique for the reduced wave equation is given by Greenspan and Werner. The method of Garabedian and Lieberstein for detatched waves
is also of special interest (see Gambedian).
EXERCISES
183
Exercises 1.
Show that the change of variables
4
= x t t , q = x - t trans-
forms the wave equation into 4u 2.
4rl
= 0.
Find the solution of the Cauchy problem for each of the following c a s e s and evaluate u ( 1 , l ) .
3.
(a)
f l = 1, f
(b)
f
1
=
f
X,
2 2
= -1
=
X‘
Find the interval of dependence for each of the following points: ( 0 , 3 ) , ( 1 , 3 ) , (-3,3), ( 7 , 8 ) , (-i’,-l), (-3,6).
4.
Find the equations of the characteristics through each point of Exercise 3.
5.
-
Given the initial-boundary problem for u u = 0 with xx tt -t 1-t X a = l , g l ( t ) = e r g 2 ( t ) = 2 t e , f ( x ) = 2 x t e ,f2(x)= 1
-e
X
, find the numerical solution at t = 5 by each of
Methods 1-111.
x- 5
u=2xte
6.
Compare your results with the exact solution
.
Given the intial-boundary problem for uxx a = 1, g l ( t ) = 0 , g2(t) = e find a
-t I
- utt -- 0
with
fl(x) = x , and f 2(x) = x
numerical solution a t t = 5.
2
,
HYPERBOLIC EQUATIONS
184
7.
By modifying Methods 1-111 appropriately, and a l s o by Method
IV, find numerical solutions at t = 4 of the initial-boundary value problem defined by
u
xx
- utt = 2 ( t - x ) ( t t x t 2 ) u3
u(x,O) =
l t x '
u (x,O) = t
u(0,t) =
1 l t t '
u(1,t) =
--l t1 x
1 2(1 t t)
Compare your results with t h e exact solution
u =
1 (ltx)(ltt)
CHAPTER VI APPROXIMATE EXTREM IZATION OF FUNCTIONALS
6.1
Introduction Problems which are more complex than those which are mildly
nonlinear usually require more specialized techniques than those described thus far.
Also, the amount of available mathematical sup-
port concerning convergence, stability and other fundamental questions usually decreases with the complexity of the problem.
Never-
t h e l e s s , such problems still demand attention and it is t o these that the next three chapters are directed.
Boundary value problems will
be studied first. 6.2
Extrernization of Functionals Historically, one of the oldest mathematical disciplines t o be
intimately involved with applied problems is the calculus of variations.
In developing numerical methods for nonlinear problems in
which the defining equations may be more than mildly nonlinear, we shall examine first the classical variational problems in one and two dimensions. The fundamental problem i n the calculus of variations may be formulated a s follows.
For a, b , a and 185
r e a l numbers, with
EXTREMIZATION OF FUNCTIONALS
186
a < b , and for given F(x,y,p) which h a s continuous first order part i a l derivatives, find a function y(x) which is defined and h a s continuous first order derivatives for a
< x < b,
which satisfies the
boundary conditions
and which minimizes the integral
Though one c a n s e e k , a l s o , t o maximize (6.2), for clarity we shall concentrate on the minimization, Geometrically, a s shown in Figure 6 . 1 , the fundamental prob-
l e m i n the calculus of variations requires that, out of uously differentiable functions defined on a
<x 5 b
the continwhose graphs
p a s s through the two points ( a , a ) and (b,B), one must find that one which minimizes the given integral (6.2). Because the value of (6.2) depends on a function, and not j u s t on a real number, the integral (6.2) is i n reality a function of a function, and therefore is called a functional.
Indeed, (6.2) is the
prototype functional of t h e mathematical discipline called functional analysis.
EXAMPLE
187
Y
=t
Figure 6.1
Example Suppose one is given a = 0 , b = 1, a = 1,
(6.3)
J =
1
(X
f3
= 0 , and
2 Y-Y')dx.
0
Then examples of continuously differentiable functions which satisfy the boundary conditions
are
EXTREMIZATION OF FUNCTIONALS
188
y = l - x y = l - x3 y = x2
- 2x t 1
which, when inserted into functional (6.3) yield
J(1
13 - X) = J 1 [X 2(1 - X) - (-l)]dx = 12 0
J(l
- x 3) =
1
[X
2
(1
0
J(x2
- 2x t 1) =
1
- x3) - (-3x2)]dx = -76
-
31 [x2(x2 2x t 1) - (2x - 2)ldx = -
0
30 '
The problem of finding that y(x) which is continuously differentiable on 0 5 x 1. 1, which satisfies (6.4), and which minimizes (6.3) is a fundamental type problem of the calculus of variations. Analytically, the fundamental problem in the calculus of variations is, in general, exceptionally difficult t o solve. A s in the elementary calculus, where one attempts t o find a minimum of a function
by solving the equation
so in the calculus of variations one can attempt to find the minimum
EULER'S EQUATION
I89
of a functional
by solving the equation
which results by setting what is known a s the Frechet derivative of functional (6.7) equal t o zero.
Equation (6.8) is called the Euler
differential equation, and a great portion of the calculus of variations
is devoted to the study of the problem defined by (6.1) and (6.8) rather than t o the problem defined by (6.1) and (6.2). ExamDle The Euler equation of the functional
is 2 (3xy t 3xy')
- dxd (-2y'
t 3xy) = 0
,
or, equivalently, 2y"
- 3y t 3xy2 = 0 .
Euler differential equation (6.8) is, i n general, a nonlinear, second order, ordinary differential equation, and, although such
190
EXTREMIZATION OF FUNCTIONALS
equations a r e , i n general, very difficult t o solve, still they seem t o be more viable analytically than the functionals from which they are
derived.
Nevertheless, numerically it is so often e a s i e r to approxi-
mate a solution of the original variational problem than t o solve the problem defined by (6.1) and (6.8)' that the approach here will be t o examine applied problems which are usually stated in terms of (6.1) and (6.8) by returning t o their primitive, variational formulation. Such an approach is a l s o motivated by the observations that for most applied problems one cannot solve the associated Euler differential equation analytically and t h a t , j u s t a s a solution of (6.6) yields only
an extremal of (6.5), so a solution of (6.8) need not necessarily yield a minimum of (6.7).
6.3
A Numerical Method
For the fundamental problem of the calculus of variations, that is, the boundary value problem defined by (6.1) and (6.2)' divide a 5 x 5 b into n equal parts, each of length h =
the interval
by t h e points a = x < x < x < 0 1 2 Thus, h = x
i
O , l , 2,.
- X
i-1'
.., n - 1, n.
*-*
for i = 1'2,.
b-a n '
<x < xn = b (see Figure 6.2). n-1
.. . ,n
L e t yi = y(xi), for i =
Then approximate the functional
A NUMERICAL METHOD
191
by the function (6.10) Since, by (6.1), y = a and y = @, it follows that J 0
tion only of y l , yz,.
n
..
,ynml.
n
is a func-
To find a n extremal of Jn' then, con-
sider the system of equations
(6.11)
a=
,...,n - 1 .
0, i = 1 , ~
ayi
A solution of (6.11) will constitute a n approximation a t
x
n- 1
x1 t
X21
...
I
of a function y(x) which is a solution of the fundamental prob-
l e m of the calculus of variations. The function (6.10) is obtained by a simple rectangular integration approximation of (6.9) in which derivatives are replaced by forward differences.
For sufficient criteria for convergence, see, e. g.,
Greenspan (8). An example will be given i n the next section. Y
Y"'B
Figure 6.2
- x
EXTREMIZATION OF FUNCTIONALS
192
6.4
Geodesics If one wishes t o consider motion on the earth or, more generally,
i n any curved s p a c e , then the "shortest" paths between two points is The shortest paths between two points in
no longer a straight line,
space are called geodesics, and i n t h i s section we will illustrate the method of Section 6.3 by applying it t o a geodesic problem whose solution is well known. In is
42
tq
4, 2
q, v space, let S be the unit sphere, whose equation
t v
2
= 1. Consider the problem of finding the shortest
path on S between (1, O , O )
and (
, 0 ' &).2
For t h i s purpose,
let S be parametrized by
4
= cos x cos y
q = cos x sin y
(6.12)
v = sin x , where x represents latitude and y represents longitude, as shown i n Figure 6.3.
Then S c a n be given vectorially by .-*
13)
v = (cos x c o s y, c o s x sin y, s i n x) v
t
GEODESICS
193
L e t the dot products E , F and G be defined by
Since (Struik) geodesics are extrema of the functional
it follows that we wish to extremize the functional 2 1/2
7d4
(6.14)
J =
Jo
[l t ( c o s 2 x ) ( z ) ]
dx
subject t o the boundary conditions (6.15) Setting h = d l 6 implies that xo = 0, x = .rr/l6, x = n/8, x = 1 2 3 3 d 1 6 , x = 7~/4 and 4
Y(X )
i
= Y , yo = y4 = 0. i
Functional (6.14) is
then approximated by
(6.16)
J4 = 1 6
i=1
{E
2 1/2
]
t (coS2Xi-~(y~~l~-1)
},
and system (6.11) t a k e s the form of t h e following three equations i n y l , y2 and Y 3 '*
EXTREMIZATION OF FUNCTIONALS
194
(cos2
-
Y1
2)
(Y,
- Y,) - 0
2
2 -
The generalized Newton's method with initial guess y = 7 1 , y2 = 1, 1 1 y = - and with (u = 1.8 was applied to solve the above nonlinear 3 2 algebraic system.
On the CDC 3600 the number of iterations was
95 and the running t i m e w a s 8 sec.
The answers were y 1 = y 2 =
y3 = 0.1 0-l2 , so that, from (6.1 2 ) , one h a s
( 4 , ,nl ,vl)= (cos x =
(COS
(C2,nZ,v2)=
(COS
=
(COS
( 4 ,n 3
,V
3
3
)=
1
c o s yl, cos x s i n yl, s i n x ) 1 1
7r 7r 16 , 0, s i n ) 16
x c o s y2, cos x sin y 2
7r -, 8
2
sin x
2
7r
0, sin-) 8
(cos x3 c o s y3, c o s x sin y 3
-
= (cos 37T , 0, s i n 37r )
16
2'
16
.
3'
sin x ) 3
FREE BOUNDARY VALUE PROBLEMS
195
Since the shortest path sought is completely determined analytically by y = 0 , 0 5 x 5
71 4, the unusual result follows that the above three
points actually lie on the resulting geodesic. For details of examples in which system (6.11) c o n s i s t s of a s many a s 1500 equations, see Greenspan (8).
6.5
Free Boundary Value Problems A l l the i d e a s and theory presented thus far extend i n a natural
way t o integration formulae other than that incorporated i n (6.10) and
also t o free boundary value problems, We shall illustrate
both of
these possibilities by means of a single control theory problem. Consider the problem of minimizing the functional
J =
(6.17)
l
2 [Y t (y'l21dx
0 subject t o the boundary conditions y(0) = 1 , Y'(1) = 0
(6.18)
implies x - 0, x = 0.25, x = 0.5, x = 0.75, 0 1 2 3
Setting h, = 0.25 1
x
4
= 1. Functional (6.17) then c a n be approximated by the trape-
zoidal integration formula
J
-1
;[Yo
2 -f-
-t
(Yb)
2
2
+ 2Yl t 2(Y;)
2 2 Y*+(Yi) 1
I
2 4-
2 2 2 2 2Y2 t 2 ( y i ) t 2y 3 t 2(y'3 )
EXTREMIZATION OF FUNCTIONALS
196
which, after t h e insertion of (6.18)
Jw
(6.19)
8[1 1 +(Yb)2 +2y1 2 +Z(Y;)
, reduces
to
2 +2y2+2(y;) 2 2t . 2 t2(y;) ~ ~ 2 t y23 4
Next, inserting into (6.19) a forward difference approximation for Y;
and central difference approximations for y; 2
J-J4=
L[l
t
("")0.25
and y'
yields
3
2 t 2y; t 2(=) 0.5
2 t 2y; t 2)-(
,yi
2 t 2y; t 2(=) 0.5
.
t Y;]
In order to minimize J the equations: 4'
a J4 =
0,
i = 1,2,3,4,
which I in this case , are equivalent t o
- 4y3 = 8 9y2 - 4y4 = 4 4y1 - 5y = 0 3 PY2 - 9Y4 -0
13y1
yield Y
32 49
-
-0.816, 1
49
y 2
I
=~-0.735, y 49
=---0.653, 32 49
-
y
4-
0.653, which compares favorably with the exact solution
(0.839, 0.731, 0.668, 0.648), determined from
197
PARTIAL DIFFERENTIAL EQUATIONS
6.6
Variational Problems and Partial Differential Eauations A s regards partial differential equations, t h e fundamental prob-
l e m of t h e c a l c u l u s of variations c a n b e formulated a s follows.
Let Let R
F ( x , y , u , p , q ) have continuous f i r s t order partial derivatives.
be a simply connected, bounded region whose boundary S is piecew i s e regular, and let f ( x , y ) b e defined and continuous on
s.
Then
one must find a function u ( x , y ) which h a s continuous first order partial derivatives on R t S , which satisfies (6.20)
u = f o n S
and which minimizes (6.21)
The Euler differential equation of (6.21) is (6.22)
Fu
--axa Fu - -aay X
F = O . uY
Example The Euler equation of t h e functional
is
u
xx
t u
U
YY
= e
.
198
EXTREMIZATION OF FUNCTIONALS
We shall study next Dirichlet problems defined by ( 6 . 2 0 ) and ( 6 . 2 2 ) by applying t o ( 6 . 2 0 ) and ( 6 . 2 1 ) a direct generalization of the
method developed in Section 6 . 3 .
But note that since the methods
already developed for mildly nonlinear equations ( 3 . 5 3 ) and ( 3 . 5 4 ) are relatively more efficient than the method t o be developed in the next section, attention will be directed t o ( 3 . 5 5 ) .
The reader interested
in a variational formulation of equations like ( 3 . 5 3 ) and ( 3 . 5 4 ) need note only that the Euler equation of
J =
ss [a+
u:
t 2
RtS
is A U = G(u)
.
The Plateau Problem
6.7
L e t R be a simple connected, bounded region whose boundary
S is piecewise regular. S.
L e t f ( x , y ) be defined and continuous on
Then the Dirichlet problem of finding u(x,y) which is continuous
on R t S, which s a t i s f i e s
u = f,
16.23)
on S
and which on R s a t i s f i e s the nonlinear elliptic partial differential equation
RADCLIFFE
199
THE PLATEAU PROBLEM 2 Y
= - 2uX uY uX Y t (1 t u x ) u y y = 0 2
(1 t u )u
(6.24)
will be called the Plateau problem. The Plateau problem is intimately related with the physical problem of soap f i l m s , that is, of determining the shape of a soap f i l m which results from having immersed a closed, three dimensional
wire into a soap solution.
Indeed, (6.24) is the Euler equation of
the integral
J =
(6.25)
ss
J 1 t u 2X t u rYd A ,
RtS which defines the surface area of the resulting f i l m .
In elasticity
problems, like those for soap f i l m s , one wishes t o minimize (6.25). Rather than d i s c u s s the extensive d e t a i l s of a n abstract generalization of the method of Section 6.3 t o general problems in partial differential equations, we will show simply how t o treat these by means of t h e following illustrative Plateau problem.
More complex
problems can be treated similarly.
Example L e t S be the square whose vertices are (O,O), ( l , O ) ,
(0,l), and whose interior is denoted by R. (6.26)
f(x,y) = x
- 3y
(l,l),
On S, define f(x,y) by
EXTREMIZATION OF FUNCTIONALS
200
and consider the associated Plateau problem. The numerical approach will center about minimizing functional ( 6 . 2 5 ) subject t o the boundary condition ( 6 . 2 6 ) . 1
take h = - and construct 3
%
and Sh.
For t h i s purpose,
It will be convenient, i n the
present development , t o adjoin t o S the vertices (0,O), ( 1 ,0 ) , (1 1 ) , h and ( 0 , l ) and t h i s will be done.
Number the points of
2 , 3 , 4 and those of Sh with 5 , 6 , 7 , .
%
with 1 ,
..,
1 6 , a s shown in Figure
Next, triangulate, i n any fashion, each subsquare shown i n
6.4.
Figure 6 . 4 , so that R t S is thereby divided into 1 8 mutually disjoint subtriangular regions , one possible arrangern ent of which is shown i n Figure 6 . 5 .
Notice that the process of triangularization
introduces no new grid points. R Z i * . * ~R1
by S
i
Number t h e s e triangular regions R1
, i n any order, and let t h e boundary of each
,i =1,2J...J18. Now, note that ( 6 . 2 5 ) can be rewritten a s
R18"18
and consider first
,
Ri be denoted
THE PLATEAU PROBLEM
201
4
13
(091 1
14
15
16 (1 91 1
R
11
3
12
4
S
9 '
1
10
2
(1 9 0 )
(090)
13
11
12
9
10
- x 5
7
6
Figure 6.5
8
W X
EXTREMIZATION C)F FUNCTIONALS
202
In order t o approximate I
1'
find the right angle vertex of S
which
1'
is the point numbered 11 in Figure 6 . 5 , and a t it approximate ux and u
Y
by using function values only a t other points of S
1'
Thus,
which, from ( 6 . 2 6 ) implies that
U
Thus, I
1
XI
11
-
u3
- (-2)
-
-3
3 ~ ~ + 6(-3)' ) ~
.
= 3 u 3 + 6 , uy l l l
1/3
- (-2)
= -3.
1/3
c a n be approximated by * I1
= 11-8 * J1 + (
+
Consider next
I2 = J J m d A . R2+S2
In order t o approximate 12, fix the right angle vertex of S
2'
which
is the point numbered 1 4 i n Figure 6 . 5 and a t it approximate u u
Y
by using function values only a t other points of S
"XI
14
-
u
14
8 - u 1 3 ---3
(-3)
-
1/3
= I
1/3
--38
-u
1 /3
and, as a n approximation to I
2'
2*
take
= -8-3u3 ,
X
Thus,
and
THE PLATEAU PROBLEM
203
*
1 = 2 18
J 1 t (1)2t (-8 -3u3)'
.
Proceed i n the indicated fashion until each integral
is approximated by a n I
*
i -
a t the .right angle vertex of
In each I:,
u
and u
X
s.1
Y
are approximated
by means of function values only a t
points of Si. One next approximates J by J
18
, where
18
Note immediately, that J
18
is a function only of u l , u2 , u3 , u4.
As a n approximation t o the minimum of J, we take the minimum of
J18 a t the points of €$, and these are found, by solving the system
t o be
Interestingly enough , t h e s e values coincide with the exact values of the solution u = x
- 3y
of the given problem a t the points of
Rh'
But, though the given Plateau problem w a s somewhat trivial, the
204
EXTREMIZATION OF FUNCTIONALS
example d o e s serve to illustrate quite simply the numerical method..
For more extensive examples, see Greenspan ( 8 ) .
205
EXERCISE S
Exercises 1.
Evaluate each of the functionals 1
(a)
Jo
(b)
s,'
[1 -I- (Y'l21dX
1
(d)
[1 t ( Y ' )
[xy4
-(
2 1/2 dx
I
~ ' 1 5xY3Y'ldX ~ 4
0
for each of the functions
2.
Find the Euler equation for each functional in Exercise 1.
3.
For the variational problem defined by 1 [l t ( ~ ' ) ~ l d x~ ,( 0 =) 0, Y ( 1 ) = 1,
J= 0
find a numerical solution with h = 1/4 4.
For the variational problem defined by
find a numerical solution with h = 1/4.
.
20 6
5.
EXTREMIZATION OF FUNCTIONALS
For the variational problem defined by
find a numerical solution with h = 1/4.
6.
In XI2 space, let S be the saddle surface whose equation is
x2 - y 2 = z . Find, numerically, the shortest path on S between (-1,1,0) and (4,4,0). 7.
In XYZ space, let S be the ellipsoid whose equation is 2 2 x t y t4z2=16. Find, numerically, the shortest path on the ellipsoid between (0,0,2) and (2,2,/2 ).
8.
Numerically, with h = 1/4, minimize the functional -1
2
J = J [Y t (y'l21dx 0
subject t o the boundary conditions ~ ( 0=) 0, Y'(1) = 1
9.
Numerically, minimize the functional J=
1
2
[xy t x 2 y 2 t ( y ' ) ]dx
0
subject t o the boundary conditions ~ ( 0=) 1, ~ ' ( 1=) -1.
207
EXERCISES
10.
Find the Euler equation for each of t h e following. J =
JJ
[uf t u t t eU]d~
RtS
J =
ss
[ ~ ~ t 2u y 2 t u ] d A
RtS
RtS J = s ~ [ 1 + 2 u x t2 u l
Y R+S 11.
Let S be the triangle with vertices (O,O), (4,0), (0,4). Find a numerical solution of the associated Plateau problem if f(x,y) = x
12.
- 3y.
Let S be t h e triangle with vertices (O,O), (4,0), (0,3). Find a numerical solution of the associated Plateau problem if 2 2 f ( x , y ) = x 4- y
13.
.
2 Let S be the circle whose equation is x t y2 = 4. Find a numerical solution of t h e associated Plateau problem i f f(x,y) =
x
- 2y.
CHAPTER VII APPROXIMATE SOLUTION OF FLUID PROBLEMS
7.1
Introduction Problems related t o jet propulsion, weather prediction, mole-
cular interaction, plasmas and flow through pipes and porous media are typical of t h e vast panorama of fluid problems which are of inter-
est i n science and technology.
In t h i s chapter, for convenience, we
will consider only liquids and g a s e s and prototype problems related t o each.
Intuitively, a liquid will be thought of as a fluid which is
characterized by incompressibility and viscosity, while a g a s will be thought of a s a fluid which is characterized by compressibility and the absence of viscosity.
7.2
Liquids will be studied first.
A Prototype Liquid Problem
A b a s i c two dimensional, steady state, viscous, incompressible flow problem, called t h e cavity flow problem, can be formulated
as follows.
L e t the points ( O , O ) ,
( l , O ) , ( l , l ) , and ( 0 , l ) be denoted
by A , B, C , and D, respectively (see Figure 7.1).
L e t S be the
square whose vertices are A , B, C , D and denote its interior by R. On R the equations of motion t o be satisfied are the two dimensional, steady s t a t e , Navier-Stokes equations, that is,
208
PROTOTYPE LIQUID PROBLEM
A
(7.2)
~
209
tax 6ay 3 ay(
ax~
=~ 0 ,- 6 3~ 2 0~ , )
where $ is the stream function, cu is the vorticity, and R is a nonnegative constant called t h e Reynolds number.
On S the bound-
ary conditions t o be satisfied a r e
ax =
(7.5)
0, on BC
The analytical problem is defined on R t S by (7.1)-(7.6) and is shown diagrammatically i n Figure 7.1.
Physically, one c a n
think of a fluid contained between walls DA, AB, and BC , while a force is applied on t h e surface of t h e fluid in the direction from C t o D. Since the above problem is of wide interest to fluid dynamicists, and s i n c e t h e development of intuition is to be encouraged, let u s , rather than merely list t h e algorithm, retrace the a c t u a l s t e p s of its development.
In t h i s spirit, then, note t h a t t h e first s t e p for the
numerical analyst is t o immerse himself in t h e problem.
This implies
FLUID PROBLEMS
21 0
Figure 7.1
reading and discussing a l l a s p e c t s of the problem including existence and uniqueness theorems , experimental physical results , and available numerical methods.
After two months of such activities, the
following results were uncovered for the problem under consideration: (1) Problem (7.1)-(7.6)
63
, and
h a s a unique generalized solution for small
a t l e a s t one generalized solution for a l l 63
.
(A generalized
solution is one which satisfies certain integral relationships related t o the differential equation, and hence need not, i n general, be
21 1
PROTOTYPE LIQUID PROBLEM differentiable everywhere).
exists for any 63 > 0.
It is not known if a c l a s s i c a l solution
(See Ladyzenskaya.)
(2) Many fluid dynamicists seem t o feel that (7. 1)-(7.6) is a reasonable approximation for the physical problem only i f R 1.3000, while
a few aerodynamicists (see, e.g.,
Mills) allow R 1.100,000.
(3) Laboratory experiments (Pan and Acrivos) show that for small
Reynolds numbers (63
- 50), the flow should look like one large vor-
tex in the central portion of the square with two very small secondary vortices in the corners A and B.
Moreover, a s the Reynolds number
i n c r e a s e s , t h e s e secondary vortices disappear. (4) Asymptotically, it h a s been shown (Batchelor) that a s 63
.-r m,
the vorticity i n a large central subregion of R converges t o a cons t a n t value. (5) Finally, several numerical methods (see Greenspan ( 1 0) for such
references) had been formulated and implemented, but a l l were divergent for 63 > 250. It follows, then, from the above d i s c u s s i o n , that since we a r e seeking a classical solution for the problem, that is, one which is actually a solution of the differential equations on R, and since no such solution is known to exist, we must be guided in developing a numerical method by the other knowledge gathered above.
F LUID PROBLEMS
21 2
W e begin with t h e reasoning of Kawaguti, and a s a starting point in developing a method, observe t h a t (7.1)-(7.2) is a coupled system of partial differential equations i n $ and
(I).But,
if
(I)
is
known, then (7. 1 ) is a l i n e a r e l l i p t i c equation i n $, while if $ is known, then ( 7 . 2 ) is a l i n e a r e l l i p t i c equation i n cu. making initial g u e s s e s 11")
~ 0 ' ~ ) . Use (I)"),
(I)'~) i n (7.
1 ) to produce $(').
i n (7.2) to produce Use'
11")
i n (7.2) to pro-
and so on, a s shown i n Figure 7.2,to generate t h e sequences
1c1 (0) (1) (2),$(3),...; 111
and proceeding a s follows.
i n (7. 1) to produce $(l). Use
U s e (I)'')
duce
and (I)")
This s u g g e s t s
111,
(I)
(O) ( 1 ) , ~ ( 2 ) , ~ ( 3 ) , . . .
.
If t h e s e q u e n c e s $
and ( I ) ( ~ ) converge , then w e might hope t h t they would converge to t h e solution $ and
(I)
of t h e given problem.
Numerically, we will
try t o carry out such a double sequence construction on
%
and Sh,
rather than on R and S, by means of t h e techniques developed i n Chapter 3.
Figure 7.2
In order to proceed on
%
and Sh, w e will need difference
approximations for t h e differential equations, and, i n the notation
(k1
PROTOTYPE LIQUID PROBLEM of Figure 7.3
, we
213
begin with the following. If w is considered t o
be known, then approximate (7. 1) by
while, if 3 is considered t o be known, approximate (7.2) by
or, equivalently , by
Observe next that to generate
on
%
from (7.7), one must
know q on Sh, and t h i s is available from (7.3)-(7.6). generate w on
%
from (7.9), one must know w on Sh, and t h i s
is not available from (7.3)-(7.6). need only be concerned with be concerned with both used for
R,, we
But, t o
R,
Thus, when generating 3 , one
R,, but when and Sh.
generating w, one must
Since (7.9) is proposed t o be
must decide how t o approximate w on Sh, and t h i s
will be done as follows. Assume that (7. 1) is satisfied on S and consider the Laplace operator $=
t $yy.
Let (x,y), ( x t h , y) , (x, y t h ) , (x,y-h) be numbered
FLUID PROBLEMS
21 4
4
1
Figure 7 . 3 (x3Y-h)
0 , 1, 2 , 4 , respectively, as shown in Figure 7.4a.
4 be in S, while 1 is in R.
L e t 0, 2 and
Consider the determination of para-
meters ao, al , a2, a4, a5 such t h a t
In (7.10) expansion of $1 , q2 and ?1, into Taylor series about the 4 point numbered 0 and reorganization of terms implies
h2
h2
+ ?1,=(ya1 ) t ?1,YY (-a2 2
t
h2
-a 2
4
) t
0 . -
In this latter equality, the setting of corresponding coefficients equal yields
a +a +a t a = O 0
ha
1
2
+ a5 = 0 ,
h2 2 a 1 = 1
4
ha2-ha
-a h2 I
2
2
4
= O
tu h2 = 1 , 2 4
PROTOTYPE LIQUID PROBLEM
21 5
0
Figure 7.4
FLUID PROBLEMS
21 6 the solution of which is
2 1 2 h 2 , a l = g r a 2 = a 4 = p , a5 = - - h '
a =-- 4
Thus one arrives a t the following approximation:
Finally, from (7.1), (7.3) and (7. l l ) , it follows that
(7.12)
uo
=
2J/1 . -3
Similarly, for the point arrangement shown i n Figure 7.4 b ,
- - -2J/2.
(7.13)
h2
0 -
for that i n Figure 7 . 4 ~ ~ (7.14)
'Oo =
--a
2+3 h2 '
while, for Figure 7.4d, since q = Y
- 1 on
DC ,
(7.15) An algorithm c a n now be formulated a s follows.
Method N. S. Step 1
For given h, construct and number the points of
and Sh a s is usual for elliptic problems.
%
PROTOTYPE LIQUID PROBLEM
$io)
= 0 on
21 7
and aio’= 0 on
Rh “h’
Step 2
Set
Step 3
Generate sequences $(k) on
% t Sh
by t h e alternating procedure shown i n Figure 7.2 a s
follows.
(7. 1 6 )
%
and
on
Apply method D with
-4q0(k) t
to generate $(k) on
(k) t $2(k) t
Rh.
$F)t
= - h 2 a r - 1 ) , k = 1,2
,...,
Apply then
on AD:
on AB;
on BC; (7.20)
on CD, t o approximate a(k)on Sh.
Then, apply Method D with
FLUID PROBLEMS
21 8
Step 4
For given positive
E
1
and
E ~ terminate ,
the itera-
tion of Step 3 when
Step 5
Call $(ktl)
and ~ ( ~ ' l so ) ,generated, the numerical
solution of the given problem.
Method N. S. works relatively well but diverges for
1 and h = 40
.
a'> 250
However, rather than give the numerical results so
derived, let u s delay and give the results after the method h a s been modified t o eliminate the divergent behavior. In order t o probe the reasons for divergence when R > 250, the computer output had t o be read item by i t e m and very often graphed by hand so a s not t o m i s s possible troubles in the program and/or the method.
After a week of such study of the massive computer output,
it was found that divergence resulted because the generalized Newton's method w a s diverging i n its attempt t o generate u ' ~ ) . This led to a n actual listing of the equation (7.2 1) for each value of k and it w a s discovered that diagonal dominance had been lost.
4% (k) - (k) 4(+2 q4 )
4% (k) and 4(+1
- +38 ))
Indeed, the terms
were becoming so large that the
matrix of the resulting system was losing its diagonal dominance.
The
21 9
PROTOTYPE LIQUID PROBLEM natural remedy then, t o maintain the diagonal dominance, was t o
introduce the forward-backward technique described in Section 2.8, and t h i s w a s done a s follows.
Modification 1 of Method N.S. Set
and approximate (7.2) by
where
or, equivalently, replace ( 7 . 2 1) by
tJk) = 0, 4
if
a , 0, B < 0,
FLUID PROBLEMS
220
t
( 1 -?)my
= 0,
if
a
The application of the new algorithm resulted i n convergence 5 1 for 0 t R 5 10 , h = lo , but diverged for h <
10
So, t h e output
had to be studied very carefully again, a d t h i s t i m e it w a s discovered that the numerical results were not good approximations fcr t h e derivative conditions on S and that , o ( ~ ) w a s diverging on S h' h'
To
remedy the situation, since both deficiencies were on the boundary, a set of "inner boundary" points like those shown t o be crossed in
Figure 7.5, w a s introduced and the method w a s modified a s follows t o force good numerical approximations t o the derivative conditions on the boundary. A t a point (x,y) of AD and numbered 0 , a s i n Figure 7.6a
set (7.28)
By (7.3) , then, (7.28) reduces t o (7.29)
92
$1 = - 4
.
221
PROTOTYPE LIQUID PROBLEM
Y
t
Al Figure 7.5
If one u s e s a similar numbering of points on the other parts of S h' a s shown in Figures 7.6(b), (c), then in each case (7.29) follows, while for Figure 7.5(d) because $ = Y
-1
on DC, one has
Thus, the following modification was made.
222
FLUID PROBLEMS
0"
1
52
2
1
Figure 7.6
PROTOTYPE LIQUID PROBLEM
223
Modification 2 of Meth,od N.S. A t e a c h point of
%
of t h e form ( h , i h ) , i = 2 , 3 , . . . , n - 2 ,
set
(7.30)
A t e a c h point of
..
- 1, set
R,
of t h e form ( i h , h) , i = 1 ,2,.
51
oftheform (1-h,ih),
i=2,3,...,n-2,
set
%
oftheform ( i h , l - h ) ,
i = l,Z,...,n-l,
set
,n
(7.31) Ateachpointof
(7.32) Ateachpointof
(7.33) Then, apply (7.16) only on t h e remaining points of €$ and solve the resulting system to generate
q(k)
on
%.
Note, incidentally, t h a t t h e application of (7.30)-(7.33) on the inner boundary preserves diagonal dominance. Computer runs with t h e new algorithm resulted i n convergence for
0 I R 5 lo5
and h =
15
, but
divergence for h c
Detailed study of t h e output revealed t h a t sequence diverging on Sh.
1 15 '
U J ( ~ ) was
still
But a n a l y s i s of the divergence showed t h a t , at
c e r t a i n points of S , h
seemed to be converging and then suddenly
FLUID PROBLEMS
224
it would overstep its l i m i t and become unbounded rapidly.
Thus; it
was deemed reasonable t o slow down the convergence rate of cu (k) , and t h i s was done a s follows.
Modification 3 of Method N. S. On
% + Sh,
denote the resulting approximation by Step 3 i n
Method N.S. of cu by
G(k).
Then, a t each point of F$ t Sh define
( u ( ~ ) by the smoothing formula
Computer examples t h i s time converged for 0 1.63 t l O5 and h =
20
, but
1 diverged for h < 20
result of
.
The divergence again w a s the
becoming unbounded a t points of S h'
Finally, for no reason other than a l l other possible modifications seemed t o have been exhausted, it w a s decided t o explore a smoothing of
JI in the following fashion.
Modification 4 of Method N.S. On
%,
denote the resulting approximation by Step 3 in Method
N.S. of 7) by $(k). Then, a t each point of
%,
define
q(k)
by
Computer examples then converged for 0 5 63 I1O5 and, in order, for h = 25
- 30' 40 ' 50
- - , and 60' 70' 80
L , a t which 99
PROTOTYPE LIQUID PROBLEM
225
point storage problems became significant and the computations ceased.
Let u s then show next some of the numerical results, which
are given a s continuous curves by interpolation on the grid lines.
Figure 7.7(a) -1 o
-~
.lo-%
Figure 7.7(b)
FLUID PROBLEMS
226
Level $ curves, called streamlines, are shown in Figure 7.7a, where a primary and two secondary vortices are shown for 1
6 3 ~ 5 0 , h = -4o ,
El
=
E2
= 10- 3 ,
t i m e on the UNIVAC 1108 was 28 minutes. Figure 7.7b p = 0.95.
values
p = 0.90.
P = 0.03,
1 5 for 63 = 10 , h = 4o ,
E~
=
The running
Streamlines are shown in E
~
-4
1=0
, P=
0.03,
Convergence was achieved i n 27 minutes, but the starting and
(u'')
were taken from a previous computation with
4 63 = 1 0 (see Greenspan (8)).
The disappearance of the secondary
vortices i n Figure 7.7b is in agreement with the experimental results of Pan and Acrivos. the level curve character.
(u
5 In Figure 7.8 is shown for the c a s e 63 = 1 0
= 1.630
, with its
double spiral , space filling
Numerical verification of Batschelor's result that vor-
ticity in a large central subregion of R converges to a constant a s
R
4 0 0
is exhibited i n Figure 7.8
by a darkening of those points
a t which the vorticity is between 1.6 and 1.7. A final note of interest is in order.
Though the residuals were
slightly higher, the numerical results using (7.24)-(7.27) a l s o proved
to be a solution of (7.21) for a l l values of 63 in the range studied.
227
BIHARMONIC PROBLEMS
14.5
80
-1 4 15
0
-16.8
0
Figure 7.8 7.3
Biharmonic Problems A t t h i s point it is convenient t o notice that a variety of prob-
lems in both fluid dynamics and elasticity can be formulated a s biharmonic problems, which, i n terms of the square of Figure 7.1, can be stated a s follows.
Find a solution on R of the biharmonic equa-
tion (7.36) given $ on S, given $, and AB.
on AD and BC, and given $
If one notes that setting
Y
on CD
FLUID PROBLEMS
228
(7.37) implies
then it follows readily that the biharmonic equation is equivalent t o the system (7.39)
A+ =
(7.40)
AU = 0 .
-W
But t h i s system is a special c a s e of (7.1)-(7.2)
wit.. R = 0 , and
c a n then be solved e a s i l y by the method of Section 7.2.
7.4
A Prototme T i m e Dependent Fluid Problem
-
Thus far attention h a s been restricted to steady s t a t e , liquidtype problems.
Attention will be directed next t o nonsteady, or
dependent, liquid type problems and will be restricted, for illustrative purposes, only t o the following prototype cavity problem. twofunctions + ( x , y , t ) and u ( x , y , t ) , such that for a given
(7.41)
A+=
positive
number
0 5 x 5 1, O < y (
Find
1, 0
~
R the following are valid:
3 a2 t & 2 = - a ; O < x < 1, ax ay
O
1, O < t
t
PROTOTYPE TIME DEPENDENT PROBLEM
229
$!(X,Y,O) =CD(x,y,O) = 0; 0 d x 5 1, 0
(7.43)
5
y
5
1
and $(X,l,t)
(7.46)
= 0,
2& (x,l,t) = -1; aY
0 6x
s 1, 0
S
t
.
A Boundarv Value Technique
7.5
Because of its simplicity, economy, and similarity to the methods discussed thus far, a boundary value technique for problem (7.41)(7.46) will be developed first.
Application of t h i s method, unlike
those which follow, requires t h e assumption that (7.41)-(7.46)
has a
steady state solution which is independent of t h e initial conditions. The method proceeds a s follows. With grid s i z e h , first solve numerically the steady state prob-
l e m (7.1)-(7.6). ah(x,y,m).
This numerical solution is denoted by 7+bh(x,y,w),
Next, for fixed t = T , subdivide 0 5 t 5 T into n equal
parts, each of length A t , by means of the points
...,
n, and , a s shown in Figure 7.9
5 = kAt,
k = 0,1,
, let P b e the rectangular paral-
lelepiped defined by P = ( ( x , y , t ) : 0 5 x 5 1, 0 5 y 1. 1, 0 5 t 5 T I e
FLUID PROBLEMS
23 0
Define R t o be the interior and S t o be the boundary of P.
Y
Y
1
t
X
X
X
F i g u r e 7.9
Using space grid s i z e h and t i m e grid s i z e A t , then construct in the usual way the three dimensional sets of interior grid points, denoted t h i s t i m e by %,At
t i m e by S h,At'
and boundary grid points, denoted t h i s
A t the boundary grid points set
A t each point (x,y, t) of
(7.50)
I
define
7 ) (0)( x , y , t ) = 0 , cu(O)(X,Y,t) = 0
.
BOUNDARY VALUE TECHNIQUE
231
We now show how t o construct from (7.50) on R
h,At
a sequence
of discrete functions
and on %,At
"h,At
a sequence of discrete functions
which will both converge.
For t h i s purpose, a t each point of
%,At
write down the difference equation
Inserting the known values (7.47)-(7.49)
wherever possible into
(7.53), solve the resulting linear algebraic system by the generalized Newton's method. then on
If the resulting solution is denoted by
the element
ing formula
set N e x t , a t each point of S h ,At (7.55)
11- (1),
of (7.51) is defined by the smooth-
FLUID PROBLEMS
23 2 where $(l) is evaluated at t h e point of
R,
,A t
which is nearest to
t h e given point and where
4=
(7.56)
{
1,
if y = 1
0,
if Y f l .
Note t h a t (7.55) is a c o n c i s e way of expressing (7.12)-(7.15). e a c h point of
%.,At8
write down the difference equation
where (7.58)
a = $("(xth,y,t)
(7.59)
Y =
(7.60)
B =
(7.6 1)
B =
(7.62)
6 =
(7.63)
6 =
$(l)(x,yth,t)
-
$(l)(x-h.v,t) 2h
-$
(x. y
- h , tl
2h W(X.Y
th.t) -w(x,y,tl h
,
i f a 2 O
m(x,v,tl - w ( x . y - h n t l, if a < 0 h
w(x+ h,v,t) - ~ ( x , Y , h
'1,
if
y
At
BOUNDARY VALUE TECHNIQUE
233
Insert the values (7.55) wherever possible and solve the system The solution is denoted by
;('I.
which completes the construction of the element
LU")
in sequence
$('I
and
generated by (7.57). "h,At
%,At
Then, on
define
(7.64)
(7.52).
One proceeds next t o construct +(2) from the same spirit as +(l) w a s constructed from $(') to generate
in
LU")
and a ' ' ) ,
from $(2) j u s t as a(') w a s generated from
and
+(1).
In the indicated fashion, the iteration continues until, for some preassigned tolerances
E
1
and
The discrete functions $ (ktl)
E ~ one ,
finds that, uniformly,
and LU (ktl)
a r e taken t o be numerical
approximations of $ ( x , y , t ) and w ( x , y , t ) , respectively. Various examples for 0 < R 5 500 were run on the UNIVAC 1108.
Since a l l behaved similarly, we shall d i s c u s s in detail only
the c a s e R = 500, with which other authors have found exceptional difficulties (see, e. g., Pearson).
FLUID PROBLEMS
234
The steady state problem (7.1)-(7.6) of Section 7.2 for h = Figures 7.10 and 7.11. and
E~
=
E~
20 '
w a s solved by the method
These results are shown graphically i n 1 2
Then, with T = 5 , A t =-,
P = 0.3, p = 0.7
-3 = 1 0 , the method of t h i s section converged in 5 4
iterations, which took 8 minutes of running t i m e .
The stream curves
$ = 0.09, 0.07, 0.05, 0.03, 0.01, and equivorticity curves 1.6, 0 are given for t = 1 , 2 , 3 , 4
cu = 4 ,
in Figures (7.12)-(7.19).
It should be observed from t h i s example that one g e t s excellent results for large t i m e s t e p s , which makes the method relatively attractive.
Steady s t a t e stream curves.
Steady s t a t e equivorticity curves.
Figure 7.10
Figure 7.11
BOUNDARY VALUE TECHNIQUE
Stream1 i nes at t=l . Figure 7.12
235
I
Streamlines at t=2. Figure 7.13
-g .03
.Ol Streamlines at t=3.
Streamlines at t=4.
Figure 7.14
Figure 7.15
236
FLUID PROBLEMS
E q u i v o r t i c i t y curves a t t=l. F i g u r e 7.16
E q u i v o r t i c i t y curves a t t=3. Figure 7.18.
E q u i v o r t i c i ty curves a t t=2. Figure 7.17
E q u i v o r t i c i t y curves a t t=4. Figure 7.19
METHOD OF FROMM
7.6
237
The Method of Fromm An explicit, step-by-step method which h a s proved t o be of
value for a large c l a s s of t i m e dependent problems, whether or not a steady s t a t e solution exists, is the method of Fromm.
The basic
idea is t o preserve certain energy relationships (see Fromm) by differencing (7.64) in the equivalent form
(7.67) A s applied t o Problem (7.41)-(7.461,
follows.
Let
the method can be given a s
A t and Ax = Ay = h be grid sizes, and, for simplicity,
use the notation (7.68) (7.69)
(7.71)
i,l
= u ( i h , jh, kAt)
.
Then, Step 1
Generate u")
ard method.
i,l
a t interior grid points by any stand-
One c a n d o t h i s by applying any of the methods
for parabolic problems t o either (7.42) or (7.67). erate tion
4'i,l)
Then, gen-
by applying Method D with the difference equa-
FLUID PROBLEMS
23 8
Finally, determine Step 2 generate
i,j
a t boundary grid points by means of (7.55).
To proceed, in general, from o)
(ktl)
i,j
5
t o t j t l , k = 1,2
explicitly at interior grid points by
1
r
N e x t , generate q (ktl) by Method D , using i,j
Finally, generate o(ktl) i,j
at boundary grid points by means
of (7.55). The stability criterion used by Fromm is
(7.75)
A t < min [ 2 h 2 ,
max
,...,
METHOD OF PEARSON 7.7
239
The Method of Pearson Just a s we improved the methods for parabolic problems by pro-
ceeding from explicit t o implicit methods, Pearson h a s attempted, e s s e n t i a l l y , a similar improvement i n the method of Fromm by generating w (ktl) i,j
implicitly from
where
-4ui
twitl
tui .tl
. tUi
'-1
(7.77) 'hwi, j =
hz
.
It is interesting to note, however, that Pearson h a s t o modify Fromm's method further i n t h a t , i n order t o converge to a steady state solution, he requires smoothing and convergence of a double sequence, a s shown in Figure 7.2, at each t i m e step.
7.8
Remarks on Three Dimensional Problems For nonsymmetric , three dimensional N a v i e r Stokes t i m e depen-
FLUID PROBLEMS
240
dent problems , one cannot transform t o a stream function and vortic i t y formulation, and one must study the problem directly in terms
of velocity components.
Such problems are basic, for example, in
numerical weather prediction.
The methods available , like that of
Chorin, are limited by such stability conditions a s RAt < < 1
(7.78)
and require relatively large amounts of computation time.
The method
of Chorin is a step ahead method which incorporates, in addition, a predictor-corrector technique.
Generally speaking, much work has
yet to be done in this vital area.
7.9
Hyperbolic Systems We turn finally to the study of the motion of a fluid which has
the characteristics of a gas.
Problems in gas dynamics are usually
divided into two categories, those of low speed and those of high speed, because high speed motion is characterized by the emergence of shock waves, which are nonexistent in the low speed case. Though there are a large number of equations thought to model gas flow at low speeds, the numerical solution of these equations often can be accomplished by the methods already developed.
Thus,
the steady state model of von Mises can be solved numerically by
HYPERBOLIC SYSTEMS
241
the methods of Chapter 6 (see, e.g.,
Greenspan and Jain), while the
time varying model of Batchelor c a n be solved numerically by the methods of Chapter 7 (see, e.g.,
Schultz). For t h i s reason, we will
direct attention only to the c a s e of high speed flow, which will require the development of entirely new numerical methods. The high speed flow of a compressible, inviscid fluid, like a g a s , is usually modeled i n terms of hyperbolic systems of first order partial differential equations (Courant and Friedrichs) and it is such systems which will be studied first.
For mathematical clarity the
discussion will be limited t o two equations i n the two dependent variables v and w and the two independent variables x and y. Generalization to other systems follows i n a natural way. Consider the problem of finding a pair of functions v(x,y) , w(x,y) which satisfy a system of first order partial differential equations of the form
a (7.79)
a If a
i,j'
b
i,j'
d
i
said t o b e linear.
v t a w t b v t b w t d = O 11 x 12 x 11 y 12 y 1 2lVX t a 2 2
w t b
x
v t b
21 y
w t d = O . 22 y 2
depend only on x and y, then system (7.79) is If , however, they can depend on x, y, v and w,
then the system.is said to be quasilinear. Analysis of system (7.79) is made e a s i e r by use of matrix notation a s follows.
Let
FLUID PROBLEMS
242
Then 7.79) is equivalent t o (7.81
Afx t Bf
Y
t d = 0.
System (7.79), or, equivalently, (7.81), is said t o be hyperbolic if and only if the determinantal equation
has roots
X1'
X
2
which are real and distinct.
assume that (7.79) is hyperbolic. dx dY
Throughout, we will
The solutions of = X2
are called the characteristics of (7.79).
Also, note that if T is a
two-by-two nonsingular matrix, then (7.8 1 ) is equivalent t o (7.82)
TAfx t TBf
Y
t Td = 0
.
If , then,
and T is any nonsingular matrix such that TA = CTB
HYPERBOLIC SYSTEMS
243
then (7.82) is called a normal form of (7.81). Example 1 Consider the wave equation u
(7.83)
xx
-u
YY
=o.
If v = u
w = u
X'
Y '
then
v -w
(7.84)
X
Y
=o,vy-w
X
=o,
which is a linear system of type (7.79) which is equivalent t o (7.83). Indeed, (7.84) is of form (7.81) with A
=(o1
N e x t , since
it follows that
implies
0 .
B
=(:
d
=(I)
FLUID PROBLEMS
244
xl=
(7.85)
1,
x2 = - 1 .
Thus, system (7.84) is hyperbolic, which is consistent with (7.83) being called a hyperbolic second order equation.
of the system a r e the solutions of
or x-y=cl,
x t y = c 2 .
Finally, t o get a normal form of (7.84)
, let
Then we wish t o have TA = CTB
But
so that one wishes t o have
.
The c h a r a c t e r i s t i c s
HYPERBOLIC SYSTEMS
245
or, equivalently
y = -6 - 6 = y ,
one solution of which is
Thus, one possible choice of T is
But then 1 TA = (1
1
-$
1 0 ( 0 -1) =
(; -;)
and system (7.82) is
(; -;) (w") X
+
(!l
I;)(>)= Y
or, equivalently, v
X
(7.86) v
X
- w
X
t
v
t w x - v
Y Y
- w - w
Y
Y
= o = o
O
246
FLUID PROBLEMS
which is a normal form equivalent of (7.84). ExamDle 2 The one dimensional isentropic flow equations are
Pt t
t pux = 0
UPX
(7.87) L
p(u t u u ) t c p = 0 ,
t
x
X
where u is velocity, p is density, and c = c ( p ) is the speed of sound.
With the change of variables
v=u, w=p, y = t , system (7.87) can be rewritten a s w (7.87' )
t v w
Y
X
t w v x = o L
wv t w v v t c w = 0 . Y
X
X
This is a quasilinear system of form (7.79) with A
=(w
wv cv2) l
B =
(1 :),
d =
Hence, A-hB =
sc that
(7.88)
2
(I).
HYPERBOLIC SYSTEMS
247
Since w = p is the density, assume w f 0 , so that (7.88) implies c
2
- ( v - X )2 = 0 ,
or x=v+c. Since c is the speed of sound, assume c
# 0,
so that
x1 -- v t c , x2 = v - c o The characteristics of system (7.87') are the solutions of
dx dY
dx = v - c , = v t c , dY
which cannot be solved because v is unknown.
To get a normal
form of (7.87') , let
Then TA = (a
Y
):
(w
v)
wv c 2
-
(aw t &W yw t 6wv
Thus , TA = CTB
a v t BC') y v t 6c2
248
FLUID PROBLEMS
which implies
aw t pwv (yw
+ bwv
av t
pc2) -
(vpw t cpw
- v b w - cbw
y v t bC2
va t ca)
vy
- cy
1
or, since c f o , w f o , a =
cp
a = cp y = -c6 y = -c6. A solution of the latter system is
?j
= 1, a = c ,
6 = 1, y =
that one c a n choose
Then , TA =
t vw
c v t c‘)
-cwtvw
-cvtc2
(CW
w TB = ( w
c
-J
‘
and a normal form is cw t v w (-,wtw
or , equivalently,
cv t c 2 -cvtc2
NE) (.: “36)= Y
O 8
-C,
SO
INITIAL VALUE PROBLEMS
249
(cw t v w ) v x t (cv t c 2 )w t w v t c w (7.89)
2 ( - c w t v w ) v t ( - c v t c )w t w v - c w X
7.10
Y
X
X
Y
Y Y
= 0 = 0.
Initial Value Problems It can be shown that any hyperbolic system (7.79) h a s a normal
form, so that in considering initial value problems for hyperbolic systems, we assume that the system is already in normal form. We allow the normal form to be quasilinear.
In formulating initial value
problems, we assume v and w are given on some curve, which, for simplicity, will be taken as the X-axis.
It will be assumed a l s o
that the X-axis is not a characteristic of the given system. We will wish t o find solutions v , w of the system for y > 0 which take on the given initial values on the X-axis. value problem is defined as follows.
More precisely, a n initial Given
v(x,O) = g(x),
on X axis
w(x,O) = h(x),
on X axis
then, for y > 0, find v ( x , y ) , w(x,y) which satisfy initial conditions (7.90), and which for y > 0 are solutions of
FLUID PROBLEMS
250
CAfxtAf
Y
t d = 0 ,
or, equivalently, of
or, equivalently, of
c a (7.92)
v ' l1 c a v
2 21 x
t c a
w
1 12 x
t c a2 2 w
+a llVytalZWy + d l = O + a2 1 ~ y + aw t d = O . 22 y 2
Existence and uniqueness of initial value problem (7.90)-(7.92) is known only in the small (Courant and Hilbert) , and since no known analytical method is available for solving it, we turn next t o a very general, useful scheme for approximating a solution.
7.11
The Method of Courant, Isaacson and Rees Of b a s i c importance in t h e method t o be developed a r e the
difference approximations of (7.91) and (7.92).
For t h e Method of
Courant, Isaacson and Rees, t h e s e are given a s follows.
Fix A x =
h, Ay = k and number t h e four points ( x , y ) , ( x t h , y ) , ( x , y t k ) , (x-h,y) with 0, 1, 2 , 3, a s shown in Figure 7.20.
Then approximate (7.91)
251
METHOD OF COURANT, ISAACSON AND REES
and
t a 22
(0)(W2-Wo)+d2(O) = 0 , k
where v -v w -w 0 3 O = h , B = h
a
v -v 0
-
y
y
=
=
h
, if
C&O)
0
3 1
6
v - v 17 ,0 6
=
h w - w
=
h
Figure 7.20
O
,
if cZ(o) <
o
.
25 2
FLUID PROBLEMS
The algorithm can now be formulated as follows. Step 1
For
Ax = h, Ay = k , construct grid points i n the
upper half plane. Step 2
Beginning on the X-axis, generate approximations for
v and w from three known values a t (x, y) , ( x t h , y) , (x-h, y) , a s shown in Figure 7.20, a t the point (x, y t k ) by writing down (7.93) and (7.94) and then solving t h e s e two equations for v2 W
2'
Step 3
.. ,
Continue from row k to row k t l , k = 1 , 2 , 3 , .
indicated i n Step 2.
For linear systems, the stability condition for the above method is h
i; I max
(7.95)
(ICJ
I
lc21 1
#
whlch is to be valid over the entire region of interest.
For
quasilinear systems, (7.95) may be of little, or no, value.
Example Consider the isentropic flow equations (7.87) in normal form (7.89) with c = 1100, t h a t is, (1100 t v)wvx t (11OO)(v t 11OO)WXt wv t l l O 0 w = 0 Y Y (-llOOtv)wvx t (1100) (1100
- v)wx t wvY -11oow Y = 0 .
as
253
METHOD OF COURANT, ISAACSON AND REES
Let v(x,O) = 0, w(x,O) = x
.
Let us approximate v(l,.l), w(l,.l). Since the system is in normal form,
a
11
= w, a
- 1100, a21 = w, a 2 2 = -1100
12 -
c = 1100 t v , c = ~ - 1 1 0 0 ,d = d 2 = 0. 1 2 1 Choose h = 1, k = .l, and number the points (1, O ) , (2,0), (1 ,.l),
(0,O) by 0, 1, 2, 3, as shown in Figure 7.21. Y
Figure 7.21
Then, v
0
= v(1,O) = 0
w
0
= W(1,O) = 1
v = v(2,O) = 0 1
w = w(2,0)= 2
v = v(0,O) = 0 3
w = W(0,O) = 0 3
1
FLUID PROBLEMS
254
Hence, a l l ( 0 ) = wo = 1
aZ1(0) = wo = 1
c (0) = 1100 t v = 1100
c (0)= vo 2
a
a
0
1
12
(0) = 1100
22
- 1100 = -1100
(0) = -1100
.
d (0) = d2(0) = 0 1 Thus, (7.93) and (7.94) become t 1100 (vo t 1100)
t w0
(vo
- 11OO)Wo
t 1100 (w;/l;o) (U) 1/10
(V)
t (1100)(1100
two
(-)
= 0
- vo) -w
- 1100 ( W f / l o
0) = 0
,
or, equivalently, v t 1100 w - -(llOO)(l09) 2 2v
2
- 1100 w 2 = -(1100)(111)
t h e solution of which is t h e desired approximation.
7.12
The Lax-Wendroff Method
In gas dynamical problems, one often encounters a hyperbolic system of equations i n t h e s p e c i a l form
255
LAX-WENDROFF METHOD
av -
a [f ( v , w ) l = 0 ax 1
t
at
aw at
2 [f (v,w)] = 0 ax 2
Such a system is said t o be in conservative form because f 1 and f
2
often represent such conserved quantities a s energy, mass, or
momentum. For such systems the Lax-Wendorff method is of particul a r value and can be outlined a s follows. If one h a s determined v and w on the line t = t
*
of a
rectangular grid with grid s i z e s Ax and A t , then one proceeds t o grid points with t = t* t A t in two steps.
First one determines v
and w at centers of rectangle mesh a r e a s by
--2Ax At w(x t?,
(fl(V(XtAx,t*), w(xtAx,t"))
t* t
--A t 2Ax
5) 1 =
2
- f,(v(x,t*), w(x,t*)))
[w(xtAx,t") t w(x,t")]
(f (v(xtAx,t*), w(xtAx,t*))
- f2(v(x,t*), w(x,t*)) ).
2
Then, determine v and w at mesh points of the form (x, t* + A t ) from V(X,t"tOt)
= v(x,t")
--
,
At Ax At - f l (v(x - bz2 ,t* t y), w(x - y ,t* t
)
FLUID PROBLEMS
25 6
- f2(v(x- 5,t* t ,I,At
w(x
Ax -~8~
At ty ))l*
For a relatively concise discussion of stability conditions for the Lax-Wendroff method and of its application t o t h e construction of shock waves, see Ames.
7.13
Other Methods With regard t o other available methods for fluid problems, the
most notable is the particle-in-cell method (see Amsden and the references contained therein). This is an expensive but valuable method which has been applied with apparent success t o very broad categories of fluid dynamics problems.
With regard to boundary layer
calculations , the method of Spaulding is both interesting and promising.
EXERCISES
257
Exercises 1.
Derive formulas (7.13)-(7.15).
2.
Prove that application of (7.30)-(7.33) on the inner boundary preserves diagonal dominance.
3.
Let A(O,O), B ( 1 , 0 ) , C ( 1 , 2 ) , D ( 0 , 2 ) be a rectangular cavity. Consider t h e two dimensional, steady state, NavierStokes equations ( 7 . 1 ) - ( 7 . 2 ) on R and boundary conditions (7.3)(7.6) on S.
Using h = 0 . 1 , generate numerical solutions for
the three c a s e s R = 1 , 1 0 0 , and 1000, and graph the resulting flows. U s e smoothing in all three cases. 4.
Generate the numerical solution of the initial value problem (7.41)-(7.46) for each of R = 1 , 1 0 , and 100 by the method of
Section 7.5. 5.
Generate the numerical solution of initial value problem (7.41)(7.46) for each of R = I . , 1 0 , and 100 by the method of Fromm
and compare your results with those of Exercise 4.
6.
Generate the numerical solution of the initial value problem (7.41)-(7.46) for each of R = 1, 10, and 1 0 0 by the method
of Pearson and compare your results with those of Exercises 4 and 5.
FLUID PROBLEMS
258
7.
Determine which of the following systems are hyperbolic.
For
those which are, find the characteristics and a normal form. v t w X
t v -w
X
Y
v t w - v X
X
v -w X
v -w
Y
vxtw
X
v t w
=o
v t w
=o
Y
Y
Y
-v
Y X
Y
= o =o
t v -w X
=o
Y 'W
X
v -w
X
Y
Y
- v
X
8.
-w Y
t v -w
X
X
Y
Y
-w
Y
=o =o =o
Find a normal form, different from (7.89), for the one dimensional, isentropic flow equations (7.87).
9.
Consider t h e isentropic flow equations (7.89) with c = 1100. Let v(x,O) = x, w(x,O) = x
2
.
Approximate v ( l , O . l )
and
w(1,O.l) by the method of Section 7.11 for each of t h e following
cases. (a)
h = 1, k = 0.1
(b)
h = 1, k = 0.05
(c)
h = 0.5,
k = 0.1
(d)
h = 0.1,
k = 0.01
CHAPTER VIII DISCRETE MODEL THEORY
8.1
Introduction From the mathematical point of view, it is somewhat less than
satisfying to r e a l i z e t h a t , for r e a l i s t i c nonlinear models, rarely a r e w e a b l e to show t h a t the numerical solution generated by a finite difference technique converges to a n a n a l y t i c a l solution a s t h e grid s i z e converges t o zero.
A natural way out of t h i s plight is simply to
t a k e t h e difference equation one u s e s , rather t h a n t h e given differential equation, a s t h e dynamical equation. The s e l e c t i o n of a dynamical difference equation a b ovo, without a n y consideration of a differential equation, is the e s s e n t i a l s u b s t a n c e of d i s c r e t e model theory. In t h i s c h a p t e r w e w i l l i l l u s t r a t e i d e a s and methods of d i s c r e t e model theory by developing basic d i s c r e t e , plane Newtonian dynamics ,
thereby constructing a physical theory which w i l l b e entirely arithmetic , and therefore completely compatible with digital computer capabilities.
8.2
P a r t i c l e s , T i m e , and Motion From a purely mathematical point of view, one c a n consider the terms
particle,
time, and
motion a s undefined and c a n then proceed t o define
other c o n c e p t s i n terms of t h e s e .
(The reader unfamiliar with the role of
undefined terms i n a mathematical s c i e n c e should, a t t h i s point, read the 259
DISCRETE MODEL THEORY
260
Appendix). Nevertheless , physically, it is desirable to have some intuition about t h e s e rudiments and i n t h i s s e c t i o n w e w i l l try to develop such intuition. A particle of a given solid will be considered to b e a small
spherical portion of the solid, A plane particle, which is the only kind with which we w i l l d e a l , will be any great circle s e c t i o n of a particle.
The centroid of a plane particle is defined t o be t h e c e n t e r of
the a s s o c i a t e d great circle.
By t h e position of a particle we will mean
t h e position of its centroid.
The mass of a particle is defined i n t h e
u s u a l Newtonian w a y , and all plane figures a r e to be considered a s compositions of particles. With regard t o t h e concept of motion, let Ax and A t b e positive c o n s t a n t s .
On a n X-axis, mark off X
- kAx,
k-
a n d , on a T-axis, mark off t . = j A t , j = O,l,. I
k = 0,l
.. , n .
purposes, suppose that a particle P is located at X at X3 when t = t
1'
at X
10
when t = t
2
... ,m ,
,
For illustrative 0
when t = t
and a t X5 when t = t
0'
3'
The
motion of P from Xo to X5 is merely P ' s being at Xo, X3, X l 0 , X5
at t h e respective t i m e s t o, t l , t 2 , t3. Thus, t h e motion of P from X
0
to X
5
is considered to be a sequence of four "stills". This concept
of motion is physiologically a c c e p t a b l e and is realized in motion pict u r e s , where t h e viewer observes motion from a finite sequence of projected stills.
VELOCITY AND ACCELERATION
261
Velocity and Acceleration
8.3
Consider, now , t h e b a s i c c o n c e p t s of velocity and acceleration a n d , for simplicity, let u s continue to confine our attention t o a par-
ticle moving i n a fixed direction. For A t > 0 , let t
k
n. A t time t k , let
= kAt, k = O , l , . . . , n - 1 ,
a particle which is i n motion i n a fixed X direction have its center at x
k'
W e wish to define t h e velocity vk and acceleration a
k
of
t h e particle at e a c h t i m e tk. Consider, then, first t h e interval from to to t
1'
Suppose, i n addition to x
0
and x
1'
one knows v
0'
as
would be t h e case i n a falling body problem when t h e particle's motion begins from a position of rest,so that one could assume vo = 0.
Let
u s try to define v = v(t ) i n a f a s h i o n t h a t will u s e a t h e given data. 1 1 This c a n be accomplished, for example, b y defining v
1
implicitly by
t h e smoothing formula
x -x
v o + v1
-1 -- 0
(8.1)
At
-
2
which then motivates our general definition
% - %-1 - vk-l At for velocity vk.
+at2
With regard to acceleration ak = a(\) rarely knows a
0
,
k = 1,2,...,n,
Of c o u r s e , a n equivalent form of (8.2) is
vk = 'k-1
(8.3)
'"k
,k
k = 1,2,...
In.
= 1,.
one
without knowing t h e force i n action, so t h a t it is
26 2
DISCRETE MODEL THEORY
reasonable t o define a.
by the forward difference
v -v a
(8.4)
--
0-
1 0 At
I
from which we a r e motivated t o define a k l in general, by
ak-l --
8.4
v - v k k-1 At
,
k = 1,2
,...,n t l .
The Law of Motion To determine the motion of a particle acted upon by a given force,
it is usual t o relate force and acceleration by a dynamical equation.
For
this purpose, let a partisle of mass m be in motion on an X a x i s and belocatedat
5
attime t -kAt, k = O , l , k-
...,n.
particle be acted upon by a force F = F ( t k , \ , v k ) .
Attime t
k'
letthe
Then t h e motion of the
particle is assumed t o be governed by a discrete Newton's equation:
(8.6)
m . a ( t ) = F ( t x v ): k k ' k' k
k=O,l,
...,n .
The values of F c a n be given either i n tabular form from experimental d a t a , or in the form of a mathematical expression.
8.5
Damped Motion in a Nonlinear Force Field Before proceeding t o more theoretical questions, let u s show how
e a s i l y the formulation given thus far c a n b e implemented.
For t h i s purpose
attention will be directed t o the study of damped, oscillatory motion in a nonlinear force field.
DAMPED , NONLINEAR MOTION
263
Consider a particle P of unit mass which is constrained t o move with its center C on a n X axis. A displacement of the particle such that the directed d i s t a n c e OC is x
i
is, for illustrative purposes,
assumed t o be opposed by a field force of magnitude s i n x viscous damping force of magnitude a v
if
i
and by a
where a is a positive con-
Such a set of interacting forces is typical in the a n a l y s i s of the
stant.
motion of a pendulum, a s d i s c u s s e d in Section 2.5.
Then t h e equation
of motion (8.6) t a k e s the particular form
ak = -avk
(8.7)
- sin%,
k = 0,1,2,...,n.
But, from (8.2) and (8.5),
vk = vk-l t ak-lAt,
(8.8)
k = 1,2,...,n
and t - A( vt 2
5=
(8.9)
k
t vkml), k = 1,2,...
,n
,
so that the motion of C c a n b e generated recursively a s follows, Fix x
0
and v
respectively.
0'
that is, a n initial position and a n initial velocity,
Generate a
finally position x
late a
1
0
from (8.7), then v
from (8.9).
1
1
N e x t , using x
1
from (A.P),
and
and v l , calcu-
from (8.7), then v2 from (8.8) and finally x2 from (8.9).
In t h e indicated fashion, from \-l from (8.7), then v
k
from (8.8),
and v
k-1
and finally
generate a k-1
%
from (8.9).
DISCRETE MODEL THEORY
264
Since, for any x + - ~and v k-1 ' (8.7)-(8.9) imply that akml, vk and
5
exist and are unique, it follows immediately from the above
discussion t h a t the motion of C is uniquely defined once initial conditions x
0
and v
0
are given, or, i n more general terminology,
the solution of a n initial value problem for (8.7) exists and is unique. A s an illustrative example, the solution of (8.7)-(8.9) with
the parametervalues a = 0 . 3 , A t = 0.01, xo = 7/4,
v = 0, n = 0
15000, was generated on the UNIVAC 1108 in under 30 seconds, and the results were completely analogous t o those of Section 2.5.
8.6
Conservation of Energy L e t u s show now that, unlike the difference approximations
developed i n Chapter 11, t h e present formulation is, in fact, energy conserving. gravity
For t h i s purpose, the force t o be considered will be
.
Let
\
= kAt, k = 0 , l
,...,n.
A t t i m e ti, let a particle be lo-
cated a t point (xi,yi), which is on the straight line through A ( x0' y 0 ) and B(xn,y,), 8.1.
force
one possible arrangement of which is shown i n Figure + Let F ( t ) represent the component in the direction AB of a i
7
applied t o the particle.
Then the work W done by
7
in
moving the particle i n the fixed direction from A t o B is defined t o be
265
CONSERVATION OF ENERGY n
(8.10)
W =
1 F(ti-l)As,
,
i=1 where
As
(8.11)
i
=
S
i
- S
i-1
is t h e directed distance from (xi-l ,yi-l)
Now let a
i
and v
i
to (xi,yi)
represent the acceleration and velocity, -+
respectively, a t (x , y ) in the direction AB i
.
i
and (8.10) it follows t h a t
Y
Figure 8.1
. Then, from (8.6)
DISCRETE MODEL THEORY
266
C
= m
ai-l~si
i=1
i=1
i=1
-
2
2
[Vi
i=1
2 - Viel1
9
Thus,
w = - mv - -n
(8.12)
mv
2
2 0
2
.
The quantity 1 2 K =-mv i 2 i
(8.13)
is defined t o be the kinetic energy of the particle a t t i m e t
i'
and
from (8.11) and (8.12), one h a s (8.14)
W = K
n
-KO.
Neglecting friction, the force necessary t o move a particle of mass m only along the vertical component of the weight mg of the particle.
a must be equal t o
Hence, the amount of work done
along the vertical component of the motion is
267
NONLINEAR STRING VIBRATIONS
(8.15)
so that W = mgy
(8.16)
n
-mgyo
.
The quantity Vi =
(8.17)
- mgyi
is called the grativational potential energy of the particle a t the point (xi,yi), so that, from (8.14) and (8.15),
w
(8.18)
=
-vn t v o .
Finally, from (8.13) and (8.16), one h a s
(8.19)
Kn t Vn = KO t Vo,
n = 0,1,2,3
,...,
which' is called the principle of conservation of energy. Thus, the discrete Newton's equation (8.16) and our particular definitions of velocity, acceleration and work have yielded a fundamental conservation principle with regard to gravity in a completely arithmetic setting.
8.7
Nonlinear String Vibrations. Consider next the notion of a system of particles, each of
which is moving i n a fixed direction.
Such a system can be realized
DISCRETE MODEL THEORY
268
nicely i n t h e study of the vibrations of a string, t o which t h i s section is directed. A discrete string is one which is composed of a finite number
It will be treated mathematically a s a n ordered set of
of particles.
m t 2 circular, homogeneous particles Pk, k = 0,l , 2 , .
shown typically in Figure 8 . 2 .
..,m , m t l , a s
Our problem will be that of describing
the return of a discrete string t o a position of equilibrium from a n arbitrary position of tension.
The resulting motion can be considered a s
a n approximation t o that of a real string, the improvement of which is dependent largely upon one's computer capability. throughout that Po and Pmtl
It will be assumed
are fixed, that P l , P 2
,..., P
m
are
free t o move, but in the vertical direction only, and that
xo = Yo = Ymtl
(8.20)
=o.
Let x < x < x < *.* < x < x and x i - x i - l = A x , 0 1 2 m mtl
1,2,,
.., m t l .
let Pj
A t t i m e tk, k = 0,1,.
i=
.., n , measured i n seconds,
be a typical particle in motion, with its
of velocity and acceleration denoted by
v
1, k
and
y
components a
j,k'
respectively.
In order t o incorporate the dependence of the
centers of P
P
j-1'
j
and P
these particles a t t i m e
1+1
$ be
on time, let the respective centers of (xj-l,yj-l,k),
where each coordinate is measured i n feet.
( x ~ , Y ~ (, x~j t)l ,l ~ j + l , k ) 8
x
-+ E
n
0 E
Q
0 0
269
DISCRETE MODEL THEORY
270
In studying the motion of P
j'
we will t a k e i n t o account only
t e n s i l e , v i s c o u s , and gravitational forces. be t h e t e n s i l e force between P force between P. and P I
of t h e particle.
jtl'
and P
j -1
j'
For t h i s purpose, let T
1
let T2 be t h e t e n s i l e
and let t h e v i s c o s i t y vary with t h e speed
Then (8.6) t a k e s t h e particular form
- a vj ,k - W g = Waj,k'
k = 0,1,2,3,...
where g 5 0 , a 2 0 , and ifi is t h e mass of P
I'
,
Thus, from (8.2),
(8.5), and ( 8 . 2 1 ) , one h a s
-
avj,k - g , Ei
(8.23)
V
= v
(8.24)
'j,ktl
= 'j,k
j,ktl
j,k
t a
j,k
At
At
for j = 1,2,.
..,rn
'
(Vj,ktl
and k = 0,1,2, *..
,n
'"j,k)
.
Actual calculation with
(8.22)-(8.24) is completely analogous to t h a t with (8.7)-(8.9) e x c e p t
NONLINEAR STRING VIBRATIONS
271
t h a t in t h e present case one h a s
m
p a r t i c l e s , i n s t e a d of a single
particle, with which to d e a l at e a c h t i m e step. A large number of examples using (8.22)-(8.24) were run at t h e
University of W i s c o n s i n Computing C e n t e r and we will describe next The output is given graphically with 100
a typical s u c h example.
additional points interpolated linearly between e a c h pair of consecutive particles.
Exam R l e Consider a twenty-one point string with xi = 20, with T1 and T
2
[
(8.26)
..,
defined by
+
T1 = To
(8.25)
i 10, i = 0,1,2,.
T 2 = T0 1 +
1 1
- 'i-1
.k-1
yi'k-lAx
('i.k-1
'i-1 ,k-1)
]
2
AX
.k2x
I +; I +; -
'i,k-l
('i+l .k--,'x
:
'i ,k-l)']
and with a = 0.15, 15= 0.05, T = 12.5, A t = 0.00025, Ax = 0.1, 0
m = 19,
g = 0,
E
= 0.01.
The string is placed i n a position of
t e n s i o n by s e t t i n g t h e second particle at ( 0 , l ) and by aligning all other particles as shown a t
t = 0.00
in Figure 8 . 3 .
The f i r s t
0.75 s e c o n d s of wave motion a r e shown typically in Figure 8 . 3 .
The
development of small trailing w a v e s is readily apparent from t h e figure. For a variety of other examples which include more particles and other t e n s i o n l a w s , see Greenspan (11). For a d i s c r e t e formulation of
I4
4.id lid 0
m
-
L:
-
m I
m
.
0
t
t
h I
272
d t
1 I
m 02
aJ L
1
cn .I-
LL
NONLINEAR STRING VIBRATIONS
273
n-body problems and applications t o such phenomena a s the generation of shock waves, see, e . g . , Greenspan (12), (14).
DISCRETE MODEL THEORY
2 74 Exercises
1.
For
\ = k(0.01),
and velocity a t t
10
2
% = ($1 ,
(b) 5 ' 1
k = 0,1,2
t\,
5
(d)
%=
-
0-
0 , find the position
\
is given by
,...
k = 0,1,2
k [(-1) t,]/[l
a t time
,...
k = 0,1,2
(c) r( = sin (\.rr),
v
of a particle which is in motion on a n
X a x i s and whose position
(a)
, and
k = 0,1,...
,...
t k], k = 0,1,2,...
(e) x = 1 , x = O , x = 3 , x = 6 , x = 1 , x 5 = - 7 , x 6 = - 3 , 3 4 0 1 2
x 7 = - 2 , x8 = -6, x 9 = -10, xl0 = -15, x 11 = -10, X12
2.
= -4, X13 = 0 ,
A particle's
X14
= 5,
X15
= 7.
motion on a n X a x i s is given by
a k t a v k t B f ( % ) = O , a > O , k=0,1,2,..., For a = 0.3, @ = 1 , A t = 0.01, x = 0
7T -, 4
f(5) = sin 5 , gener-
a t e t h e motion of the particle up t o t250 and describe the resulting behavior if vo = 0. 3.
Consider a twenty one particle string with x. = 1,2
,...,
1
i lo,
i = 0,
20, a = 0.15, E = 0.05, T 0 = 12.5, A t = 0.00025,
EXERCISES
275
Ax=0.llm=19,g=32.2, by (8.25)-(8.26).
e=O.Ol,and T
1'
T
2
defined
Place the string i n three different initial
positions and describe the resulting vibrations. 4.
Formulate a discrete m o d e l of a liquid which flows out of a canal lock a s the lock door is opened and generate the resulting flow on a computer.
5.
Formulate a discrete model of heat transfer.
APPENDIX A MATHEMATICS, THE EXACT SCIENCE
No person c a n come t o the study of mathematics without finding the experience unique.
For there are certain qualities about
mathematics which make it distinctly different from a l l other academic disciplines and applied s c i e n c e s , and it is with t h e s e qualities that we shall be concerned. L e t us begin simply, and seemingly quite apart from our subject, by considering some of the extant problems associated with communication between people by means of language.
If any particular word,
like ship, were flashed on a screen before a large audience, it is doubtful that any two people would form exactly the same mental image of a ship.
It follows, similarly, that the meaning of every word
is so intimately related t o a person's individual experiences, that probably no word h a s exactly the same meaning t o any two people. To further complicate matters, it d o e s not appear t o be possible
for anyone t o ever find out what a particular word means t o anyone
else.
Suppose for example, that man X a s k s man Y what the word
ship means t o him and that man Y replies that a ship is a v e s s e l which moves in, on, or under water.
Man X, realizing that even a
rowboat tied t o a pier is moving by virtue of the earth's rotation, a s k s 276
277
EXACT SCIENCE
man Y t o clarify h i s definition of ship by further defining to move. Man Y replies that to move is t o relocate from one position t o another by such processes a s walking , running , driving , flying , sailing , and the like.
Man X, for exactness, then a s k s man Y if by sailing
he means the process of navigating a ship which has sails, to which man Y replies yes.
"Then" , replies man X, "I shall never be able t o
understand you. You have defined ship in terms of move, move in terms of saillnq, and sailing in terms of ship, which was the word originally requiring clarification.
circle.
You have simply talked around a
I'
The circular process in which men X and Y became involved
so quickly is indeed one in which we can all become entangled if we constantly require definitions of words used in definitions.
For the
total number of words in a l l existing languages is finite and it would be merely a matter of time t o complete a cycle of this verbal merrygo-round. Now, in constructing the language of mathematical science, the mathematician examines the two semantic problems described above and agrees that no two people will ever completely understand what any particular word means to the other.
With this supposition, how-
ever, the problem of definitions resulting i n a circular process can be, and is, avoided a s follows.
Suppose, says the mathematician,
APPENDIX
278
t h e words
a
in
path
by
is
point
direction
move
the
fixed
out
trace
a r e called b a s i c terms and a r e stated without definition.
We all have
i d e a s and feelings about t h e s e words, but rather than attempt t o make their meanings precise t o e a c h other, we s h a l l simply leave them undefined.
Now, let u s define a
line a s t h e
path traced out by a point
moving in a fixed direction.
Note that the word line is defined only
in terms of the b a s i c terms.
Next, define a plane a s the path traced
out by a line moving in a fixed direction. in terms only of
and of b a s i c terms.
Note t h a t plane is defined Now suppose t h a t man X
a s k s mathematician Y what a plane is. Y responds that a plane is t h e path traced out by a line moving i n a fixed direction.
Man X,
for clarity, a s k s mathematician Y what he means precisely by a U e , t o which Y responds that a moving i n a fixed direction.
line is the
path traced out by a point
Man X, seeking futher clarity, a s k s
for t h e definition of point, t o which the mathematician responds, "Point is a n undefined b a s i c term", and there the questioning stops. Thus, every mathematical science begins with b a s i c terms which are undefined and
other concepts a r e defined by means only
279
EXACT SCIENCE of these.
Point is a n undefined concept of geometry and positive
integer is a n undefined concept of algebra.
No other subject treats
its notions t h i s way.
But let us look a bit further into the nature of mathematical concepts.
line.
Consider, for example, the geometric concept called a straight With a pencil and ruler, we have a l l a t one time or another
drawn a straight line.
But, indeed, have we really ever drawn a
straight l i n e ? A mathematical line h a s
no width,
while the line we
draw with pencil and ruler certainly d o e s have some width, even though one mif$ht need a special instrument, like a micrometer, t o measure the width.
A s a matter of fact, t h e width may even vary a s
the pencil lead is being used up in t h e drawing process.
Indeed,
every physical object h a s some width and it must follow that the mathematical straight line is an idealized form which exists only i n the mind, that is, it is a n abstraction. be shown that
In a similar fashion, it can
mathematical concepts are idealized forms which
exist only i n the mind, that is, are abstractions. So, a l l mathematical concepts are abstractions which either
are undefined or have definitions constructed on basic undefined terms. After having constructed a system of concepts, the mathematician next s e e k s a body of rules by which to combine and manipulate
APPENDIX
280
h i s concepts.
Thus, mathematical sciences now take on the aspects
of a game in that rules of play, which must be followed, have to be
enumerated.
Each mathematical science has its own rules of play,
or, what are technically called assumptions or axioms.
The axioms
of algebra are indeed quite simple. For example , for the numbers 2 , 3 and 5, it is assumed that 2 + 5 = 5 + 2
2 * 5 = 5 * 2
(2+3)+5=2+(3+5) (2
3)' 5 = 2
(3
5)
In complete abstract form , then if a ,b and c are three positive integers, the algebraist assumes that a t b = b t a
(Commutative axiom of addition)
a = b = b * a
(Commutative axiom of multiplication)
(a t b ) t c = a t (b t c)
(Associative axiom of addition)
(aob) . c = a *(b-c)
(Associative axiom of multiplication)
a. (btc)= a . b t a - c
(Distributive axiom)
.
The question which immediately presents itself is how does one go about selecting axioms? Historically, axioms were supposed to
coincide with fundamental physical concepts of truth.
But, as the
EXACT SCIENCE
281
nineteenth century chemists and physicists began t o destroy the previous year's physical truths, the choice of mathematical axioms became a relative free one.
And indeed it is a rather simple matter t o
show that the axioms stated above for numbers c a n be f a l s e when applied t o physical quantities.
For example, if a represents sul-
phuric acid and b represents water, while a t b represents adding sulphuric acid t o water and b t a represents adding water t o sulphuric acid, then a t b is not equal t o b t a , because b t a results in a n explosion whereas a t b does not. In t h i s connection the history associated with the fifth postulate of Euclid is of utmost scientific significance. Elements, set forth in about 300 B. C.
Indeed, in Euclid's
, plane geometry was founded
on ten axioms, five of which were called common notions and five of which were called postulates.
The axiom of interest t o us is the
fifth postulate, stated usually in the following equivalent form: Postulate
Through a point not on a given line one and only one
parallel c a n be drawn t o the given line. Throughout the centuries, Postulate 5 w a s of serious concern t o mathematicians.
Euclid himself seems to have avoided its use
whenever possible.
The reason for its somewhat tenuous position
among the other axioms of geometry lay in the realization that it w a s a n assumption about a n infinite object, that is, the entire straight
APPENDIX
282
l i n e , when science knew of no physical object with any infinite quality or dimension.
Indeed, science maintains that everything in the physical
world is of finite character.
But such a rock of Gibralter w a s geometry
i n the realm of mathematics, physics, and astronomy, that instead of seeking a physically acceptable replacement for Postulate 5 , mathemat i c i a n s until the nineteenth century sought primarily t o establish its truth. It w a s not until the latter part of the eighteenth century and during the nineteenth century that such men a s G a u s s , Bolyai, and Lobachewsky developed a second geometry in which the postulate w a s replaced by t h e assumption that through a point not on a given line one could draw
two
parallels t o the given line.
veloped a third geometry by assuming that
Still later, Riemann de-
no parallels
could be drawn through a point not on t h e line.
t o a given line
And perhaps the great-
est scientific impact of t h e s e new geometries w a s that the geometry of Riemann laid t h e groundwork for t h e geometry utilized in the Einstein theory of relativity.
Thus, mathematical history shows that until some
freedom of choice with regard t o the selection of axioms w a s realized, the development of the theory of relativity simply w a s not possible. Note, however, that complete freedom of choice in t h e selection of axioms is available t o no man.
It would be impractical, for ex-
ample, t o start with assumptions like:
283
EXACT SCIENCE
Axiom 1.
A l l numbers are positive
Axiom 2.
Some numbers are negative,
for t h e s e assumptions contradict each other.
Indeed, even though a
set of axioms d o e s not contain a contradictory pair, it c a n happen that reasoning from them would yield contradictory conclusions.
But,
further examination of t h e very deep problems associated with selection of axioms would be beyond t h e present scope. The final difference between mathematics and all other discipl i n e s lies i n the reasoning processes allowed in reaching conclusions. There a r e basically two acceptable types of reasoning in scientific work, inductive reasoning and deductive reasoning.
L e t u s consider
e a c h in turn. Suppose scientist X injects 100 monkeys with virus Y and d o e s not so inject a control group of 100 monkeys.
One week later,
ninety monkeys in the first group and only five in the second group contract chicken POX. Scientist X, sensing a discovery, repeats the experiment and finds approximately the same s t a t i s t i c a l results. Further experiments are made i n which various environmental factors like heat, light, proximity of c a g e s , and so forth are varied, and in every case X finds that from 85%t o 95% of the monkeys receiving virus Y become ill, while only from 3%to 10% of the control group acquire t h e disease.
Scientist X concludes that virus Y is the c a u s e
APPENDIX
284
of monkey chicken pox, and the process of reaching h i s conclusion by experimentation with control is called inductive reasoning.
Note
that i f , after proving h i s result, X were t o inject only one monkey with virus Y, a l l that he could s a y would be that the probability is very high that the monkey will become ill. Indeed it is not absolutely necessary that chicken pox will prevail. Suppose now that mathematician X writes down a set of assumptions, two of which are
Axiom 1.
A l l heavenly bodies are hollow.
Axiom 2.
A l l moons are heavenly bodies,
Then it must follow, without exception, t h a t Conclusion: A l l moons are hollow. The above type of reasoning from axioms t o necessary conclusions is called deductive reasoning.
The simple three line argument presented
above is called a syllogism.
The general process of reaching neces-
sary conclusions from axioms is called deductive reasoning and the syllogism is the fundamental unit in a l l complex deductive arguments. In mathematics,
conclusions must be reached by deductive reason-
ing alone. Although, very often axioms a r e selected after extensive inductive reasoning, no mathematical conclusion can be so reached.
285
EXACT SCIENCE Thus, there is no question of a mathematical conclusion having a
high probab!lity of validity as in t h e case of inductive conclusions. Indeed, if the axioms are absolute truths, then so are t h e deductive conclusions. Thus we see that a mathematical science deals with abstract idealized forms which are defined from b asic undefined terms , relates
its concepts by means of axioms, and establishes conclusions only by deductive reasoning from the axioms.
It is the perfect precision
of abstract forms and deductive reasoning which makes mathematics an exact science, and it is the prescribing of materials and methods from which one c an create meaningful new forms which gives mathematics the form of a n art.
APPENDIX B FORTRAN PROGRAM NAVSTK Since computer programs for most elementary numerical p r o c e s s e s a r e now readily available i n such compendia a s that of Carnahan, Luther and W i l k e s , we will give in t h i s appendix a typical program for a nonelementary numerical process.
The program i s called NAVSTK, is given
i n FORTRAN, and a p p l i e s to the prototype Navier-Stokes problem of Section 7.2.
The program variables are:
OMA = vorticity values PSI = stream values N = number of vertical s p a c e s i n t h e grid
M = number of horizontal s p a c e s i n the grid R = Reynold's number H = grid s i z e
EPS = tolerance for inner-and outer-iterations C1 = weighting factor for OMA El
= weighting factor for PSI
KW = relaxation factor for OMA equations
NM = number of outer-iterations NCOUNT = number of inner-iterations W 0 , W l ,W2,W3,W4 = coefficients for t h e vorticity equation ISTOP = switch to indicate convergence
The program itself is a s follows: 286
.
PROGRAM NAVSTK
28 7
PROGRAM NAVSTK DIMENSION P S I ~ 5 0 , 5 0 ~ , 0 M A ~ 5 0 , 5 0 ~ , S V P S I ~ 5 0 , 5 0 ~ , S V O M A ~ 5 0 , 5 0 ~ , S V 0 U T ~ 5 10.50)
300 ,TM= -.. 0
C
NPLUSl=N+l NME SH=N-1 H=l./N H2=H*H EPS= .001 INITIALIZE VECTORS NZ=O MP=5 ISTOP.0 R.50
RW.1. c1-0 El- =fl_ 104 CONTINUE PRINT 2323,Cl 2323 FORMAT(lHl,F8.2) DO 1 I=1,50 DO 1 J=1,50 SVOUT(I,J)=O SVPSI(1,J):O SVOMA(I,J)=O PSI(I,J) = O 1 OMA (I,J = O NM=O E2.1-E 1 c2=1-c1 C BEGIN LOOP FOR OUTER ITERATIONS C SAVE VORTICITY FUNCTION FROM PREVIOUS OUTER ITERATION DO 40 I=l,NPLUSl 23 DO 40 J=l,MPLUSl 40 SVOUT(I,J)=OMA(I,J) NM=NM+l NCOUNT=O BEGIN INNER ITERATION FOR STREAM FUNCTION C C COMPUTE STREAM FUNCTION FOR INNER REGION 11 DO 2 I=B,NMESH DO 2 J=3,MMESH SVPSI(I,J)=PSI(I,J) 2 PSI~I,J~=~-.8*PSI~I,J~~t.45*~PSI~I,J-1)+PSI~I,Jtl~tPSI~I-l,J~t 1PSI(I+1,J)+E2*0MA(IYJ))
C
COMPUTE STREAM FUNCTION ON TOP AND BOTTOM INNER BOUNDARY LINES
APPENDIX
288
3
C 4 C
5 C 222
DO 3 I=2,N PSI(I,2)=(.25*PSI(I,3)) PSI(I,M)=.25*PSI(I,MMESH)+.5fcH COMPUTE STREAM FUNCTION ON LEFT AND RIGHT INNER BOUNDARY LINES DO 4 1=3,MMESH PSI(2,1)= (.25*PSI(3,1)) PSI(N,I)= (.25cPSI(N-1,1)) TEST STREAM FUNCTION FOR CONVERGENCE DO 5 1=3,NMESH DO 5 J=3,MMESH DIFF=ABSF(SVPSI(I,J)-PSI(I,J)) IFCDIFF .GT. EPS) GO TO 6 CONTINUE RECALCULATE STREAM FUNCTION USING WEIGHTING DO 2 2 2 I=3,NMESH DO 2 2 2 J=3,MMESH PSI(I,J)=El*SVPSI(I,J)+E2*PSI(I,J)
DO 114 I-2,NMESH IF(PSI(I,M))28,114,114 114 CONTINUE GO TO 200 NCOUNT=NCOUNT+l 6 IF(NC0UNT .GT. 100) GO TO 8 GO TO 11 TEST STREAM FUNCTION FOR DIVERGENCE C IFCDIFF .GT. 10) GO TO 28 8 PRINT 93 FORMAT(lH1,llH PSI VALUES) 93 CALL PRNTLST(PS1) FORMAT(lOF11.6) 10 NCOUNT-0 GO TO 11 PRINT 81 28 FORMAT(13H PSI DIVERGED) 81 CALL PRNTLST(PS1) CALL PRNTLST(OMA1 GO TO 699 BEGIN INNER ITERATION FOR VORTICITY C NCOUNT.0 200 HCONST=C2*(-2./HZ) 30 COMPUTE VORTICITY ON BOUNDARY LINES USING WEIGHTING C TOP AND BOTTOM BOUNDARY LINES C DO 1 2 I=l,NPLUSl OMA(I,1)=Cl*OMA(I,1)+HCONST~kPSI(I,2) OMA(I,M+1)=C1*OMA(I,M+l)+HCONST*~PSI(I,M~-H~ 12 LEFT AND RIGHT BOUNDARY LINES C DO 13 I-2,M OMA(1, I )=HCONST$*PSI(2 ,I)+Cl*OMA( 1 ,I) 13
90
OMA(N+1.I)=HCONST*PSI(N.1)tC1*OMA(N+1.I)
CONTINUE
PROGRAM NAVSTK
C C
15 16
289
COMPUTE COEFFICIENTS FOR VORTICITY EQUATIONS COMPLETE ONE SWEEP OF INTERIOR DO 14 I=2,N DO 14 J=2,M Al=PSI(Itl,J)-PSI(I-l,J) B1=PSI(I,J+l)-PSI(I,J-l) A=ABSF(Al) B=A6SF(B1) WO = 4 + (A+B ) ( R/2 ) IF(A1.GE. 0)15,16 W2 = I+(R/2) *A W4=1 GO TO 17 w2.1
W4=l+A*(R/2) 17 IF(B1.GE. 0)18,19 W1.l 18 W 3= 1+B" (R/ 2 ) GO TO 20 Wl=l+B'< ( R / 2 ) 19 W3.1 SVOMA(I,J)=OMA(I,J) 20 IF(IST0P .EQ. 1)GO TO 305 OMA(I,J)=~~W1/WO)~~OMA(Itl,J~+(W2/WO)*OMA(I,J+l~t~W3/WO~~~OMA~I-l,J~ 1+(W4/WO ) *OMA( I,J-1) 1 "RW+ (l-RW)"OMA(I J) GO TO 14 CHECK TO SEE IF DIFFERENCE EQUATIONS ARE SATISFIED TO .001 C DIFF :((W1/WO)"OMA(It1,J)t(W2/WO)"OMA(I,J+1)+(W3/WO)aO~A(I-1~J) 305 1+(W4/WO)~~OMA(I,J-1))-OMA(I,J) DIF=ABSF(DIFF) IF(D1F .GT. EPS1)282,14 PRINT 183,I,J 282 GO TO 700 14 CONTINUE IF (ISTOP .EQ. 1) GO TO 700 TEST VORTICITY FOR CONVERGENCE C DO 21 I=2,N DO 21 J=2,M DIFF=ABSF(SVOMA(I,J)-OMA(I,J)) IFCDIFF .GE. EPS) GO TO 2 2 21 CONTINUE RECALCULATE VORTICITY USING WEIGHTING C DO 144 I=2,N DO 1 4 4 J=2,M OMA ( I,J ) = C 1S:SV OMA ( I,J ) + C 2" OMA ( I,J ) 144 JM=JM+ 1 PRINT OUT EVERY 4 OUTER ITERATES C IF(JM .EQ. 4)89,59 89 JM=0 PRINT 79,NM
APPENDIX
290
79
C 59
45
99 91 92
C C
301 302
FORMAT(lHl,I2,17H OUTER ITERATIONS) PRINT 91 CALL PRNTLST(PS1) PRINT 92 CALL PRNTLST(0MA) TEST OUTER ITERATIONS FOR CONVERGENCE CONTINUE DO 45 I=l,NPLUSl DO 45 J=l,MPLUSl DIFF=ABSF(SVOUT(I,J)-OMA(I,J)) IF(D1FF .GT. EPS) GO TO 7 CONTINUE NZ=O MP = 8 PRINT 99,NM FORMAT(lH1,22H PROBLEM CONVERGED IN ,I4) PRINT 91 FORMAT(lX,llH PSI VALUES) CALL PRNTLST(PS1) PRINT 92 FORMAT(lH1,14H OMEGA VALUES) CALL PRNTLSTCOMA) EPSl=.001 RMAX = 0 ISTOP.1 CHECK TO SEE IF DIFFERENCE EQUATIONS FOR STREAM FUNCTION ARE SATISFIED TO A TOLERANCE OF -001 DO 181 II=3,NMESH DO 181 JJ=S,MMESH RES=ABSF(PSI(II,JJ)-SVPSI(II,JJ)) IF(RES .GT. RMA-X)301,302 RMAX =RES CONTINUE A=-4~~FSI~II,JJ~tPSI~IItl,JJ~+PSI~II,JJ+I~tPSI~II-l,JJ~tPSI~II,JJ11) B= -H”H* OMA ( II ,J J
D=A-B 181 182 183 C I 22 C
GO TO 699 TEST OUTER ITERATIONS FOR DIVERGENCE IF(D1FF .GT. 100)199,23 NCOUNT=NCOUNT+l IF(NC0UNT .GT. 300) GO TO 24 GO TO 90 TEST VORTICITY FOR DIVERGENCE
PROGRAM NAVSTK
IFCDIFF .GT. 10) GO TO 29 PRINT 9 4 FORMAT(lH1,13H OMEGA VALUES) CALL PRNTLST(0MA) PRINT 91 CALL PRNTLST(PS1) 32 FORMAT(lOF11.6) NCOUNT=O GO TO 9 0 PRINT 8 2 29 FORMAT(13H OMA DIVERGED) 82 CALL PRNTLST(PS1) CALL PRNTLSTCOMA) GO TO 6 9 9 PRINT 189 199 FORMAT(26H OUTER ITERATIONS DIVERGED) 189 700 CONTINUE PRINT 303,RMAX FORMAT(lH1,17H PSI CONVERGED TO,E12.4) 303 CONTINUE 699 SUBROUTINE PRNTLST(Z1 DIMENSION Z(50,SO) COMMON N,NPLUSl,M,MPLUSl,NZ,MP IF(NZ .EQ. 1) GO TO 103 IF(N .GT. 111103,75 75 DO 61 J=l,MPLUSl L MP LUS 1- J + 1 61 PRINT 52,(Z(I,L),I=l,NPLUSl) RETURN 10 3 NE=O NN.11 DO 51 IP=l,NPLUSl,ll NB=IP 2 NE =NE+NN IF(NE .GT. NPLUS1)101,102 NE=NPLUSl 101 DO 5 1 J=l,MPLUSl 102 L =MPLUS1-J+1 IF(NZ .EQ. 1) GO TO 64 PRINT 52,(Z(I,L),I=NB,NE) GO TO 5 1 PRINT 62,(Z(I,L),I=NB,NE) 64 62 FORMAT(lX,llElO.Z) 51 CONTINUE 52 FORMAT(llFlO.5) RETURN END
24
94
F o r additional programs of relative complexity, the reader should consult the Technical Report Series of the Computer Sciences Department, University of Wisconsin.
291
REFERENCES AND SOURCES FOR FURTHER READING
M. Abramowitz and I. A. Stegun, Handbook of Mathematical Functions, National Bureau of Standards, Washington, D. C . , 1965. B. J. Alder, "Studies in molecular dynamics. 111. A mixture of hard s p h e r e s , " Jour. Chem. Phys., 40, 1964, pp. 2724-2730. W. F. A m e s , Nonlinear Partial Differential Equations in Engineering, Academic P r e s s , New York, 1965. method for t h e calculation of t h e dynamics of compressible f l u i d s , " Rpt. 3406, Los Alamos Scientific Lab., L. A., N. M., 1966.
A. A. Amsden, "The particle-in-cell
P. M. Anselone (Ed. ) , Nonlinear Integral Equations, University of Wisconsin Press, Madison, Wis., 1964. G. K. Batchelor, "On steady laminar flow with c l o s e d streamlines a t large Reynolds numbers," Jour. Fluid Mech., 1 , 1956, pp. 177190. H. Bateman, P a r t i a l Differential Equations of Mathematical Physics, Cambridge Univ. P r e s s , Cambridge, 1964. R. E. Bellman, R. E. Kalaba, and J. A. Lockett, Numerical Inversion of t h e Laplace Transform, Elsevier, N. Y., 1966.
I. S. Berezin and N. P. Zhidkov, Computing Methods, vols. I and 11, Addison-Wesley, Reading, M a s s . , 1965. P. W. Berg and J. L. McGregor, Elementary Partial Differential Equations, Holden-Day, San Francisco, 1966, R. L. Berger and N. Davids, "General computer method a n a l y s i s of condition and diffusion i n biological s y s t e m s with distributive s o u r c e s , " Rev. Sci. Instr., 36, 1965, pp. 88-93. D. Bernstein, Existence Theorems i n Partial Differential Equations, Princeton Univ. P r e s s , Princeton, N. J., 1950. L. Bers , "On mildly nonlinear partial differential equations of e l l i p t i c t y p e , " Jour. Res. N. B. S., 51, 1953, pp. 229-236.
292
REFERENCES
2 93
L. Bieberbach, Theorie d e r Differentialqleichungen, Dover, New York, 1944. A. D. Booth , Numerical Methods, Butterworths , London, 1955.
R. T. Boughner, "The discretization error in t h e finite difference solution of t h e linearized Navier-Stokes equations for incompressible fluid flow at large Reynolds number," TM 2165, Oak Ridge Nat. Lab., Oak Ridge, Tenn., 1968. J. H. Bramble, "Error estimates f o r difference methods in forced vibration problems," SAM Jour. Nun. Anal., 3, 1966, pp. 1-12.
A. C a r a s s o and S. V. Parter, "An a n a l y s i s of 'Boundary-Value Techniques' for parabolic problems," Math. Comp., 110, 1970, pp. 315-340.
B. Carnahan, H. A. Luther, and J. 0. W i l k e s , Applied Numerical M e t h o d s , W i l e y , N. Y. , 1969. J. W. Carr 111, "Error bounds for t h e Runge-Kutta s i n g l e s t e p integration p r o c e s s , " Jour. ACM, 5 , 1958, pp. 39-44.
L. C e s a r i , Asymptotic Behavior and Stability Problems in Ordinary Differential Equations, Springer, Berlin, 1959. A. J. Chorin, "The numerical solution of t h e Navier-Stokes equations for a n incompressible f l u i d , " Bull. AMS, 73, 1967, pp. 928931. R. V. Churchill, Fourier Series and Boundary Value Problems, McGrawHill, New York, 1941.
C. W. Clenshaw, "The solution of van d e r Pol's equation i n Chebychev s e r i e s ,I' i n Numerical Solutions of Nonlinear Differential Eaua,-t Wiley, N. Y., 1966, pp. 55-63. E. A. Coddington and N. Levinson, Theory of Ordinary Differential Equations, McGraw-Hill, N. Y., 1955. L. Collatz, (1) The Numerical Treatment of Differential Equations, Springer-Verlag, Berlin, 1959. (2) Functional Analysis and Numerical Mathematics, Academic Press, N. Y., 1966.
294
REFERENCES
P. C o n c u s , "Numerical solution of t h e minimal surface equation, " Math. Comp., 21, 1967, pp. 340-350. R. Courant and K. 0. Friedrichs, Supersonic Flow and Shock W a v e s , I n t e r s c i e n c e , N. Y., 1948.
R. Courant, K. Friedrichs and H. Lewy, "Uber d i e partiellen Differenzengleichungen d e r Mathematischen Physik, " Math. Ann. , 1928, pp. 32-74. R. Courant and D. Hilbert, Methods of Mathematical Physics, Vol. 11, I n t e r s c i e n c e , N. Y., 1962. R. Courant, E. I s a a c s o n and M. Rees,
"On t h e solution of nonlinear hyperbolic differential equations by finite differences, " Comm. Pure Appl. Math., 5 , 1952, pp. 243-255.
C. W. Cryer, "Stability a n a l y s i s i n d i s c r e t e mechanics, " Tech, Rpt. #67, Dept. of Computer S c i e n c e s , Univ. of W i s . , Madison, 1969.
J. M. A. Danby, Fundamentals of C e l e s t i a l M e c h a n i c s , Macmillan, N. Y., 1962. J. W. Daniel, The Approximate Minimization of Functionals , Prentice H a l l , Englewood Cliffs, N. J., 1971. D. F. Davidenko, "Construction of difference equations for approximating t h e solution of t h e Euler-Poisson-Darboux e q u a t i o n , " (in Russian), Dokl. Akad. Nauk SSSR, 142, 1962, pp. 510-513. H. T. D a v i s , Introduction t o Nonlinear Differential and Integral Equations, U. S. Atomic Energy Commission, Washington, D. C. 1960. P. J. Davis and P. Rabinowitz, Numerical Integration, Blaisdell, Waltham, M a s s . , 1967. C. R. Deeter and G. Springer, "Discrete harmonic k e r n e l s , " Jour. Math. and Mech., 1 4 , 1965, pp. 413-438.
J. Douglas, Jr., "A survey of numerical methods for parabolic differe n t i a l e q u a t i o n s , " i n Advances i n ComDuters, 11, Academic P r e s s , N. Y., 1961, pp. 1-55.
REFERENCES
2 95
S. E. Dreyfus , "The numerical solution of nonlinear control problems, i n Numerical Solutions of Nonlinear Differential Eauations , Wiley, N. Y., 1966, pp. 335-363.
"
R. J. Duffin, "Basic properties of d i s c r e t e analytic functions, " Duke Math. Jour., 23, 1956, pp. 335-363
M. Esser, Differential Equations, Saunders , Philadelphia, 1968. D. K. Faddeev and V. N. Faddeeva, Computational Methods of Line= Algebra, Freeman, San Francisco, 1963. E. Fehlberg , " C l a s s i c a l fifth- , sixth- , seventh-, and eighth-order Runge-Kutta formulas with s t e p s i z e control, " TR T-287, NASA, 1968.
E. Fermi, J. R. P a s t a , and S. Ulam, "Studies of nonlinear problems. I , " Rpt. #1940, Los A l a m o s Scientific Lab. , L. A., N. M. , 1955. G. E. Forsythe, "Solving linear algebraic equations c a n be interesting, 'I Bull. AMS, 59, 1953, pp. 299-329. G. E. Forsythe and W. R. Wasow, Finite-Difference Methods for Partial Differential Equations, Wiley , New York, 1960. L. Fox, (1) The Numerical Solution of Two-Point Boundary Problems in Ordinary Differential Equations Oxford Univ. Press , Fairlawn, N. J., 1957. ( 2 ) (Editor) Numerical Solution of Ordinary and Partial Differential Equations , Addison-Wesley , Reading, M a s s . , 1962. (3) An Introduction to Numerical Linear Alqebra, Oxford Univ. Press, N. Y., 1965. J. N. Franklin, "Difference methods for s t o c h a s t i c ordinary differ-
e n t i a l equations ," Math. Comp. , 1 9 , 1965 , pp. 552-561. A. Friedman, Partial Differential Equations of Parabolic Type , Prentice H a l l , Englewood Cliffs, N. J. , 1964. C. E.
Froberg, Introduction t o Numerical Analysis , Addison-Wesley, Reading, M a s s . , 1965.
29 6
REF ERE N CES
J. E. Fromm , "Lectures on large scale finite difference computation of incompressible fluid f l o w s , " Rpt. RJ 617, IBM Research, San Jose, Calif. , 1969. J. E. Fromm and F. H. Harlow, "Numerical solution of t h e problem of vortex s t r e e t development ," Phys. of Fluids , 6 , 1963 , pp. 975-985.
R. A. Gangolli and D. Ylvisaker, Discrete Probability, Harcourt, Brace and World, New York, 1967. P. R. Garabedian, Partial Differential Equations , Wiley, New York, 1964. H. Geiringer, "On t h e solution of s y s t e m s of linear equations by certain iteration methods ," Reissner Anniv. Vol. , Ann Arbor, Mich. , 1949, pp. 365-393. S. K. Godunov and V. S. Ryabenki, The Theory of Difference Schemes, Wiley, N. Y., 1964. H. Goldstein, C l a s s i c a l Mechanics, Addison-Wesley, Reading, M a s s . , 1959. M. Golomb and H. F. Weinberger, "Optimal approximation and error bounds, " i n On Numerical Approximation, Univ. Wisconsin P r e s s , Madison, W i s . , 1959, pp. 117-191. E. T. Goodwin (Ed.) , Modern Computing Methods, Philosophical Library, 1961.
D. Greenspan, (1) Theory and Solution of Ordinary Differential Equations, Macmillan, N. Y. , 1960. (2) Introduction t o Partial Differential Equations, McGraw-Hill, N. Y. , 1961. (3) Introductory Numerical Analysis of Elliptic Boundary Value Problems, Harper and Row, N. Y., 1965. (4) (Editor), Numerical Solutions of Nonlinear Differential Equations , Wiley, N. Y. , 1966. (5) Introduction t o Calculus, Harper and Row, N. Y. , 1968. (6) Lectures on t h e Numerical Solution of Linear, Singular and Nonlinear Differential Equations, Prentice-Hall, Englewood Cliffs, N. J. , 1969. (7) "Resolution of c l a s s i c a l capacity problems by means of a digital computer," Can. Jour. Phys., 44, 1966, pp. 2605-2613. (8) "On
REFERENCES
29 7
approximating extremals of functionals. Part 11. Theory and generalizations related t o boundary value problems for nonlinear differential equations, " Int. Jour. Eng. Sci. , 5, 1967, pp. 571-588. (9) "Numerical solution of a class of nonsteady cavity flow problems, " BIT, 8 , 1968 , pp. 287-294. (10) "Numerical s t u d i e s of prototype cavity flow problems, " The Comp. Jour., 1 2 , 1969, pp. 89-94. (11) "Computer simulation of transverse string vibrations, I' BIT, 11 , 1971 , pp. 399408. (12) "Numerical s t u d i e s of t h e 3-body problem, 'I SLAM Jour. Appl. Math., 20, 1971, pp. 67-78. (13) Introduction to Numerical Analysis and Applications, Markham Publishers, Chicago, 1971. (14) "Discrete liquid f l o w , " Tech. Rpt. #14, Computing Center, Univ. Wis., Madison, 1970. D. Greenspan and P. C. Jain, "Numerical study of subsonic fluid flow
by a combination variational integral-finite difference technique, " Jour. Math. Anal. Appl. , 1 8 , 1967, pp. 85-111. D. Greenspan and S. V. Parter, "Mildly nonlinear elliptic partial differential equations and their numerical solution, 11, " Num. Math., 7 , 1965, pp. 129-146. D. Greenspan and P. Werner, "A numerical method for t h e exterior Dirichlet problem for the reduced wave equation, 'I Arch. Rat. Mech. Anal., 23, 1966, pp. 288-316. W. Grobner, Contributions to the Method of Lie Series, B. I. Hochschulskripten 802/802a* , Bibliographisches Institut, Mannheim
.
R. W. Hamming, Numerical Methods for Scientists and Engineers, McGraw-Hill, N. Y., 1962. K. F. Hansen, B. V. Koen and W. W. Little, Jr. , "Stable numerical solutions of t h e reactor k i n e t i c s equations ," Nuclear Sci. Eng. 2 2 , 1965, pp. 51-59.
,
D. R. Hartree, Numerical Analysis, Oxford Univ. Press, Oxford, 1952. W. Heinsenberg, Physics and Philosophy, Harper and Row, N. Y., 1958. W. J. Hemmerle, Statistical Computations on a Digital Computer, Blaisdell, Waltham, Mass,, 1967.
29 8
REFERENCES
P. Henrici, (1) D i s cr e t e Variable Methods i n Ordinary Differential Equations, W i l ey, N. Y . , 1962. (2) Elements of Numerical Analysis, Wiley, N. Y . , 1964. K. Heun, "Neue Methode z ur approximativen Integration d e r Differentialgleichungen e i n e r unabhangigen Variable , '' ZAMP, 45 , 1900, pp. 23-38.
F. B. Hildebrand , (1) Introduction to Numerical Analysis , McGrawHill, N. Y . , 1953, (2) Finite-Difference Equations and Simulatio n s , Prentice-Hall, Englewood Cl i ffs, N. J. , 1968. J. 0. Hirschfelder, C. F. C u r t i s s a n d R. B. Bird, Molecular Theory of G a s e s a nd Liquids, Wiley, N. Y. , 1954.
H. Hochstadt, Special Functions of Mathematical Physi cs , Holt, Rinehart and W i ns t on, N. Y. , 1961. R. W. Hockney, "A fast di r e c t solution of Poi sson's equation using Fourier a n a l y s i s , " Tour. ACM, 1 2 , 1965 , pp. 95-1 13. L. Hormander, Linear Partial Differential Operators , Academic Press, N. Y . , 1963. A. S. Householder, (1) Principles of Numerical Analysis, McGrawHill, New York, 1953. (2) The Theory of Mat ri ces i n Numerical Analysis, Blaisdell, N. Y . , 1964. A. Huber, "Some r e s ul t s i n generalized axi al l y symmetric potentials , " Proc. Conf. Diff. Eqs., Coll. Pk., Md., 1955, pp. 147-155.
E. I s a a c s o n an d H. B. Keller, Analysis of Numerical Methods, Wiley, N. Y., 1966.
N. N. Janenko (Editor), Difference Methods for Solutions of Problems in Mathematical Phys i c s , Amer. Math. SOC, , Providence, R. I., 1967. F. John, (1) "On integration of parabolic equat i ons by difference methods ," Comm. Pure Appl. Math. , 5 , 1952 , pp. 155-21 1. ( 2 ) Lectures on Advanced Numerical Analysis, Gordon and Breach, N. Y. , 1967.
REFERENCES
29 9
E. Kamke, Differentialgleichungen, Vols. I and 11, Akad. Verlag., Leipzig, 1959.
M. Kawaguti, "Numerical solution of t h e Navier-Stokes equations for the flow i n a two dimensional c a v i t y , " Jour. Phys. SOC., Japan, 1 6 , 1961, pp. 2307-2315. H. B. Keller, Numerical Methods for Two-Point Boundary Value Problems, Blaisdell, Waltham, M a s s . , 1968. 0. D. Kellogg, Foundations of Potential Theory, Dover, N. Y.
, 1953.
L. G. Kelly, Handbook of Numerical Methods a n d Applications, Addison-Wesley, Reading, M a s s . , 1967. J. G. Kemeny and J. L. Snell, Mathematical Models i n the Social S c i e n c e s , Ginn and Co., N. Y., 1962.
J. Kowalik and M. R. Osborne, Methods for Unconstrained 0Dtimization Problems, Elsevier, N. Y., 1968.
H. 0. Kreiss, "Difference approximations for t h e initial-boundary value problem for hyperbolic differential equations, " i n Numerical Solut i o n s of Nonlinear Differential Esuations, Wiley, N. Y., 1966, pp. 141-166. K. S. Kunz, Numerical Analysis, McGraw-Hill, N. Y.
, 1957.
W. Kutta, "Beitrag zur naherungsweisen Integration totaler Differentialgleichungen, " ZAMP, 4 6 , 1901, pp. 435-453. 0. A. Ladyzhenskaya, The Mathematical Theory of Viscous Incornp r e s s i b l e Flow, 2nd Ed., Gordon and Breach, N. Y., 1969. J. D. Lawson, "An order six Runge-Kutta p r o c e s s with extended region
of s t a b i l i t y , " SUM Jour. Num. Anal., 4 , 1967, pp. 620-625. P. D. Lax, "Nonlinear partial differential equations and computing, SIAM Review, 11, 1969, pp. 7-19.
P. D. Lax and B. Wendroff, "Systems of conservation l a w s , Pure Appl. Math., 1 3 , 1960, pp. 217-237.
"
"
Comm.
C. E. Leith, "Numerical hydrodynamics of the atmosphere," i n Proc. Symp. Applied Math. of Amer. Math. SOC., Amer. Math. SOC., Providence, R. I., 1967, pp. 125-137.
300
REFERENCES
H. Levy and F. Lessman, Finite Difference Equations, Macmillan, N. Y., 1961. H. A. Luther and H. P. Konen, "Some fifth-order c l a s s i c a l RungeKutta formulas," SIAM Rev. , 7, 1965, pp. 551-558. M. M. May and R. H. White, "Hydrodynamic calculation of general relativistic c o l l a p s e , " The Physical Review, 141 , 1966, pp. 1232-1 241. N. W. McLachlan, Ordinary Non-Linear Differential Equations in Engineering and Physical Sciences , Oxford Univ. Press , London, 1950. P. K. Mehta, "Cylindrical and spherical e l a s t o p l a s t i c s t r e s s waves by a unified direct a n a l y s i s method," ATAA Jour. , 5 , 1967, pp. 2242-2248. W. G. Melbourne , "Lunar and planetary flight mechanics ," Jet Propulsion Laboratory, Pasadena, Calif. , January, 1968.
R. H. Miller and N. Alton, "Three dimensional n-body calculations, ICR Quart. Rpt. #18, Univ. Chicago, Chicago, 1968. R. D. M i l l s , "On a c l o s e d motion of a fluid i n a square c a v i t y ,
"
Jour. Roy. Aer. SOC. , 69, 1965, pp. 116-120.
W. E. Milne, (1) Numerical Calculus, Princeton Univ. P r e s s , Princeton, N. J., 1950. ( 2 ) Numerical Solution of Differential Equations, Wiley, New York, 1953. C. L. Miracle , "Approximate solutions of t h e telegrapher's equation by difference equation methods," Jour. SIAM, 1 0 , 1962, pp. 51 7-527. R. von M i s e s , Mathematical Theory of Compressible Fluid Flow, Academic Press , New York, 1958. R. E. Moore , Interval Analysis, Prentice Hall, Englewood Cliffs , N. J. , 1966. R. H. Moore, "A Runge-Kutta procedure for t h e Goursat problem in hyperbolic partial differential equations ,'I Arch. Rat. Mech. Anal. , 1 , 1961, pp. 37-63.
"
REFERENCES
301
P. M . Morse and H. Feshbach, Methods of Theoretical Physics, Vols. I and 11, McGraw-Hill, N. Y . , 1953. Z. Nehari, Conformal Mappinq, McGraw-Hill, N. Y.,
1952.
J. von Neumann, "Proposal and a n a l y s i s of a new numerical method for the treatement of hydrodynamical shock problems, " in Collected Works of Tohn von Neumann, VI, Pergamon, N. Y., 1963, pp. 361-379. B. Noble, Numerical Methods, Oliver and Boyd, London, 1964. W. F. Noh, " C E k a time-dependent, two-space-dimensional,
coupled Eulerian-Lagrange c o d e , ' I i n Methods i n Computational Physics , N. Y., 1964, pp. 117-180.
V. V. Novozhilov, Foundations of the Nonlinear Theory of Elasticity, Graylock, Rochester, N. Y., 1953. A. M. Ostrowski, Solution of Equations and Systems of Equations, 2nd edition, Academic P r e s s , N. Yo, 1966. F. Pan and A. Acrivos, "Steady flows i n rectangular c a v i t i e s , Fluid Mech., 2 8 , 1967, pp. 643-655.
"
Jour,
C. E. Pearson, "A computational method for viscous flow problems, Jour. Fluid Mech. , 21, 1965, pp. 611-622. I. G. Petrovsky , Partial Differential Equations , Interscience, N. Y. 1954.
I'
,
N. A. Phillips, "Numerical weather prediction, " in Advances i n Computers, I, Academic Press, N. Y., 1960, pp. 43-91. S. T. Pohozaev, "The Dirichlet problem for the equation A u = u
2,
I,
Soviet Math., 1 , 1960, pp. 1143-1146. G. Polya and G. Szego, Isoperimetric Inequalities i n Mathematical Physics, Princeton Univ. Press, Princeton, N. J., 1951.
R. W. Preisendorfer, Radiative Transfer on Discrete Spaces, Pergamon, N. Y., 1965.
302
REFERENCES
L. B. Rall, (1) (Editor) Error i n D i s i t a l Computation, Vol. I and 11, Wiley, N. Y. , 1965. (2) Computational Solution of Nonlinear Operator Equations, Wiley, N. Y. , 1969. A. Ralston, A First Course in Numerical Analysis, McGraw-Hill, N. Y. 1965. A. Ralston and H. S. Wilf (Editors), Mathematical Methods for Digital Computers, W i l e y , N. Y., 1960.
P. L. Richman, " E -Calculus Univ., 1968.
,
"
TR 105 , Dept. Comp. Sci.
, Stanford
R. D. Richtmyer and K. W. Morton, Difference Methods for InitialValue Problems, 2nd e d i t i o n , Interscience, N. Y. , 1967.
D. J. Rose, "An algorithm for solving a s p e c i a l class of tridiagonal s y s t e m s of linear e q u a t i o n s , " Comm. ACM, 1 2 , 1969, pp. 23423 6. W. C. Royster, "A Poisson integral formula for t h e e l l i p s e and some a p p l i c a t i o n s , " Proc. AMS, 1 5 , 1964, pp. 661-670. M. Sajben, "An e x a c t solution for a x i a l l y symmetric equilibrium electron d e n s i t y distributions ," Phys. Fluids , 11 , 1968 , pp. 2501-2502. C. Saltzer, "Discrete potential theory and boundary value problems ," Duke Math. Tour., 31 , 1964, pp. 299-320. D. Sarafyan, "Seventh order, 10-stage Runge-Kutta formulas, " Tech. Rpt. 3 8 , Math. Dept. , LSU, New Orleans, 1970. M. Schechter, "On t h e Dirichlet problem for second order e l l i p t i c equations with coefficients singular on t h e boundary, " Comm. Pure Appl. Math. , 1 3 , 1960, pp. 321-328. S. Schechter, "Iteration methods for nonlinear pmblems ," Trans. Amer. Math. SOC. , 1962, pp. 179-189.
H. Schlichting, Boundary Layer Theory, McGraw-Hill, N. Y., 1960. D. Schultz , Experimental Numerical Solution of the Navier-Stoke s Eauations for Flow of a Fluid i n a H e a t e d , C l o s e d , Cavity, Ph.D. T h e s i s , Dept. Comp. Sci., Univ. Wis. , Madison, 1970.
,
REFERENCES
3 03
G. H. Shortley, R. Weller, P. Darbey and E. H. Gamble, "Numerical solution of axisymmetrical problems , with a p p l i c a t i o n s t o electrostatics and t o r s i o n , " Eng. Exp. Sta. Bull. No. 1 2 8 , Ohio State Univ. , 1947. J. W. Siry, J. P. Murphy a n d I. J. C o l e , "The Goddard general orbit determination s y s t e m , " NASA-TM-X-63413; X-550-68-218 , NASA Goddard Space Flight Ctr. , Greenbelt, Md. , 1968.
G. D. Smith, Numerical Solution of Partial Differential Equations, Oxford Univ. P r e s s , N. Y. , 1965. J. Smith , "The coupled equation approach to t h e numerical solution of t h e biharmonic equation by f i n i t e d i f f e r e n c e s , " Parts I and 11, SUM Tour. Num. Anal., 5 , 1968, pp. 323-339; 7, 1970, pp. 104-1 11.
M. Soare, Application of Finite Difference Equations t o Shell Analysis, Pergamon, N. Y. , 1967. I. S. Sokolnikoff and R. M. Redheffer, M a t h e m a t i c s of Physics and Modern Engineering, McGraw-Hill, N. Y. , 1958. R. W. Southworth a n d S. L, DeLeeuw, Digital Computation and Numerical M e t h o d s , McGraw-Hill, N. Y. , 1965. D. B. Spalding, Convective M a s s Transfer, An Introduction, McGrawHill, N. Y., 1963.
R. G. Stanton, Numerical Methods for Science a n d Engineering, Prentice H a l l , Englewood C l i f f s , N. J. , 1961. J. J. Stoker, W a t e r W a v e s , I n t e r s c i e n c e , N. Y.
, 1957.
D. J. Struik, Lectures on C l a s s i c a l Differential Geometry, AddisonW e s l e y , Reading, M a s s . , 1950. J. L. Synge , (1) The Hypercircle i n Mathematical P h y s i c s , Cambridge Univ. P r e s s , Cambridge, 1957. (2) Relativity: The Special Theory, North-Holland, Amsterdam, 1965. E. F. Taylor and J. A. W h e e l e r , Spacetime P h y s i c s , Freeman, San Francisco, 1966.
3 04
REFERENCES
C. B. Tompkins and W. L. Wilson, Jr. , Elementary Numerical Analysis, Prentice Hall, Englewood Cliffs, N. J. , 1969. J. Todd (Editor), Survey of Numerical Analysis, McGraw-Hill, N. Y.
,
1962.
F. G. Tricomi, Integral Equations, Interscience, N. Y, , 1957. M. Urabe, "Numerical study of periodic solutions of the van der Pol equation, " i n International Symposium on Nonlinear Differential Equations and Nonlinear Mechanics, Academic P r e s s , N. Y. , 1963, pp. 184-192. R. S. Varga , Matrix Iterative Analysis, Prentice-Hall, Englewood
Cliffs, N. J., 1962. C. H,Warlick and D. M. Young, "A priori e s t i m a t e s for the determination of t h e optimum relaxation factor for t h e s u c c e s s i v e overrelaxation method ," TR 105 , Comp. Ctr. , U. Texas , Austin, 1970. B. Wendroff 1966.
, Theoretical Numerical
Analysis , Academic Press, N. Y.
G. J. Whitrow, The Natural Philosophy of T i m e , Harper and Row, N. Y., 1961. J. H. Wilkinson, Rounding Errors in Algebraic P r o c e s s e s , PrenticeHall, Englewood Cliffs, N. J. , 1963. N. J. Zabusky, "Elastic solution for t h e vibrations of a nonlinear continuous model string, " Jour. Mathematical Phys., 3 , 1962, pp. 1028-1 039.
M. Zlamal, "On t h e finite element method," Num. Mat. pp. 394-409.
, 12,
1968 ,
,
ANSWERS TO SELECTED EXERCISES Chapter 1 3.
a, b, d, f
4.
a-f
5.
b, d
9.
(a) w = 1 . 8 ,
x ( ~ =) 2.23,
X(4)
w = 1.4,
x ( ~=) 2.10,
x ( ~= )0.39,
x r ) = 1.05
= 1.0,
x ( ~= ) 2.13, 1
x ( ~ =) 0.39,
X(4)
cu = 0.6,
x ( ~ =) 1 . 8 5 ,
x ( ~=) 0.28,
x ( ~ )= 0.79
= 0.2,
x ( ~ =) 0 . 9 7 ,
x ( ~ =) 0 . 0 6 ,
x(~) = 0.19
(u
= 1.8,
x ( ~ =) 0.90,
x ( ~=) 0.76,
x ( ~=) -0.55
(u
= 1.4,
x ( ~=) 0.19,
x ( ~= ) 1.14,
x ( ~ )= -0.93
cu = 1 . 0 ,
x(~) = 0.15,
x ( ~=) 1 . 1 7 ,
x ( ~= )-0.94
= 0.6,
x ( ~ =) 0.17,
x(4) = 1 . 0 2 ,
x ( ~ =) -0.82
= 0.2,
x ( ~ =) 0.11,
x ( ~=) 0 . 5 2 ,
x ( ~ =) -0.35
(u
~0
(c)
UI
1 1
1
1
1
1 1
1
2
= 0.69,
2
2
2
2
2
2
2
1
2
2
X(4)
3
= 2.07
3
3
3
3
3
3
3
3
Chapter 2 2.
(a) exact solution: y = s i n x (b) e x a c t solution:
(c) exact solution:
- e2x 15 y = 1 t -x - 1x2 - 1 1 2 x3 32 16
y = 2eX
305
= 1.03
.
SELECTED ANSWERS
y
1
= 0.479,
y1 = 2.320,
y
y' = 1.361, 1
y
= 0.807,
y
y
1
Ax> 2 ,
y3 = 0.997
y 2 = 0.841, 2 2 2
= 11.594, y = 77.789 3 = 2.833,
y
= 0.843,
Y = 0.933
3
= 17.077
3
(b) Ax> . 0 2 ,
(c) A x > . 0 0 2
exact solution: y = - J 3 s i n x t c o s x -4 -1
exact solution: y = ( e - e
)
X
general solution: y = c e
1
general solution:
x[e e-4X~
t c e
4x
2
X2 t c xe y = c e 1 2
elliptic
(d)
hyperbolic
(e) hyperbolic
parabolic
(f)
1 2
t -x 4 2 X
1 8
t -x t
9 32
.
hyperbolic
hyperbolic
.
hyperbolic on t h e upper-half plane, elliptic on t h e lower-half plane , parabolic on t h e X-axis. hyperbolic outside t h e unit c i r c l e x
2
t y
2
= 1,
elliptic i n s i d e , and parabolic on t h e circle.
-
5.
~ ( 2 , 2 ) -2,
9.
(a)
si: 4'
-
~ ( 4 , 2 ) 0,
trl
2
= 1,
-
~ ( 2 ~ 4-6) ,
F(Ein) = 1
307
SELECTED ANSWERS
14.
C
- 4.26.
Chapter 4 1.
(a)
1 "(2, 1) - 2 3 7 5 9 ,
u ( 12 , 1 ) ---16800,
Chapter 5 2.
(a) u = 1
-t 1
3
(b) u = x t; [ ( X t t )
-
(X-t)
3
] " x t t -r'
1 2 2 (c) u = T [ ( X t t ) t ( x - t ) t Jx-t
drl
Chapter 6
2.
( a ) -2y" = 0
(c) x
- 2y" = 0
3 (d) 2y" t y ( 5 t 4 ~=) 0
3.
1 y(q)-0.25,
1 y(,)-O.5,
3
y(q)-O.75.
3
u(;,
1) --16800.
308
5.
10.
SELECTED ANSWERS
y(a)
-
( a ) uxx t u (b)
1 y(y)
0.40,
U=+U
(c) U=
3 y(;)
- 1.06 .
1 u
Te
yy = YY
tu
- 0.80,
YY
= U
= H(u)
2
(d) (1 t uY)um
- 2~XuY uXY t (1 t ux2)UYY = 0
Chapter 7 3.
Two primary vortices for relatively small R
7.
A l l are hyperbolic.
.
Chapter 8 1.
(a) x l 0 = 0.01,
“k = -Vk-l
(b) xl0 = 1 . 1
(c) x l 0 = s i n -
IT
10
(dl
Xl0
=
1110
(e) xl0 = -15,
v
10
= 400
.
t-
2 (2k-1) (O.Ol)3
SUBJECT INDEX Abstraction 279 Acceleration 261-262 Algebraic system 1-22, 64, 108,
Detatched wave 182 Determinant 242 Diagonal dominance 3, 10, 60,
150, 170, 194, 231
61, 90, 98, 131, 148, 149, 218-219, 223 Difference 28, 61 Difference analogue 141 , 175, 179 Difference approximation 149, 160, 161, 177, 181, 212, 250 Difference equation 49, 58, 59, 63, 80-83, 97, 107, 138, 231, 232
Arithmetic mean 83 Axiom 280
'
Backward difference 28, 61 Biharmonic equation 227 Boundary condition 26, 59, 119, 145, 154, 164, 186, 193, 209
Boundary function 75, 78, 102 Boundary grid point 86, 99, 121, 230
Differential equation biharmonic 227 Burger's 149 e l l i p t i c 70-1 13, 21 2 Euler 189, 190, 197, 199 g a s dynamical 71-72 h e a t 71, 118-138 hyperbolic 70, 71, 153-182 Laplace 70, 73, 80, 98, 112 linear partial 69, 95-98, 113 mildly nonlinear 70, 106-1 13,
Boundary lattice point 86, 99, 121, 230
Boundary value problem 26, 57-65, 66, 73-80, 141, 143, 144, 180, 185, 190, 195-196 Boundary value technique 140-1 5 0 , 175-182, 229-236 Burger's equation 149
CDC 3600 1 9 4 Capacity 102-1 06 Cauchy problem 153-160 Cavity flow 208, 228 Central difference 28, 143, 172,
138-150,
174-182
minimal surface 71 Navier-Stokes 208-209,
196
239-240
Centroid 260 C h a r a c t e r i s t i c s 159, 164, 182, 242, 244, 247
Newton's dynamical 43 ordinary 26-66, 143, 180, 189
Compressible 208 Conformal map 78 Conservation of energy 264-267 Conservative form 255 Coupled system 212 Cramer's rule 2 Crank-Nicolson method 134-138
parabolic 70, 71, 118-150, 237, 239
partial 69, 212 potential 70 quasilinear 69, 241, 246, 249, 252
radiation 6 4 reduced wave 182 s o a p f i l m 7, 199 van d e r Pol's 52-56 wave 71, 153-182, 243
Damped motion 44, 262-264 Damping 44, 262-264 Deductive reasoning 283 Density 246
309
31 0
SUBJECT INDEX
Dirichlet problem 75-79, 83, 86, 98, 1 0 7 , 1 0 9 , 111, 1 9 8 Discrete model 259-273 Double precision 5 6 Double sequence 2 1 2 Dynamical equation 259, 2 6 2
Electrostatic capacity 1 0 2 - 1 0 6 Elliptic partial differential equation 70-113,
212
Euler equation 1 8 9 , 1 9 0 , 1 9 7 , 1 9 9 Euler's method 33-34, 4 7 Explicit method 1 2 9 , 1 6 5 , 237-238 Exterior Dirichlet problem 79-80, 91-94,
99, 1 0 3
Extremization of functionals 185204
Force 4 4 Formula of D'Alembert 1 5 4 , 1 5 5 Forward difference 28, 61, 1 9 1 , 1 9 6 , 262
Forward-backward technique 62, 9 8 , 219
Fourier integral 1 2 0 Fourier s e r i e s 76, 78, 1 2 0 , 1 5 4 Functional 186, 1 9 0 , 1 9 3 G a s 71-72, 208, 2 4 0 G a s dynamical equation 71-72 G a u s s elimination 5-1 0 , 11 Generalized Newton's formula 1 6 Generalized Newton's method 12-22, 65, 1 3 9 , 145, 149, 1 5 0 , 181, 194, 218, 2 3 1 Generalized solution 2 1 0-21 1 Geodesic 192-195 Gravity 44, 2 6 4 , 2 7 0 Grid point 2 8 , 2 9 , 34, 8 5 , 1 2 1 Grid s i z e 8 5
Half-plane 119, 1 5 4 Harmonic function 73, 9 6 , 1 0 7 , 1 2 6 Heat equation 71, 118-1 3 8 Heun's formulas 38
Hyperbolic partial differential equation 70, 71, 153-182 Hyperbolic system of partial differential equations 240-249 Implicit method 130, 1 3 6 , 1 6 8 , 171
Incompressible 208 Inductive reasoning 283 Initial condition 26, 44, 119, 1 5 3 , 1 5 4 , 159, 229
Initial value problem 26, 29-52, 6 5 , 66, 118, 1 2 0 , 249-250, 264 Initial value technique 1 4 0 Initial-boundary problem 118, 153, 1 5 4 Inner boundary 2 2 0 Instability 46-52 Interior grid point 85, 99, 1 2 1 , 230 Interior lattice point 8 5 , 99, 121, 230 Interval of dependence 1 5 9 Inverse point 9 2 Inversion 9 2 , 9 4 , 1 0 1 , 1 0 2 Inversion mapping 9 2 , 9 4 , 101, 102 Isentropic flow 246, 2 5 2 Isoperimetric inequalities 1 0 3 , 105
Kinetic energy 266 Kutta's formulas 38-39,
40
Laplace difference analogue 8083, 8 7
Laplace difference equation 8083, 8 7
Laplace's equation 70, 73, 80, 98, 1 1 2
Lattice 8 5 Lattice point 83-86 Lax-W endroff method 25 4- 25 6
SUBJECT INDEX
Linear algebraic system 1-12, 88, 90, 131, 134, 148, 1 49
Linear differential equation 27, 57, 69, 95-98,
113
Linear partial differential equation 69, 95-98, Liquid 208
113
Mach number 72 Machine error 46 Main diagonal 5, 60 Mathematical s c i e n c e 276-285 Matrix 1-12, 218, 241, 242 Max-min property 74, 82, 96, 126-127,
138 Maximization 1 8 6 Method D 86-91, 97, 99, 1 07 , 11 2, 1 4 4 , 181, 217, 237 Method of c h a r a c t e r i s t i c s 1 8 2
Method of Courant, I s a a c s o n and Rees 250-254 Method of Fromm 237-238 Method of Pearson 239 Method of Taylor s e r i e s 29-32, 53 Mild diagonal dominance 3, 149, 176, 177, 179
Mildly nonlinear partial differential equation 70, 106-113, 138-150, 174-1 8 2
Minimal surface equation 71 Minimization 1 8 6 , 203 Mixed type problem 79 Motion 259-260 Navier-Stokes equations 208-209, 239-240
N e c e s s a r y conclusion 28 4 Neighbor 85, 8 7 Neumann problem 79 Newton's dynamical equation 43, 262 Newton's formula 15 Newton's method 15, 108 Nonlinear boundary value problem 63, 106-113
31 1
Nonlinear force field 262-264 Nonlinear pendulum 43-46, 185 Normal derivative 78-79, 103 Normal form 243, 247, 249, 253 Ordinary differential equation 26-66,
143, 180, 189
Oscillation 262-264 Over-relaxation factor 1 6 Overflow 46, 48, 5 0 Parabolic partial differential equation 70, 71, 118-150, 237, 239
Parameter 34, 80, 214 Partial differential equation 69, 21 2
biharmonic 227 e l l i p t i c 70-1 13, 21 2 g a s dynamical 71-72 h e a t 71, 118-138 hyperbolic 70, 71, 153-182 Laplace 70, 73, 80, 98, 112 linear 69, 95-98, 113 mildly nonlinear 70, 106-1 13, 138-1 50, 174-1 82
minimal surface 71 Navier-Stokes 208-209, 239240
parabolic 70, 71, 118-150, 237, 239
quasilinear 69, 241, 246, 249, 252
s o a p film 7, 199 wave 71, 153-182, 243 Particle 259-260 Particle-in-cell method 256 Pendulum 43-46, 263 Periodic function 56 Periodic solution 2 6 , 52-56 Physically reasonable 127 Piecewise regular 75 Plateau problem 198-204 Poisson integral 78
312
Potential energy 267 Potential equation 70 Primary vortex 226 Program error 46 Quasilinear partial differential equation 69, 241, 246, 249, 252
Radiation equation 6 4 Rectangular integration 191 Reduced wave equation 1 8 2 Region of dependence 159, 1 6 4 Remainder 30 Reynolds number 209 Robin problem 79 Rounding 51, 126, 140 Row of grid points 121, 131, 162, 179
Runge-Kutta method 32-43, 1 8 2 SOR12, 62, 90, 91, 1 1 2 Saddle surface 74 Secondary vortex 211, 226 Semi-infinite s t r i p 119, 1 5 4 Shortest path 192 Smoothing 224, 231, 239, 261 Soap film equation 7, 1 9 9 Sonic flow 72 Speed of sound 72, 246 Stability 121-128, 136, 139, 164, 175, 238, 240, 252 Stable 127, 164, 1 6 8 Steady state 143, 145, 208, 229, 234 Step-ahead technique 140 Stream function 209 Streamline 226, 234 String vibration 267-273 Subsonic flow 72 S u c c e s s i v e over-relaxation 12, 62, 90, 91, 1 1 2 Supersonic flow 72 Surface potential 103 Syllogism 284
SUBJECT INDEX
Symbol manipulation 29, 33 System of particles 267 Taylor expansion 29, 34, 36, 80, 96, 142, 178
Taylor s e r i e s 29-32, 35, 53, 214 Tension 268, 271 Three-point formula 28 Time 259-260 Total charge 103 Trailing wave 271 Transcendental system 1-22, 6 4 Trapezoidal integration 195 Triangularization 200 Tridiagonal 4, 5, 10-12, 58, 59, 131, 134, 137, 139, 168, 169
Truncation 1 4 0 Two-point formula 28 UNIVAC 1108 5 , 10, 45, 56, 104, 150, 226, 233, 264
Undefined term 278-279 Unit c i r c l e 9 1 Unit cube 103 Unit sphere 1 0 1 Unstable 46 van d e r Pol's equation 52-56 Variational problem 185-186, 197 Velocity 261 Viscosity 208, 270 Viscous flow 208 Vortex 21 1, 226 Vorticity 209, 21 1 Wave equation 71, 153-182, 243 Work 264-266