0% found this document useful (0 votes)
4 views34 pages

5 - Fourier Series and Separation of Variables

Chapter 5 discusses the analytical solution of linear partial differential equations (PDEs) using the method of separation of variables, transforming PDEs into ordinary differential equations (ODEs). The chapter specifically applies this method to the heat equation, deriving solutions under Dirichlet boundary conditions using Fourier sine series. It also covers the orthogonality of trigonometric functions and provides a method for calculating Fourier coefficients to express initial conditions in terms of the series.

Uploaded by

Rhein Ferdous
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views34 pages

5 - Fourier Series and Separation of Variables

Chapter 5 discusses the analytical solution of linear partial differential equations (PDEs) using the method of separation of variables, transforming PDEs into ordinary differential equations (ODEs). The chapter specifically applies this method to the heat equation, deriving solutions under Dirichlet boundary conditions using Fourier sine series. It also covers the orthogonality of trigonometric functions and provides a method for calculating Fourier coefficients to express initial conditions in terms of the series.

Uploaded by

Rhein Ferdous
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 34

Chapter 5

Fourier series and separation of variables

5.1 Introduction
In the previous chapter, we introduced the finite difference method as a numerical approach for solving
a specific class of linear partial differential equations (PDEs). In this chapter, our goal is to solve these
same PDEs analytically. We recall that a PDE is said to be linear if the dependent variable and its
derivatives appear at most to the first power and in no functions.
To achieve this, we will employ the method of separation of variables, which involves transforming
the PDE into a system of ordinary differential equations (ODEs).

General idea of the separation of variables


The idea of separation of variables is quite simple. Assume that you have a linear PDE along with some
boundary and/or initial conditions. For clarity, let us assume that the PDE is linear and homogeneous,
and that the boundary conditions are also linear and homogeneous. Assume also that the equation
involves two variables: the first, referred to as time t, and the second, referred to as space x.

Methodology 5.1.1 (Idea of the separation of variables). The method of separation of


variables can be broken down into three steps:
Step 1: Find nonzero solutions of the PDE which have a product form

u(x, t) = X(x)T (t).

Step 2: Select from among the solutions found in Step 1 those solutions which satisfy the BC.
There will typically be an infinite sequence of these:

un (x, t) = Xn (x)Tn (t), n = 1, 2, . . .

Step 3: Observe that, because the PDE and BC are linear and homogeneous, any linear com-
bination of solutions of these will again be a solution. Thus for any choice of coefficients
b1 , b2 , . . . the linear combination


X
u(x, t) = bn un (x, t)
n=1

77
78 CHAPTER 5. FOURIER SERIES AND SEPARATION OF VARIABLES

will again be a solution of the PDE and BC (assuming the series converges). Choose the
constants bn so that u(x, t) satisfies the initial condition.

5.2 Solution to the heat equation by separation of variables


Now, let us apply the previous method to the heat (diffusion) equation. We recall that the equation is
given by:

ut (x, t) = α2 uxx (x, t), 0 < x < L, t>0 (5.1)

We consider the heat equation (5.1)subject to the following initial condition:

u(x, 0) = f (x) (5.2)

5.2.1 Dirichlet boundary conditions: Fourier sine series


Consider the heat conduction in an insulated rod whose endpoints are held at zero degrees for all time
and within which the initial temperature is given by f (x) as shown in Figure 5.1.

Insulation

ICE ICE

Insulation
t

u(0, t) = 0 ut = α2uxx u(L, t) = 0

x
u(x, 0) = f (x)

Figure 5.1: Consider a conducting bar with thermal conductivity α2 that has an initial temperature
distribution u(x, 0) = f (x) and whose endpoints are maintained at 0◦ C, i.e. embedded in ice. See Prof.
Peirce’s lectures.

The system of equations is given by:


5.2. SOLUTION TO THE HEAT EQUATION BY SEPARATION OF VARIABLES 79

ut = α2 uxx , 0 < x < L, t > 0 (5.3a)


BC : u(0, t) = 0, u(L, t) = 0, (5.3b)
IC : u(x, 0) = f (x), (5.3c)

We assume a solution of the form:

u(x, t) = X(x)T (t). (5.4)


Differentiating both sides:

ut = X(x) · Ṫ (t)
uxx = X ′′ (x) · T (t)
Substituting these into the heat equation (5.3):

X(x) · Ṫ (t) = α2 X ′′ (x) · T (t). (5.5)


Dividing by α2 X(x)T (t):

Ṫ (t) X ′′ (x)
= =λ (5.6)
α2 T (t) X(x)
Since both sides depend on different variables, they must equal a constant, denoted as λ. This gives
two ordinary differential equations (ODEs):

Time equation:
Ṫ (t) = λα2 T (t)
Solving this gives:
2t
T (t) = Ceλα (5.7)

Space equation: an eigenvalue problem


X ′′ (x) = λX(x), X(0) = 0 = X(L) (5.8)
An obvious solution of (5.8) is X = 0. This is a trivial solution. Can we find nontrivial solutions?
The nature of X(x) depends on λ.

Case 1; λ > 0: Let λ = µ2 , then:

X ′′ − µ2 X = 0

The general solution is (we have chosen this form for simplifications, it is also fine to use the
exponential form):

X(x) = A sinh(µx) + B cosh(µx) (5.9)

Applying boundary conditions:


80 CHAPTER 5. FOURIER SERIES AND SEPARATION OF VARIABLES

X(0) = 0 ⇒ B = 0, X(L) = 0 ⇒ A sinh(µL) = 0 (5.10)


Since sinh(µL) ̸= 0, we must have A = 0, leading to the trivial solution.
Case 2: λ = 0: The equation simplifies to:

X ′′ (x) = 0 ⇒ X(x) = Ax + B
Applying boundary conditions:

X(0) = 0 ⇒ B = 0, X(L) = 0 ⇒ AL = 0 ⇒ A = 0 (5.11)


Again, we get the trivial solution.
Case 3: λ < 0: Let λ = −µ2 , then:

X ′′ + µ2 X = 0
The general solution is:

X(x) = A sin(µx) + B cos(µx). (5.12)


Applying boundary conditions:

X(0) = 0 ⇒ B = 0, X(L) = 0 ⇒ A sin(µL) = 0


For a nontrivial solution ( A ̸= 0 ), we require:

sin(µL) = 0 ⇒ µL = nπ, n = 1, 2, 3, . . . (5.13)


Thus,

nπ  nπ 2
µn = , λn = − (5.14)
L L
λn are eigenvalues. The corresponding eigenfunctions are:
 nπ 
Xn (x) = sin x (5.15)
L
So, the solution will have the form
2 nπ 2
 nπx 
un (x, t) = e−α ( L ) t sin , n = 1, 2, . . . (5.16)
L
Since the Equation (5.3) is linear, a linear combination of solutions is again a solution. Thus the
most general solution is:

∞ 2  nπx 
−α2 ( nπ
L ) t
X
u(x, t) = bn e sin , bn , n = 1, 2, . . . . (5.17)
n=1
L
5.2. SOLUTION TO THE HEAT EQUATION BY SEPARATION OF VARIABLES 81

How can we find those coefficients?

Using the initial condition u(x, 0) = f (x) :


X  nπx 
f (x) = bn sin (5.18)
n=1
L

This is the Fourier sin series of f (x). We have the following question in mind:

Note!
Given a function f (x) defined on [0, L], do there exist constants b1 , b2 , . . . such that (5.18) holds? If
the answer is "yes" then (5.17) is the solution to the heat equation problem (5.3).

