Page 413 - Applied Numerical Methods Using MATLAB
P. 413
402 PARTIAL DIFFERENTIAL EQUATIONS
9.1 ELLIPTIC PDE
As an example, we will deal with a special type of elliptic equation called
Helmholtz’s equation, which is written as
2
∇ u(x, y) + g(x, y)u(x, y) =
2
2
∂ u(x, y) ∂ u(x, y)
+ + g(x, y)u(x, y) = f (x, y) (9.1.1)
∂x 2 ∂y 2
over a domain D ={(x, y)|x 0 ≤ x ≤ x f ,y 0 ≤ y ≤ y f } with some boundary con-
ditions of
u(x 0 ,y) = b x0 (y), u(x f ,y) = b xf (y),
(9.1.2)
u(x, y 0 ) = b y0 (x), and u(x, y f ) = b yf (x)
(cf) Equation (9.1.1) is called Poisson’s equation if g(x, y) = 0 and it is called Laplace’s
equation if g(x, y) = 0and f (x, y) = 0.
To apply the difference method, we divide the domain into M x sections, each
of length x = (x f − x 0 )/M x along the x-axis and into M y sections, each of
length y = (y f − y 0 )/M y along the y-axis, respectively, and then replace the
second derivatives by the three-point central difference approximation (5.3.1)
2
∂ u(x, y) u i,j+1 − 2u i,j + u i,j−1
∼
= with x j = x 0 + j x, y i = y 0 + i y
∂x 2 x 2
x j ,y i
(9.1.3a)
2
∼
∂ u(x, y) u i+1,j − 2u i,j + u i−1,j
= with u i,j = u(x j ,y i ) (9.1.3b)
∂y 2 y 2
x j ,y i
so that, for every interior point (x j ,y i ) with 1 ≤ i ≤ M y − 1and 1 ≤ j ≤ M x − 1,
we obtain the finite difference equation
u i,j+1 − 2u i,j + u i,j−1 u i+1,j − 2u i,j + u i−1,j
+ + g i,j u i,j = f i,j (9.1.4)
x 2 y 2
where
u i,j = u(x j ,y i ), f i,j = f(x j ,y i ), and g i,j = g(x j ,y i )
These equations can somehow be arranged into a system of simultaneous
equations with respect to the (M y − 1)(M x − 1) variables {u 1,1 ,u 1,2 ,...,u 1,M x −1 ,
u 2,1 ,...,u 2,M x −1 ,..., u M y −1,1 ,u M y −1,2 ,... ,u M y −1,M x −1 }, but it seems to be
messy to work with and we may be really in trouble as M x and M y become
large. A simpler way is to use the iterative methods introduced in Section 2.5.
To do so, we first need to shape the equations and the boundary conditions into
the following form:
u i,j = r y (u i,j+1 + u i,j−1 ) + r x (u i+1,j + u i−1,j ) + r xy (g i,j u i,j − f i,j ) (9.1.5a)

