Partial Differential Equations and Boundary Value Problems
†National Chiao Tung University Chun-Jen Tsai 12/16/2019
/49
Partial Differential Equation
A partial differential equation (PDE) is a differential equation that contains partial derivatives of a
dependent variable that is a function of at least two independent variables.
Example: one-dimensional heat equation:
u(x, t) is the temperature function of x (position) and t (time) of a heated rod, k is a constant parameter determined by the material of the rod
2
Linear Partial Differential Equations
If u is a function of two independent variables x and y, the general form of a linear 2nd-order PDE is given by:
where A, B, C, D, …, G are functions of x and y.
Example: one-dimensional heat propagation equation can be described by:
/49
Solving PDE for Separable Functions
General solutions for PDE are difficult to find, so in practice, we only look for particular solutions.
In addition to using initial or boundary conditions to constrain our solutions, we often assume that the solution function is separable, that is:
u(x, y) = X(x)Y(y).
Thus, we have:
4
Example: Solving (1/4)
Let u(x, y) = X(x)Y(y), we have XY = 4XY, or
where
l
is a constant because changing X won’t change Y/Y and changing Y won’t change X/4X.Thus, X and Y must be solutions of X + 4
l
X = 0 and Y +l
Y = 0.These are the eigenvalue problem of ODE’s†.
Consider the three cases:
l
= 0,l
=a
2, andl
= –a
2. 4 l
,
Y Y X
X
/49
Example: Solving (2/4)
Case I:
l
= 0.The two equations become X = 0 and Y = 0. The general solutions are X(x) = c1 + c2 x and Y(y) = c3, respectively.
Thus, a particular solution of the PDE is u(x, y) = X(x)Y(y) = (c1 + c2 x)c3 = C1 + C2 x.
6
Example: Solving (3/4)
Case II:
l
= –a
2,a
> 0.The two equations becomes X – 4
a
2X = 0 and Y –a
2Y = 0. The general solutions becomesX(x) = c1 cosh 2
a
x + c2 sinh 2a
x and Y(y) = c3ea2y, respectively.Thus, a particular solution of the PDE is
u(x, y) = X(x)Y(y) = (c1 cosh 2
a
x + c2 sinh 2a
x)c3ea2y= C1 ea2ycosh 2
a
x + C2 ea2ysinh 2a
x./49
Example: Solving (4/4)
Case III:
l
=a
2,a
> 0.The two equations becomes X + 4
a
2X = 0 and Y +a
2Y = 0. The general solutions becomes X(x) = c1 cos 2a
x + c2 sin 2a
x and Y(y) = c3e–a2y, respectively.Thus, a particular solution of the PDE is
u(x, y) = X(x)Y(y) = (c1 cos 2
a
x + c2 sin 2a
x)c3e–a2y= C1 e–a2ycos 2
a
x + C2 e–a2ysin 2a
x.8
Superposition Principle for PDE
If u1, u2, …, uk are solutions of a homogeneous linear partial differential equation, then the linear combination
where the ci, i = 1, 2, …, k, are constants, is also a solution.
The property is true even when k = .
k ii iu c
1
/49
Classification of PDE
The linear 2nd-order partial differential equation with two independent variables,
where A, B, C, D, …, G are real constants, is said to be:
Hyperbolic if B2 – 4 AC > 0,
Parabolic if B2 – 4 AC = 0,
Elliptic if B2 – 4 AC < 0.
10
2 ,
2 2
2 2
G y Fu
E u x
D u y
C u y
x B u x
A u
Derivation of Classical PDEs
The derivation of the mathematical model that can be used to explain or predict the behavior of a physical phenomenon is the key to most engineering problems
Example: the optical flow model.
The motion (dx/dt, dy/dt) of the image pixels E(x, y, t) taken by a camera can be approximated by:
,
0
t E dt
dy y
E dt
dx x
E
/49
Derivation of the Heat Equation (1/3)
Assume that we have a heated rod:
u(x, t) is the temperature of the rod at x and time t.
From empirical study of thermodynamics:
The amount of heat in a element of mass m and temperature u is Q = g mu, g is a constant parameter of the rod.
The heat flow Qt = –KAux is the flow of heat in the direction of decreasing temperature, K is a constant parameter of the rod.
12
cross section area A
x
heater insulated shell, like a heat conduit
† One calorie is the amount of heat required at a pressure of one atmosphere to raise the temperature of one gram of water by one degree Celsius
x = 0
Derivation of the Heat Equation (2/3)
The heat content in a segment of the rod is:
Q =
g
mu =g
(
AD
x)u,and the heat flow in this segment is
dQ/dt =
g
AD
x ut, whenD
x 0 (1) Another way to estimate the heat flow is to compute the difference of amount of heat entering/leaving the segment as
D
x 0:Qt(x+Dx, t) – Qt(x, t) = KA[ux(x+
D
x, t) – ux(x, t)] (2)x x+Dx
Qt(x, t) Qt(x+Dx, t)
/49
Derivation of the Heat Equation (3/3)
Eq (1) and (2) should equal each other as
D
x 0, thus KA[ux(x+D
x, t) – ux(x, t)] g
AD
x ut, asD
x 0.Therefore
Finally, we obtain the following heat equation:
where k = K/
g
is the thermal diffusivity of the rod.14
2 .
2
t u x
k u
t x
x
x u
x
t x u t
x x
u
K
D
D
D
)]
, ( )
, (
lim [
g
0BVP of the Heat Equation (1/3)
The solution of a PDE involves arbitrary functions of some dependent variables. For example,
the partial DE
has a general solution u(x, t) = g(x), where g(x) can be any function of x.
Hence, the “initial condition” of a partial DE is a
boundary function. In the case of the heated rod, we may have the boundary function u(x, 0) = f(x), where f(x) is the heat function (of x) at time 0.
) 0 ,
(
t
t x u
/49
BVP of the Heat Equation (2/3)
We may also constrain the temperature function at two ends of the rod and try to solve the PDE. For example,
u(0, t) = u(L, t) = 0, for all t > 0.
A boundary value problem of the heated rod PDE may be as follows:
);
0 ,
0
2 (
2
x L t
x k u t
u
), 0 (
0 )
, ( )
, 0
( t u L t t
u
).
0 ( )
( )
0 ,
(x f x x L
u
16
BVP of the Heat Equation (3/3)
Another possible boundary condition for the heated rod is that no heat will flow through either end (i.e. both
ends are heat-insulated):
ux(0, t) = ux(L, t) = 0, for all t.
Physical intuition tells us that if the initial condition f(x) is a reasonable function, there exists a unique solution u(x, t) for the boundary value problem.
/49
Derivation of the Wave Equation (1/2)
A PDE that models the vibrations of a string can be derived with the following assumptions:
A perfectly flexible uniform string with density is stretched under a uniform tension force of T between x = 0 and x = L.
Each point on the string moves only in u direction
u(x, t) is the shape of the string at time t.
The slope of the curve is small for all x sin tan = ux(x, t).
18
Derivation of the Wave Equation (2/2)
Apply Newton’s law to the segment [x, x + Dx], Tsin
2 – Tsin
1 Ttan
2 – Ttan
1= T[ux(x + Dx, t) – ux(x, t)]
= (
Dx)utt. So, division by DxT on both side yields
As Dx 0, we have uxx = (
/T)utt.
, . ,
tt x
x u
T x
t x u t
x x
u
D
D
/49
BVP of the Wave Equation
If we set
we have the one-dimensional wave equation that
models the free vibrations of a uniform flexible string:
20
2 ,
a T
);
0 ,
0
2 (
2 2
2 2
x L t
t u x
a u
), 0 (
, 0 )
, ( )
, 0
( t u L t t u
), 0
( )
( )
0 ,
(x f x x L
u
).
0 ( )
( )
0 ,
(x g x x L
ut
Laplacian of a 2-D Function u(x, y)
The Laplacian of the function u(x, y) is defined as
The Laplace’s equation 2u = 0 is often used to model the steady-state behavior of a 2-D (or higher
dimensional) phenomenon (e.g., temperature of an object).
2 .
2 2
2 2
y u x
u u
/49
Modeling of 2-D Heat/Wave Equations
Given a 2-D thin plate with thermal diffusivity k, its temperature u(x, y, t) at the point (x, y) at time t
satisfies the 2-D heat equation:
Note that ut = k2u is the 2-D extension of the 1-D heat equation ut = kuxx. Similarly, utt = a22u is the 2-D
extension of the 1-D wave equation utt = a2uxx.
c k K u
y k u x
k u t
u
2 2 ,
2 2
2
y
x
R
C
22
Heat/Wave Eqs with Influences
The 1-D heat/wave equation can be modified to take into account external and internal influences:
and
where G() may be the ambient temperature influences to the heated rod; and F() may represent the external, damping, and restoring forces of the string vibration
,
/49
Solution to the BVP of Heat Equation
Note that the BVP of a heated rod is modelled as:
Note that the heat equation is linear. That is, if u1 and u2 satisfy the PDE, w = c1u1 + c2u2 also satisfies the PDE.
However, a solution of the PDE must also satisfy the boundary conditions.
24
);
0 ,
0
2 (
2
x L t
x k u t
u
), 0 (
0 )
, ( )
, 0
( t u L t t u
).
0 ( )
( )
0 ,
(x f x x L
u
Meeting Boundary Conditions (1/2)
If u1 and u2 satisfies the (homogeneous) conditions u(0, t) = u(L, t) = 0, for all t > 0,
w = c1u1 + c2u2 will also satisfy the condition. However, the general form of w may not satisfy the boundary
condition only a particular choice of c1 and c2 satisfy the non-homogeneous boundary condition:
u(x, 0) = f(x), 0 < x < L.
/49
Meeting Boundary Conditions (2/2)
In general, we must find an infinite sequence u1, u2, u3, …, of solutions that satisfies both the PDE and the homogeneous boundary conditions, and assume the general solution form as follows:
Then, determine the coefficients c1, c2, c3, … that satisfy the non-homogeneous boundary condition.
.) , ( )
, (
1
n
n
nu x t
c t
x u
26
General Solutions of a Linear BVP
Suppose that each of the functions u1, u2, u3, …,
satisfies both the PDE for 0 < x < L and t > 0 and the homogeneous conditions, and c1, c2, c3, … are chosen to meet the following three criteria:
1. For 0 < x < L and t > 0, the function u(x, t) = cnun(x, t) is
continuous and term-wise differentiable (for /t and 2/x2).
2.
3. The function u(x, t) = cnun(x, t) is continuous within, and at the boundary of the region 0 x L and t 0.
Then u(x, t) is a solution of the BVP.
. 0
) ( )
0 , (
1
L x
x f x
u c
n
n
n
for
/49
Separation of Variables (1/4)
In solving the heated rod problem, Fourier sought for a sequence of solutions u1, u2, u3, …, which are
“separable.” That is for each of ui, we have u(x, t) = X(x)T(t),
where X(x) and T(t) are functions of x and t,
respectively. Substitution of such u(x, t) into the heat equation ut = kuxx yields XT = kX"T, or
where
l
is a constant because changing x (or t) does not change T/kT (or X"/X).l,
kT T X
X
28
Separation of Variables (2/4)
Thus, the solution can be obtained by solving two ODEs for some common value of
l
:For X(x), we have u(0, t) = X(0)T(t) = 0, u(L, t) = X(L)T(t) = 0. Thus X(0) = X(L) = 0 if T(t) is nontrivial.
X(x) has a nontrivial solution if and only if
and then
. 0 )
( )
(
, 0 )
( )
(
t kT t
T
x X x
X
l l
,...
3 , 2 , 1
2 ,
2
2
n
L n
n
l
,...
3 , 2 , 1 ,
sin )
( n x n
x
X
/49
Separation of Variables (3/4)
To solve for T(t), substituting the value
l
into the ODE for T(t) asA nontrivial solution of Tn(t) is
.
2 0
2
2
n
n T
L k T n
/
, 1,2,3,...exp )
(t n2 2kt L2 n
Tn
30
Separation of Variables (4/4)
Now, we have sequences of solutions to the PDE un(x, t) = X(x)T(t) = exp(–n2
2kt/L2)sin(n
x/L),n = 1, 2, 3, …. Each of these functions satisfies the heat equation and the homogeneous conditions.
We want to find c1, c2, c3, … such that cnun(x, t) satisfies
But this is the Fourier series of f(x) on [0, L]. Thus, . 0
), ( sin
) 0 , (
1
L x
x L f
x c n
x u
n
n
,....
3 , 2 , 1 ,
sin ) 2 (
0
b L
f x nLx dx ncn n L
/49
Insulated Endpoint Conditions
When the heated rod is insulated at both ends, the homogeneous boundary condition becomes
ux(0, t) = ux(L, t) = 0. We can use the separation of variables approach again to solve this problem.
Solving the ODE of X(x) gives us:
Similarly, solving the ODE of T(t) gives us:
. cos
) (
2 ,
2 2
L x x n
L X n
n n
l
. exp
)
( 2
2 2
L
kt t n
Tn
32
Heated Rod with Insulated Ends
For a heated rod with zero endpoint temperatures, the general solution is
where {an} are the Fourier cosine coefficients of u(x, 0).
/
cos ,2 exp )
, (
1
2 2
0
2
n
n L
x L n
kt n
a a t
x
u
/49
Solution to the BVP of Wave Equation
The BVP of a vibrating string is modelled as:
Here, we have two non-homogeneous boundary conditions.
34
), 0
( )
( )
0 ,
(x f x x L
u
).
0 ( )
( )
0 ,
(x g x x L
ut
);
0 ,
0
2 (
2 2
2
2
x L t
t u x
a u
), 0 (
, 0 )
, ( )
, 0
( t u L t t u
Problems with Two Nonzero BCs
To solve the wave equation, we divide the system into two sub-problems:
Problem A:
utt = a2 uxx; u(0, t) = u(L, t) = 0, u(x, 0) = f(x), ut(x, 0) = 0.
Problem B:
utt = a2 yxx; u(0, t) = u(L, t) = 0, u(x, 0) = 0, ut(x, 0) = g(x).
The overall solution is the sum of the two sub-problems since
u(x, 0) = uA(x, 0) + uB(x, 0) = f(x) + 0 = f(x),
ut(x, 0) = {uA}t(x, 0) + {uB}t(x, 0) = 0 + g(x) = g(x).
nonzero initial offset
nonzero initial velocity
/49
Problem A Solution (1/3)
By separation of variables, substitution of
u(x, t) = X(x)T(t) in utt = a2uxx yields XT = a2XT for all x and t. Therefore, assume that
we have a system of ODE:
The first equation is an eigenvalue problem:
.
2
l
, for somel
T a
T X
X
0 . )
0 ( ,
0
0 )
( )
0 ( ,
0
2
T T
a T
L X X
X X
l l
and ...
, 3 , 2 , 1
2 ,
2
2
n
L n
n
l
( ) sin , n 1,2,3, ...L x x n
Xn
36
Problem A Solution (2/3)
Substitute
l
n into the second equation:The solution to the IVP is
Hence,
satisfies all the homogeneous boundary conditions.
Choose {An} to satisfy the non-homogeneous boundary condition
. 0 ) 0 ( ,
2 0
2 2
2
n n
n T T
L a T n
...
, 3 , 2 , 1 ,
cos )
( n
L at A n
t
Tn n
L x n L
at A n
t T x X t
x u t
x u
n
n n
n n
n
n
sin cos
) ( ) ( )
, ( )
, (
1 1
1
. 0
), ( sin
) 0 ,
( n x f x x L
A x
u
n /49
Problem A Solution (3/3)
If we choose
the condition is simply the Fourier sine series expansion of f(x) on [0, L].
Example: if
and g(x) = 0, the solution u(x, t) is
. sin
) 2 (
0 L
n dx
L x x n
L f
A
. sin
2 cos 1 sin
) 4 , (
1 2
2
n L
x n L
at n n
n t bL
x
u
2 , / ),
(
2 / 0
) , (
L x L
x L b
L x
x bx f
x u
L L/2
u = f(x)
½bL
38
d’Alembert form of Solution (1/2)
An alternative form of solution of problem A can be obtained by applying trigonometric identity:
If we define we have
u(x, t) = [F(x + at) + F(x – at)]/2.
.) (
2 sin ) 1
( 2 sin
1
sin cos
) , (
1 1
1
n
n n
n n
n
at L x
A n at
L x A n
L x n L
at A n
t x u
, sin
) (
1
n
n L
x A n
x
F
/49
d’Alembert form of Solution (2/2)
The functions F(x + at) and F(x – at) in d’Alembert form of Solution represents waves moving to the left and right, respectively, along the string with speed a.
x u
/2
(a) At time t = 0.
x u
/2
(a) At time t = /8.
x u
/2
(a) At time t = /4.
x u
/2
(a) At time t = 3/8.
40
Problem B Solution (1/2)
Solution for Problem B is similar to that for A, except that
A non-trivial solution is Hence,
. 0 ) 0 ( ,
2 0
2 2 2 2
2 n Tn Tn
L a n
dt T
d
...
, 3 , 2 , 1 ,
sin )
( n
L at B n
t
Tn n
. sin
sin )
( ) ( )
, (
1
1 L
x n L
at B n
t T x X t
x u
n
n n
n n
/49
Problem B Solution (2/2)
Again, the coefficients {Bn} that satisfies the non- homogeneous boundary condition
would be the Fourier sine coefficient bn of g(x) on [0, L] divided by n
a/L:Hence, we choose
. 0
), ( sin
) 0 , (
1
L x
x L g
x n L
a B n
x u
n
n
t
. sin
) 2 (
0 dx
L x x n
L g L b
a
Bn n n
L . sin
) 2 (
0 dx
L x x n
a g
Bn n
L 42
Total Solution to the Wave Equation
The complete solution is the summation of Problem A and Problem B:
where
, sin
sin cos
) , (
1 L
x n L
at B n
L at A n
t x u
n
n n
. sin
) 2 (
0 dx
L x x n
a g
Bn n
L , sin
) 2 (
0 L
n dx
L x x n
L f
A
/49
Steady-State Temperature
The steady-state temperature of a plate can be
described by a function u(x, y), i.e., ut = 0. Thus, we have the 2-D Laplace equation:
A boundary value problem of the Laplace equation can be formulated as follows (i.e. the Dirichlet problem):
.
2 0
2 2
2 2
y
u x
u u
. ) on is ) , ( if ( )
, ( )
, (
) R within (
2 0
2 2
2 2
C y
x y
x f y
x u
y u x
u u y
x
R C
44
Solutions to the Laplace’s Equation
Suppose we want to find the steady-state temperature u(x, y) in a thin rectangular plate with width a and height b. The problem can be formulated as a BVP problem as follows:
uxx + uyy = 0;
u(0, y) = f1(x), u(a, y) = f2(x), u(x, b) = f3(x), u(x, 0) = f4(x).
This is called the Dirichlet problem.
/49
Solve the boundary value problem for the rectangle R.
uxx + uyy = 0;
u(0, y) = u(a, y) = u(x, b) = 0, u(x, 0) = f(x).
Assume that u(x, y) = X(x)Y(y), we have XY + XY = 0.
Thus,
Example: The Dirichlet Problem (1/4)
0. ) ( )
0 (
0
a X X
X X
Y Y X
X l
l
46
y
x
R
(a, b) u = 0
u = 0 u = 0
u = f(x)
Example: The Dirichlet Problem (2/4)
The eigenvalues and eigenfunctions of X are
As a result,
The general solution of Yn is
,...
3 , 2 , 1 ,
sin )
(
2 ,
2
2
n
a x x n
a X n
n n
l
. 0 )
( ,
2 0
2
2
Y Y b
a
Yn n n n
. sinh
cosh )
( a
y B n
a y A n
y
Yn n n
/49
Example: The Dirichlet Problem (3/4)
To compute the particular solution, we must solve An and Bn using Yn(b) = 0:
Therefore,
48
).
/ sinh(
/ ) ,
sinh ( c A n b a
a y b
cn n n n
. 0 sinh
cosh )
(
a b B n
a b A n
b
Yn n n
. sinh
cosh a
b n a
b A n
Bn n
a y n a
b n a
b A n
a y A n
y
Yn n n
sinh sinh
cosh cosh
)
(
Example: The Dirichlet Problem (4/4)
The formal series solution is then
cn must satisfy the nonhomogeneous condition
Therefore,
). sinh (
sin )
( ) ( )
, (
1
1
n
n n
n
n a
y b
n a
x c n
y Y x X y
x
u
).
( sin
sinh )
0 , (
1
x a f
x n a
b c n
x u
n
n
. sin
) ) (
/ sinh(
2
0 a
n dx
a x x n
a f b n
c a
#