We want to write the function f (x) in terms of the sum of an infinite number of basis functions
sin L . This is similar to projecting a vector on a set of basis vectors. The sine function is periodic
nπx


on the interval [0, 2L] or [−L, L] :


 
nπ(x + 2L)  nπx   nπx 
sin = sin + 2nπ = sin
L L L
   
nπ(x − L)  nπx  nπ(x + L)
sin = sin − nπ + 2nπ = sin
L L L

Now, we use an important property of trigonometric functions:

Theorem  5.2.1 (Orthogonality of trigonometric functions). The trigonometric functions


sin nπx nπx

L
and cos L
(for n = 1, 2, 3, . . .) are orthogonal over the interval [0, L] in the following
sense:

(
L
0, if n ̸= m
Z  nπx   mπx 
sin sin dx = L (5.19a)
0 L L 2
, if n = m

Z L  nπx   mπx  0, if n ̸= m

cos cos dx = L2 , if n = m ̸= 0 (5.19b)
0 L L 
L, if n = m = 0

Z L  nπx   mπx 
cos sin dx = 0, ∀n, m (5.19c)
0 L L

The concept of orthogonality means that the inner product of two functions (or two vectors) is
zero over an interval.
Z L
⟨f (x), g(x)⟩ = f (x)g(x)dx. (Inner product of two functions)
0

Proof of Theorem 5.2.1. To prove the first property (5.19a), we use the trigonometric identities:
82 CHAPTER 5. FOURIER SERIES AND SEPARATION OF VARIABLES

cos(A + B) = cos A cos B − sin A sin B


cos(A − B) = cos A cos B + sin A sin B
Using these, we rewrite the product of two sine functions:
1
sin A sin B = (cos(A − B) − cos(A + B))
2
For m ̸= n :

L  L   
πx(n − m)
Z  nπx   mπx  Z
1 πx(n + m)
sin sin dx = cos − cos dx
0 L L 0 2 L L
"  L   L#
1 L πx(n − m) L πx(n + m)
= sin − sin
2 (n − m)π L 0 (n + m)π L 0

=0

For m = n, we use:
1
sin2 A = (1 − cos 2A)
2
Thus:
Z L  nπx  Z L   
2 1 2nπx
sin dx = 1 − cos dx
0 L 0 2 L
"   L#
1 L 2nπx
= x|L0 − sin
2 2nπ L 0
L
=
2
The case of (5.19b) and (5.19c) follow with similar arguments.

Finding Fourier coefficients bn


Going back to our Fourier series representation:

X  nπx 
f (x) = bn sin
n=1
L

To find bn , multiply both sides by sin mπx


and integrate over [0, L] :

L
Z L  mπx  ∞
X Z L  nπx   mπx 
f (x) sin dx = bn sin sin dx
0 L n=1 0 L L
So:
Z L  mπx  Z L  mπx 
f (x) sin dx = 0 + 0 + · · · + bm sin2 dx + 0 + 0 + . . .
0 L 0 L
all terms in the sum, except the mth term are zero. Hence,
5.2. SOLUTION TO THE HEAT EQUATION BY SEPARATION OF VARIABLES 83

Z L  mπx  L
f (x) sin dx = bm ·
0 L 2
Thus, the Fourier sine coefficients are:

2 L
Z  mπx 
bm = f (x) sin dx, m = 1, 2, 3, . . .
L 0 L
Finally, the most general solution to (5.3) is given by
∞  Z L 
2  nπx  2 nπ 2
 nπx 
dx e−α ( L ) t sin
X
u(x, t) = f (x) sin (5.20)
n=1
L 0 L L

Example 5.2.1 (Fourier sine expansion). Let us solve (5.3) with f (x) = x, 0 < x < 1, L = 1. We
have using the integration by part formula,
Z 1
(−1)n+1
bn = 2 x sin(nπx)dx = 2
0 nπ
Hence,

2 X (−1)n+1 −α2 (nπ)2 t
u(x, t) = e sin(nπx)
π n=1 n

We can use the latter expression to compute some series: for example, if t = 0 and x = 12 , then
we have

2 X (−1)n+1
u(1/2, 0) = f (1/2) = 1/2 = sin(nπ/2)
π n=1 n

k n sin(nπ/2)
0 1 1
2 0
1 3 -1
4 0
2 5 1

Therefore,

X (−1)k π
=
k=0
(2k + 1) 4

Example 5.2.2. We want to solve the following PDE problem:

ut = 0.003uxx , 0 < x < 1, t > 0


u(0, t) = u(1, t) = 0
u(x, 0) = 50x(1 − x) for 0 < x < 1
84 CHAPTER 5. FOURIER SERIES AND SEPARATION OF VARIABLES

Figure 5.2: Representation of the terms of the Fourier series of f (x) = x.

As previously,
P∞ we need to write f (x) = 50x(1 − x) for 0 < x < 1 as a sine series. That is,
f (x) = n=1 bn sin(nπx), where
Z 1 (
200 200(−1)n 0 if n even
bn = 2 50x(1 − x) sin(nπx)dx = 3 3 − 3 3
= 400
0 π n π n π 3 n3
if n odd
Hence the solution u(x, t), is given by:

400 X 1 2 2
u(x, t) = 3 3
sin((2k + 1)πx)e−(2k+1) π 0.003t
π k=0 (2k + 1)

5.2.2 Neumann boundary conditions: Fourier cosine series


Consider the heat conduction in an insulated rod whose endpoints are insulated and within which the
initial temperature is given by f (x) as shown in Figure 5.3
The system of equations is given by:

P DE : ut = α2 uxx , 0 < x < L, t > 0 (5.21a)


BC : ux (0, t) = 0, ux (L, t) = 0, (5.21b)
IC : u(x, 0) = f (x), (5.21c)

We assume a solution of the form:

u(x, t) = X(x)T (t) (5.22)


Differentiating both sides:

ut = X(x) · Ṫ (t)
uxx = X ′′ (x) · T (t)
Substituting these into the heat Equation (5.21):

X(x) · Ṫ (t) = α2 X ′′ (x) · T (t) (5.23)


5.2. SOLUTION TO THE HEAT EQUATION BY SEPARATION OF VARIABLES 85

Insulation

Insulator Insulator

Insulation
t

ux (0, t) = 0 ut = α2uxx ux (L, t) = 0

x
u(x, 0) = f (x)

Figure 5.3: Consider a conducting bar with thermal conductivity α2 that has an initial temperature
x

distribution u(x, 0) = f (x) and whose endpoints are insulated, Prof. Peirce’s lectures.

Dividing by α2 X(x)T (t) :

Ṫ (t) X ′′ (x)
= =λ (5.24)
α2 T (t) X(x)
Since both sides depend on different variables, they must equal a constant, denoted as λ. This gives
two ordinary differential equations (ODEs):

Time equation:
Ṫ (t) = λα2 T (t)
Solving this gives:
2t
T (t) = Ceλα (5.25)

Space equation: an eigenvalue problem


X ′′ (x) = λX(x), X ′ (0) = 0 = X ′ (L) (5.26)
The nature of X(x) depends on λ.
Case 1: λ > 0: Let λ = µ2 , then:

X ′′ − µ2 X = 0

The general solution is (we have chosen this form for simplifications, it is also fine to use the
exponential form):
86 CHAPTER 5. FOURIER SERIES AND SEPARATION OF VARIABLES

X(x) = A sinh(µx) + B cosh(µx). (5.27)


We note that
X ′ (x) = Aµ cosh(µx) + Bµ sinh(µx)
Applying boundary conditions:

X ′ (0) = 0 ⇒ A = 0, X ′ (L) = 0 ⇒ Bµ sinh(µL) = 0 (5.28)

Since sinh(µL) ̸= 0, we must have B = 0, leading to the trivial solution.

Case 2: λ = 0: The equation simplifies to:

X ′′ (x) = 0 ⇒ X(x) = Bx + A
Applying boundary conditions:

X ′ (0) = 0 ⇒ B = 0, X ′ (L) = 0 ⇒ B = 0 (5.29)

So, X(x) = A is a non-trivial solution. The eigenvalue λ0 = 0 and the corresponding eigenfunction
is X0 (x) = 1.

Case 3: λ < 0: Let λ = −µ2 , then:

X ′′ + µ2 X = 0

The general solution is:

X(x) = A sin(µx) + B cos(µx) (5.30)

We have

X ′ (x) = µA cos(µx) − µB sin(µx) (5.31)

Applying boundary conditions:

X ′ (0) = 0 ⇒ A = 0, X ′ (L) = 0 ⇒ −µB sin(µL) = 0

For a nontrivial solution (B ̸= 0), we require:

sin(µL) = 0 ⇒ µL = nπ, n = 1, 2, 3, . . . (5.32)

Thus,

nπ  nπ 2
µn = , λn = − (5.33)
L L
λn are eigenvalues. The corresponding eigenfunctions are:
5.2. SOLUTION TO THE HEAT EQUATION BY SEPARATION OF VARIABLES 87

 nπx 
Xn (x) = cos , n = 1, 2, 3, . . . (5.34)
L
So, the solution will have the form
2 nπ 2
 nπx 
un (x, t) = e−α ( L ) t cos , n = 1, 2, . . . (5.35)
L
We also had another eigenvalue/function from λ = 0, u0 (x, t) = A0 · e0·t = A0 . Since the equation
(5.21) is linear, a linear combination of solutions is again a solution. Thus the most general solution is
of the form:
∞  nπx 
2 nπ 2
An e−α ( L ) t cos
X
u(x, t) = A0 + , An , n = 0, 1, 2, . . . are constants (5.36)
n=1
L

Using the initial condition u(x, 0) = f (x) :



X  nπx 
f (x) = A0 + An cos (5.37)
n=1
L
As previously, we use the inner product ⟨·, ·⟩ to project f (x) onto the basis functions in the series:
We multiply both sides of (5.37) by X0 (x) = 1 and integrate over [0, L]:
Z L Z L X∞ Z L  nπx 
f (x)dx = A0 1dx + An cos dx
0 0 n=1 0 L

i.e
∞ L
Z L XL  nπx 
f (x)dx = A0 · x|L0 + An sin = A0 L + 0
0 n=1
nπ L
0
Hence, Z L
1
A0 = f (x)dx
L 0

Now, if we multiply both sides of (5.37) by cos mπx


and integrate over [0, L]:

L
Z L  mπx  Z L  mπx  ∞
X Z L  nπx   mπx 
f (x) cos dx = A0 cos dx + An cos cos dx
0 L 0 L n=1 0 L L
i.e.
Z L  mπx  L
L  nπx  L
f (x) cos dx = A0 sin + Am ·
0 L nπ L 0 2
So,
Z L
2  mπx 
Am = f (x) cos dx
L 0 L
Thus, the Fourier cosine coefficients are:
Z L Z L
1 2  mπx 
A0 = f (x)dx, Am = f (x) cos dx, m = 1, 2, 3, . . . (5.38)
L 0 L 0 L
88 CHAPTER 5. FOURIER SERIES AND SEPARATION OF VARIABLES

The final solution is:


Z L ∞  Z L  nπ  
1 X 2  nπ  2 n2 π 2
u(x, t) = f (x)dx + f (x) cos x dx cos x e−α L2 t (5.39)
L 0 n=1
L 0 L L
RL
We observe that as t → ∞ it follows that u(x, t) → A0 = L1 0 f (x)dx, which is just the average
value of the initial heat f (x) distributed in the bar. This is consistent with physical intuition. It is
sometimes convenient to re-define the Fourier coefficients as follows:

a0 = 2A0
ak = Ak , k = 1, 2, . . .
so that the ak can be rewritten on a unified form

2 L
Z  
kπx
ak = f (x) cos dx k = 0, 1, 2, . . .
L 0 L
In terms of the new coefficients ak defined, the Fourier expansion for the initial condition function
f (x) is of the form

a0 X  nπx 
f (x) = + an cos (5.40)
2 n=1
L
while the solution of the heat equation (5.23) is of the form

a0 X  nπx  2 nπ 2
u(x, t) = + an cos e−α ( L ) t (5.41)
2 n=1
L

Example 5.2.3 (Fourier cosine expansion). Determine the Fourier coefficients ak for the function

f (x) = x, 0<x<1=L
and use the resulting Fourier cosine expansion to prove the identity

X 1 π2
=
k=0
(2k + 1)2 8
We have,
1 1
x2
Z 
a0 = 2 xdx = 2 = 1 and
0 2 0
Z 1
(−1)n − 1 − n24π2 , n odd

an = 2 x cos(nπx)dx = 2 =
0 n2 π 2 0, n even
Therefore,

1 4 X 1
f (x) = − 2 cos((2k + 1)πx) (5.42)
2 π k=0 (2k + 1)2
To obtain the required identity we set x = 1 in and rearrange terms. We can also deduce that the
solution of (5.23) with the initial condition u(x, 0) = x is given by
5.2. SOLUTION TO THE HEAT EQUATION BY SEPARATION OF VARIABLES 89


1 4 X 1 2 2
u(x, t) = − 2 2
cos((2k + 1)πx)e−α ((2k+1)π) t (5.43)
2 π k=0 (2k + 1)

The partial sums are shown in Figure 5.4

Figure 5.4: Partial sums of the Fourier Cosine Series of the function f (x) = x.

Example 5.2.4. Let us solve now the following PDE problem

ut = 0.003uxx , 0 < x < 1, t > 0


ux (0, t) = ux (1, t) = 0,
u(x, 0) = 50x(1 − x) for 0 < x < 1.
We must find the cosine series of u(x, 0). For 0 < x < 1 we have

25 50 X 1
50x(1 − x) = − 2 cos(2kπx)
3 π k=1 k 2
Hence, the solution to the PDE problem, is given by:

25 50 X 1 2 2
u(x, t) = − 2 2
cos(2kπx)e−k π 0.012t
3 π k=1 k

5.2.3 Heat equation on a circular ring - Full range Fourier series


Consider a thin circular wire in which there is no radial temperature dependence as shown in Figiure
5.5, i.e., u(r, θ) = u(θ) so that ∂u
∂r
= 0. In this case the polar Laplacian reduces to

∂ 2 u 1 ∂u 1 ∂ 2u
∆u = + +
∂r2 r ∂r r2 ∂θ2
2
∂ u
=
∂(rθ)2
2
and if we let x = rθ then ∂(rθ)
∂ u
2 = uxx . In this case the heat distribution in the ring is determined by

the following initial value problem with periodic boundary conditions:


90 CHAPTER 5. FOURIER SERIES AND SEPARATION OF VARIABLES

x=L
x=0
x = −L

Figure 5.5: Consider a thin conducting ring with thermal conductivity α2 that has a given initial
temperature distribution.

PDE : ut = α2 uxx , 0 < x < 2L, t > 0 (5.44a)


BC : u(−L, t) = u(L, t), ux (−L, t) = ux (L, t), (5.44b)
IC : u(x, 0) = f (x), (5.44c)

We assume a solution of the form:

u(x, t) = X(x)T (t) (5.45)


Differentiating both sides:

ut = X(x) · Ṫ (t)
uxx = X ′′ (x) · T (t)
Substituting these into the heat equation (5.44):

X(x) · Ṫ (t) = α2 X ′′ (x) · T (t) (5.46)


Dividing by α2 X(x)T (t) :

Ṫ (t) X ′′ (x)
= = λ. (5.47)
α2 T (t) X(x)
Since both sides depend on different variables, they must equal a constant, denoted as λ. This gives
two ordinary differential equations (ODEs):

Time equation:
Ṫ (t) = λα2 T (t)
5.2. SOLUTION TO THE HEAT EQUATION BY SEPARATION OF VARIABLES 91

Solving this gives:


2
T (t) = Ceλα t . (5.48)

Space equation: an eigenvalue problem


X ′′ (x) = λX(x), X(−L) = X(L), X ′ (−L) = X ′ (L) (5.49)
The nature of X(x) depends on λ.

Case 1: λ > 0: Let λ = µ2 , then:

X ′′ − µ2 X = 0

The general solution is (we have chosen this form for simplifications, it is also fine to use the
exponential form):
X(x) = A cosh(µx) + B sinh(µx) (5.50)
We note that

X ′ (x) = Aµ sinh(µx) + Bµ cosh(µx)

Applying boundary conditions:

X(−L) = X(L) ⇒ 2B sinh(µL) = 0 ⇒ B = 0 (5.51)

and

X ′ (−L) = X ′ (L) ⇒ 2Aµ sinh(µL) = 0 ⇒ A = 0 (5.52)

leading to the trivial solution.

Case 2: λ = 0 The equation simplifies to:

X ′′ (x) = 0 ⇒ X(x) = Ax + B

We also have

X ′ (x) = A

Applying boundary conditions:

X(−L) = X(L) ⇒ 2AL = 0 ⇒ A = 0

and

X ′ (−L) = A = 0 = X ′ (L)

So, X(x) = B is a non trivial solution. For this case, the eigenvalue λ0 = 0 and the corresponding
eigenfunction is X0 = 1.
92 CHAPTER 5. FOURIER SERIES AND SEPARATION OF VARIABLES

Case 3: λ < 0: Let λ = −µ2 , then:

X ′′ + µ2 X = 0
The general solution is:

X(x) = A cos(µx) + B sin(µx) (5.53)


We have

X ′ (x) = −µA sin(µx) + µB cos(µx) (5.54)


Applying boundary conditions:

X(−L) = X(L) ⇒ 2B sin(µL) = 0


and

X ′ (−L) = X ′ (L) ⇒ 2Aµ sin(µL) = 0


For a nontrivial solution (A, B, µ ̸= 0), we require:

sin(µL) = 0 ⇒ µL = nπ, n = 1, 2, 3, . . . (5.55)


Thus,

nπ  nπ 2
, λn = −
µn = (5.56)
L L
λn are eigenvalues. The corresponding eigenfunctions are:
n  nπx   nπx o
Xn (x) ∈ cos , sin , n = 1, 2, 3, . . . (5.57)
L L
So, the solution will have the form
2 h  nπx   nπx i
−α2 ( nπ )
un (x, t) = e L
t
An cos + Bn sin , n = 1, 2, . . . (5.58)
L L
We also had another eigenvalue/function from λ = 0, u0 (x, t) = A0 · e0·t = A0 .
Since the equation (5.44) is linear, a linear combination of solutions is again a solution. Thus the most
general solution is of the form:
∞  nπx   nπx i
2 nπ 2 h
e−α ( L )
X
u(x, t) = A0 + t
An cos + Bn sin (5.59)
n=1
L L
for some coefficients A0 , An , Bn , n = 1, 2, . . ..
Using the initial condition u(x, 0) = f (x) :
X∞ h  nπx   nπx i
f (x) = A0 + An cos + Bn sin (5.60)
n=1
L L
As previously, we use the inner product ⟨·, ·⟩ to project f (x) onto the basis functions in the series.
We state the following important result:
5.2. SOLUTION TO THE HEAT EQUATION BY SEPARATION OF VARIABLES 93

Theorem
nπx
 5.2.2 (Orthogonality
nπx
 of trigonometric functions). The trigonometric functions
sin L and cos L (for n = 1, 2, 3, . . . ) are orthogonal over the interval [−L, L] in the fol-
lowing sense:

(
L
if n ̸= m
Z  nπx  0,
 mπx 
sin sin dx = (5.61a)
−L L L L, if n = m

Z L  nπx   mπx  0,
 if n ̸= m
cos cos dx = L, if n = m ̸= 0 (5.61b)
−L L L 
2L, if n = m = 0

Z L  nπx   mπx 
cos sin dx = 0, for all n, m (5.61c)
−L L L

The concept of orthogonality means that the inner product of two functions (or two vectors) is
zero over an interval.
Z L
⟨f (x), g(x)⟩ = f (x)g(x)dx. (Inner product of two functions)
−L

We multiply both sides of (5.60) by X0 (x) = 1 and integrate over [−L, L] :


Z L Z L ∞
X Z L  nπx  ∞
X Z L  nπx 
f (x)dx = A0 1dx + An cos dx + Bn sin dx
−L −L n=1 −L L n=1 −L L
i.e

∞ L ∞ L
Z L X L  nπx  X L  nπx 
f (x)dx = A0 · x|L−L + An sin − Bn cos = 2A0 L + 0 + 0
−L n=1
nπ L n=1
nπ L
−L −L

Hence,
Z L
1
A0 = f (x)dx (5.62)
2L −L

Now, if we multiply both sides of (5.60) by cos mπx


and integrate over [−L, L] :

L

Z L  mπx  Z L  mπx  ∞
X Z L  nπx   mπx 
f (x) cos dx = A0 cos dx + An cos cos dx
−L L −L L n=1 −L L L

X Z L  nπx   mπx 
+ Bn sin cos dx
n=1 −L L L

i.e. (using (5.61a) and (5.61c))


Z L  mπx  L
L  nπx 
f (x) cos dx = A0 sin + Am L + 0
−L L nπ L −L

So,
94 CHAPTER 5. FOURIER SERIES AND SEPARATION OF VARIABLES

Z L
1  mπx 
Am = f (x) cos dx (5.63)
L −L L
Now, if we multiply both sides of (5.60) by sin mπx
and integrate over [−L, L] :

L
Z L  mπx  Z L  mπx  ∞
X Z L  nπx   mπx 
f (x) sin dx = A0 sindx + An cos sin dx
−L L −LL n=1 −L L L
X∞ Z L  nπx   mπx 
+ Bn sin sin dx
n=1 −L L L
i.e. (using (5.61b) and (5.61c))
Z L  mπx  L
L  nπx 
f (x) sin dx = − A0 cos + 0 + Bm L
−L L nπ L −L

So,
Z L
1  mπx 
Bm = f (x) sin dx (5.64)
L −L L
So, in summary, the full Fourier series of f (x) is:

a0 X  nπx   nπx 
f (x) = + an cos + bn sin
2 n=1
L L
where
Z L
1  nπx 
an = f (x) cos dx, n = 0, 1, 2, 3, . . . (5.65)
L −L L
and
Z L
1  mπx 
bn = f (x) sin dx, n = 1, 2, 3, . . . (5.66)
L −L L
The final solution is:


a0 X −α2 ( nπ
L )
2 h  nπx   nπx i
u(x, t) = + e t
an cos + bn sin (5.67)
2 n=1
L L
RL
We observe that as t → ∞ it follows that u(x, t) → a0
2
= 1
2L −L
f (x)dx, which is just the average
value of the initial heat f (x).

Example 5.2.5 (Full Fourier expansion). Let us solve the equation (5.44) with the initial condition
u(x, 0) = f (x), where
(
0, −π < x < 0
f (x) =
x, 0 ≤ x ≤ π
In this case, L = π. We need to write the full Fourier expansion of u(x, 0). We have,
5.2. SOLUTION TO THE HEAT EQUATION BY SEPARATION OF VARIABLES 95

Z π Z π
1 1 π
a0 = f (x)dx = x dx =
π −π π 0 2

1 π
Z
an = f (x) cos(nx)dx
π −π
1 π
Z
= x cos(nx)dx
π 0
π
1 π
 Z 
1 sin(nx)
= x − sin(nx)dx
π n 0 n 0
 π
1 π sin(nπ) 1
= + 2 cos(nx)
π n n 0
1
= [(−1)n − 1] (5.68)
πn2
For even indices, a2m = 0 for m = 0, 1, . . .. For odd indices:
2
a2m+1 = − , m = 0, 1, 2, . . .
π(2m + 1)2
Now, we compute bn
1 π
Z
bn = f (x) sin(nx)dx
π −π
1 π
Z
= x sin(nx)dx
π 0
π
1 π
 Z 
1 cos(nx)
= −x + cos(nx)dx
π n 0 n 0
 π
1 cos(nπ) 1
= −π + 2 sin(nx)
π n n 0

Therefore, the Fourier series representation of f (x) is given by


a0 X
f (x) = + an cos(nx) + bn sin(nx)
2 n=1
∞ ∞
π 2 X cos[(2m + 1)x] X sin(nx)
= − 2
+ (−1)n+1 (5.69)
4 π m=0 (2m + 1) n=1
n

Finally, the solution takes the form:


∞ 2 2 ∞ −α2 m2 t
π 2 X e−α (2m+1) t cos[(2m + 1)x] X m+1 e sin(mx)
u(x, t) = − 2
+ (−1) (5.70)
4 π m=0 (2m + 1) m=1
m
96 CHAPTER 5. FOURIER SERIES AND SEPARATION OF VARIABLES

Important summary!

I: The Dirichlet Problem (Ice on Both Sides)

( (
X ′′ + λ2 X = 0 λn = nπ
L
, n = 1, 2, . . .
=⇒
X(0) = 0 = X(L) Xn (x) = sin nπx
L

II: The Neumann Problem (Insulation on Both Sides)

( (
X ′′ + λ2 X = 0 λn = nπ
L
, n = 0, 1, 2, . . .
=⇒
X ′ (0) = 0 = X 0 (L) Xn (x) = cos nπx
L

III: The Periodic Boundary Value Problem (The Closed Ring)


′′ 2
X + λ X = 0
(
λn = nπ

L
, n = 0, 1, 2, . . .
X(−L) = X(L) =⇒ nπx nπx

 ′ Xn (x) ∈ {1, cos L , sin L }
X (−L) = X ′ (L)

IV: Mixed Boundary Value Problem A (Ice Left and Insulation Right)
5.3. FOURIER SERIES 97

( (
X 00 + λ2 X = 0 λk = (2k+1)π
2L
, k = 0, 1, 2, . . .
=⇒
X(0) = 0 = X 0 (L) Xn (x) = sin (2k+1)πx
2L

V: Mixed Boundary Value Problem B (Insulation Left and Ice Right)

( (
X 00 + λ2 X = 0 λk = (2k+1)π
2L
, k = 0, 1, 2, . . .
=⇒
X 0 (0) = 0 = X(L) Xn (x) = cos (2k+1)πx
2L

5.3 Fourier Series


In the previous sections, we solved the heat equation under various boundary conditions, including
periodic, Dirichlet, and Neumann conditions. In each case, a key step in the solution was expressing
the initial condition u(x, 0) as a sum of sine and/or cosine functions. This type of expansion known as
a Fourier series. The fundamental idea behind Fourier series is that any "reasonable" function can be
represented as an infinite sum of trigonometric terms. In the following section, we explore Fourier series
in more detail, developing the formalism that allows us to decompose functions into their fundamental
frequency components.
We consider the expansion of the function f (x) of the form

a0 X  nπx   nπx 
f (x) ≈ + an cos + bn sin = S(x), (5.71)
2 n=1
L L

where Z L Z L
1  nπx  a0 1
an = f (x) cos dx, = f (x)dx = average value of f (5.72)
L −L L 2 2L −L

and Z L
1  nπx 
bn = f (x) sin dx. (5.73)
L −L L
We recall that a function f (x) defined for all x is periodic with period T if f (x + T ) = f (x) for all
x.
98 CHAPTER 5. FOURIER SERIES AND SEPARATION OF VARIABLES

We observe that cos nπ (x + T ) = cos nπx provided nπT = 2π, T = 2L and similarly sin nπ
  
L L L n L
(x + 2L) =
sin nπx . Thus each of the terms of the Fourier Series S(x) on the RHS of (5.71) is a periodic function

L
with a maximal period 2L (a constant function is periodic with any period). As a result the function
S(x) is also periodic.
But the question is: How does this relate to f (x) which may not be periodic?
The function S(x) represented by the series is known as the periodic extension of f on [−L, L].

Definition 5.3.1 (Periodic extension). If f is defined on the interval [a, b] then the periodic
extension fper of f , which has period T = b − a, is defined simply by "repeating" f in all the
intervals [a + nT, b + nT ] for n = 0, ±1, . . ., so that for all x,

fper (x) = f (x − nT ) whenever a + nT < x ≤ b + nT, n = 0, ±1, ±2, . . . (5.74)

In Figure 5.6, we show a picture for a = −1, b = 1, and functions f (x) = x2 and f (x) = x.

Figure 5.6: Periodic extension fper (x) of the function f (x) = x2 (blue curve) and the function f (x) = x
(red curve) with a = −1 and b = 1.

Note that fper may be discontinuous at a, b, etc., even if f is continuous. A related fact is that in
defining fper we have taken fper (a) = f (b) and not fper (a) = f (a); some choice must be made but this
has no effect in practice.

Note: t can be useful to shift the interval of integration

Since the periodic extension is periodic with period (as are the basis functions nπx

f per 2L cos L
and sin nπx ), the interval [−L, L] over which the integration is carried out may be replaced by

L
any other interval of the same length: that is for any X,
5.3. FOURIER SERIES 99

Z X+2L Z X+2L
1 1 nπx
a0 = fper (x)dx, an = fper (x) cos dx, n≥1
2L X L X L
1 X+2L
Z
nπx
bn = fper (x) sin dx, n ≥ 1
L X L

Example 5.3.1. Consider the example given in Example 5.2.5. Then, we have

0 −π < x < 0
f (x) =
x 0≤x≤π
On [π, 3π],
(
0 π < x < 2π
fper (x) =
x − 2π 2π ≤ x ≤ 3π
Z 3π
1
an = fper (x) cos(nx)dx, change of variables: t = x − 2π dx = dt, x = t + 2π
π π
1 3π
Z
= (x − 2π) cos(nx)dx
π 2π
1 2π
Z
= t cos(nt)dt since cos n(t + 2π) = cos nt
π 0

5.3.1 Half range Fourier Series: even and odd functions


We consider the Fourier Expansions for Even and Odd functions, which give rise to cosine and sine
half range Fourier Expansions. If we are only given values of a function f (x) over half of the range
[0, L], we can define two different extensions of f to the full range [−L, L], which yield distinct Fourier
Expansions. The even extension gives rise to a half range cosine series, while the odd extension gives
rise to a half range sine series.
We first recall the elementary definitions of even, odd, and periodic functions.

Definition 5.3.2 (Even and odd functions). A function f (x) is said to be even if it is defined
for all x (or possibly in some interval symmetric about x = 0, that is, of the form ( −L, L ) or
[−L, L] ) and satisfies f (x) = f (−x); it is odd if it is similarly defined and satisfies f (−x) =
−f (x). We will frequently use the observation that if f (x) is defined for −L ≤ x ≤ L then,
Z L (
0, if f is odd
f (x)dx = RL (5.75)
−L 2 0 f (x)dx, if f is even
RL R0 RL
This formula is easily be derived by writing −L f (x)dx = −L f (x)dx + 0 f (x)dx and making the
change of variable y = −x in the first integral.

Note
Let E(x) represent an even function and O(x) an odd function. Then,
(a) If f (x) = E(x) · O(x) then f (−x) = E(−x)O(−x) = −E(x)O(x) = −f (x) ⇒ f is odd.
100 CHAPTER 5. FOURIER SERIES AND SEPARATION OF VARIABLES

(b) E1 (x) · E2 (x) → even.


(c) O1 (x) · O2 (x) → even.
(d) Any function can be expressed as a sum of an even part and an odd part:
1 1
f (x) = [f (x) + f (−x)] + [f (x) − f (−x)]
2| {z } 2| {z }
even part odd part

Check: Let E(x) = 12 [f (x) + f (−x)]. Then E(−x) = 12 [f (−x) + f (x)] = E(x) (even.)
Similarly let O(x) = 12 [f (x) − f (−x)]. Then, O(−x) = 12 [f (−x) − f (x)] = −O(x) ( odd.)

Important!: Consequences of the Even/Odd property for Fourier Series

One may use (5.75) to considerably simplify the formulas (5.72)-(5.73) when f is even or odd.

• If f is even then f (x) cos(nπx/L) is even and f (x) sin(nπx/L) is odd, so that from (5.75),

Z L Z L
1 2 nπx
a0 = f (x)dx, an = f (x) cos dx, bn = 0, n≥1 (5.76)
L 0 L 0 L

• If f is odd one has f (x) cos(nπx/L) is odd and f (x) sin(nπx/L) is even

Z L
2 nπx
a0 = 0, an = 0, bn = f (x) sin dx, n≥1 (5.77)
L 0 L

• Since any function can be written as the sum of an even and an odd part, we can interpret
the cosine and sine series as corresponding to even and odd functions:

1 1
f (x) = [f (x) + f (−x)] + [f (x) − f (−x)]
2 2
where the first term represents the even part of f (x) and the second term represents the odd part.
Thus, the Fourier series expansion can be expressed as:
( ∞
) (∞ )
a0 X  nπx  X  nπx 
f (x) = + an cos + bn sin ,
2 n=1
L n=1
L
where the cosine terms correspond to the even part and the sine terms correspond to the odd part
of the function. In addition,

2 L1 1 L
Z  nπx  Z  nπx 
an = [f (x) + f (−x)] cos dx = f (x) cos dx
L 0 2 L L −L L
2 L1 1 L
Z  nπx  Z  nπx 
bn = [f (x) − f (−x)] sin dx = f (x) sin dx
L 0 2 L L −L L

Let us emphasize that in (5.76)-(5.77) we are considering the Fourier series of a function defined on
the interval [−L, L].
5.3. FOURIER SERIES 101

5.3.2 Half-range expansions


If we are given a function f (x) on an interval [0, L] and we want to represent f by a Fourier series, we
have two choices: a cosine series or a sine series.

Cosine series:
If f (x) is extended as an even function on [−L, L], it can be represented by a Fourier cosine series:

a0 X  nπx 
f (x) = + an cos
2 n=1
L
where the Fourier coefficients are given by

2 L
Z  nπx 
an = f (x) cos dx
L 0 L
We note that the even periodic extension is obtained by simply computing the Fourier series repre-
sentation for the even function

f (x), 0 < x < L
fe (x) ≡
f (−x) −L < x < 0
Since fe (x) is an even function on a symmetric interval [−L, L], we expect that the resulting Fourier
series will not contain sine terms.
We can simplify this by noting that the integrand is even and the interval of integration can be
replaced by [0, L]. On this interval fe (x) = f (x). So, we have the Cosine Series representation of
f (x) for x ∈ [0, L] given as above.

Sine series:
If f (x) is extended as an odd function on [−L, L], it can be represented by a Fourier sine series:

X  nπx 
f (x) = bn sin
n=1
L
where the Fourier coefficients are given by

2 L
Z  nπx 
bn = f (x) sin dx
L 0 L
Similarly as the case of the cosine series, given f (x) defined on [0, L], the odd periodic extension is
obtained by simply computing the Fourier series representation for the odd function

f (x), 0<x<L
fo (x) ≡
−f (−x) −L < x < 0
The resulting series expansion leads to defining the Sine Series representation of f (x) for x ∈ [0, L]
as described above.

Example 5.3.2 (Half-Range Expansion of f (x) = x). Expand f (x) = x on 0 < x < 2 in a
half-range (a) sine series, (b) cosine series.
102 CHAPTER 5. FOURIER SERIES AND SEPARATION OF VARIABLES

(a) Sine Series (L = 2).


Z L Z 2
2  nπ  


bn = x sin x dx = x sin 2 x dx
L0 L 0
 2
x cos nπ
Z 2 
2
x 2 nπ

=− nπ + cos 2
x dx
2
nπ 0
0
2
4 2 4

(−1)n .

=− cos(nπ) + sin 2
x =−
nπ nπ 0 nπ

Hence ∞
4 X (−1)n+1  nπ 
f (x) = sin 2 x ,
π n=1 n
and at x = 1: ∞
4 X (−1)n+1  nπ  π
1= sin 2 =⇒ = 1 − 13 + 15 − 17 + · · · .
π n=1 n 4
(b) Cosine Series (L = 2).
2
2 2 x2
Z
a0 = x dx = = 2,
2 0 2 0
Z 2   2  2 2
Z 2    2   2
nπ nπ
an = x cos 2 x dx = x sin 2 x − sin nπ
2
x dx + 2

cos nπ
2
x
0 nπ 0 nπ 0 0
4  
= 2 2 cos(nπ) − 1 .

Thus
∞ ∞ (2k+1)π 
4 X (−1)n − 1  nπ  8 X cos 2
x
f (x) = 1 + 2 2
cos 2 x = 1 − 2 2
.
π n=1 n π k=0 (2k + 1)
At x = 2: ∞
8 X 1 π2 1 1
2=1+ 2 =⇒ =1+ 32
+ 52
+ ··· .
π k=0 (2k + 1)2 8

Example 5.3.3 (Cosine Series of sin x on 0 ≤ x ≤ π ). Find the Fourier cosine series of
f (x) = sin x on [0, π].

2 π 2 π 1 π
Z Z Z
4
a0 = sin x dx = , a1 = sin x cos x dx = sin 2x dx = 0.
π 0 π π 0 π 0

For n ≥ 2, use 2 sin x cos(nx) = sin((n + 1)x) − sin((n − 1)x):

2 π 1 π
Z Z
an = sin x cos(nx) dx = [sin((n + 1)x) − sin((n − 1)x)] dx
π 0 π 0

1 h cos((n−1)x) cos((n+1)x) iπ 2 (−1)n−1 − 1
= n−1
− n+1
= .
π 0 π(n2 − 1)
5.3. FOURIER SERIES 103

Hence ∞ ∞
2 2 X (−1)n−1 − 1 2 4 X cos(2jx)
sin x = + cos(nx) = − .
π π n=2 n2 − 1 π π j=1 (2j)2 − 1

Example 5.3.4 (Periodic Extension of f (x) = x). Assume f (x) = x on 0 < x < 2 with period 2
so that L = 1. Compute its full Fourier series.

1 L
Z Z 1 Z 2
a0 = x dx = x dx = 0? (equivalently compute x dx = 2 for even part.)
L −L −1 0

For n ≥ 1:
1 1
Z Z 2
an = x cos(nπx) dx = x cos(nπx) dx
L −1 0
Z 2
h
x sin(nπx)
i2 1
= nπ
− sin(nπx) dx = 0,
0 nπ 0
1 1
Z Z 2
bn = x sin(nπx) dx = x sin(nπx) dx
L −1 0
Z 2
h
x cos(nπx)
i2 1 2
= − nπ + cos(nπx) dx = − .
0 nπ 0 nπ
Therefore

2 X sin(nπx)
f (x) = 1 − .
π n=1 n

Why??

In the previous example, if we compute f (0) using the original definition of f , we obtain 0 . However,
if we use the Fourier expansion of f , we obtain f (0) = 1. What is wrong?

5.3.3 Convergence of Fourier Series


In this section, we state the fundamental convergence theorem for Fourier Series, which assumes that
the function f (x) is piecewise continuous. At points of discontinuity of f (x), the Fourier approximation
SN (x) takes on the average value:

1
f x+ + f x−
 
2
where f (x+ )and f (x− ) represent the right-hand and left-hand limits of f (x) at the discontinuity,
respectively. Before stating the main result of this section, we introduce the following notion.

Definition 5.3.3 (Piecewise continuous). A function f : [a, b] → R is piecewise continuous if


there are numbers t0 , t1 , . . . , tn with a = t0 < t1 < · · · < tn = b, such that f is continuous on each
of the intervals (ti , ti+1 ), and tends to a finite value at each endpoint of these intervals. That is,
the limits
104 CHAPTER 5. FOURIER SERIES AND SEPARATION OF VARIABLES

f t+

i = lim f (t) and
t↘ti


f ti+1 = lim f (t)
t↗ti+1

exist (and are finite). A function f : [a, b] → R is piecewise continuous if, roughly speaking, it is
made up of a finite number of continuous pieces. A function f : R → R is piecewise continuous
if it is piecewise continuous on every closed interval [a, b]. Thus it can have infinitely many
discontinuities, but only finitely many on any finite interval.

Example 5.3.5.

• For the square wave function


0 if −π < t ≤ 0
f (t) =
π if 0<t≤π
we have f (0− ) = 0 and f (0+ ) = π and f is continuous on ( −π, 0 ), ( 0, π ). Therefore, f is
piecewise continuous on [−π, π].

• The function f : R → R given by f (t) = tan t (and f (t) = 0 if t is an odd multiple of π/2 )
is not piecewise continuous. Although it has only finitely many discontinuities on any finite
interval,
 the function "blows up" at these discontinuities, so that (for example) the limits
π− π+

f 2 and f 2 do not exist.

Theorem 5.3.1 (Convergence of Fourier Series). Let f and f ′ be piecewise continuous func-
tions on [−L, L] (i.e. f is piecewise continuously differentiable or piecewise C 1 ) and periodic
with period 2L, then f has a Fourier Series

a0 X  nπx   nπx 
f (x)] ≈ + an cos + bn sin = S(x)
2 n=1
L L
where
Z L Z L
1  nπx  1  nπx 
an = f (x) cos dx and bn = f (x) sin dx
L −L L L −L L
The Fourier Series converges to f (x) at all points at which f is continuous and to 12 [f (x+ ) +
f (x− )]at all points at which f is discontinuous. Thus a Fourier Series converges to the average
value of the left and right limits at a point of discontinuity of the function f (x).

Important!
Under the hypothesis of Theorem 5.3.1, ≈ can be replaced by = and

if f is continuous at x
(
f (x),
S(x) = f (x+ )+f (x− )
2
, if f is discontinuous at the point x.
5.3. FOURIER SERIES 105

Remark 5.3.1. A way to look at the connection of Fourier series on an interval with the Fourier
series of periodic functions is to start with a piecewise continuous function g defined only on the
interval [−L, L]. Then gper , a periodic extension of g of period 2L, can play the role of f above;
in particular, the Fourier series of g converges to gper everywhere, in our usual sense:
(
gper (x), if gper is continuous at x
S(x) = gper (x+ )+gper (x− )
2
, if gper is discontinuous at the point x

Remark 5.3.2 (Gibbs phenomenon). The Fourier series has a difficult time converging at the
point of discontinuity and these graphs of the Fourier series show a distinct overshoot which does
not go away. This is called the Gibbs phenomenon and the amount of overshoot can be computed.
We refer to the Lectures notes of Prof. Peirce for more on this phenomenon.

Theorem 5.3.2 (Uniform convergence of Fourier Series). Let f be a continuous functions


on [−L, L] and periodic with period 2L. If f ′ is piecewise continuous on [−L, L], then the Fourier
series for f converges uniformly to f on [−L, L] and hence on any interval. That is, for each
ε > 0, there exists an integer N0 (that depends on ε ) such that

sup |f (x) − SN (x)| < ε


x∈[−L,L]

for all N > N0 , where


N
a0 X h  nπx   nπx i
SN (x) = + an cos + bn sin
2 n=1
L L

5.3.4 Complex form of Fourier Series

Finally, everything said above applies also to the complex form of the Fourier series: a function g(x),
periodic with period 2L, has a complex Fourier series


nπx
cn ei( )
X
g(x) ≈ L

n=−∞

with
Z L
1 nπx
cn = g(x)e−i( L ) dx
2L −L
106 CHAPTER 5. FOURIER SERIES AND SEPARATION OF VARIABLES

Example 5.3.6. 
−1 −π ≤ x < 0
f (x) = L=π
1 0<x<π
 Z 0 Z π 
1 −inx −inx
cn = − e dx + e dx
2π −π 0
−inx 0
( )
e | −inx π
1 −π e |0
= − +
2π (−in) (−in)

i  +inπ −inπ 0 n even
= −2 + e +e = 2
2πn iπn
n odd
Therefore,

X 2
f (x) = ei((2n+1)x)
n=−∞
πi(2n + 1)

5.4 Bessel’s inequality and Parseval Identity


Bessel’s inequality and Parseval’s identity are fundamental results in functional analysis and Fourier
analysis, particularly in the study of Hilbert spaces. These results provide insights into the decomposi-
tion of functions into orthonormal bases and the convergence of series representations. We will explore
an analogue of Pythagoras’ Theorem for functions that are square-integrable. Such functions are sig-
nificant in mathematical physics, as they correspond to systems with finite energy. Additionally, we
show some applications of the Parseval’s identity into summation formulas involving series of reciprocal
powers of n.

Definition 5.4.1 (Square integrable function). A function f is said to be square-integrable


if it satisfies the condition:
Z L
[f (x)]2 dx < ∞
−L
2
in which case we write f ∈ L ([−L, L]).

Consider the Fourier series associated with f (x) :


a0 X h  nπx   nπx i
f (x) ∼ + an cos + bn sin = S∞
2 n=1
L L

Define the partial sum:

N
a0 X h  nπx   nπx i
SN (x) = + an cos + bn sin
2 n=1
L L

Then, we have the following results.


5.4. BESSEL’S INEQUALITY AND PARSEVAL IDENTITY 107

Theorem 5.4.1 (Bessel’s Inequality). Let f ∈ L2 [−L, L]. Then


∞ L
a20 X 2
Z
1
+ an + b2n ≤ f 2 (x)dx
2 n=1
L −L

a20 P∞
in particular the series 2
+ n=1 a2n + b2n is convergent.

Proof of Theorem 5.4.1. We have that

[f (x) − SN (x)]2 = f 2 (x) − 2f (x)SN (x) + SN


2
(x)
Consider the least-square error defined as:

1 L
Z
E2 [f, SN ] = [f (x) − SN (x)]2 dx
L −L
Z L Z L Z L 
1 2 2
= f (x)dx − 2 f (x)SN (x)dx + SN (x)dx
L −L −L −L
1
= {⟨f, f ⟩ − 2 ⟨f, SN ⟩ + ⟨SN , SN ⟩}
L
Now, we compute:
" N
#2
Z L
a0 X  nπx   nπx 
⟨SN , SN ⟩ = + an cos + bn sin dx
−L 2 n=1
L L
N  Z L Z L
a20 X
2 2 nπx
 
2 2 nπx
  
= L+ an cos dx + bn sin dx
2 n=1 −L L −L L
" N
#
a20 X 2
an + b2n

=L +
2 n=1

In addition,
Z L
⟨f, SN ⟩ = f (x)SN (x)dx
−L
Z L N  Z L Z L 
a0 X  nπx   nπx 
= f (x)dx + an f (x) cos dx + bn f (x) sin dx
2 −L n=1 −L L −L L
Therefore,
( N
)
L
a20 X 2
Z
1 1
[f (x) − SN (x)]2 dx = ⟨f, f ⟩ − an + b2n

E2 [f, SN ] = +
L −L L 2 n=1

Since we know that


Z L
E2 [f, SN ] = [f (x) − SN (x)]2 dx ≥ 0
−L

it follows that
108 CHAPTER 5. FOURIER SERIES AND SEPARATION OF VARIABLES

N L
a20 X 2
Z
1 1
+ an + b2n ≤ f 2 (x)dx = ⟨f, f ⟩ = E[f ]
2 n=1
L −L L
where E[f ] is known as the energy of the 2L-periodic function f .

Theorem 5.4.2 (Parseval’s Identity). Let f ∈ L2 [−L, L]. Then the Fourier coefficients an
and bn satisfy Parseval’s Formula
∞ L
a20 X 2
Z
1
an + b2n = f 2 (x)dx = E[f ] (5.78)

+
2 n=1
L −L

if and only if Z L
lim [f (x) − SN (x)]2 dx = 0 (5.79)
N →∞ −L

Remark 5.4.1. The convergence in (5.79) should be understood in the L2 -sense (mean square
sense). This is a convergence in an average sense. When {SN } tends to f uniformly, {SN } must
tend to f in L2 -sense. The converse is not always true. Hence convergence in L2 -sense is weaker
than uniform convergence.

Important!: In practice...

• The Fourier series of every L2 -integrable function converges to the function in L2 -sense.

• Let f be a piecewise continuous function on [−L, L]. Then SN converges to f in the mean
square sense.

• If f is piecewise continuous on [−L, L], then Parseval’s identity (5.78) holds.

Example 5.4.1. Consider the Fourier cosine series of f (x) = x, 0 < x < 2:

X 4 nπx
x≈1+ [cos(nπ) − 1] cos
n=1
π 2 n2 2
a) Write Parseval’s identity corresponding to the above Fourier series.
b) Determine from a) the sum of the series
1 1 1
+ + + ...
14 24 34

Solution 5.4.1 (Solution to Example 5.4.1). a) We first find the Fourier coefficient and the
period of the Fourier series just by comparing the given series with the standard Fourier series
4
a0 = 2, an = [cos(nπ) − 1], n = 1, 2, . . . , bn = 0,
π 2 n2
period: L = 2.
5.4. BESSEL’S INEQUALITY AND PARSEVAL IDENTITY 109

We note that Z 2
16
x2 dx = < ∞,
−2 3
so that f ∈ L2 (−2, 2). Thus, the conditions for Parseval’s identity are satisfied, and we can write
∞ 2 2
a20 X 2
Z Z
 1
+ an + b2n = 2
f (x) dx = f 2 (x) dx.
2 n=1
2 −2 0

This implies
Z 2 ∞
4 X 16
x2 dx = + (cos(nπ) − 1)2 .
0 2 n=1 π 4 n4
This can be simplified to give
8 64 h 1 1 1 i
= 2 + 4 4 + 4 + 4 + ··· ,
3 π 1 3 5
and hence
1 1 1 π4
+ + + · · · = .
14 34 54 96
b) Let
1 1 1
S= 4
+ 4 + 4 + ··· .
1 2 3
Split the series as    
1 1 1
S= 14
+ 34
+ 54
+ · · · + 214 + 1
44
+ 1
64
+ ···
π4 1
= + 4 S.
96 2
Solving for S gives
π4
S= .
90

Example 5.4.2. Find the Fourier series of x2 , −π < x < π and use it along with Parseval’s
theorem to show that ∞
X 1 π4
= .
n=1
(2n − 1)4 96

Solution 5.4.2 (Solution to Example 5.4.2). Since f (x) = x2 is an even function, bn = 0. For
n ≥ 1,
2 π 2 2 π
Z Z
2h i 4
an = x cos(nx) dx = 0− x sin(nx) dx = 2 (−1)n .
π 0 π n 0 n
The constant term is π
2π 2
Z
2 2
a0 = x dx = .
π 0 3
110 CHAPTER 5. FOURIER SERIES AND SEPARATION OF VARIABLES

Thus ∞
π2
2
X (−1)n
x = +4 cos(nx).
3 n=1
n2
Rπ 2π 5
Since −π
x4 dx = 5
< ∞, by Parseval’s theorem,

π ∞
a2 X 2
Z
1
f (x) dx = 0 +
2
an + b2n .

π −π 2 n=1

1
Rπ 2π 4
Using π −π
x4 dx = 5
leads to

4π 4 X 16 2π 4
+ = ,
18 n=1
n4 5
P∞ 1 π4
so n=1 n4 = 90
. Finally,
∞ ∞ ∞
X 1 X 1 1 X 1 15 π 4 π4
= − = = .
n=1
(2n − 1)4 n=1
n4 16 n=1 n4 16 90 96

5.5 Heat conduction problems with time-independent inhomo-


geneous boundary conditions
In this section, we consider heat conduction problems with inhomogeneous boundary conditions. To
determine a solution, we exploit the linearity of the problem, which ensures that linear combinations of
solutions remain solutions. In particular, we first determine a well-chosen particular solution, known as
the steady-state solution, which can be used to eliminate the inhomogeneous boundary conditions.
This reduces the problem to solving the same boundary value problem but with homogeneous boundary
conditions and an adjusted initial condition.

Selection of particular solution is not unique !!


Although the steady-state solution is a natural choice in this case, the selection of a particular
solution, as always, is not unique. We will introduce two methods: The separation of variables and
a more generally applicable method of eigenfunction expansions.

5.5.1 Steady state


We convert an inhomogeneous heat equation to a homogeneous problem when the inhomogeneous terms
are all time-independent.

Dirichlet nonhomogeneous BC

Consider the Boundary Value Problem (BVP) modelling heat propagation in a rod where the end points
are kept at constant temperatures u0 and u1 :

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy