Page 289 - Excel for Scientists and Engineers: Numerical Methods
P. 289
266 EXCEL: NUMERICAL METHODS
Thus, for example, Laplace's equation (12-2) is rewritten as
F(x + h, Y)- 2F(x, Y) + F(x - h, Y) + F(x9 Y + k)-2F(xy v)+ F(x, Y -k) =
h2 k2
(12-1 3)
Our approach for solving these problems will be to subdivide the region of
interest into a lattice of mesh size h x k and write the difference equations that
correspond to the lattice points, to obtain values of the function at each lattice
point. For the general lattice point x,, yI the derivative expression is
m,+1 Y, ) - 2m, YI 1 + F(x,-, 9 Y, 1 + F(x, 7 YI+1) - 2F(x, Y Y, ) + F(x, 3 YI-1) =O
Y
Y
h2 k2
(1 2- 14)
If h = k, equation 12- 14 simplifies to
F
F(X,+,Y Y,) + F(x, ,Y,+1) - Wx, ,Y,) + k Y Yl-1) + F(X,-,Y Y,) = 0
(1 2- 15)
from which we obtain equation 12-16
(12-16)
F(x,+,,~l)+F(xlY~l+,)+F(xlY~l-,)+F(xl-,,~,)
F(x,,y,) =
4
For the case where h # k, an expression for F(x,y) can readily be obtained
from equation 12- 14.
Note that four lattice points are involved in the calculation of F(x,y) by
equation 12- 16, as represented in Figure 12- 1. This representation is sometimes
referred to as the stend of the method.
-1 0 1
Xi
Figure 12-1. Stencil of the finite difference method for the solution of an
elliptic PDE. The points shown as solid squares represent previously calculated
values of the function; the open square represents the value to be calculated.