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

Chapter 3

Fourier Series & Fourier Transforms

3.1 Introduction
Joseph Fourier submitted a paper in 1807 to the Academy of Sciences of Paris. The paper was
a mathematical description of problems involving heat conduction, and was at first rejected
for lack of mathematical rigour. However, it contained ideas which have developed into an
important area of mathematics named in his honour, Fourier analysis.

3.2 Orthogonal Functions


Definition 3.2.1 Two functions f1 (x) and f2 (x) are said to be orthogonal on an interval [a,b]
if Z b
hf1 , f2 i = f1 (x)f2 (x) dx = 0
a
Example 3.2.1 Functions f1 (x) = x and f2 (x) = x3 are orthogonal on the interval [-1,1]
2

since " #1
Z 1 Z 1
1
hf1 , f2 i = f1 (x)f2 (x) dx = x2 x3 dx = x6 =0
−1 −1 6
−1
Example 3.2.2 Given f, g as functions with an inner product defined as
Z π
< f, g >= f (t).g(t) dt
−π

Show whether the functions sin t and cos t are orthogonal


Z π  π
1 2
< sin t, cos t >= sin t cos t dt = sin t =0
−π 2 −π

Thus sin t and cos t are orthogonal functions in the vector space C[−π, π]
Example 3.2.3 Find the inner product of f (x) = x2 − 3x + 3 and g(x) = 2x3 + x2 + 5x − 5
over [0, 2].
< f, g >= 6
Example 3.2.4 Find the inner product of f (x) = x2 − 3x + 3 and g(x) = 2x3 + x2 + 5x − 5
130
over [−1, 1], then < f, g >= −
3
Example 3.2.5 Find the inner product of f (x) = − 12 + 23 x2 and g(x) = − 32 x + 52 x3 over [0, 1].
1
< f, g >=
8

84
3.3. ORTHOGONAL SETS

3.3 Orthogonal Sets


Definition 3.3.1 A set of real-valued functions {φ0 (x), φ1 (x), φ2 (x), · · · } is said to be or-
thogonal on an interval [a,b] if
Z b 
0, m 6= n
hφm , φn i = φm (x)φn (x) dx = (3.3.1)
a k, m = n
Example 3.3.1 The set
 
π π 2π 2π nπ nπ
1, cos x, sin x, cos x, sin x, . . . cos x, sin x, . . .
L L L L L L
is orthogonal on [−L, L]. i.e.
RL
cos mπ
L
x sin nπ
L
x dx = 0 ∀ m, n.
−L

RL
cos mπ
L
x cos nπ
L
x dx = 0 m 6= n.
−L

RL
sin mπ
L
x sin nπ
L
x dx = 0 m 6= n.
−L

RL RL
1 · sin nπ
L
x dx = 0 = 1 · cos nπ
L
x dx
−L −L

RL RL
sin2 mπ
L
x dx = L = cos2 mπ
L
x dx
−L −L

Example 3.3.2 Given the set of polynomials


 
3 2 1
{f1 , f2 , f3 } = 1, x, x −
2 2
Show whether or not, the set is orthogonal in the interval [−1, 1] with an inner product defined
as Z b
hfn , fm i = fn (x)fm (x) dx
a
In case, it is orthogonal, determine whether it is orthonormal?
Z 1 Z 1 Z 1  2 1
x
hf1 , f2 i = (f1 )(f2 ) dx = (1)(x) dx = x dx = =0
−1 −1 −1 2 −1
Z 1
hf1 , f3 i = (f1 )(f3 ) dx
−1
1 1 1
x3 1
Z   Z   
3 2 1 3 2 1
= (1) x − dx = x − dx = − x =0
−1 2 2 −1 2 2 2 2 −1
Z 1
hf2 , f3 i = (f2 )(f3 ) dx
−1
Z 1 1 1
3x4 1 2
  Z   
3 2 1 3 3 1
= (x) x − dx = x − x dx = − x =0
−1 2 2 −1 2 2 8 4 −1

js, ddw de ii: Lecture Notes Page 85 of 249


CHAPTER 3. FOURIER SERIES & FOURIER TRANSFORMS

Thus the set {f1 , f2 , f3 } is orthogonal. But


Z 1 Z 1 Z 1
hf1 , f1 i = (1)(f1 )(f1 ) dx = (1)(1)(1) dx = 1 dx = [x]1−1 = 2 6= 1
−1 −1 −1
hf2 , f2 i 6= 1
hf3 , f3 i 6= 1
If any is not equal to 1, as manifested above, the set of functions is not orthonormal.
If we change the interval of orthogonality from [−1, 1] to [0, 1],
Z 1 Z 1 Z 1  2 1
x 1
hf1 , f2 i = (1)(f1 )(f2 ) dx = (1)(1)(x) dx = x dx = = 6= 0
0 0 0 2 0 2
Which implies, the set ceases to be orthogonal. This indicates that for a specific set of or-
thogonal functions, there is a specific, defined interval of orthogonality and a specific weighting
function. A change in any will change the orthogonality status.
Z 1
Exercise 3.1 Let V be a vector space of polynomials f (t) with inner product < f, g >= f (t)g(t) dt
−1
Show that
1, t, 3t2 − 1, 5t3 − 3t


is an orthogonal basis on the interval [0, 1].


Exercise 3.2 Show that the set of functions
{1, cos x, sin x, cos 2x, sin 2x, · · · , cos mx, sin nx, . . . }
is orthogonal on the interval [−π, π].
Example 3.3.3 See after Section 3.5.1.
1.) On the interval [−1, 1], show that the function f (x) = x is orthogonal to the constant
functions.

A direct calculation makes it plain that


Z 1 1
x2
[x · c0 ] dx = c0 = 0.
−1 2 −1
2.) Find a quadratic polynomial that is orthogonal to both 1 and x.

Since x2 and 1 are even functions it must be the case that they are orthogonal to x, which
is odd. This suggest that we produce some constant c such that x2 + c is orthogonal to 1.
Hence,
Z 1 1
2 x3 2 1 1
⇔ f2 (x) = x2 −

x + c · 1dx = + cx = + 2c = 0 ⇔ c = −
−1 3 −1 3 3 3
3.) Find a cubic polynomial that is orthogonal to all quadratics. (These are the first few
Legendre polynomials.)

In a similar fashion we look for x3 + cx orthogonal to x. We find


Z 1 1
3 x5 x3 2 2 3 3
⇔ f3 (x) = x3 − x

x + cx · x dx = +c = +c =0 ⇔ c=−
−1 5 3 −1 5 3 5 5
is orthogonal to x by construction and orthogonal to both 1 and x2 by an even-odd argu-
ment.

js, ddw de ii: Lecture Notes Page 86 of 249


3.4. FOURIER SERIES

3.4 Fourier Series


Definition 3.4.1 Suppose f is a function defined on an interval [−L, L] that can be expanded
in the trigonometric series called the Fourier series of f (x) as

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

1). Integrating the equation above from −L to L gives



Z L " Z #
a0 L L
Z Z L
X nπ nπ
f (x) dx = dx + an cos x dx + bn sin x dx
−L 2 −L n=1 −L L −L L

nπ nπ
since cos x, sin x are orthogonal to {1} (see Example 3.3.1 on page 85) then we have
L L
Z L #L
a0 L
Z
a0
f (x) dx = dx = x = La0 .
−L 2 −L 2
−L

To have coefficient a0 as
ZL
1
a0 = f (x) dx (3.4.2)
L
−L


2). Multiplying equation (3.4.1) by cos x and integrating gives
L
Z L

f (x) cos x dx (3.4.3)
−L L

" Z #
a0 L L
Z Z L
mπ X mπ nπ mπ nπ
= cos x dx + an cos x cos x dx + bn cos x sin x dx
2 −L L n=1 −L L L −L L L

But by orthogonality of the set (Example 3.3.1 on page 85),


(
L L
m 6= n
Z Z
mπ mπ nπ 0
cos x dx = 0, cos x cos x dx =
−L L −L L L L m=n
Z L
mπ nπ
cos x sin x dx = 0
−L L L
To apply orthogonality, at all other ai s goes to zero other than at one an , when m = n.
∞  Z L 
X mπ nπ
an cos x cos x dx
n=1 −L L L
Z L Z L
mπ π mπ 2πx
= a1 cos x cos x dx + a2 cos x cos dx
−L L L −L L L
Z L Z L
mπ mπ mπ (m + 1)π
+ · · · + am cos x cos x dx + am+1 cos x cos x dx
−L L L −L L L
Z L
mπ (m + 2)π
+am+2 cos x cos x dx + · · ·
−L L L

js, ddw de ii: Lecture Notes Page 87 of 249


CHAPTER 3. FOURIER SERIES & FOURIER TRANSFORMS

ZL
mπ mπ
= 0 + 0 + · · · + 0 + am cos x cos x dx + 0 + · · · + 0
−L L L
Z L
mπ mπ
= am cos x cos x dx, since m = n
−L L L
Z L
nπ nπ
= an cos x cos x dx
−L L L
= an L
and
∞  Z L 
X mπ nπ
bn cos x sin x dx
n=1 −L L L
Z L Z L
mπ π mπ 2πx
= b1 cos x sin x dx + b2 cos x sin dx
−L L L −L L L
Z L Z L
mπ mπx mπ (m + 1)πx
+ · · · + bm cos x sin dx + bm+1 cos x sin dx + · · ·
−L L L −L L L
= 0 + 0 + ··· + 0 = 0
The above shows how the summation symbol on right hand side ceases to exist.

Thus (3.4.3) reduces to


Z L

f (x) cos x dx = an L
−L L
To have coefficient an given by
ZL
1 nπ
an = f (x) cos x dx (3.4.4)
L L
−L


3). Multiplying equation (3.4.1) by sin x and integrating gives
L
Z L

f (x) sin x dx
−L L

Z L " Z #
L Z L
a0 mπ X nπ mπ nπ mπ
= sin x dx + an cos x sin x dx + bn sin x sin x dx
2 −L L n=1 −L L L −L L L
and using orthogonality of the set (Example 3.3.1 on page 85)
Z L

sin x dx = 0
−L L
Z L
nπ mπ
cos x sin x dx = 0
−L L L
Z L (
mπ nπ 0 m= 6 n
sin x sin x dx =
−L L L L m=n
We get the coefficient bn as
ZL
1 nπ
bn = f (x) sin x dx (3.4.5)
L L
−L

js, ddw de ii: Lecture Notes Page 88 of 249


3.4. FOURIER SERIES

Definition 3.4.2 The trigonometric series



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

with coefficients (as derived in (3.4.2), (3.4.4), (3.4.5) together with (3.4.1))

ZL
1
a0 = f (x) dx
L
−L
ZL
1 nπ
an = f (x) cos x dx
L L
−L
ZL
1 nπ
bn = f (x) sin x dx
L L
−L

is called the Fourier series of f on [−L, L].

Definition 3.4.3 The coefficients a0 , an , bn are called the Fourier coefficients of f .

Remark 3.4.1 The function f is said to be 2L-periodic since interval is [−L, L].

Example 3.4.1 If it is a 2π periodic, it means the interval is [−π, π]

Example 3.4.2 Obtain the Fourier Series expansion of


(
0, −π < x < 0
f (x) =
π − x, 0 < x < π

The function is defined on [−L, L] = [−π, π]. The coefficients are given by
Zπ Z 0 Z π  " #π
1 1 1 1 2 π
a0 = f (x) dx = 0 dx + (π − x) dx = πx − x =
π π −π 0 π 2 2
−π 0

1 π 0 π
Z Z Z 
1 nπ 1
an = f (x) cos x dx = f (x) cos nxdx = 0 dx + (π − x) cos nxdx
π π π −π π −π 0
−π

1 − (−1)n

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

1 π 1 π
Z Z
1 nπ
bn = f (x) sin x dx = f (x) sin nx dx = (π − x) sin nx dx
π π π −π π 0
−π
 π
−(π − x) 1 1
= cos nx − 2 sin nx =
n n 0 n

The Fourier series is therefore



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

js, ddw de ii: Lecture Notes Page 89 of 249


CHAPTER 3. FOURIER SERIES & FOURIER TRANSFORMS

∞ 
π X 1 − (−1)n

1
f (x) = + cos nx + sin nx
4 n=1 n2 π n

For f (x) = π − x given for this example, the Fourier series can be rewritten as
∞ 
π X 1 − (−1)n

1
(π − x) = + cos nx + sin nx
4 n=1 n2 π n

Remark 3.4.2 For any arbitrary value of x, we generate a unique Fourier series. For example,
if x = 0

π X 1 − (−1)n
π = +
4 n=1
n2 π
π 2 2 2
π = + 2 + 2 + 2 + ···
4 1π 3π 5π
3 2 2 2
π = 2 + 2 + 2 + ···
4 1 π 3 π 5 π 
3 2 2 2 2
π = + + + ···
4 12 32 52
 
2 4 2 2 2
π = + + + ···
3 12 32 52

generating well-known mathematical series rewritten in different forms. It can also be rewritten
as

4 X 1 − (−1)n
π =
3 n=1 n2 π

Exercise 3.3 Determine the Fourier series for

f (x) = 3 − 2x, −π <x<π

a0 = 6
sin (π n)
an = 6 =0
πn
−π n cos (π n) + sin (π n) (−1)n
bn = −4 =4
π n2 n
such that ∞
X (−1)n
(3 − 2x) = 3 + 4 sin (nx)
n=1
n

Exercise 3.4 Compute the Fourier series for




 0, −2 < x < −1

−2, −1 ≤ x < 0
f (x) =


 1, 0≤x<1
1≤x<2

0,

js, ddw de ii: Lecture Notes Page 90 of 249


3.4. FOURIER SERIES

Example 3.4.3 Determine the Fourier series for the function

f (x) = π + x , −π <x<π

Computing the Fourier coefficients


" #π
π
1 π
Z Z
1 1 1 2
a0 = f (x) dx = (π + x) dx = πx + x = 2π (3.4.6)
π −π π −π π 2
−π
Z π
1
an = f (x) cos nxdx
π −π
Z π
1
= (π + x) cos nxdx
π −π
 π
1 (π + x) 1
= sin nx + 2 cos nx
π n n −π
   
1 1 n 1 n
= 0 + 2 (−1) − 0 + 2 (−1) =0 (3.4.7)
π n n
Z π Z π
1 1
bn = f (x) sin nxdx = (π + x) sin nxdx
π −π π −π
 π
1 −(π + x) 1
= cos nx − 2 sin nx
π n n
   −π
1 2π −2 2
= − (−1)n − 0 − (0 + 0) = (−1)n = (−1)n+1 (3.4.8)
π n n n
We have used the trigonometric fact that

cos(−θ) = cos(θ)
sin(−θ) = − sin(θ)
tan(−θ) = − tan(θ)

The Fourier series is given by



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

X (−1)n+1
x+π = π+2 sin nx
n=1
n
π
For if x = , we can deduce the series to
2

X (−1)n+1
x+π = π+2 sin nx
n=1
n

π X (−1)n+1
π
+π = π+2 sin n
2 n 2
n=1 
π 1 1 1 1
+π = π+2 − + − + ···
2 1 3 5 7
π 1 1 1
= 1 − + − + ···
4 3 5 7
Exercise 3.5 Determine the Fourier series for f (x) = ex , − π < x < π.

js, ddw de ii: Lecture Notes Page 91 of 249


CHAPTER 3. FOURIER SERIES & FOURIER TRANSFORMS

Exercise 3.6 Define the Fourier series for


(
1, −5 < x < 0
f (x) =
1+x , 0≤x<5

9
a0 =
2
sin (π n) −5 + 5 cos (π n) + 6 π n sin (π n) −1 + (−1)n
an = + =5
πn n2 π 2 n2 π 2
cos (π n) − 1 π n + 5 sin (π n) − 6 π n cos (π n) (−1)1+n
bn = + = 5
πn n2 π 2 πn
such that ∞
9 X [−1 + (−1)n ]  nπ  (−1)1+n  nπ 
f (x) = + 5 cos x + 5 sin x
4 n=1 n2 π 2 5 πn 5

Exercise 3.7 Evaluate the Fourier series for


(
π2, −π < x < 0
f (x) = 2
π −x , 0≤x<π

 
1 3 1 2
a0 = 2π − π
π 2
sin (π n) π 2 −1 − sin (π n) π 2 n + π n sin (π n) + cos (π n) −1 + (−1)n
 
1
an = − =−
π n n2 π n2
(−1)n
 2
π [cos (π n) − 1] −π 2 n + π 2 cos (π n) n − π n cos (π n) + sin (π n)

1
bn = − =
π n n2 n
Such that

[−1 + (−1)n ] (−1)n
  X
1 3 1 2
f (x) = 2π − π + − cos(nx) + sin(nx)
2π 2 n=1
π n2 n

Exercise 3.8 Compute the Fourier series for



−1, −π < x < 0
f (x) =
2, 0≤x<π

a0 = 1
sin (π n)
an = =0
πn
cos (π n) − 1 (−1)1+n + 1
bn = −3 =3
πn πn
Such that, the Fourier series is given by
∞  1+n 
1 X (−1) +1
f (x) = + 3 sin(nx)
2 n=1 πn

Whose expansion is given by


1 sin (x) sin (3 x) 6 sin (5 x) 6 sin (7 x) 2 sin (9 x)
f (x) = +6 +2 + + + + ...
2 π π 5 π 7 π 3 π
js, ddw de ii: Lecture Notes Page 92 of 249
3.4. FOURIER SERIES

Remark 3.4.3 The f (x) to use depends on the value of x you are applying. For example, if
π 3π
let x = − , then f (x) = −1, whereas if, let x = , then f (x) = 2.
2 4
π
Let x = , we deduce
2
1 6 2 6 6 2
2=+ − + − + + ...
2 π π 5π 7π 3π

0, −2 < x < 0

Exercise 3.9 State the Fourier series for f (x) = x , 0 ≤ x < 1

1, 1 ≤ x ≤ 2

3
a0 =
4
1
π n + sin 12 π n π n sin 21 π n − sin (π n)
  
−2 + 2 cos 2
an = −
π 2n2 πn
−1 + cos 21 π n
= 2
π 2 n2

 − π24n2 , n = 2, 6, 10, . . .
= 0, n = 0, 4, 8, 12, . . .
− π22n2 , n odd.

2 sin 21 π n − cos 21 π n π n cos 21 π n − cos (π n)


  
bn = +
π 2 n2 πn
1
 n
2 sin 2 π n − π n (−1)
=
π 2 n2
−π n(−1)n



 π 2 n2
, n even



−2−π n(−1)n
= π 2 n2
, n = 3, 7, 11, · · ·



 2−π n(−1)n


π 2 n2
, n = 1, 5, 9, · · ·

Exercise 3.10 Compute the Fourier series for f (x) = |x|, − 1 < x < 1.

a0 = 1
(−1)n − 1

cos (π n) + sin (π n) nπ − 1 0, if n is even;
an = 2 = 2 =
π 2 n2 π 2 n2 − n24π2 , if n is odd.
bn = 0

Thus

1 X [(−1)n − 1]
|x| = + 2 cos (nπx)
2 n=1 n2 π 2

1 X 4
= + − 2 2 cos (nπx)
2 n=1

n odd

js, ddw de ii: Lecture Notes Page 93 of 249


CHAPTER 3. FOURIER SERIES & FOURIER TRANSFORMS

Example 3.4.4 Take the function



0 if − π < t ≤ 0,
f (t) =
π if 0 < t ≤ π.
Extend f (t) periodically and write it as a Fourier series.

This function or its variants appear often in applications and the function is called the square
wave.

Now we compute the coefficients. Let us start with a0


1 π 1 π
Z Z
a0 = f (t) dt = π dt = π
π −π π 0
1 π 1 π
Z Z
an = f (t) cos(nt) dt = π cos(nt) dt = 0
π −π π 0
1 π
Z
bn = f (t) sin(nt) dt
π −π
1 π
Z
= π sin(nt) dt
π 0
 π
− cos(nt)
=
n t=0
1 − cos(πn)
=
n
1 − (−1)n
=
 2n
n
if n is odd,
=
0 if n is even.
The Fourier series (for n odd, to use bn = 2/n) is
∞ ∞
π X2 π X 2 
+ sin(nt) = + sin (2k − 1) t .
2 n=1 n 2 k=1 2k − 1

Note 3.4.1 There is another form of the Fourier series using complex exponentials that is
sometimes easier to work with.
Exercise 3.11 Let

a0 X
f (t) = + an cos(nt) + bn sin(nt).
2 n=1

Use Euler’s formula eiθ = cos(θ) + i sin(θ) to show that there exist complex numbers cm such
that
X∞
f (t) = cm eimt .
m=−∞

Note that the sum now ranges over all the integers including negative ones. Do not worry about
convergence in this calculation. Hint: It may be better to start from the complex exponential
form and write the series as

X
c0 + cm eimt + c−m e−imt .
m=1

js, ddw de ii: Lecture Notes Page 94 of 249


3.5. EVEN AND ODD FUNCTIONS

3.5 Even and Odd Functions


Definition 3.5.1 A function is said to be even if

f (−x) = f (x) (3.5.1)

Definition 3.5.2 A function is said to be odd if

f (−x) = −f (x) (3.5.2)

Example 3.5.1 The function


f (x) = cos x
is even since
cos(−x) = cos(x)

Example 3.5.2 The function


f (x) = sin x
is odd because
sin(−x) = − sin(x)

Example 3.5.3 The function


f (x) = x2
is even as evident with
(−x)2 = x2

Example 3.5.4 The function


f (x) = x3
is odd as
f (x) = (−x)3 = −x3 = −(x)3 = −f (x)

Example 3.5.5 The curve


f (x) = x3 − x + 1
is neither even nor odd.

Example 3.5.6 The only function that is even and odd is f (x) = 0.

js, ddw de ii: Lecture Notes Page 95 of 249


CHAPTER 3. FOURIER SERIES & FOURIER TRANSFORMS

3.5.1 Properties of Even and Odd Functions


The following properties hold for even and odd functions.

1). The product of two even functions is even.

Proof : Since f and g are even functions,

f (−x) = f (x)
g(−x) = g(x)

Then let Φ(x) = f (x) · g(x)

Φ(−x) = f g(−x)
= f (−x) · g(−x)
= f (x) · g(x)
= Φ(x)

Therefore even. 

2). The product of two odd functions is even.

Proof : Since f and g are odd functions,

f (−x) = −f (x)
g(−x) = −g(x)

Then let Φ(x) = f (x) · g(x)

Φ(−x) = f g(−x)
= f (−x) · g(−x)
= −f (x) · −g(x) = f (x) · g(x)
= Φ(x)

Therefore even. 

3). The product of an even function and an odd function is an odd function.

Proof : Since f is even and g is an odd,

f (−x) = f (x)
g(−x) = −g(x)

Then let Φ(x) = f (x) · g(x)

Φ(−x) = f g(−x)
= f (−x) · g(−x)
= f (x) · −g(x)
= −Φ(x)

Therefore the product is an odd function. 

js, ddw de ii: Lecture Notes Page 96 of 249


3.5. EVEN AND ODD FUNCTIONS

4). The sum(difference) of two even functions is even.

Proof : For f even and g is an even function,

f (−x) = f (x)
g(−x) = g(x)

Define Φ(x) = f (x) + g(x)

Φ(−x) = (f + g) (−x)
= f (−x) + g(−x)
= f (x) + g(x)
= (f (x) + g(x))
= (f + g) (x)
= Φ(x)

Therefore the sum is an even function. 

5). The sum(difference) of two odd functions is odd.

Proof : For f even and g is an even function,

f (−x) = −f (x)
g(−x) = −g(x)

Define Φ(x) = f (x) + g(x)

Φ(−x) = (f + g) (−x)
= f (−x) + g(−x)
= −f (x) − g(x)
= − (f (x) + g(x))
= − (f + g) (x)
= −Φ(x)

Therefore the sum of two odd functions is odd. 

The function
h(x) = x3 + 2x
a sum of two odd functions f (x) = x3 and f (x) = 2x is odd as

h(−x) = (−x)3 + 2(−x)


= −x3 − 2x
= −(x3 + 2x)
= −h(x)

js, ddw de ii: Lecture Notes Page 97 of 249


CHAPTER 3. FOURIER SERIES & FOURIER TRANSFORMS

6). If f (x) is even then


Za Za
f (x) dx = 2 f (x) dx.
−a 0

Proof : Since the definite integral is additive with respect to the interval of
integration, one has
Z a Z 0 Z a
I := f (x) dx = f (x) dx + f (x) dx.
−a −a 0

Making in the first addend the substitution t = −x, dt = − dx (since need moving
from [x1 , x2 ] = [−a, 0] to [t1 , t2 ] = [a, 0]) and swapping the limits of integration
one gets
Z 0 Z a
I = f (−t)(−dt) + f (x) dx
a 0
Z 0 Z a
= − f (−t)(dt) + f (x) dx
a 0
Z a Z a
= f (−t)(dt) + f (x) dx
0 0
Z a Z a
= f (−x) dx + f (x) dx
0 0

By using the substitution, let x = t. Because f (x) is an even function, it yields


Z a Z a Z a
I := f (x) dx = f (−x) dx + f (x) dx (3.5.3)
−a 0 0
Z a Z a
= f (x) dx + f (x) dx
0 0
Z a
= 2 f (x) dx
0

7). If f (x) is odd then


Za
f (x) dx = 0.
−a

Proof : From (3.5.3)


Z a Z a Z a
I := f (x) dx = f (−x) dx + f (x) dx,
−a 0 0
Z a Z a
= −f (x) dx + f (x) dx, Since an odd function.
0 0
Z a Z a
= − f (x) dx + f (x) dx,
0 0
= 0

js, ddw de ii: Lecture Notes Page 98 of 249


3.6. FOURIER COSINE AND FOURIER SINE SERIES

3.6 Fourier cosine and Fourier sine Series


Recall the Fourier series

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

with coefficients
1 L
Z
a0 = f (x) dx
L −L
1 L
Z

an = f (x) cos x dx
L −L L
1 L
Z

bn = f (x) sin x dx
L −L L

3.6.1 If f (x) is Odd


The Fourier coefficients simplify to

Z L ZL
1 1
a0 = f (x) dx = (odd) dx = 0
L −L L
−L
Z L ZL
1 nπ 1
an = f (x) cos x dx = (odd)(even) dx = 0
L −L L L
−L
Z L ZL
1 nπ 2 nπ
bn = f (x) sin x dx = f (x) sin x dx
L −L L L L
0

And thus the Fourier series (3.4.1) become

∞ h
X nπ i
f (x) ≈ bn sin x (3.6.1)
n=1
L

with coefficient bn reduced to

ZL
2 nπ
bn = f (x) sin x dx (3.6.2)
L L
0

This is called the Fourier sine series.

js, ddw de ii: Lecture Notes Page 99 of 249


CHAPTER 3. FOURIER SERIES & FOURIER TRANSFORMS

3.6.2 If f (x) is Even


The Fourier coefficients simplify to
1 L 2 L
Z Z
a0 = f (x) dx = f (x) dx
L −L L 0
1 L 2 L
Z Z
nπ nπ
an = f (x) cos x dx = f (x) cos x dx
L −L L L 0 L
1 L 1 L
Z Z

bn = f (x) sin x dx = (even)(odd) dx = 0
L −L L L −L
And thus the Fourier series (3.4.1) become

a0 X h nπ i
f (x) ≈ + an cos x (3.6.3)
2 n=1
L

with coefficients reduced to


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

and
Z L Z L
1 nπ 2 nπ
an = f (x) cos x dx = f (x) cos x dx (3.6.5)
L −L L L 0 L
This is called the Fourier cosine series.
Example 3.6.1 Given f (x) = 1 − x, 0 ≤ x ≤ 1, find its Fourier sine series and its Fourier
cosine series.
1.) Fourier sine series: Computing the coefficients
a0 = 0
an = 0
2
bn =

to have the Fourier sine series for f (x) = 1 − x on [0, 1] as
∞  
X 2
f (x) = sin nπx
n=1

2.) Fourier cosine series: Computing the coefficients


a0 = 1
2
an = 2 2
[1 − (−1)n ]

bn = 0
The Fourier cosine series for f (x) = 1 − x on [0, 1] is
∞  
1 X 2 n
f (x) = + [1 − (−1) ] cos nπx
2 n=1 n2 π 2

Remark 3.6.1 The limits cant be −1 ≤ x ≤ 1, for Fourier sine series, or Fourier cosine series,
we use half intervals.

js, ddw de ii: Lecture Notes Page 100 of 249


3.6. FOURIER COSINE AND FOURIER SINE SERIES

Example 3.6.2 For f (x) = x, 0 ≤ x ≤ 2, find its Fourier sine series and its Fourier cosine
series.

1.) For Fourier sine series

−4 4 (−1)n+1
a0 = 0, an = 0, bn = (cos nπ) =
nπ πn
The Fourier sine series is ∞
4 X (−1)n+1 nπ
f (x) = sin x
π n=1 n 2

2.) For Fourier cosine series

4 −1 + (−1)n
a0 = 2, an = [cos nπ − 1] = 4 , bn = 0
n2 π 2 π 2 n2
The Fourier cosine series is therefore
∞ 
4 [−1 + (−1)n ]

X nπ
f (x) = 1 + cos x
n=1
n2 π 2 2

Example 3.6.3 Find the Fourier series for f (x) = L − x on −L ≤ x ≤ L

a0 = 2L
an = 0
2L(−1)n
bn =

Example 3.6.4 Determine whether the given function is even, odd or neither.

1.) f (x) = x3 + sin 2x

f (−x) = (−x)3 + sin(−2x)


= −x3 − sin 2x
= −(x3 + sin 2x)
= −f (x)

Thus an odd function


− 1
2.) f (x) = 1 − x2 2
− 21
f (−x) = 1 − (−x)2
− 1
= 1 − x2 2
= f (x)

Thus an even function

js, ddw de ii: Lecture Notes Page 101 of 249


CHAPTER 3. FOURIER SERIES & FOURIER TRANSFORMS

Example 3.6.5 Compute the Fourier series for the given function
f (x) = x2 , −π <x<π
The trigonometrical series

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

with coefficients
1 L
Z
a0 = f (x) dx.
L −L
1 L
Z

an = f (x) cos x dx.
L −L L
1 L
Z

bn = f (x) sin x dx.
L −L L
is called the Fourier series of f on [−L, L].
1 L 1 π 2
Z Z
2
a0 = f (x) dx = x dx = π 2
L −L π −π 3
Z π
1 2 4 4 4
an = x2 cos nxdx = π sin(nπ) − 3 sin(nπ) + 2 cos(nπ) = 2 (−1)n
π −π n n n n
Z π  2 2 π
1 2 −n x cos(nx) + 2 cos(nx) + 2nx sin(nx)
bn = x sin nxdx = =0
π −π n3 π −π

1 2 X 4
⇒ f (x) = π + 2
(−1)n cos nx
3 n=1
n

Example 3.6.6 Compute the Fourier series for the given function
f (x) = x(1 − x) , 0 < x < 1
Since half range, we first extend it to a 2L-periodic function

0, −1 < x < 0
f (x) =
x(1 − x), 0<x<1
whose Fourier series has coefficients
1 L
Z Z 1 Z 0 Z 1
1
a0 = f (x) dx = x(1 − x) dx = 0 dx + x(1 − x) dx =
L −L −1 −1 0 6
Z 1 n
1 − [1 + (−1) ]
an = x(1 − x) cos nπx dx =
1 −1 n2 π 2
2 1 + (−1)n+1
Z 1  
1
bn = x(1 − x) sin nπx dx =
1 −1 n3 π 3
The Fourier series for the function
f (x) = x(1 − x), 0 < x < 1
is given by

" n+1 
#
n

1 X − [1 + (−1) ] 2 1 + (−1)
x(1 − x) = + cos nπx + sin nπx
12 n=1 n2 π 2 n3 π 3

js, ddw de ii: Lecture Notes Page 102 of 249


3.6. FOURIER COSINE AND FOURIER SINE SERIES

Example 3.6.7 Compute the Fourier series for the given function

f (x) = e−x , 0 < x < π

In a similar fashion, we extend the function to a 2L-periodic function



0, −π < x < 0
f (x) = −x
e , 0<x<π

with Fourier coefficients


Z L
1
a0 = f (x) dx
L −L
1 π −x
Z
= 0+ e dx
π 0
1
= (−e−π + 1)
π
(eπ − 1) e−π
=
Z ππ
1
an = f (x) cos nx dx
π −L
1 π −x
Z
= 0+ e cos nx dx
π 0
 
1 (− exp(−π) cos(nπ) + n exp(−π) sin(nπ) + 1)
=
π (1 + n2 )
1 1 − (−1)n e(−π)
 
=
π (1 + n2 )
[−eπ + (−1)n ] e−π
= −
π (1 + n2 )
1 π −x
Z
bn = 0+ e sin nx dx
π 0
2 (n exp(−π) cos(nπ) + exp(−π) sin(nπ) − n)
= −
π (1 + n2 )
2 n − n(−1)n e(−π)
 
=
π (1 + n2 )
n [−eπ + (−1)n ] e−π
= −
π (1 + n2 )
The Fourier series for the function

f (x) = e−x , 0 < x < π

is given by
∞ 
[eπ − 1] e−π X [−eπ + (−1)n ] e−π n [−eπ + (−1)n ] e−π

f (x) = + − 2)
cos nx − 2)
sin nx
2π n=1
π (1 + n π (1 + n

Note 3.6.1 We could also extend by considering the functions either as even or odd and then
compute Fourier sine or Fourier cosine series, or by redefining the undefined half interval into
odd or even. All three techniques might give different results but all Fourier representations of
that function.

js, ddw de ii: Lecture Notes Page 103 of 249


CHAPTER 3. FOURIER SERIES & FOURIER TRANSFORMS

Example 3.6.8 Compute the Fourier sine series for the function

f (x) = x3 , 0 < x < L

2 L
Z

bn = f (x) sin x dx
L 0 L
2 L 3
Z

= x sin x dx
L 0 L
2 L4 [−6nπ cos(nπ) + 6 sin(nπ) + n3 π 3 cos(nπ) − 3n2 π 2 sin(nπ)]
= −
L (n4 π 4 )
2L3 [−6nπ(−1)n + n3 π 3 (−1)n ]
= −
(n4 π 4 )
∞ 
2L3 [−6nπ(−1)n + n3 π 3 (−1)n ]

X nπ
f (x) ≈ − sin x
n=1
(n4 π 4 ) L

Example 3.6.9 The Fourier sine series for f (x) = x2 , 0 < x < π

2 L
Z

bn = f (x) sin x dx
L 0 L
2 π 2
Z

= x sin x dx
π 0 π
Z π
2
= x2 sin nxdx
π 0
−2 
2 − 2 cos (π n) + n2 cos (π n) π 2 − 2 n sin (π n) π

= 3
πn
2 
−2 + 2 (−1)n + (−1)1+n n2 π 2

= 3
πn
∞  
X 2  n 1+n 2 2 
f (x) ≈ −2 + 2 (−1) + (−1) nπ sin nx
n=1
π n3

Example 3.6.10 The Fourier sine series

f (x) = sin x , 0 < x < π

2 L
Z

bn = f (x) sin x dx
L 0 L
2 π
Z

= sin x sin x dx
π 0 π
2 π
Z
= sin x sin nxdx
π 0
  
2 1 (sin((−1 + n)π) + sin((−1 + n)π)n + sin((1 + n)π) − sin((1 + n)π)n)
=
π 2 (−1 + n)(1 + n)
sin (π n)
= −2
π (−1 + n2 )
= 0
f (x) ≈ sin x

js, ddw de ii: Lecture Notes Page 104 of 249


3.6. FOURIER COSINE AND FOURIER SINE SERIES

Example 3.6.11 Compute the Fourier sine series for the function
f (x) = ex , 0 < x < L

2 L
Z

bn = f (x) sin x dx
L 0 L
2 L x
Z

= e sin x dx
L 0 L
2 L(eL nπ cos(nπ) − eL L sin(nπ) − nπ)
 
= −
L (L2 + n2 π 2 )
 L
e nπ(−1)n − nπ

= −2
(L2 + n2 π 2 )
The Fourier sine series is given by
∞   L
e nπ(−1)n − nπ
 
X nπ
f (x) ≈ −2 sin x
n=1
(L2 + n2 π 2 ) L
Example 3.6.12 Compute the Fourier sine series for the function
f (x) = x2 − Lx , 0 < x < L
Since a Fourier sine series, a0 = an = 0, we only need to compute for bn .
2 L
Z

bn = f (x) sin x dx
L 0 L
2 L 2
Z

= (x − Lx) sin x dx
L 0 L
2 L3 (nπ sin(nπ) + 2 cos(nπ) − 2)
 
=
L n3 π 3
n n
   
2 2(−1) − 2 2 (−1) − 1
= 2L = 4L
n3 π 3 n3 π 3
∞   n
 
2 (−1) − 1 nπ
X
f (x) ≈ 4L 3π3
sin x
n=1
n L
Example 3.6.13 Compute the Fourier cosine series for the function
f (x) = e−x , 0 < x < 1

2 L
Z Z 1
e−x dx = 2 −e−1 + 1

a0 = f (x) dx = 2
L 0 0
Z L
2 nπ
an = f (x) cos x dx
L 0 L
Z 1
= 2 e−x cos(nπx) dx
0 −1
−e cos(nπ) + e−1 sin(nπ)nπ + 1

= 2
(1 + n2 π 2 )
 −1
−e (−1)n + 1

= 2
(1 + n2 π 2 )
∞  
−e−1 (−1)n + 1
 
 −1  X
f (x) ≈ −e + 1 + 2 cos nπx
n=1
(1 + n2 π 2 )

js, ddw de ii: Lecture Notes Page 105 of 249


CHAPTER 3. FOURIER SERIES & FOURIER TRANSFORMS

Example 3.6.14 Compute the Fourier cosine series for the function

f (x) = cos x , 0 < x < L

2 L 2 L
Z Z
2 2 sin L
a0 = f (x) dx = cos x dx = sin(L) =
L 0 L 0 L L
Z L Z L
2 nπ 2 nπ
an = f (x) cos x dx = cos x cos x dx
L 0 L L 0 L
−L(−1)n sin L
   
2 L(−L sin L cos nπ + nπ cos L sin nπ)
= =2
L (−L + nπ)(L + nπ) (−L + nπ)(L + nπ)
∞   n
 
sin L X −L(−1) sin L
f (x) ≈ + 2 cos nx
L n=1
(−L + nπ)(L + nπ)

Example 3.6.15 The Fourier cosine series for f (x) = π − x , 0 < x < π

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

an = f (x) cos x dx = (π − x) cos(nx) dx = =
L 0 L π 0 π n2 π n2

π X 2 1 − (−1)n
   
f (x) ≈ + cos nx
2 n=1 π n2

Example 3.6.16 The Fourier cosine series for f (x) = 1 + x , 0 < x < π

2 L 2 π
Z Z  
2 1 2
a0 = f (x) dx = (1 + x) dx = π+ π =2+π
L 0 π 0 π 2
Z L Z π
2 nπ 2
an = f (x) cos x dx = (1 + x) cos(nx) dx
L 0 L π 0
2 (−1)n − 1
   
2 n sin(nπ) + cos(nπ) + nπ sin(nπ) − 1
= =
π n2 π n2

2 + π X 2 (−1)n − 1
   
f (x) ≈ + 2
cos nx
2 n=1
π n

Example 3.6.17 The Fourier cosine series for f (x) = x − x2 , 0 < x < 1

2 L
Z Z 1  
2 1
a0 = f (x) dx = 2 (x − x ) dx = 2
L 0 0 6
Z L Z 1
2 nπ
an = f (x) cos x dx = 2 (x − x2 ) cos(nπx) dx
L 0 L 0
 
−(nπ cos(nπ) − 2 sin(nπ) + nπ)
= 2
n3 π 3
nπ(−1)n + nπ
 
= −2
n3 π 3

nπ(−1)n + nπ
   
1 X
f (x) ≈ + −2 cos nπx
6 n=1 n3 π 3

js, ddw de ii: Lecture Notes Page 106 of 249


3.6. FOURIER COSINE AND FOURIER SINE SERIES

Example 3.6.18 Find the Fourier series of the periodic function f (t) defined by
(
1 0 ≤ t < T2
f (t) =
−1 T2 ≤ t < T
The coefficients are
an = a0 = 0
   
2 2
bn = [1 − cos(nπ)] = [1 − (−1)n ]
(nπ) nπ
Example 3.6.19 Compute the Fourier series for
f (x) = x, −π <x<π
Note that f is a 2π-periodic function. We compute each of the coefficients.
1.)
Z π  π
1 1 1
a0 = x dx = x =0
π −π π 2 −π
2.)
Z π  π
1 1 x 1
an = x cos(nx) dx = sin nx + 2 cos nx =0
π −π π n n −π

3.)
Z π  π
1 1 x 1
bn = x sin(nx) dx = − cos nx + 2 sin nx
π −π π n n −π
 
2 2 2
= − cos nπ = − (−1)n = (−1)n+1
n n n
The Fourier series is therefore given by

X (−1)n+1
f (x) = x ∼ 2 sin nx
n=1
n
Exercise 3.12 The Fourier cosine series for f (x) = x is
 
L 4L π 1 3π 1 5π
x = − 2 cos x + 2 cos x + 2 cos x + · · · , 0 ≤ x ≤ L (3.6.6)
2 π L 3 L 5 L
1.) Derive equation (3.6.6).
2.) By evaluating (3.6.6) at x = 0, evaluate
1 1 1 1 1
1 + 2 + 2 + 2 + 2 + 2 + ···
2 3 4 5 6
Example 3.6.20 Integrating equation (3.6.6) from 0 to x yields
x2 4L2
 
L π 1 3π 1 5π
= x − 3 sin x + 3 sin x + 3 sin x + · · · (3.6.7)
2 2 π L 3 L 5 L
using (3.6.7), evaluate
1 1 1
1− + − + ···
33 53 73
L
Let x = to have
2
1 1 1 π3
1− + − + · · · =
33 53 73 32

js, ddw de ii: Lecture Notes Page 107 of 249


CHAPTER 3. FOURIER SERIES & FOURIER TRANSFORMS

Exercise 3.13
π
1.) Set x = in the Fourier series for f (x) = x , − π ≤ x ≤ π to obtain the formula
2
π 1 1 1
= 1 − + − + ···
4 3 5 7
π
2.) Set x = in the series in part (1) above to obtain
4
π √
   
1 1 1 1 1 1
= 2 1 + − − + ··· − 1 − + − + ···
4 3 5 7 3 5 7

3.) Conclude from (2) that


π 1 1 1 1 1 1 1
√ =1+ − − + + − − + ···
2 2 3 5 7 9 11 13 15

Exercise 3.14 1.) Show that

π2 4 4
x2 = − 4 cos x + cos 2x − cos 3x + · · · = (−1)m 2 cos mx + · · ·
3 9 m
for −π ≤ x ≤ π

2.) Setting x = 0 in part (1) above, find the sum



1 1 1 X 1
1− + − + ··· = (−1)m+1 2
4 9 16 m=1
m

3.) What is

X 1
m=1
m2
Hint: set x = π in part (1) above.

4.) What is

X 1
m=odd
m2
Hint: add (2) and (3)

Note 3.6.2 In Example 3.14, the function f (x) has been given implicitly by f (x) = x2 .

