420 Chapter 7 Numerical Methods
and the upper halves of the vertical sides), andu=0 on the lower half. Take
x= y= 1 /3. See Fig. 5.
9.The region, as seen in Fig. 5, is shaped like an upside-downUand is formed
by removing a small( 1 × 2 )rectangle from the bottom of a larger( 5 × 4 )
one. In the interior of the region,∇^2 u=0. The boundary conditions are:
u=1 on the left and right sides and the top of the rectangle;u=0onthe
bottom and on the boundary formed by the removal of the small rectangle.
Use x= y=1.
7.5 Two-Dimensional Problems
Separation of variables and other analytical methods produce satisfactory so-
lutions to two-dimensional problems in only the nicest cases. However, simple
numerical methods work quite well on two-dimensional problems. In this ele-
mentary exposition, we will limit ourselves to the heat and wave equations on
two-dimensional regions that “fit on graph paper,” as in Section 7.4.
We will compute an approximation to the solution of a problem, denot-
ing space position with one or two subscripts and time level with an index in
parentheses. Both heat and wave problems will require the replacement of the
Laplacian operator. We use the same replacement as in Section 7.4,
∂^2 u
∂x^2
+∂
(^2) u
∂y^2
→uE(m)−^2 ui(m)+uW(m)
( x)^2
+uN(m)−^2 ui(m)+uS(m)
( y)^2
.
Because we are using a square mesh, with x= y, the replacement simplifies
to
∂^2 u
∂x^2
+∂
(^2) u
∂y^2
→uN(m)+uS(m)+uE(m)+uW(m)−^4 ui(m)
( x)^2
, (1)
whereN,S,E,Wstand for the indices of the four grid points adjacent to the
point with the indexi.
Heat Problems
Now let us consider this heat problem on a rectangle:
∂^2 u
∂x^2
+∂
(^2) u
∂y^2
=∂u
∂t
, 0 <x< 1. 25 , 0 <y< 1 , 0 <t, (2)
u( 0 ,y,t)= 0 , u( 1. 25 ,y,t)= 0 , 0 <y< 1 , 0 <t, (3)
u(x, 0 ,t)= 0 , u(x, 1 ,t)= 0 , 0 <x< 1. 25 , 0 <t, (4)
u(x,y, 0 )= 1 , 0 <x< 1. 25 , 0 <y< 1. (5)