The Dirichlet BVP For A Rectangle: U U (X, 0) F U (X, B) F X A, U (0, Y) G U (A, Y) G y B

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

MODULE 7: THE LAPLACE EQUATION 12

Lecture 3 The Dirichlet BVP for a Rectangle

In this lecture we shall discuss the solution of the Laplace equation with Dirichlet type
BC in cartesian coordinates.

Consider the following Dirichlet problem in a rectangle:

PDE: uxx + uyy = 0, 0 < x < a, 0 < y < b, (1)


BC: u(x, 0) = f1 (x), u(x, b) = f2 (x), 0 ≤ x ≤ a, (2)
u(0, y) = g1 (y), u(a, y) = g2 (y) 0 ≤ y ≤ b.

We shall study how the method of separation of variables is still applicable for the BVP.
Since the BC are nonhomogeneous, we are required to do some preliminary work.

By the principle of superposition, we seek the solution of the above BVP (1)-(2) as

u(x, y) = u1 (x, y) + u2 (x, y) + u3 (x, y) + u4 (x, y),

where each of u1 , u2 , u3 and u4 satisfies the PDE with one of the original nonhomogeneous
BC, and the homogeneous versions of the remaining three BC. These problems are then
solved by the method of separation of variables.

Let us consider solving the following example problem:


EXAMPLE 1. Solve the Dirichlet BVP:

PDE: uxx + uyy = 0, 0 < x < a, 0 < y < b, (3)


BC: u(x, 0) = f (x), u(x, b) = 0, 0 ≤ x ≤ a, (4)
u(0, y) = 0, u(a, y) = 0, 0 ≤ y ≤ b.

Apply the method of separation of variables to solve this problem. The step-wise
solution procedure is given below.

Step 1: (Reducing to ODEs)


Separating variables, we seek for a solution of the form

u(x, y) = X(x)Y (x).

Substituting this into (3), we obtain

X ′′ Y (y) + X(x)Y ′′ (y) = 0


MODULE 7: THE LAPLACE EQUATION 13

and hence,
X ′′ (x) Y ′′ (y)
=− = k,
X(x) Y (y)
for some constant k, which is called the separation constant. This leads two ODEs

X ′′ (x) − kX(x) = 0, (5)


′′
Y (y) + kY (y) = 0. (6)

Step 2: (Solving the resulting ODEs)

Case 1 : When k > 0, set k = λ2 , where λ ̸= 0. In this case, the solutions of ODEs are

X(x) = [Aeλx + Be−λx ],

Y (y) = [C cos(λy) + D sin(λy)].

Therefore, the solutions of PDE u(x, y) are given by

u(x, y) = [Aeλx + Be−λx ][C cos(λy) + D sin(λy)].

Case 2 : When k = 0, the solutions of ODEs are linear are given by

X(x) = (A + Bx), Y (y) = (C + Dy).

Therefore,
u(x, y) = (A + Bx)(C + Dy).

Case 3 : Suppose k < 0, set k = −λ2 , where λ > 0.


The solutions of ODEs are given by

X(x) = [A cos(λx) + B sin(λx)]

Y (x) = [Ceλy + De−λy ].

Thus , the solution of PDE is

u(x, t) = [A cos(λx) + B sin(λx)][Ceλy + De−λy ].

Step 3: (Applying the BC)


Using the boundary conditions u(0, y) = 0 and u(a, y) = 0 for the product solution
obtained for the case k > 0 leads to the equations

A + B = 0, Aeλa + Be−λa = 0,
MODULE 7: THE LAPLACE EQUATION 14

which has a trivial solution A = 0 and B = 0. Thus, only the trivial solution u(x, y) = 0
is possible. Similarly, use of boundary conditions u(0, y) = 0 and u(a, y) = 0 also leads
to a trivial solution u(x, y) = 0 for the case k = 0. Let us examine the product solution
obtained in Case 3 (for k < 0) i.e.,

u(x, y) = [A cos(λx) + B sin(λx)][Ceλy + De−λy ].

Using the boundary condition u(0, y) = 0 yields A = 0. The condition u(a, y) = 0 gives

B sin(λa)][Ceλy + De−λy ] = 0.

For a non-trivial solution,

B ̸= 0 =⇒ sin λa = 0

=⇒ λa = nπ or λ = , n = 1, 2, 3, . . . .
a
Therefore, the sequence of non-trivial is given by
nπx nπy −nπy
un (x, y) = sin( )[Cn e a + Dn e a ]
a
Applying the BC u(x, b) = 0, we obtain
nπx nπb −nπb
sin( )[Cn e a + Dn e a ] = 0
a
nπb −nπb
=⇒ Cn e a + Dn e a = 0
nπb
e a
=⇒ Dn = −Cn −nπb , n = 1, 2, . . . , .
e a

Therefore, the solution now takes the form


nπx 2Cn { nπ(y−b) −nπ(y−b)
}
un (x, y) = sin( ) −nπb e a − e a /2
a e a
2Cn nπx nπ(y − b)
= −nπb sin( ) sinh( ).
e a a a
2Cn
Setting cn = −nπb and using superposition principle, we obtain
e a


∑ nπx nπ(y − b)
u(x, y) = cn sin( ) sinh( ).
a a
n=1

To satisfy the remaining nonhomogeneous BC, we must have



∑ nπx −nπb
u(x, 0) = f (x) = cn sin( ) sinh( ),
a a
n=1
MODULE 7: THE LAPLACE EQUATION 15

which is a half-range Fourier series. Therefore,



−nπb 2 a nπx
cn sinh( )= f (x) sin( )dx,
a a 0 a
and this implies ∫ a
2 nπx
cn = f (x) sin( )dx. (7)
a sinh( −nπb
a ) 0 a
Therefore, the required solution to the problem (3)-(4) is

∑ nπx nπ(y − b)
u(x, y) = cn sin( ) sinh( )
a a
n=1

with the coefficients cn computed from (7).

As a consequence of the superposition principle we obtain the following result.


THEOREM 2. Let an , bn , cn and dn be the Fourier coefficients of f (x), g(x), h(y) and
k(y). Then solution of the Dirichlet problem

PDE: uxx + uyy = 0, 0 < x < a, 0 < y < b,


BC: u(x, 0) = f (x), u(x, b) = g(x) 0 ≤ x ≤ a,
u(0, y) = h(y), u(a, y) = k(y), 0 ≤ y ≤ b,

is
∞ [
∑ nπx nπ(b − y)
u(x, y) = An sin( ) sinh[ ]
a a
n=1
nπx nπy
+Bn sin( ) sinh( )
a a
nπy nπ(a − x)
+Cn sin( ) sinh[ ]
b b ]
nπy nπx
+ Dn sin( ) sinh( ) ,
b b
where
nπb nπb
An = an / sinh( ) Bn = bn / sinh( )
a a
nπa nπa
Cn = cn / sinh( ) Dn = dn / sinh( ).
b b

Practice Problems

1. Solve the following BVP:

uxx + uyy = 0, 0 < x < 1, 0 < y < 1,


u(x, 0) = x(x − 1), u(x, 1) = 0, 0 ≤ x ≤ 1,
u(0, y) = 0, u(1, y) = 0, 0 ≤ y ≤ 1,
MODULE 7: THE LAPLACE EQUATION 16

2. Solve the following BVP:

uxx + uyy = 0, 0 < x < π, 0 < y < π,


u(x, 0) = sin x, u(x, 1) = sin x, 0 ≤ x ≤ π,
u(0, y) = sin y, u(1, y) = sin y, 0 ≤ y ≤ π,

You might also like