Exercise 3.15 Find the Fourier series for the function



π
−1, if − π ≤ x ≤ − 2 ,

f (x) = 0, if − π2 < x ≤ π2 ,

1, if π2 < x ≤ π,


2X1 nπ 
defined on the interval [−π, π] . f (x) = cos − cos nπ sin nx.
π n=1 n 2

js, ddw de ii: Lecture Notes Page 108 of 249


3.6. FOURIER COSINE AND FOURIER SINE SERIES

Example 3.6.21 Compute the Fourier series for



1, −2 < x < 0
f (x) =
x, 0 < x < 2
This time the period is 2 and we compute
1.)
Z2
1
a0 = f (x) dx
2
−2
Z0 Z2
1 1
= dx + x dx
2 2
−2 0
= 2

2.)
Z2
1  nπ 
an = f (x) cos x dx
2 2
−2
Z0 Z2
1  nπ  1  nπ 
= cos x dx + x cos x dx
2 2 2 2
−2 0
1 h  nπ i0 1 h  nπ i2 2 h  nπ i2
= sin x + x sin x + cos x
nπ 2 −2 nπ 2 0 (nπ)2 2 0
2 h  nπ i 2
= 0+0+ 2
cos x
(nπ) 2 0
2
= 2
[(−1)n − 1]
(nπ)

3.)
Z2
1  nπ 
bn = f (x) sin x dx
2 2
−2
Z0 Z2
1  nπ  1  nπ 
= sin x dx + x sin x dx
2 2 2 2
−2 0
1 h  nπ i0 1 h  nπ i2 2 h  nπ i2
= − cos x − x cos x + sin x
nπ 2 −2 nπ 2 0 (nπ)2 2 0
1 1
= − [1 − (−1)n ] − [2(−1)n ] + 0
nπ nπ
1
= − [(−1)n + 1]

To have the the Fourier series of f (x) as



X 2 n
 nπ  1 n
 nπ 
f (x) ∼ 1 + [(−1) − 1] cos x − [(−1) + 1] sin x
n=1
(nπ)2 2 nπ 2

js, ddw de ii: Lecture Notes Page 109 of 249


CHAPTER 3. FOURIER SERIES & FOURIER TRANSFORMS

Example 3.6.22 Compute the Fourier series for the function


(
0, −π < x < 0
f (x) =
sin x, 0 ≤ x < π

and deduce
π 1 1 1 1 1
= + − + − + ···
4 2 1.3 3.5 5.7 7.9
Remark 3.6.2 Every function, we can get its full range Fourier series and its Half range
(Fourier cosine and Fourier sine series - regardless whether even or odd function)

1) Full range - Fourier series

2 1 + cos (π n) 1 + (−1)n sin (π n)


a0 = , a n = − 2
=− 2
, and bn = − =0
π π (−1 + n ) π (−1 + n ) π (−1 + n2 )

whose Fourier series is



1 X 1 + (−1)n
sin x = + − 2)
cos nx
π n=2
π (−1 + n
n even

Note that, x ∈ 0 ≤ x < π since considered the piece f (x) = sin x and not the piece
f (x) = 0. Also n starts at n = 2, since for n = 0 already covered in a0 and n 6= 1 not
to have denominator equal to zero. Considering odd n values, the term gets to zeros. Lets
choose x = π2 ,

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

1 X 1 + (−1)n
sin x = + − cos nx
π n=2
π (−1 + n2 )
n even
1 2 2 2 2
1 = + − + − + ···
π 3π 15π 35π 63π
π 1 1 1 1 1
= + − + − + ···
2 2 3 15 35 63
π 1 1 1 1 1
= + − + − + ··· (3.6.8)
2 2 1.3 3.5 5.7 7.9

2) Half Range - Fourier sine series. Consider f (x) = sin x, 0 ≤ x < π


∞ h
X nπ i
f (x) ≈ bn sin x
n=1
L

with
a0 = 0, an = 0, bn = 0
Thus no Fourier sine series.

js, ddw de ii: Lecture Notes Page 110 of 249


3.6. FOURIER COSINE AND FOURIER SINE SERIES

3) Half Range - Fourier cosine series. Consider f (x) = sin x, 0 ≤ x < π



a0 X h nπ i
f (x) ≈ + an cos x
2 n=1
L

with
4 1 + cos (π n) [1 − (−1)n ]
a0 = , an = −2 = −2 , bn = 0
π π (−1 + n2 ) π(−1 + n2 )


2 X [1 − (−1)n ]
sin x = + −2 cos nx
π n=2
π(−1 + n2 )
n odd
π
At x =
2
2 4 4 4 4
1 = + − + − + ···
π 3π 15π 35π 63π
π 1 1 1 1 1
= + − + − + ··· (3.6.9)
4 2 1.3 3.5 5.7 7.9

Different range generate a different series as (3.6.8) not equal to (3.6.9) both representing
Fourier series for the same function at the same value of x = π2 .
(
0, −π < x < 0
Exercise 3.16 For f (x) = 2
x , 0≤x<π
deduce
π2 1 1 1
= 1 + 2 + 2 + 2 + ...
6 2 3 4
and
π2 1 1 1
= 1 − 2 + 2 − 2 + ...
12 2 3 4

1) Full range - Fourier series

1 2
a0 = π ,
3
(−1)n
an = 2
n2
2 − 2 (−1)n + (−1)n n2 π 2
bn = −
π n3
whose Fourier series is
∞ 
1 2 X (−1)n 2 − 2 (−1)n + (−1)n n2 π 2
  
2
x = π + 2 cos nx − sin nx
6 n=1
n2 π n3
At x = 0
1 2 2 2 2 2 2
0 = π − 2 + 2 − 2 + 2 − 2 + ···
6 1 2 3 4 5
1 2 2 2 2 2 2
π = 2 − 2 + 2 − 2 + 2 + ···
6 1 2 3 4 5
1 2 1 1 1 1 1
π = 2 − 2 + 2 − 2 + 2 + ··· (3.6.10)
12 1 2 3 4 5
js, ddw de ii: Lecture Notes Page 111 of 249
CHAPTER 3. FOURIER SERIES & FOURIER TRANSFORMS

∞ h
X nπ i
2) Half Range - Fourier sine series f (x) ≈ bn sin x . Consider f (x) = x2 , 0 ≤ x < π
n=1
L
with
2 −2 + 2 (−1)n + (−1)1+n n2 π 2
 
a0 = 0, an = 0, bn =
π n3
Therefore the Fourier sine series is given by

"  #
2 −2 + 2 (−1)n + (−1)1+n n2 π 2

X
2
x ≈ sin nx
n=1
π n3
for the value of x = 0 considered in full range, the series becomes trivial, 0 = 0.

a0 X h nπ i
3) Half Range - Fourier cosine series f (x) ≈ + an cos x , f (x) = x2 , 0 ≤ x < π
2 n=1
L
with
2 2 (−1)n
a0 = π , a n = 4 , bn = 0
3 n2
The Fourier cosine series

1 2 X (−1)n
x2 = π + 4 2
cos nx
3 n=1
n
At x = 0
1 2 1 1 1 1 1
π = 2 − 2 + 2 − 2 + 2 + ··· (3.6.11)
12 1 2 3 4 5
At x = π
1 2 1 1 1 1 1
π = 2 + 2 + 2 + 2 + 2 + ··· (3.6.12)
6 1 2 3 4 5
For this particular example, (3.6.10) is same as (3.6.11). However, with a different value of x,
within half range, we get required (3.6.12).
π
Remark 3.6.3 If considered x = − , then we consider f (x) = 0, the corresponding piece of
2
f (x).
Exercise 3.17 Consider the function f (x) with period 4 and given on the interval [−2, 2] by

 x, −1 ≤ x ≤ 1
f (x) = 1, 1 ≤ x < 2
−1, −2 < x ≤ −1

∞  
X 2 nπ 4 nπ nπ
1.) Show that the Fourier series of f is − cos + 2 2 sin sin x
n=1
nπ 2 n π 2 2

2.) Can you use the Fourier series of f to deduce the Fourier series of f 0 ? Explain.
Since the the function f is not continuous throughout R, then its Fourier series cannot be
differentiated termwise to obtain the Fourier series of f 0 .
Z x
3.) Deduce the Fourier series of the antiderivative F (x) = f (t)dt.
0
∞  Z x
X 2 nπ 4 nπ nπ
F (x) = − cos + 2 2 sin tdt sin
n=1
nπ 2 nπ 0 2 2
∞   h
X 2 nπ 4 nπ −2 nπ i
= − cos + 2 2 sin cos x−1
n=1
nπ 2 nπ 2 nπ 2

js, ddw de ii: Lecture Notes Page 112 of 249


3.6. FOURIER COSINE AND FOURIER SINE SERIES

Exercise 3.18 Find the Fourier series of each of the following functions
1.) f (x) = 1 − x2 , −1<x<1  
2 4 1 1
f (x) = + 2 cos πx − cos 2πx + cos 3πx − · · ·
3 π 4 9
2.) g(x) = |x|, −π <x<π  
π 4 1 1
g(x) = − cos x + cos 3x + cos 5x + · · ·
2 π 9 25

0, −2 < x < 0
3.) h(x) =
1, 0 ≤ x < 2.        
1 2 π 1 3π 1 5π
h(x) = + sin x + sin x + sin x + ···
2 π 2 3 2 5 2
x2
Exercise 3.19 Find the Fourier series for f (x) = , − π < x < π.
4
1 2 (−1)n
a0 = π , a n = , bn = 0
6 n2
To have ∞
x2 π 2 X (−1)n
= + cos nx
4 12 n=1 n2
or
x2 π2 1 1 1 1
= − 2 cos x + 2 cos 2x − 2 cos 3x + 2 cos 4x − · · ·
4 12 1 2 3 4
Hence deduce that
π2 1 1 1 1
1.) = 1 + 2 + 2 + 2 + 2 + ···
6 2 3 4 5
π2 π2 1 1 1
Set x = π; = + 1 + 2 + 2 + 2 + ···
4 12 2 3 4
π2 1 1 1 1
2.) = 1 − 2 + 2 − 2 + 2 − ···
12 2 3 4 5
π2 1 1 1 1
Set x = 0; 0 = − 1 + 2 − 2 + 2 − 2 ···
12 2 3 4 5
π2 1 1 1 1
3.) = 1 + 2 + 2 + 2 + 2 + ···
8 3 5 7 9
1.) + 2.) gives
π2 π2
 
1 1 1
+ = 2 1 + 2 + 2 + 2 + ···
6 12 3 5 7
2
 
π 1 1 1
= 2 1 + 2 + 2 + 2 + ···
4 3 5 7
2
π 1 1 1
= 1 + 2 + 2 + 2 + ···
8 3 5 7
Exercise 3.20 Find the Fourier cosine series and the Fourier sine series for the function

1, 0 < x < 1
f (x) =
0, 1 ≤ x < 2.
Exercise 3.21 Find the Fourier cosine series for the function f (x) = sin x, 0 < x < π. What
is the Fourier sine series for f ? The Fourier sine series is simply f (x) = sin x

