You are on page 1of 9

Partial Differential Equations

Fourier Series
Suppose that f (x) is a periodic function defined on an interval −L ≤ x ≤ L, i.e., the period is
2L and f (x + 2L) = f (x). We use the Fourier Series to expand f (x) into a sum of cosine and
sine, i.e.,

a0 X h  nπ   nπ i
f (x) = + an cos x + bn sin x , where
2 n=1
L L

1 L 1 L 1 L
Z Z  nπ  Z  nπ 
a0 = f (x) dx; an = f (x) cos x dx; bn = f (x) sin x dx, for n ≥ 1.
L −L L −L L L −L L

The following are some important sine and cosine equations and integrals:
1
sin x cos y = [sin (x + y) + sin (x − y)]
2
1
cos x cos y = [sin (x + y) − sin (x − y)]
2
1
sin x sin y = − [cos (x + y) − cos (x − y)]
2
1 1
sin2 x = (1 − cos 2x) and cos2 x = (1 + cos 2x)
2 2

sin (nπ) = 0, cos (nπ) = (−1)n , where n is an integer

(−1)k , if n is odd,
 nπ  
sin = where n = 2k + 1 with k = 0, 1, 2, . . .
2 0, if n is even,

 nπ  0, if n is odd,
cos = k where n = 2k with k = 0, 1, 2, . . .
2 (−1) , if n is even,

L
2 L

2
Z  mπ   nπ  Z  mπ   nπ  0, if m 6= n,
sin x sin x dx = cos x cos x dx =
L 0 L L L 0 L L 1, if m = n,

2m
(−1)m+n+1 + 1 , if
Z L  
2  mπ   nπ  
2 2
m 6= n,
sin x cos x dx = (m − n ) π
L 0 L L  0, if m = n,
where n =1, 2, . . .

When f (x) is a polynomial, then we have to use integration by-parts:


Z Z Z Z
′ ′
u (x) v (x) dx = u (x) v (x) − v (x) u (x) dx =⇒ u dv = uv − v du.

For f (x) = a0 + a1 x + a2 x2 + ... + am xm and


Z  nπ  Z  nπ 
f (x) sin x dx or f (x) cos x dx,
L L

1
Z  nπ   nπ  Z
L L  nπ 
f (x) sin x dx = − f (x) cos x + f ′ (x) cos x dx or
L nπ L nπ L
Z  nπ   nπ  Z
L L  nπ 
f (x) cos x dx =f (x) sin x − f ′ (x) sin x dx.
L nπ L nπ L

1. Find the Fourier Series for the following periodic functions.


(a) f (x) = sin x, −π ≤ x ≤ π, and f (x + 2π) = f (x)
x
(b) f (x) = , 0 ≤ x < 2π, and f (x + 2π) = f (x) (Figure 46)
2

1, 0 ≤ x ≤ 1,
(c) f (x) = and f (x + 2) = f (x) (Figure 47)
−1, −1 < x < 0,
(d) f (x) = |x|, −π ≤ x ≤ π, and f (x + 2π) = f (x) (Figure 48)


 0, −π < x < − π2 ,


(e) f (x) = 4, − π2 ≤ x ≤ π2 , and f (x + 2π) = f (x)


π

 0, 2 < x < π,


 2x, 0 ≤ x ≤ 21 ,
(f) f (x) = 2 − 2x, 21 ≤ x ≤ 32 , and f (x + 2) = f (x) (Figure 49)
 2x − 4, 3 ≤ x ≤ 2,

2

y y
3 1

2
x
1 −2 −1 1 2 3 4

x
−2π 2π 4π 6π −1
Figure 46 Figure 47
y y
1
1

x
−2 −1 1 2 3 4

x
−1
−2 −1 0 1 2 3 4
Figure 48 Figure 49

2
Homogeneous Heat Equation and The Sturm-Liouville Problem
In this topic, we will have several types of boundary value problems associated with the one-
dimensional homogeneous heat equation. The equations are solved by the separation of variables
and Fourier series. Series solutions will be obtained.

A. Ends of the Bar Kept at Zero Temperature

Consider the problem of determining the temperature distribution u (x, t) in a thin, homogeneous
bar of length L, given the initial temperature (Initial Condition, IC) throughout the bar and
the temperature at both ends (Boundary Condition, BC) at all times. The Initial Boundary
Value Problem (IBVP) is

