424 Chapter 7 Numerical Methods
i
m 1234567 f(tm)
00000000 0
10000000 1. 0
20. 50. 25 0. 25 0. 50. 50. 25 0 2. 0
31. 22 0. 75 0. 69 0. 75 1. 22 0. 69 0. 25 3. 0
41. 99 1. 40 1. 19 1. 84 1. 98 1. 30 0. 69 4. 0
Table 10 Numerical solution of Eqs. (9)–(11). Entries are 100×ui(m)
As an example, let us consider the vibrations of a square membrane, as de-
scribed by the problem
∂^2 u
∂x^2 +
∂^2 u
∂y^2 =
∂^2 u
∂t^2 ,^0 <x<^1 ,^0 <y<^1 ,^0 <t, (14)
u(x, 0 ,t)= 0 , u(x, 1 ,t)= 0 , 0 <x< 1 , 0 <t, (15)
u( 0 ,y,t)= 0 , u( 1 ,y,t)= 0 , 0 <y< 1 , 0 <t, (16)
u(x,y, 0 )=f(x,y), 0 <x< 1 , 0 <y< 1 , (17)
∂u
∂t
(x,y, 0 )=g(x,y), 0 <x< 1 , 0 <y< 1. (18)
A typical replacement for the wave equation (14) is constructed using Eq. (1)
for the Laplacian and Eq. (13) for the time derivative:
ui(m+ 1 )− 2 ui(m)+ui(m− 1 )
( t)^2
=uN(m)+uS(m)+uE(m)+uW(m)−^4 ui(m)
( x)^2
. (19)
As usual we solve forui(m+ 1 ), using the abbreviationρ= t/ x.Theresult
is
ui(m+ 1 )=ρ^2
[
uE(m)+uW(m)+uN(m)+uS(m)
]
+( 2 − 4 ρ^2 )ui(m)−ui(m− 1 ). (20)
The stability rules given earlier still apply. Thus we must chooseρ^2 ≤ 1 /2in
order to get a sensible solution.
Let us now be specific. We shall take x= y= 1 /4,ρ^2 = 1 /2 (that is,
t= 1 / 4
√
2), and suppose that the initial data from Eqs. (11) and (12) are
f(x,y)=
{
1nearx=^14 , y=^14 ,
0elsewhere,
g(x,y)≡ 0.