js, ddw de ii: Lecture Notes Page 113 of 249


CHAPTER 3. FOURIER SERIES & FOURIER TRANSFORMS


X 4 π
Example 3.6.23 In the expansion 1 = sin nx, valid for 0 < x < π, put x = to
n=2
nπ 4
n odd
calculate the sum
   
1 1 1 1 1 1 1 1 1 1
1− + − + ··· + − + + ··· = 1 + − − + + ···
5 9 13 3 7 11 3 5 7 9

Hint: Since each of the series converges, then can be combined as indicated. However, they
cannot be arbitrarily rearranged because they are only conditionally, not absolutely, convergent.

0, −π ≤ x ≤ 0
1) Full range - Fourier series for f (x) = 1, in interval 0 ≤ x ≤ π, that is f (x) =
1, 0 ≤ x ≤ π

a0 = 1,
an = 0
−1 + (−1)n

0, n even
bn = − = 2
πn nπ
, n odd

whose Fourier series is



1 X 2
1 = + sin nx
2 n=1

n odd

1 X 2
= sin nx (3.6.13)
2 n=1

n odd
At x = 0

2) Half Range - Fourier sine series. Consider f (x) = 1, 0 ≤ x < π


∞ h
X nπ i
f (x) ≈ bn sin x
n=1
L

with
a0 = 0, an = 0
and
1 + (−1)1+n

0, n even
bn = 2 = 4
πn nπ
, n odd
Therefore the Fourier sine series is given by

X 4
1 ≈ sin nx (3.6.14)
n=1

n odd

Notice that (3.6.13) is same as (3.6.14).

3) Half Range - Fourier cosine series. Consider f (x) = 1, 0 ≤ x < π with

a0 = 2, an = 0, and bn = 0

The Fourier cosine series equation become trivial with 1 = 1. This is meaningless.

js, ddw de ii: Lecture Notes Page 114 of 249


3.6. FOURIER COSINE AND FOURIER SINE SERIES

Applying any of (3.6.13) or (3.6.14), since are same (if different, you choose one that helps you
π
generate the needed series) at x =
4

X 4
1 = sin nx
n=1

n odd
 
4 π 1 3π 1 5π 1 7π
= sin + sin + sin + sin + ···
π 4 3 4 5 4 7 4
"√ √ ! √ ! √ ! #
4 2 1 2 1 2 1 2
= + + − + − + ···
π 2 3 2 5 2 7 2
√ ! 
4 2 1 1 1
= 1 + − − + ···
π 2 3 5 7
√  
2 2 1 1 1
= 1 + − − + ···
π 3 5 7
 
4 1 1 1
= √ 1 + − − + ···
π 2 3 5 7

Hence the value


    √
1 1 1 1 1 1 1 1 1 1 π 2
1 + − − + + ··· = 1− + − + ··· + − + + ··· =
3 5 7 9 5 9 13 3 7 11 4

Exercise 3.22 Let φ(x) = x2 for 0 ≤ x ≤ 1.

1.) Calculate its Fourier sine series

2.) Calculate its Fourier cosine series.

Exercise 3.23 Given the Fourier sine series of φ(x) = x on (0, l). Assume the series can be
integrated term by term (a fact that can be shown).
x2
1.) Find the Fourier cosine series of the function . Find the constant of integration that will
2
a0 l2
be the first term in the cosine series. c= =
2 6
2.) Then by setting x = 0 in your result, find the sum of the series

X (−1)n+1
n=1
n


X (−1)n+1 π2
=
n=1
n 12

Example 3.6.24 Without any computation, prediction which of the Fourier coefficients of
| sin x| on the interval (−π, π) must vanish.

Since sin x is odd it follows that | sin x| defines an even function. By Fourier results, we note
that the full Fourier series on (−π, π) has only cosine terms. That is, all of the sine coefficients
must necessarily vanish.

js, ddw de ii: Lecture Notes Page 115 of 249


CHAPTER 3. FOURIER SERIES & FOURIER TRANSFORMS

Exercise 3.24 Find the Fourier series of the 2π-periodic function f (x) whose expression over

2 π2 X (−1)n
the interval [−π, π] is f (x) = x . +4 cos nx
3 n=1
n2

Exercise 3.25 Using the Fourier series for f (x) = x2 on −π ≤ x ≤ π, at x = 0 show that
∞ ∞
X 1 π2 X 1 π4
1.) = − 2.) =
n=1
n2 12 n=1
n4 90

3.6.3 Parseval’s identity and Fourier Series


The other theorem which comes in handy is Parseval’s identity: with the same definitions as
in Fourier series for a 2L periodicity only.

For a Fourier series ∞


a0 X h nπ nπ i
f (x) = + an cos x + bn sin x
2 n=1
L L
applying Parseval’s identity, we get
L ∞
a2 X  2
Z
1 2
|f (x)| dx = 0 + an + b2n

(3.6.15)
L −L 2 n=1

Example 3.6.25 For Exercise 3.25 part 2.) a 2π periodic(that is L = π) function,



" #
2 2
1 π 2 2 [2π 2 /3] 4(−1)n
Z X
x dx = + 2
+ (0)2
π −π 2 n=1
n
Z π 2 2 ∞
1 4 [2π /3] X 16
x dx = +
π −π 2 n=1
n4

Evaluating the integral and rearranging gives



X 1 π4
= .
n=1
n4 90

Exercise 3.26 The Fourier series of the 2π-periodic function f (x) given on the interval [−π, π]
by f (x) = x3 − π 2 x is given by

X (−1)n sin nx

n=1
n3
Use the Parseval Identity to evaluate

X 1
n=1
n6

X 1 4π 4
=
n=1
n6 945

js, ddw de ii: Lecture Notes Page 116 of 249


CHAPTER 3. FOURIER SERIES & FOURIER TRANSFORMS

3.8 Differentiation and Integration of Fourier Series


Theorem 3.8.1 Let f (x)be continuous on (−∞, ∞) and 2L-periodic. Let f 0 (x) and f 00 (x) be
piecewise continuous on [−L, L]. Then the Fourier series of f 0 (x) can be obtained from that of
f through termwise differentiation.

Theorem 3.8.2 Let f (x) be piecewise continuous on [−L, L] . Then we can integrate its
Fourier series termwise.

Remark 3.8.1 For f with appropriate continuity/ smoothness, we can differentiate and in-
tegrate term by term.

3.8.1 Differentiation of Fourier Series


Let f (x) be a 2π-periodic piecewise continuous function defined on the closed interval [−π, π].
As we know, the Fourier series expansion of such a function exists and is given by

a0 X
f (x) = + (an cos nx + bn sin nx).
2 n=1

If the derivative f 0 (x) of this function is also piecewise continuous and the function f (x) satisfies
the periodicity conditions

f (−π) = f (π) , f 0 (−π) = f 0 (π) ,

then the Fourier series expansion of the derivative f 0 (x) is expressed by the formula

X
f 0 (x) = (nbn cos nx − nan sin nx).
n=1

Exercise 3.33 Let ∞


1 X 1
f (x) = + cos(nx)
2 n=1 n3

1.) Find the derivative.

2.) Is the derivative periodic?

js, ddw de ii: Lecture Notes Page 128 of 249


3.8. DIFFERENTIATION AND INTEGRATION OF FOURIER SERIES

3.8.2 Integration of Fourier Series


Let g(x) be a 2π-periodic piecewise continuous function on the interval [−π, π]. Then this
function can be integrated term by term on this interval.

The Fourier series for g(x) is given by



a0 X
g (x) = + (an cos nx + bn sin nx).
2 n=1

Consider the function


Zx ∞
A0 X
G (x) = g (t) dt ∼ + (An cos nx + Bn sin nx),
2 n=1
0

Where
bn an
An = − , Bn = .
n n
By setting x = 0, we see that
∞ ∞ ∞
A0 X A 0 X bn A0 X bn
G (0) = 0 = + An = − or = .
2 n=1
2 n=1
n 2 n=1
n

Hence, the Fourier series expansion of the function G(x) is defined by


Zx Zx ∞ Z x
a0 X
G (x) = g (t) dt = dx + (an cos nx + bn sin nx) dx
2 n=1
0 0 0

a0 x an sin nx + bn (1 − cos nx)
X
= + ,
2 n=1
n

where the series on the right-hand side is obtained by the formal term-by-term integration of
the Fourier series for g(x).

Because of the presence of the term depending on x on the right-hand side, this is not clearly
a Fourier series expansion of the integral of g(x). The result can be rearranged to be a Fourier
series expansion of the function
Zx
a0 x
Φ (x) = g (t) dt − .
2
0

The Fourier series of the function Φ(x) is given by the expression


Zx ∞
a0 x A0 X
Φ (x) = g (t) dt − = + (An cos nx + Bn sin nx),
2 2 n=1
0

where the Fourier coefficients are defined by the relationships:



A 0 X bn bn an
= , An = − , Bn = .
2 n=1
n n n

js, ddw de ii: Lecture Notes Page 129 of 249


CHAPTER 3. FOURIER SERIES & FOURIER TRANSFORMS

Example 3.8.1 Find the Fourier series of the sign function