∂u ∂2u
PDE: = c2 2 , 0 < x < L, t > 0,
∂t ∂x
BC: (zero temperature at both ends) u (0, t) = u (L, t) = 0, t > 0,
IC: (given initial temperature) u (x, 0) = f (x) , 0 < x < L.

Procedure for solving the IBVP:

I. Let the solution be u (x, t) = X (x) T (t). Then we get the following two differential
equations:

X ′′ + λX = 0 with BC: X (0) = X (L) = 0 (SLP: Sturm-Liouville Problem)


T ′ + c2 λT = 0 (DET: Differential Equation T (t))

II. Based on the boundary conditions in the SLP, obtain the starting index n0 , eigenvalues
λn and eigenfunctions Xn (x) from the SLP analysis, i.e.,
 nπ 2  nπ 
n0 = 1, λn = and Xn (x) = bn sin x .
L L

III. Solve the DET in terms of λ. Hence, for n = n0 , n0 + 1, . . ., obtain Tn (t) in terms of λn
and constant K, i.e.,
2
Tn (t) = Ke−c λn t .

IV. Form the solution


∞ ∞  nπ 
2 n2 π 2 t
X X
u (x, t) = Xn (x) Tn (t) = Bn e−c L2 sin x , where Bn = Kbn .
n=n0 n=1
L

V. Use the initial condition to get



X ∞
X  nπ 
u (x, 0) = f (x) = Xn (x) Tn (0) = Bn sin x .
n=n0 n=1
L

VI. Find Bn , where


Z L
f (x) Xn (x) dx L
2
Z  nπ 
0
Bn = L
= f (x) sin x dx.
L L
Z
0
Xn2 (x) dx
0

3
B. Temperature in a Bar with Insulated Ends

Consider the heat equation for a bar with no heat flow across the ends:
∂u ∂2u
PDE: = c2 2 , 0 < x < L, t > 0,
∂t ∂x
∂u ∂u
BC: (insulated ends) (0, t) = (L, t) = 0, t > 0,
∂x ∂x
IC: (given initial temperature) u (x, 0) = f (x) , 0 < x < L.

Procedure:

I. Remain the same.

II. The insulation conditions give us

X ′ (0) = X ′ (L) = 0,

which are different boundary conditions than we had before. Find the new n0 , λn and
Xn (x) from the SLP analysis, i.e.,
 nπ 2  nπ 
n0 = 0, λn = and Xn (x) = an cos x .
L L

III. Solve DET, i.e.,


2λ t
Tn (t) = Ke−c n
.

IV. Form the solution


∞  nπ 
2 n2 π 2 t
X
u (x, t) = An e−c L2 cos x , where An = Kan .
n=0
L

V. The initial condition gives



X  nπ 
f (x) = An cos x .
n=0
L

VI. Find An , where


L L
1 2
Z Z  nπ 
A0 = f (x) dx and An = f (x) cos x dx for n ≥ 1.
L 0 L 0 L

C. Ends of the Bar with Non-Zero Temperature

Consider the IBVP in A, but the bar has non-zero temperature at both ends:
∂u ∂2u
PDE: = c2 2 , 0 < x < L, t > 0,
∂t ∂x
BC: (temperature at both ends) u (0, t) = T0 , u (L, t) = T1 , t > 0,
IC: (given initial temperature) u (x, 0) = f (x) , 0 < x < L.

Let the solution be u (x, t) = v (x) + w (x, t), then the PDE becomes

wt (x, t) = c2 [v ′′ (x) + wxx (x, t)] .

4
Choose v ′′ (x) = 0, v (0) = T0 , and v (L) = T1 , then

v (x) = a1 x + a2 , v (0) = a2 = T0 and v (L) = a1 L + a2 = T1 .

The boundary conditions and initial condition become

u (0, t) =v (0) + w (0, t) =⇒ w (0, t) = u (0, t) − v (0) = 0,


u (L, t) =v (L) + w (L, t) =⇒ w (L, t) = 0, and
u (x, 0) =v (x) + w (x, 0) =⇒ w (x, 0) = u (x, 0) − v (x) = f (x) − v (x) .

Hence, the system of the PDE becomes:


2
∂w 2∂ w
PDE: =c , 0 < x < L, t > 0,
∂t ∂x2
BC: (zero temperature at both ends) w (0, t) = w (L, t) = 0, t > 0,
IC: (given initial temperature) w (x, 0) = f (x) − v (x) , 0 < x < L.

Therefore, solve the PDE by Step I to VI again in A.

1. Solve the following IBVP:

∂u ∂2u
= c2 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.


 (B−A)x
with (a) f (x) = 2x, (b) f (x) = sin L
x , and (c) f (x) = A + L

2. Solve the following PDE:

ut = c2 uxx , 0 < x < 1, 0 < t < ∞,


ux (0, t) = ux (1, t) = 0, 0 < t < ∞,
u (x, 0) = f (x) , 0 < x < 1.

with (a) f (x) = cos (2πx) , (b) f (x) = sin (2πx) , and (c) f (x) = x

3. Solve the following PDE:

ut = c2 uxx , 0 < x < 1, 0 < t < ∞,


u (0, t) = 0, u (1, t) = 10, 0 < t < ∞,
u (x, 0) = f (x) , 0 < x < 1.

with (a) f (x) = 12x, (b) f (x) = 10x + sin (4πx)

5
Table of eigenvalues and eigenfunctions
for the SLP whose differential equation is
X ′′ + λX = 0, 0 < x < L.

Z L
Boundary conditions Eigenvalues λn and eigenfunctions Xn Xn2 dx
0
 nπ 2  nπ  L
X (0) = 0, X (L) = 0 λn = , Xn = sin x , n = 1, 2, 3, . . .
L L 2

 nπ 2  nπ  L for n = 0
X ′ (0) = 0, X ′ (L) = 0 λn = , Xn = cos x , n = 0, 1, 2, . . . L
L L for n ≥ 1
2
 2  
(2n − 1) π (2n − 1) π
λn = , Xn = sin x , L
X (0) = 0, X ′ (L) = 0 2L 2L
2
n = 1, 2, 3, . . .
 2  
(2n − 1) π (2n − 1) π
λn = , Xn = cos x , L
X ′ (0) = 0, X (L) = 0 2L 2L
2
n = 1, 2, 3, . . .

Wave Equation
If we consider a perfectly flexible elastic string stretched between two points at x = 0 and x = L
with uniform tension T and the string is displaced slightly from its initial position of rest and
released, with the end points remaining fixed, then the string will vibrate. The position of any
point P in the string will then depend on its distance from one end and on the instant in time.
Its displacement u at and time t can thus be expressed as u = f (x, t) where x is its distance
from the left-hand end.
The equation of motion is given by

∂ 2u 2
2∂ u T
2
= c 2
, where c2 =
∂t ∂x ρ
in which T is the tension in the string and ρ is the mass per unit length of the string. The
displacement of the string is regarded as small so that T and ρ remain constant.
The Initial Boundary Value Problem (IBVP) for wave equations is

PDE: utt = c2 uxx , 0 < x < L, 0 < t < ∞,


BC: (fixed ends) u (0, t) = u (L, t) = 0, 0 ≤ t < ∞,
(initial delection of P ) u (x, 0) = f (x) , 0 ≤ x ≤ L,
IC:
(initial velocity of P ) ut (x, 0) = g (x) , 0 ≤ x ≤ L.

Procedure for solving the IBVP:

I. Write u (x, t) = X (x) T (t) and substitute it into the partial differential equation:

X (x) T ′′ (t) = c2 X ′′ (x) T (t)

6
Hence, the two differential equations are:
T ′′ (t) + λc2 T (t) = 0
X ′′ (x) + λX (x) = 0, X (0) = X (L) = 0 (SLP)

II. From the SLP analysis, the starting index n0 , eigenvalues λn and eigenfunctions Xn are
 nπ 2  nπ 
n0 = 1, λn = , Xn (x) = βn sin x .
L L
2
III. Solving T ′′ (t) + λc2 T (t) = 0 with λn = nπ L
,
 nπc   nπc 
Tn (t) = an cos t + bn sin t .
L L
IV. The solution u (x, t) now becomes:
X∞  nπ  h  nπc   nπc i
u (x, t) = sin x An cos t + Bn sin t , where An = βn an and Bn = βn bn
n=1
L L L

V. By the initial conditions,



X  nπ  X∞  nπ 
u (x, 0) =f (x) = sin x [An cos (0) + Bn sin (0)] = An sin x ;
n=1
L n=1
L

X nπc  nπ  h  nπc   nπc i
ut (x, t) = sin x −An sin t + Bn cos t ;
n=1
L L L L
∞ ∞
X nπc  nπ  X nπc  nπ 
ut (x, 0) =g (x) = sin x [−An sin (0) + Bn cos (0)] = Bn sin x .
n=1
L L n=1
L L

