You are on page 1of 49

Partial Differential Equations

and Boundary Value Problems†

National Chiao Tung University


Chun-Jen Tsai
12/16/2019
† Chapter 12.1 ~ 12.5 in the textbook.
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/49
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:

3/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 use 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/49
Example: Solving (1/4)
 Let u(x, y) = X(x)Y(y), we have XY = 4XY, or
X  Y 
  l ,
4X Y
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 + 4lX = 0 and Y + lY = 0.
These are the eigenvalue problem of ODE’s†.
Consider the three cases: l = 0, l = a2, and l = –a2.

† See Section 5.2, example 2.


5/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/49
Example: Solving (3/4)
 Case II: l = –a2, a > 0.

The two equations becomes X – 4a2X = 0 and


Y – a2Y = 0. The general solutions becomes
X(x) = c1 cosh 2ax + c2 sinh 2ax and Y(y) = c3ea2y,
respectively.

Thus, a particular solution of the PDE is


u(x, y) = X(x)Y(y) = (c1 cosh 2ax + c2 sinh 2ax)c3ea2y
= C1 ea2ycosh 2ax + C2 ea2ysinh 2ax.

7/49
Example: Solving (4/4)
 Case III: l = a2, a > 0.

The two equations becomes X + 4a2X = 0 and


Y + a2Y = 0. The general solutions becomes
X(x) = c1 cos 2ax + c2 sin 2ax and Y(y) = c3e–a2y,
respectively.

Thus, a particular solution of the PDE is


u(x, y) = X(x)Y(y) = (c1 cos 2ax + c2 sin 2ax)c3e–a2y
= C1 e–a2ycos 2ax + C2 e–a2ysin 2ax.

8/49
Superposition Principle for PDE
 If u1, u2, …, uk are solutions of a homogeneous linear
partial differential equation, then the linear combination
k

c u
i 1
i i

where the ci, i = 1, 2, …, k, are constants, is also a


solution.

The property is true even when k = .

9/49
Classification of PDE
 The linear 2nd-order partial differential equation with
two independent variables,
 2u  2u  2u u u
A 2 B C 2  D  E  Fu  G,
x xy y x y
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/49
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:
E dx E dy E
     0,
x dt y dt t

11/49
Derivation of the Heat Equation (1/3)
 Assume that we have a heated rod:
x=0 cross section area A

heater insulated shell, like a heat conduit

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.

† 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 12/49
Derivation of the Heat Equation (2/3)
 The heat content in a segment of the rod is:
Qt(x, t) Qt(x+Dx, t)
Q = g mu = g (ADx)u,
and the heat flow in this segment is x x+Dx

dQ/dt = gADx ut, when Dx  0 (1)

 Another way to estimate the heat flow is to compute


the difference of amount of heat entering/leaving the
segment as Dx  0:

Qt(x+Dx, t) – Qt(x, t) = KA[ux(x+Dx, t) – ux(x, t)] (2)

13/49
Derivation of the Heat Equation (3/3)
 Eq (1) and (2) should equal each other as Dx  0, thus
KA[ux(x+Dx, t) – ux(x, t)]  gADx ut, as Dx  0.
Therefore
K [u x ( x  Dx, t )  u x ( x, t )]
 lim  ut
g Dx  0 Dx
Finally, we obtain the following heat equation:
 2u u
k 2  .
x t
where k = K/g is the thermal diffusivity of the rod.

14/49
BVP of the Heat Equation (1/3)
 The solution of a PDE involves arbitrary functions of
some dependent variables. For example,
the partial DE
u ( x, t )
0
t
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.

15/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:

u  2u
k 2 (0  x  L, t  0);
t x
u (0, t )  u ( L, t )  0 (t  0),
u ( x,0)  f ( x) (0  x  L).

16/49
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.

17/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/49
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
u x  x  Dx, t   u x  x, t  
 utt .
Dx T
As Dx  0, we have uxx = (/T)utt.

19/49
BVP of the Wave Equation
 If we set T
a 2
,

we have the one-dimensional wave equation that
models the free vibrations of a uniform flexible string:
 2u  2u
a 2
 2 (0  x  L, t  0);
x 2
t
u (0, t )  u ( L, t )  0, (t  0),
u ( x ,0 )  f ( x ) (0  x  L),
u t ( x ,0 )  g ( x ) (0  x  L).

20/49
Laplacian of a 2-D Function u(x, y)
 The Laplacian of the function u(x, y) is defined as
 2u  2u
 u 2  2.
2

x y

 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).

21/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: y

u   2u  2u  K
 k  2  2   k 2u , k  R
t  x y  c C

 Note that ut = k2u is the 2-D extension of the 1-D heat


