Partial Differential Equations: Analytical and Numerical Methods

The method of shifting the data can be used to transform an inhomogeneous Dirichlet problem to a homogeneous Dirichlet problem. This technique works just as it did for a one-dimensional problem, although in two dimensions it is more difficult to find a function satisfying the boundary conditions. We consider the BVP

where ? is the rectangle defined in (8.10) and ?? = ? 1 ? ? 2 ? ? 3 ? ? 4, as in (8.13). We will assume that the boundary data are continuous, so
Suppose we find a function p defined on ? and satisfying p( x) = g( x) for all x ? ??. We then define v = u ? p and note that
and
(since p satisfies the same Dirichlet conditions that u is to satisfy). We can then solve
where
The result will be a rapidly converging series for v, and then u will be given by u = v + p.
We now describe a method (admittedly rather tedious) for computing a function p that satisfies the given Dirichlet conditions. We first note that there is a polynomial of the form
which assumes the desired boundary values at the corners:

A direct calculation shows that

We then define

We have thus replaced each g i by a function h i which differs from g