VI. Find An and Bn , where


Z L  nπ 
f (x) sin x dx
2 L
Z  nπ 
0 L
An = Z L = f (x) sin x dx and
 nπ  L 0 L
sin2 x dx
0 L
Z L  nπ 
g (x) sin x dx Z L
L 0 L 2  nπ 
Bn = Z L = g (x) sin x dx.
nπc 2 nπ
  nπc 0 L
sin x dx
0 L
Therefore,
∞ h
X  nπc   nπc i  nπ 
u (x, t) = An cos t + Bn sin t sin x with
n=1
L L L
Z L Z L
2  nπ  2  nπ 
An = f (x) sin x dx and Bn = g (x) sin x dx.
L 0 L nπc 0 L

1. Solve the following PDE:


PDE: utt = c2 uxx , 0 < x < L, 0 < t < ∞,
BC: u (0, t) = 0, u (L, t) = 0, 0 ≤ t < ∞,
IC: u (x, 0) = f (x) , ut (x, 0) = g (x) , 0 ≤ x ≤ L,
with

7
( 2π
 ( 2π
 ( 2π

f (x) = sin L
x f (x) = sin L
x f (x) = sin L
x
(a) ; (c) 2π
 ; (e) .
g (x) = 0 g (x) = sin L
x g (x) = 2x
( ( 2π

f (x) = 0 f (x) = sin L
x
(b) 2π
 ; (d) 3π
 ;
g (x) = sin L
x g (x) = sin L
x

2. Solve the following PDE:


PDE: utt = c2 uxx , 0 < x < π, 0 < t < ∞,
BC: u (0, t) = 0, u (π, t) = 0, 0 < t < ∞,
IC: u (x, 0) = 0, ut (x, 0) = πx − x2 , 0 < x < π,

Laplace’s Equation
The Laplace equation concerns the distribution of a field, e.g., temperature, potential, etc., over
a plane area subject to certain boundary conditions.
The potential at a point P in a plane can be indicated by an ordinate axis and is a function
of its position, i.e., z = u (x, y) where u (x, y) is the solution of the Laplace two-dimensional
equation
∂ 2u ∂ 2u
+ = 0.
∂x2 ∂y 2
The Boundary Value Problem (BVP) for Laplace’s equations is
PDE: uxx + uyy = 0, 0 < x < a, 0 < y < b,
 (zero left and right edges) u (0, y) = u (a, y) = 0, 0 < y < b,
BC: (zero top edge) u (x, b) = 0, 0 < x < a,
(non-zero bottom edge) u (x, 0) = g (x) , 0 < x < a.

Procedure for solving the BVP:

I. Write u (x, y) = X (x) Y (y) and substitute it into the partial differential equation:
X ′′ (x) Y ′′ (y)
X ′′ (x) Y (t) + X (x) Y ′′ (y) = 0 =⇒ =− = −λ
X (x) Y (y)
Hence, the two differential equations are:
X ′′ (x) + λX (x) = 0, X (0) = X (a) = 0 (SLP)
Y ′′ (y) − λY (y) = 0, Y (b) = 0

II. From the SLP analysis, the starting index n0 , eigenvalues λn and eigenfunctions Xn are
 nπ 2  nπ 
n0 = 1, λn = , Xn (x) = βn sin x .
a a
2
III. Solving Y ′′ (y) − λY (y) = 0 with λn = nπa
,
nπ nπ
y y
Yn (y) = cn e a + dn e− a .
2nπ
The boundary condition Yn (b) = 0 gives dn = −cn e a b , and

h nπ i ex − e−x
Yn (y) = 2e a b cn sinh (y − b) , where sinh x = is a hyperbolic function.
a 2

8
IV. The solution u (x, y) now becomes:
∞  nπ  h nπ i nπ
X
u (x, y) = Bn sin x sinh (y − b) , where Bn = 2e a b an βn
n=1
a a

V. By the last boundary condition,



X  nπ  h nπ i
u (x, 0) = g (x) = Bn sin x sinh (−b) .
n=1
a a

VI. Find Bn , where


a
2
Z  nπ 
Bn = g (x) sin x dx.
a sinh − nπ

a
b 0 a

1. Solve the following PDE:

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


u (0, y) = u (a, y) = 0, 0 < y < b,
BC: u (x, b) = 0, 0 < x < a,
u (x, 0) = g (x) , 0 < x < a.
π

(a) g (x) = x (a − x) (b) g (x) = sin a
x

You might also like