equation ut = kuxx. Similarly, utt = a22u is the 2-D
extension of the 1-D wave equation utt = a2uxx.

22/49
Heat/Wave Eqs with Influences
 The 1-D heat/wave equation can be modified to take
into account external and internal influences:
 2u u
k 2  G ( x, t , u , u x ) 
x t
and
 2
u  2
u
a 2
 F ( x, t , u , ut )  2 ,
x 2
t

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

23/49
Solution to the BVP of Heat Equation
 Note that the BVP of a heated rod is modelled as:
u  2u
k 2 (0  x  L, t  0);
t x
u (0, t )  u ( L, t )  0 (t  0),
u ( x,0)  f ( x) (0  x  L).

 Note that the heat equation is linear. That is, if u1 and u2


satisfy the PDE, w = c1u1 + c2u2 also satisfy the PDE.

However, a solution of the PDE must also satisfy the


boundary conditions.

24/49
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.

25/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:

u ( x, t )   cnun ( x, t ).
n 1

Then, determine the coefficients c1, c2, c3, … that satisfy


the non-homogeneous boundary condition.

26/49
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.
 c u ( x,0)  f ( x)
n 1
n n for 0  x  L.

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.

27/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
X  T 
  l ,
X kT
where l is a constant because changing x (or t) does
not change T/kT (or X"/X).

28/49
Separation of Variables (2/4)
 Thus, the solution can be obtained by solving two
ODEs for some common value of l:
X ( x)  lX ( x)  0,
T (t )  lkT (t )  0.
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
n 2 2
ln  2 , n  1,2,3,...
L
and then
nx
X n ( x)  sin , n  1,2,3,...
L
29/49
Separation of Variables (3/4)
 To solve for T(t), substituting the value l into the ODE
for T(t) as n 2 2 k
Tn  2
Tn  0.
L
A nontrivial solution of Tn(t) is

 
Tn (t )  exp  n 2 2 kt / L2 , n  1,2,3,...

30/49
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 
nx
u ( x, 0)   cn sin  f ( x), 0  x  L.
n 1 L
But this is the Fourier series of f(x) on [0, L]. Thus,
2 L nx
cn  bn   f ( x) sin dx, n  1,2,3,....
L 0 L

31/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:


n 2 2 nx
ln  2 , X n ( x)  cos .
L L
Similarly, solving the ODE of T(t) gives us:
  n 2 2 kt 
Tn (t )  exp 2
.
 L 

32/49
Heated Rod with Insulated Ends
 For a heated rod with zero endpoint temperatures, the
general solution is
nx
a0 
 
u ( x, t )    an exp  n 2 2 kt / L2 cos
2 n 1 L
,

where {an} are the Fourier cosine coefficients of u(x, 0).

33/49
Solution to the BVP of Wave Equation
 The BVP of a vibrating string is modelled as:
 2u  2u
a 2
 2 (0  x  L, t  0);
x 2
t
u (0, t )  u ( L, t )  0, (t  0),
u ( x ,0 )  f ( x ) (0  x  L),
u t ( x ,0 )  g ( x ) (0  x  L).

Here, we have two non-homogeneous boundary


conditions.

34/49
Problems with Two Nonzero BCs
 To solve the wave equation, we divide the system into
two sub-problems:
nonzero initial offset
 Problem A:
 utt = a2 uxx; u(0, t) = u(L, t) = 0, u(x, 0) = f(x), ut(x, 0) = 0.
nonzero initial velocity
 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).

35/49
Problem A Solution (1/3)
 By separation of variables, substitution of
u(x, t) = X(x)T(t) in utt = a2uxx yields XT = a2XT for all x
and t. Therefore, assume that
X  T 
 2  l , for some l .
X aT
 we have a system of ODE:
 X   lX  0, X ( 0)  X ( L )  0
 .
 T   la T  0, T (0)  0
2

The first equation is an eigenvalue problem:


n 2 2 nx
ln  2 , n  1,2,3, ... and n X ( x )  sin , n  1,2,3, ...
L L
36/49
Problem A Solution (2/3)
 Substitute ln into the second equation:
n 2 2 a 2
Tn  2
Tn  0, Tn(0)  0.
L nat
The solution to the IVP is Tn (t )  An cos , n  1,2,3, ...
L
 Hence,   
nat nx
u ( x, t )   un ( x, t )   X n ( x)Tn (t )   An cos sin
n 1 n 1 n 1 L L
satisfies all the homogeneous boundary conditions.
 Choose {An} to satisfy the non-homogeneous
boundary condition

nx
u ( x,0)   An sin  f ( x), 0  x  L.
n 1 L