(
−1, −π ≤ x ≤ 0
f (x) = sign x = ,
1, 0<x≤π
knowing that the Fourier series expansion of the function F (x) = |x| on the interval [−π, π] is
given by

π 4 X cos (2n + 1) x
F (x) = |x| = − .
2 π n=0 (2n + 1)2
Since f (x) = F 0 (x) for all x 6= 0, we obtain
" ∞
#
d π 4 X cos (2n + 1) x
f (x) = −
dx 2 π n=0 (2n + 1)2
or ∞
4 X sin (2n + 1) x
f (x) = .
π n=0 2n + 1
Example 3.8.2 Find the Fourier series expansion of the function f (x) = x2 knowing that

X (−1)n+1
x=2 sin nx for − π ≤ x ≤ π.
n=1
n

Since the function f (x) is piecewise continuous on the interval [−π, π] ,, we may integrate its
Fourier series term by term to obtain
Zx ∞ Z x
X (−1)n+1
tdt = 2 sin nt dt.
n=1
n
−π −π

Hence,
∞  x 
x2 π 2

X cos nt
− = 2 (−1)n+1 − 2 ,
2 2 n=1
n
−π
X (−1)n ∞
x2 π 2
⇒ − = 2 2
[cos nx − cos (−πn)],
2 2 n=1
n
∞ ∞
x2 π 2 X (−1)n X (−1)n (−1)n
⇒ − = 2 cos nx − 2 ,
2 2 n=1
n2 n=1
n2
∞ ∞
x2 π 2 X (−1)n X 1
⇒ − = 2 2
cos nx − 2 2
.
2 2 n=1
n n=1
n

We know from Bessel’s Inequality and Parseval’s Theorem that



X 1 π2
ζ (2) = 2
= .
n=1
n 6

Then we get

2 2
X (−1)n 2π 2
x −π =4 cos nx −
n=1
n2 3
or ∞
2 π2 X (−1)n
x = +4 cos nx.
3 n=1
n2

js, ddw de ii: Lecture Notes Page 130 of 249


3.8. DIFFERENTIATION AND INTEGRATION OF FOURIER SERIES

Example 3.8.3 Find the Fourier series of the function f (x) = x3 knowing that

π2 X (−1)n
x2 = +4 2
cos nx for − π ≤ x ≤ π.
3 n=1
n

Integrating this series term by term, we have


Zx Zx ∞ x
π2
Z
2
X n cos nt
t dt = dt + 4 (−1) dt,
3 n=1
n2
−π −π −π
 3  x  2  x ∞   x 
t π X n sin nt
⇒ = t +4 (−1) 3
,
3 −π 3 −π n=1
n
−π
3 3 2 ∞  
x π π X n sin nx sin (−nπ)
⇒ + = (x + π) + 4 (−1) 3
− 3
,
3 3 3 n=1
n n

x3 π 3 π 2 x π 3 X sin nx
⇒ +  = +  +4 (−1)n 3 ,
3 3 3 3 n=1
n

X (−1)n
⇒ x3 = π 2 x + 12 sin nx.
n=1
n3

Substitute the Fourier series expansion for x, that is



X (−1)n
x=2 sin nx.
n=1
n

Then the complete answer is


∞ ∞ ∞
(−1)n+1 (−1)n 12 2π 2
X X X  
3 2 n
x = 2π sin nx + 12 sin nx = (−1) − sin nx.
n=1
n n=1
n3 n=1
n3 n

Example 3.8.4 Investigate the process of differentiating term by term the Fourier series
expansion of the function f (x) = x defined on the interval [−π, π] .

Write the Fourier series expansion for the linear function:



X sin nx
x=2 (−1)n+1 .
n=1
n

By formal differentiation, we find that



X
1∼2 (−1)n+1 cos nx = 2 (cos x − cos 2x + cos 3x − . . .) .
n=1

We obtain a contradiction since the Fourier series for 1 should consist just of a single constant
term. To explain this paradox, we introduce the Dirac delta function or the unit impulse
function δ (x). The so-called “weak” definition of δ (x) implies that
(
0, x 6= 0
δ (x) =
∞, x = 0

js, ddw de ii: Lecture Notes Page 131 of 249


CHAPTER 3. FOURIER SERIES & FOURIER TRANSFORMS

assuming that the total area under the graph of the function is 1:
Z∞
δ (x) dx = 1.
−∞

The delta function can also be defined by the limit as n → ∞ in the following way:
1 sin n + 12 x

δ (x) = lim .
n→∞ 2π sin x2
The Fourier series of the delta function is given by

1 1X 1 1
δ (x) = + cos nx = + [cos x + cos 2x + cos 3x + · · · ] .
2π π n=1 2π π

This series has only cosines since the delta function is even.

Now we consider the periodic extension f1 (x) of the original function f (x). This function has
jump discontinuities at the points x = (2m + 1) π, m = 0, ±1, ±2, . . . The derivative f10 (x) of
the periodic extension has an additional delta function concentrated at each jump discontinuity,
so that ∞
X
0
f1 (x) = 1 − 2π δ [x − (2m + 1) π] = 1 − 2π δ̄ (x − π) ,
m=−∞

where δ̄ (x − π) denotes the 2π-periodic extension of the delta function.

It is seen from here that



1 1X
δ [x − (2m + 1) π] = + cos n [x − (2m + 1) π]
2π π n=1
1 1
= + [cos (x − (2m + 1) π) + cos 2 (x − (2m + 1) π) + . . .]
2π π
1 1
= + [− cos x + cos 2x − cos 3x + cos 4x − . . .]
2π π

1 1X
= − (−1)n+1 cos nx.
2π π n=1

Hence, the Fourier series expansion of the derivative f10 (x) is given by

X
0
f1 (x) = 1 − 2π δ̄ (x − π) = 2 (−1)n+1 cos nx ∼ 1.
n=1

Thus, the function f1 0 (x) = 1 − 2π δ̄ (x − π) is the Fourier series expansion for the constant
term 1.
Exercise 3.34 Calculate the Fourier series for the saw-tooth function you get as the periodic
extension of f (x) := 1 − |x| from the basic interval [−1, 1]. Differentiate the series term by term
and compare with the Fourier series for the derivative of f (x). Notice that the Fourier series is
not bothered by the corners in the function at −1, 0, and 1.
Exercise 3.35 Calculate the Fourier series for the saw-tooth function you get as the periodic
extension of f (x) := x from the basic interval [−1, 1]. Differentiate the series term by term and
compare with the Fourier series for the derivative of f (x). Explain any discrepancies you find.

js, ddw de ii: Lecture Notes Page 132 of 249


3.8. DIFFERENTIATION AND INTEGRATION OF FOURIER SERIES

Exercise 3.36 Calculate the second derivatives of the Fourier series of Exercise 3.34 and
Exercise 3.35. Does the resulting series converge? If so, to what?
Example 3.8.5
1.) Compute the Fourier series for the function
f (x) = x − x3
defined for −1 < x < 1.
a0 = 0
an = 0
[12(−1)n+1 ]
bn =
(nπ)3
Thus ∞
3
X [12(−1)n+1 ]
x−x = sin nπx
n=1
(nπ)3

2.) Differentiate the terms in the Fourier series for this function , and compare with 1 − 3x2 .

From

3
X [12(−1)n+1 ]
x−x = sin nπx
n=1
(nπ)3

Differentiating both sides



2
X [12(−1)n+1 ]
1 − 3x = cos nπx
n=1
(nπ)2

Computing the Fourier series for f (x) = 1 − 3x2 gives


−12 n [12(−1)n+1 ]
a0 = 0, an = (−1) = , bn = 0
(nπ)2 (nπ)2
To have

2
X [12(−1)n+1 ]
1 − 3x = cos nπx
n=1
(nπ)2

as expected.
3.) Integrating the series for x − x3 term by term, we find that

x2 x4 X [12(−1)n ]
− = cos nπx
2 4 n=1
(nπ)4

What does this show about the constant of integration?


Exercise 3.37 Find the Fourier series for the square 2π-periodic wave defined on the interval
[−π, π] : (
0, if − π ≤ x ≤ 0
f (x) = .
1, if 0 < x ≤ π
1 − (−1)n
a0 = 1, an = 0, bn = .
πn

js, ddw de ii: Lecture Notes Page 133 of 249


CHAPTER 3. FOURIER SERIES & FOURIER TRANSFORMS

Example 3.8.6 Find the Fourier series for the triangle wave
(
π
+ x, if − π ≤ x ≤ 0
f (x) = π2 ,
2
− x, if 0 < x ≤ π
The constants are given by
1.)
 
Zπ Z0  Zπ 
1 1 π  π 
a0 = f (x) dx = +x dx + −x dx
π π 2 2
−π −π 0
"  0  #
2 2 π

1 π x π x
= x+ + x−
π 2 2 −π 2 2 0
" !  #
π 2 (−π)2 π 2 π 2

1
= 0− −  + +  −  − 0 = 0.
π 2 2 2 2

2.)
 0 
Zπ Z  Zπ 
1 1 π  π 
an = f (x) cos nxdx =  + x cos nxdx + − x cos nxdx
π π 2 2
−π −π 0
 0 0 π

Z Z Z Zπ
1 π π
= cos nxdx + x cos nxdx + cos nxdx − x cos nxdx .
π 2 2
−π −π 0 0

Integrating by parts, we can write


Z Z
x sin nx x sin nx x sin nx cos nx
x cos nxdx = − dx = + .
n n n n2
Then
"   0   0   π   π 
1 π sin nx x sin nx cos nx π sin nx x sin nx cos nx
an =
π 2 n + n
+
n2 + 2 n − n
+
n2 .
−π −π 0 0

The values of sin nx at x = 0 or x = ±π are zero. Therefore,


1  0 π
an = (cos nx)|−π − (cos nx)|0
πn2
1
= [cos 0 − cos (−πn) − cos πn + cos 0]
πn2
2
= [1 − cos πn]
πn2
2
= [1 − (−1)n ] .
πn2
4
When n = 2k, then a2k = 0. When n = 2k + 1,, then a2k+1 = πn2
, k = 0, 1, 2, 3, . . .
3.) Since the function f (x) is even, the Fourier coefficients bn are zero. Therefore, the complete
Fourier expansion for the triangle wave is

4 X cos (2k + 1) x
f (x) = .
π k=0 (2k + 1)2

js, ddw de ii: Lecture Notes Page 134 of 249


3.9. APPLICATIONS OF FOURIER SERIES TO DIFFERENTIAL
EQUATIONS

3.9 Applications of Fourier Series to Differential Equa-


tions
Fourier theory was initially invented to solve certain differential equations. Therefore, it is of no
surprise that Fourier series are widely used for seeking solutions to various ordinary differential
equations (ODEs) and partial differential equations (PDEs).

In this section, we consider applications of Fourier series to the solution of ODEs.

3.9.1 Fourier Series to Solve ODEs


Example 3.9.1 Find the Fourier series solution to the differential equation

y 00 + 2y = 3x

with the boundary conditions y (0) = y (1) = 0.

We will use the Fourier sine series for representation of the nonhomogeneous solution to satisfy
the boundary conditions. We can write the right side of the equation as the series

6 X (−1)n+1
3x = sin nπx.
π n=1 n

We assume a solution ∞
X
y (x) = bn sin nπx.
n=1

Substituting this into the differential equation, we get


∞ ∞ ∞
X
2 2
 X 6 X (−1)n+1
−n π bn sin nπx + 2 bn sin nπx = sin nπx.
n=1 n=1
π n=1 n

Since the coefficients of each sine mode must be equal to each other, we obtain the algebraic
equation
2 2
 6(−1)n+1 6(−1)n+1
2 − n π bn = or bn = .
nπ nπ (2 − n2 π 2 )
Hence, the solution of the given differential equation is described by the series

6 X (−1)n+1
y (x) = sin nπx.
π n=1 n (2 − n2 π 2 )

js, ddw de ii: Lecture Notes Page 135 of 249


CHAPTER 3. FOURIER SERIES & FOURIER TRANSFORMS

Example 3.9.2 (Periodically forced oscillation) Solve the ODE,


x00 (t) + 2x(t) = F (t) (3.9.1)
where F (t) is a step function

0, −1 < t < 0,
F (t) = (3.9.2)
1, 0 < t < 1.
We set

c0 X  nπ   nπ 
F (t) = + cn cos t + dn sin t (3.9.3)
2 n=1
L L
Then we write a proposed steady periodic solution x(t) as

a0 X
x(t) = + an cos (nπt) + bn sin (nπt) (3.9.4)
2 n=1

Using (3.9.2) and (3.9.3), to get coefficients


1 1 1 1
Z Z
c0 = F (t) dt = dt = 1
1 −1 1 0
1 1 1 1
Z Z
cn = F (t) cos(nπt) dt = cos(nπt) dt = 0
1 −1 1 0
1 1 1 1
Z Z
dn = F (t) sin(nπt) dt = sin(nπt) dt
1 −1 1 0
1 − (−1)n
 2