37/49
Problem A Solution (3/3)
2 L nx
 If we choose An 
L 0
f ( x ) sin
L
dx.

the condition is simply the Fourier sine series


expansion of f(x) on [0, L].

u
 bx, 0 x  L/2
 Example: if f ( x)   , ½bL u = f(x)

b( L  x), L / 2  x  L x
L/2 L

and g(x) = 0, the solution u(x, t) is


4bL 
 1 n  nat nx
u ( x, t ) 
2
  2
n 1  n
sin
2


cos
L
sin
L
.

38/49
d’Alembert form of Solution (1/2)
 An alternative form of solution of problem A can be
obtained by applying trigonometric identity:

nat nx
u ( x, t )   An cos sin
n 1 L L
1  n 1  n
  An sin ( x  at )   An sin ( x  at ).
2 n 1 L 2 n 1 L

nx
If we define F ( x)   An sin ,
n 1 L
we have
u(x, t) = [F(x + at) + F(x – at)]/2.

39/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.
u u

x x
/2  /2 
(a) At time t = 0. (a) At time t = /8.

u u

x x
/2  /2 
(a) At time t = /4. (a) At time t = 3/8.

40/49
Problem B Solution (1/2)
 Solution for Problem B is similar to that for A, except
that
d 2Tn n 2 2 a 2
2
 2
Tn  0, Tn (0)  0.
dt L
A non-trivial solution is
nat
Tn (t )  Bn sin , n  1,2,3, ...
L
Hence,
 
nat nx
u ( x, t )   X n ( x)Tn (t )   Bn sin sin .
n 1 n 1 L L

41/49
Problem B Solution (2/2)
 Again, the coefficients {Bn} that satisfies the non-
homogeneous boundary condition

na nx
ut ( x,0)   Bn sin  g ( x), 0  x  L.
n 1 L L
would be the Fourier sine coefficient bn of g(x) on
[0, L] divided by na/L:
na 2 L nx
L
Bn  bn  g ( x) sin dx.
L 0 L
Hence, we choose
2 L nx
Bn 
na 0
g ( x ) sin
L
dx.

42/49
Total Solution to the Wave Equation
 The complete solution is the summation of Problem A
and Problem B:

 nat nat  nx
u ( x, t )    An cos  Bn sin  sin ,
n 1  L L  L
where
2 L nx
An   f ( x) sin dx,
L 0 L
2 L nx
na 0
Bn  g ( x) sin dx.
L

43/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:
 2 u  2u
 u  2  2  0.
2

x y

 A boundary value problem of the Laplace equation can


be formulated as follows (i.e. the Dirichlet problem):
 2  2u  2u y
 u  2  2  0 ( within R )
 x y . R
 u ( x, y )  f ( x, y ) (if ( x, y ) is on C ) C

44/49
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.

45/49
Example: The Dirichlet Problem (1/4)
 Solve the boundary value problem for the rectangle R.
y
uxx + uyy = 0;
u=0 (a, b)
u(0, y) = u(a, y) = u(x, b) = 0,
u(x, 0) = f(x). u=0 R u=0

x
u = f(x)

Assume that u(x, y) = X(x)Y(y), we have XY + XY = 0.


Thus,
X  Y   X   lX  0
  l   .
X Y  X (0)  X ( a )  0

46/49
Example: The Dirichlet Problem (2/4)
 The eigenvalues and eigenfunctions of X are
n 2 2 nx
ln  2 , X n ( x)  sin , n  1,2,3,...
a a
As a result,
n 2 2
Yn  2 Yn  0, Yn (b)  0.
a
The general solution of Yn is
ny ny
Yn ( y )  An cosh  Bn sinh .
a a

47/49
Example: The Dirichlet Problem (3/4)
 To compute the particular solution, we must solve An
and Bn using Yn(b) = 0:
nb nb
Yn (b)  An cosh  Bn sinh  0.
a a
nb nb
 Bn   An cosh sinh .
a a
Therefore,
ny  nb nb  ny
Yn ( y )  An cosh   An cosh sinh  sinh
a  a a  a
n (b  y )
 cn sinh , cn  An / sinh(nb / a ).
a
48/49
Example: The Dirichlet Problem (4/4)
 The formal series solution is then
 
nx n (b  y )
u ( x, y )   X n ( x )Yn ( y )   cn sin sinh .
n 1 n 1 a a
cn must satisfy the nonhomogeneous condition

 nb  nx
u ( x,0)    cn sinh  sin  f ( x ).
n 1  a  a
Therefore,
2 a nx
cn 
a sinh(nb / a) 0
f ( x) sin
a
dx.

49/49

You might also like