, if n odd;
= =
nπ 0, if n even.
such that

1 X 2
F (t) = + sin (nπt) (3.9.5)
2 n=1

n odd

Substitute the solution x(t), equation (3.9.4), into the ordinary differential equation (3.9.1)

X
00
2 − (nπ)2 an cos (nπt) + 2 − (nπ)2 bn sin (nπt)
   
x + 2x = a0 +
n=1
= F (t)

1 X 2
= + sin (nπt)
2 n=1

n odd

and equate coefficients to give


1
a0 =
2
an = 0
bn = 0, n even
2
bn = , n odd
nπ (2 − n2 π 2 )
The steady periodic solution has the Fourier series

1 X 2
x(t) = + sin (nπt)
4 n=1
nπ (2 − n2 π 2 )
n odd

js, ddw de ii: Lecture Notes Page 136 of 249


3.9. APPLICATIONS OF FOURIER SERIES TO DIFFERENTIAL
EQUATIONS

Example 3.9.3 (Resonance) Find the steady periodic solution to the equation
2x00 + 18π 2 x = F (t),
where

−1, −1 < t < 0,
F (t) =
1, 0 < t < 1.
extended periodically. We note that We set

c0 X
F (t) = + cn cos (nπt) + dn sin (nπt)
2 n=1

Then we write a proposed steady periodic solution x(t) as



a0 X
x(t) = + an cos (nπt) + bn sin (nπt)
2 n=1

The coefficients for F (t) are given by


c0 = 0
cn = 0
cos (π n) − 1
dn = −2
πn
1+n  4
(−1) +1 nπ
, if n odd;
= 2 =
πn 0, if n even.
such that

X 4
F (t) = sin (nπt)
n=1

n odd

Substitute the solution x(t), equation into the ordinary differential equation

X
00 2
18π 2 − 2(nπ)2 an cos (nπt) + 18π 2 − 2(nπ)2 bn sin (nπt)
   
2x + 18π x = a0 +
n=1

X 4
= F (t) = sin (nπt)
n=1

n odd

and equate coefficients to give a0 = 0, an = 0


bn = 0, n even
2
bn = , n odd, n 6= 3
nπ [9π − (nπ)2 ]
2

The steady periodic solution would have the Fourier series



X 2
x(t) = sin (nπt)
n=1
nπ [9 − n2 ]
3
n odd
n6=3

Thus (with n = 3 inclusive. In order not to have a duplication when n = 3, we pull out that
term and multiply by t.)

1 X 2
x(t) = − t cos(3πt) + sin (nπt)
9π 2 n=1
nπ 3 [9 − n2 ]
n odd
n6=3

js, ddw de ii: Lecture Notes Page 137 of 249


CHAPTER 3. FOURIER SERIES & FOURIER TRANSFORMS

Exercise 3.38 Let



1 X 1
F (t) = + cos (nπt)
2 n=1 n2

Find the steady periodic solution to the ordinary differential equation

x00 + 2x = F (t).

Express your solution as a Fourier series.


Exercise 3.39 Let

X 1
F (x) = 3
sin (nπx)
n=1
n

Find the steady periodic solution to

y 00 + y 0 + y = F (x).

Express your solution as a Fourier series.


Exercise 3.40 Let

X 1
F (t) = cos (nπt)
n=1
n2

Find the steady periodic solution to

x00 + 4x = F (t).

Express your solution as a Fourier series.


Exercise 3.41 Let F (x) = x for −1 < x < 1 and extended periodically. Find the steady
periodic solution to the ordinary differential equation

y 00 + y = F (x).

Express your solution as a series.


Exercise 3.42 Let F (x) = x for −1 < x < 1 and extended periodically. Find the steady
periodic solution to
y 00 + π 2 y = F (x).
Express your solution as a series.
Exercise 3.43 Let F (x) = sin(2πx) + 0.1 cos(10πx). Find the steady periodic solution to

y 00 + 2y = F (x).

Express your solution as a Fourier series.


Exercise 3.44 Let F (x) = |x| for −1 < x < 1 and extended periodically. Find the steady
periodic solution to √
y 00 + 3y = F (x).
Express your solution as a series.

js, ddw de ii: Lecture Notes Page 138 of 249


3.9. APPLICATIONS OF FOURIER SERIES TO DIFFERENTIAL
EQUATIONS

Example 3.9.4 Find the periodic solutions of the differential equation

y 0 + ky = f (x) ,

where k is a constant and f (x) is a 2π-periodic function.

Represent the function f (x) on the right-hand side of the equation as a Fourier series (Note
that we will need the complex form of Fourier series of a periodic function.)

X
f (x) = cn einx .
n=−∞

The complex Fourier coefficients are defined by the formula



1
cn = f (x) e−inx dx.

−π

Assuming that the solution can be represented as a Fourier series expansion



X
y= yn einx ,
n=−∞

we find the expression for the derivative:



X
y0 = inyn einx .
n=−∞

Substituting this into the differential equation, we get



X ∞
X ∞
X
inyn einx + k yn einx = cn einx .
n=−∞ n=−∞ n=−∞

Since this equation is valid for all n, we obtain


cn
inyn + kyn = cn or yn = .
in + k
Here cn and k are known numbers. Hence, the solution is given by

X cn inx
y (x) = e .
n=−∞
in + k

js, ddw de ii: Lecture Notes Page 139 of 249


CHAPTER 3. FOURIER SERIES & FOURIER TRANSFORMS

Example 3.9.5 Find the periodic solutions of the differential equation

y 0 + 2y = f (x),

where f (x) is a 2π-periodic function.

Set

dn einπx .
X
f (x) ∼
−∞

Let y be any 2π-periodic solution of the differential equation. Assume



yn einπx .
X
y∼
−∞

Then, from the differential equation, we get

inyn + 2yn = fn , for any n.

Hence
1
yn = fn , for any n.
2 + in
Therefore, we have

1
fn einπx .
X
y=
−∞
2 + in

Example 3.9.6 Find the periodic solutions of the differential equation

y 00 + 2y 0 + y = sin(x).

Because
eix − e−ix
sin(x) = ,
2i

fn einπx with
X
we get sin(x) ∼
−∞

 f1 = 1/2i
f−1 = −1/2i
fn = 0 for n 6= ±1.

Let y be a periodic solution of the differential equation. If



yn einπx ,
X
y∼
−∞
h i
then (in)2 + 2(in) + 1 yn = fn . Hence

1
y1 = y−1 = − , and yn = 0 otherwise.
4
Therefore, the differential equation has only one periodic solution
1 1 1
y = − eix − e−ix = − cos(x).
4 4 2

js, ddw de ii: Lecture Notes Page 140 of 249


3.9. APPLICATIONS OF FOURIER SERIES TO DIFFERENTIAL
EQUATIONS

Exercise 3.45 Find the steady periodic solution of the non homogeneous differential equation

00 1, −π < x < 0
y + 3y = f (x) =
2, 0 < x < π.
Using Fourier series, we have
 
3 2 1 1
f (x) = + sin x + sin 3x + sin 5x + · · ·
2 π 3 5
and hence cn = 0; n = 1, 2, · · · , and
2
c0 = 3, d2n−1 = , d2n = 0; n = 1, 2, · · ·
π(2n − 1)
It follows that ∞
1 X 2
yp (x) = + sin(2n − 1)x
2 n=1 π(2n − 1) [3 − (2n − 1)2 ]
Exercise 3.46 Find the steady periodic solution of the non homogeneous differential equation
y 00 + 5y = x, −2<x<2
Since ∞
4 X (−1)n+1  nπ 
x= sin x
π n=1 n 2
The required particular solution is

16 X (−1)n+1  nπ 
yp (x) = sin x
π n=1 π (20 − n2 π 2 ) 2

Exercise 3.47 Find periodic particular solutions of the following nonhomogeneous differential
equations:

00 x, −π < x < 0
1.) y + 3y =
0, 0 < x < π
∞ 
(−1)n

π 2X 1
yp (x) = − − cos(2n − 1)x + sin(nx)
12 π n=1 (2n − 1)2 [(2n − 1)2 − 3] n(n2 − 3)

−x, −1 < x < 0
2.) y 00 + y =
x, 0<x<1
∞  
1 4 X 1
yp (x) = + 2 cos(2n − 1)πx
2 π n=1 (2n − 1)2 [(2n − 1)2 π 2 − 1]

3.) y 00 + 2y 0 + 3y = ex , −π <x<π
(−1)n (−1)n−1
a = 2, b = 3, a0 = sinh π, an = sinh π, b n = sinh π
1 + n2 1 + n2

00 0 1, −π < x < 0
4.) y + 3y + 7y =
x, 0 < x < π
π (−1)n − 1 (−1)n (1 − π) − 1
a = 3, b = 7, a0 = 1 + , an = , b n =
2 πn2 πn
js, ddw de ii: Lecture Notes Page 141 of 249
CHAPTER 3. FOURIER SERIES & FOURIER TRANSFORMS

Exercise 3.48 Use Fourier trigonometric series to solve the following initial value problems:
1.)

4 X sin(2n − 1)πx
y 00 + y = , y(0) = 0
π n=1 2n − 1
Solution:
∞  
X 1 −x 1
4 e + sin(2n − 1)πx − cos(2n − 1)πx
n=1
1 + (2n − 1)2 π 2 π(2n − 1)

2.)

X cos nx
y 00 + y = , y(0) = 0
n=1
n!
Solution: ∞
X 1  −x 
−e + cos nx + n sin nx
n=1
n!(n2 + 1)

3.)

00 4 X sin(2n − 1)x
y + 4y = , y(0) = y 0 (0) = 0
π n=1 2n − 1
Solution: ∞  
2X 1 2
− sin 2x + sin(2n − 1)x
π n=1 4 − (2n − 1)2 2n − 1

4.)

00 4 X sin(2n − 1)x
y +y = , y(0) = y 0 (0) = 0.
π n=1 2n − 1
Solution:
∞  
2 4X 1 1
(sin x − x cos x) + sin x − sin(2n − 1)x
π π n=2 (2n − 1)2 − 1 2n − 1

Exercise 3.49 Solve the following nonhomogeneous boundary value problems:


1.) y 00 + 4y = 4x, y(0) = 0 = y(1)

8 X (−1)n+1
y(x) = sin nπx
π n=1 n(4 − n2 π 2 )

2.) y 00 + 11y = x2 , y(0) = 0 = y(1)


∞ 
(−1)n+1 2 {1 − (−1)n }

X 1
y(x) = 2 − 3 3 2π2)
sin nπx
n=1
nπ n π (11 − n

3.) y 00 − x = x, y(0) = 0 = y 0 (π)


∞ n+1
32 X (−1) 2 n 
y(x) = sin x
π n odd n2 (n2 + 4) 2

3.10 Fourier Transform & Inverse Fourier


The Fourier transform & the Inverse Fourier transform is left out this year, but was extensively
covered and could be found in last year’s lecture notes.

js, ddw de ii: Lecture Notes Page 142 of 249

You might also like