You are on page 1of 75

MT 226:Partial Differential Equations

DR. ISDORY A
E-mail: isdorya@maths.udsm.ac.tz
Office: Room #306, Department of Mathematics

Lecture #1

November 9, 2021
Fourier Series

Topics:

1 Fourier Series
Introduction
Fourier Series
Convergence of Fourier Series

DR. ISDORY A E-mail: isdorya@maths.udsm.ac.tzOffice: Room #306,


MT Department
226:Partial Differential
of Mathematics
Equations
Lecture #1
Fourier Series

Fourier Series

Introduction
Fourier series has its origin from the theory of oscillations and
the theory of heat conductions.

The development of the techniques of Fourier Series has a long


history involving a great many individuals. For example,
in 1748 Euler examined the motion of a vibrating string using
Fourier analysis.
Jean Pabtiste Joseph Fourier, a Freanch mathematician made
a substantial contribution to the development of the Fourier
Series.
Joseph Fourier was born on March 21, 1768, in Auxerre, France
and dies on May 16, 1830.

DR. ISDORY A E-mail: isdorya@maths.udsm.ac.tzOffice: Room #306,


MT Department
226:Partial Differential
of Mathematics
Equations
Lecture #1
Fourier Series

Figure 1: Jean-Baptiste Joseph Fourier

DR. ISDORY A E-mail: isdorya@maths.udsm.ac.tzOffice: Room #306,


MT Department
226:Partial Differential
of Mathematics
Equations
Lecture #1
Fourier Series

List of things named after Joseph Fourier:


In Mathematics
Budan–Fourier theorem.
Fourier’s theorem.
Fourier–Motzkin elimination.
Fourier algebra.
Fourier division.
Analysis
Fourier analysis.
Fourier series (generalized Fourier series).
Fourier–Bessel series
Laplace–Fourier series
Legendre–Fourier series

DR. ISDORY A E-mail: isdorya@maths.udsm.ac.tzOffice: Room #306,


MT Department
226:Partial Differential
of Mathematics
Equations
Lecture #1
Fourier Series

List of things named after Joseph Fourier continues:


Fourier transform (List of Fourier-related transforms):
Discrete-time Fourier transform (DTFT), the reverse of the
Fourier series, a special case of the Z-transform around the
unit circle in the complex plane.
Discrete Fourier transform (DFT), occasionally called the
finite Fourier transform, the Fourier transform of a discrete
periodic sequence (yielding discrete periodic frequencies),
which can also be thought of as the DTFT of a finite-length
sequence evaluated at discrete frequencies.
Fast Fourier transform (FFT), a fast algorithm for
computing a Discrete Fourier transform.
Finite Fourier transform, etc.

DR. ISDORY A E-mail: isdorya@maths.udsm.ac.tzOffice: Room #306,


MT Department
226:Partial Differential
of Mathematics
Equations
Lecture #1
Fourier Series

List of things named after Joseph Fourier continues:


In physics and engineering :
Fourier’s law of heat conduction.
Fourier number (Fo) (also known as the Fourier modulus), a
ratio αt/d 2 of the rate of heat conduction αt to the rate of
thermal energy storage d 2 .
Fourier optics.
Fourier transform spectroscopy, a measurement technique
whereby spectra are collected based on measurements of the
temporal coherence of a radiative source.

DR. ISDORY A E-mail: isdorya@maths.udsm.ac.tzOffice: Room #306,


MT Department
226:Partial Differential
of Mathematics
Equations
Lecture #1
Fourier Series

The physical motivation of Fourier’s work was the phenomenon


of heat propagation and diffusion.
By 1807, Fourier had completed a substantial portion of his
work on heat diffusion.
In his work, Fourier had found series of harmonically related
sinusoids to be useful in representing the temperature
distribution through a body.

DR. ISDORY A E-mail: isdorya@maths.udsm.ac.tzOffice: Room #306,


MT Department
226:Partial Differential
of Mathematics
Equations
Lecture #1
Fourier Series

Important definitions

Definition (Periodic functions)


A function f (x) is said to have a peroid T if for all x

f (x + T ) = f (x),

where T is a positive constant.

The least value of T > 0 is called the period of f (x)

In other words: A function f (x) is said to be periodic if its function


values repeat at regular intervals of the independent variable.

DR. ISDORY A E-mail: isdorya@maths.udsm.ac.tzOffice: Room #306,


MT Department
226:Partial Differential
of Mathematics
Equations
Lecture #1
Fourier Series

Figure 2: A Periodic function with period T

DR. ISDORY A E-mail: isdorya@maths.udsm.ac.tzOffice: Room #306,


MT Department
226:Partial Differential
of Mathematics
Equations
Lecture #1
Fourier Series

Example 1
It is clearly known that if f (x) = sin x then,

f (x) = sin x = sin(x + 2π) = sin(x + 4π) = ...

Therefore, the function has periods 2π, 4π, 6π, etc.


However, 2π is the least value and therefore it is the period of f (x).
Similarly:
cos x is a periodic function with the period 2π and tan x has a
period π

DR. ISDORY A E-mail: isdorya@maths.udsm.ac.tzOffice: Room #306,


MT Department
226:Partial Differential
of Mathematics
Equations
Lecture #1
Fourier Series

Example 2
The period of sin nx and cos nx where n ∈ Z+ (is a positive integer)
is

,
n

that is a period of sin 2x is π, sin 3x is , etc.
3

DR. ISDORY A E-mail: isdorya@maths.udsm.ac.tzOffice: Room #306,


MT Department
226:Partial Differential
of Mathematics
Equations
Lecture #1
Fourier Series

Important definitions cont...

Definition (Limit of a function)


A function f (x) is said to tend to a limit L as x tends to 0 a0 if for
each given  > 0, there exists a positive number δ such that

|f (x) − L| < 

when
0 < |x − a| < δ.

This is denoted by
lim f (x) = L.
x→a

DR. ISDORY A E-mail: isdorya@maths.udsm.ac.tzOffice: Room #306,


MT Department
226:Partial Differential
of Mathematics
Equations
Lecture #1
Fourier Series

Figure 3: The  − δ definition of the function f (x) as x approaches a.

DR. ISDORY A E-mail: isdorya@maths.udsm.ac.tzOffice: Room #306,


MT Department
226:Partial Differential
of Mathematics
Equations
Lecture #1
Fourier Series

Important definitions cont...


One-Sided Limits:

Definition (Left-hand and Right -hand Limits )


A function f (x) is said to tend to a limit L as x tends to 0 a0 if for
each  > 0, there exists δ > 0 such that

|f (x) − L| < 

when
a − δ < x < a + δ.
This is denoted by
lim f (x) = L.
x→a−

is called the left-hand limit.


DR. ISDORY A E-mail: isdorya@maths.udsm.ac.tzOffice: Room #306,
MT Department
226:Partial Differential
of Mathematics
Equations
Lecture #1
Fourier Series

Figure 4: limx→a− f (x) = L Left-hand limit

We say that the left-hand limit of f (x) as x approaches a from the


left is equal to L if we can make the values of f (x) arbitrarily close
to L by taking x to be sufficiently close to 0 a0 and x less than a.

DR. ISDORY A E-mail: isdorya@maths.udsm.ac.tzOffice: Room #306,


MT Department
226:Partial Differential
of Mathematics
Equations
Lecture #1
Fourier Series

Similarly, if we require that x be greater than a, we get the


right-hand limit f (x) as x approaches 0 a0 of f (x) is equal to L and
we write
lim+ f (x) = L.
x→a

Figure 5:

DR. ISDORY A E-mail: isdorya@maths.udsm.ac.tzOffice: Room #306,


MT Department
226:Partial Differential
of Mathematics
Equations
Lecture #1
Fourier Series

Definition

lim f (x) = L if and only if


x→a
lim f (x) = lim f (x)
x→a+ x→a−

DR. ISDORY A E-mail: isdorya@maths.udsm.ac.tzOffice: Room #306,


MT Department
226:Partial Differential
of Mathematics
Equations
Lecture #1
Fourier Series

Example 1
1
If f (x) = x sin , find lim+ f (x) and lim− f (x). Hence show that
x x→0 x→0
1
the limit of f (x) = x sin as x approaches 0 is 0.
x

DR. ISDORY A E-mail: isdorya@maths.udsm.ac.tzOffice: Room #306,


MT Department
226:Partial Differential
of Mathematics
Equations
Lecture #1
Fourier Series

 
1
lim f (x) = lim (0 + h)) sin
x→0+ h→0 0+h
1
= lim h sin
= 0 also
h→0 h  
1
lim f (x) = lim (0 − h)) sin
x→0− h→0 0−h
1
= lim h sin = 0
h→0 h
1
Therefore, the limit of f (x) = x sin as x approaches 0 is 0.
x

DR. ISDORY A E-mail: isdorya@maths.udsm.ac.tzOffice: Room #306,


MT Department
226:Partial Differential
of Mathematics
Equations
Lecture #1
Fourier Series

Example 2
Use the  − δ definition of limits to prove that

lim (3x − 2) = 4
x→2

DR. ISDORY A E-mail: isdorya@maths.udsm.ac.tzOffice: Room #306,


MT Department
226:Partial Differential
of Mathematics
Equations
Lecture #1
Fourier Series

We must show that for each  > 0 there exists a δ > 0 such that

| (3x − 2) − 4| <  whenever 0 < x − 2 < δ.

The choice of δ depends on , we need to establish a condition


between the absolute values

| (3x − 2) − 4| and |x − 2|.


⇒ | (3x − 2) − 4| = |3x − 6| = 3|x − 2|

So for a given  > 0 we can choose δ =
3
This choice works because

0 < |x − 2| <implies that
3

| (3x − 2) − 4| = 3|x − 2| < 3. = 
3
DR. ISDORY A E-mail: isdorya@maths.udsm.ac.tzOffice: Room #306,
MT Department
226:Partial Differential
of Mathematics
Equations
Lecture #1
Fourier Series

Figure 6: The limit of f (x) as x approaches 2 is 4.


DR. ISDORY A E-mail: isdorya@maths.udsm.ac.tzOffice: Room #306,
MT Department
226:Partial Differential
of Mathematics
Equations
Lecture #1
Fourier Series

Important definitions cont...

Note:
Definition (Continuous Function)
A function f (x) is said to be continuous at x = a if given  > 0,
however small, we can find a number δ such that |f (x) − f (a)| < 
when |x − a| < δ and is denoted by lim f (x) = f (a).
x→a

That is lim f (x) exists if lim− f (x) and lim+ f (x) exists and are
x→a x→a x→a
equal.

A function f (x) is said to be continuous in an interval (a, b) if it is


continuous at every point of the interval.

DR. ISDORY A E-mail: isdorya@maths.udsm.ac.tzOffice: Room #306,


MT Department
226:Partial Differential
of Mathematics
Equations
Lecture #1
Fourier Series

Important definitions cont...


In other words: If a graph of a function has no sudden jumps or
breaks it is called a continuous function, examples being the
graphs of sine and cosine functions.

Figure 7: A continuous periodic function.


DR. ISDORY A E-mail: isdorya@maths.udsm.ac.tzOffice: Room #306,
MT Department
226:Partial Differential
of Mathematics
Equations
Lecture #1
Fourier Series

Important definitions cont...

Definition (Discontinuous Function)


A function f (x) is said to be discontinous at a point if it is not
continuous at that point.

Definition (Piecewise Continuous)


A function f (x) is said to be piecewise continuous in an interval if
(i) The interval can be divided into finite number of sub-intervals
in each of which f (x) is continuous.
(ii) The limit of f (x) as x approaches the end points of sub-interval
are finite.

DR. ISDORY A E-mail: isdorya@maths.udsm.ac.tzOffice: Room #306,


MT Department
226:Partial Differential
of Mathematics
Equations
Lecture #1
Fourier Series

In other words: If a graph of a function has sudden jumps or


breaks it is called a discontinuous function at the points

π π
Figure 8: A discontinuous periodic function at x = −π, − , , π
2 2

DR. ISDORY A E-mail: isdorya@maths.udsm.ac.tzOffice: Room #306,


MT Department
226:Partial Differential
of Mathematics
Equations
Lecture #1
Fourier Series

Important definitions cont...

Definition (Harmonics)
A function f (x) is sometimes expressed as a series of numbers of
different sine components. The component with the largest period is
the first harmonic or fundamental of f (x).
For instance,

y = A1 sin x is the first harmonic or fundamental


y = A2 sin 2x is the second harmonic
y = A3 sin 3x is the third harmonic and in gereral:

y = An sin nx is the nth harmonic,with amplitude An



and Period = .
n
DR. ISDORY A E-mail: isdorya@maths.udsm.ac.tzOffice: Room #306,
MT Department
226:Partial Differential
of Mathematics
Equations
Lecture #1
Fourier Series

Sinusoidal functions
A Sinusoidal function is a one with smooth, repititive oscillation...
Sinusoidal comes from sine, because the sine function is smooth.

Figure 9: A Sinusoidal periodic function.


DR. ISDORY A E-mail: isdorya@maths.udsm.ac.tzOffice: Room #306,
MT Department
226:Partial Differential
of Mathematics
Equations
Lecture #1
Fourier Series

Non-Sinusoidal Periodic functions


A function can be periodic without being obviously sinusoidal in
apperance.
 For instance
4 if 0 < x < 6
f (x) = .
0 if 6 ≤ x < 8

Figure 10: A periodic non sinusoidal function.


DR. ISDORY A E-mail: isdorya@maths.udsm.ac.tzOffice: Room #306,
MT Department
226:Partial Differential
of Mathematics
Equations
Lecture #1
Fourier Series

Important definitions cont...

Definition (Dirichlet Conditions)


Suppose that
(i) f (x) is defined and single valued except at finite number of
points in (−L, L).
(ii) f (x) is periodic with period 2L.
(iii) f (x) and f 0 (x) are piecewise continuous in (−L, L)
Then the Fourier series converges to
(a) f (x) if x is a point of continuity.
limx→a+ f (x) + limx→a− f (x)
(b) if x is a point of discontinuity.
2

DR. ISDORY A E-mail: isdorya@maths.udsm.ac.tzOffice: Room #306,


MT Department
226:Partial Differential
of Mathematics
Equations
Lecture #1
Fourier Series

The above conditions (i), (ii) and (iii) imposed on f (x) are
sufficient but not necessary because there are functions that do not
satisfy these conditions which still possess a convergent Fourier
series. However, The conditions above are generally satisfied in
cases which arise in science and engineering.

DR. ISDORY A E-mail: isdorya@maths.udsm.ac.tzOffice: Room #306,


MT Department
226:Partial Differential
of Mathematics
Equations
Lecture #1
Fourier Series

Fourier Series

If f (x) is a periodic function of period 2π, that satisfies Dirichlet


conditions, then it can be represented by an infinite series called
Fourier Series as
a0
f (x) = + a1 cos x + a2 cos 2x + a3 cos 3x + ... + an cos nx
2
+b1 sin x + b2 sin 2x + b3 sin 3x + ... + bn sin nx

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

where a0 , a2 and bn are called Fourier Coefficients.

DR. ISDORY A E-mail: isdorya@maths.udsm.ac.tzOffice: Room #306,


MT Department
226:Partial Differential
of Mathematics
Equations
Lecture #1
Fourier Series

Advantages of Fourier Series


(1) Discontinuous functions can be represented by Fourier Series.
Although derivatives of discontinuous functions do not exist
(This is not true for Taylor0 s Series).
(2) The Fourier series is useful in expanding the periodic functions
since outside the closed interval, there exists a periodic
extension of the function.

DR. ISDORY A E-mail: isdorya@maths.udsm.ac.tzOffice: Room #306,


MT Department
226:Partial Differential
of Mathematics
Equations
Lecture #1
Fourier Series

Advantages of Fourier Series cont...


(3) Expansion of oscillating functions by Fourier series gives all
models of oscillation (Fundamental and over tones) which is
useful in physics.

Figure 11: Harmonics and Overtones in a standing wave.

(4) Term by term integration of a convegent Fourier Series is


always valid, and it may be valid if the series is not convergent.
DR. ISDORY A E-mail: isdorya@maths.udsm.ac.tzOffice: Room #306,
MT Department
226:Partial Differential
of Mathematics
Equations
Lecture #1
Fourier Series

Determining the Fourier coefficients a0, a2 and bn

The Fourier series of the function f (x) in the interval


c < x < c + 2π is given by

∞ ∞
a0 X X
f (x) = + an cos nx + bn sin nx (1)
2 n=1 n=1
were
1 c+2π
Z
a0 = f (x)dx
π c
1 c+2π
Z
an = f (x) cos nxdx
π c
1 c+2π
Z
bn = f (x) sin nxdx
π c
DR. ISDORY A E-mail: isdorya@maths.udsm.ac.tzOffice: Room #306,
MT Department
226:Partial Differential
of Mathematics
Equations
Lecture #1
Fourier Series

Derivation of the Fourier coefficients a0, a2 and bn

Recall the following integrals:


Z π
(a) sin nxdx
−π
Z π
(b) cos nxdx
−π
Z π
(c) sin mx sin nxdx
−π
Z π
(d) cos mx cos nxdx
−π
Z π
(e) sin mx cos nxdx
−π
where m and n integers.

DR. ISDORY A E-mail: isdorya@maths.udsm.ac.tzOffice: Room #306,


MT Department
226:Partial Differential
of Mathematics
Equations
Lecture #1
Fourier Series

The integral in part (a):


Z π h cos nx iπ
sin nxdx = −
−π n −π
1
= − [cos nπ − cos(−nπ)]
n
1
= − (cos nπ − cos nπ)
n
= 0

The above result can be obtained from the fact that the integral of
a sine or cosine function over a complete period is zero.
Similarly,it follows that
Z π
cos nxdx = 0
−π

DR. ISDORY A E-mail: isdorya@maths.udsm.ac.tzOffice: Room #306,


MT Department
226:Partial Differential
of Mathematics
Equations
Lecture #1
Fourier Series

The integral in part (c):


Recall:

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


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

π
1 π
Z Z
∴ sin mx sin nxdx = [cos(m − n)x − cos(m + n)x] dx
−π 2 −π
= 0 if m 6= n

since both the cosines are integrated over complete periods.

DR. ISDORY A E-mail: isdorya@maths.udsm.ac.tzOffice: Room #306,


MT Department
226:Partial Differential
of Mathematics
Equations
Lecture #1
Fourier Series

If m = n, we have
Z π Z π
sin mx sin nxdx = sin2 nxdx
−π
Z−π
π
= sin nx sin nxdx
−π
1 π
Z
= [cos(nx − nx) − cos(nx + nx)] dx
2 −π
Z π
1 − cos 2nx
= dx
−π 2
Z π 
1 cos 2nx
= − dx
−π 2 2

1 sin 2nx
= x− =π
2 2 −π

DR. ISDORY A E-mail: isdorya@maths.udsm.ac.tzOffice: Room #306,


MT Department
226:Partial Differential
of Mathematics
Equations
Lecture #1
Fourier Series

Z π 
0 if m 6= n
Hence , we have sin mx sin nxdx =
−π π if m = n
Similarly,Z
π 
0 if m 6= n
cos mx cos nxdx =
−π π if m=n
Finally,
Z π
1 π
Z
sin mx cos nxdx = [sin(m + n)x + sin(m − n)x] dx
−π 2 −π
= 0, for all m and n.

DR. ISDORY A E-mail: isdorya@maths.udsm.ac.tzOffice: Room #306,


MT Department
226:Partial Differential
of Mathematics
Equations
Lecture #1
Fourier Series

Calculation of the coefficients

Integrating both sides of equation (1) from −π to π, we get


Z π Z π Z π ∞ Z π ∞
a0 X X
f (x)dx = dx + an cos nxdx + bn sin nxdx
−π −π 2 −π n=1 −π n=1
Z π
a0
= dx + 0 + 0
−π 2
1
= a0 · (π − (−π)
2
1
= a0 · 2π = a0 π
2Z
1 π
whence a0 = f (x)dx.
π −π

DR. ISDORY A E-mail: isdorya@maths.udsm.ac.tzOffice: Room #306,


MT Department
226:Partial Differential
of Mathematics
Equations
Lecture #1
Fourier Series

Calculation of the coefficients...


Multiplying equation (1) by cos mx,we get

a0 X
f (x) cos mx = cos mx + an cos nx cos mx +
2 n=1

X
bn sin nx cos mx (2)
n=1

Integrating both sides of equation (2), we get


Z π Z π Z π ∞
a0 X
f (x) cos mxdx = cos mxdx + an cos nx cos mxdx
−π −π 2 −π n=1
Z π ∞
X
+ bn sin nx cos mxdx
−π n=1
DR. ISDORY A E-mail: isdorya@maths.udsm.ac.tzOffice: Room #306,
MT Department
226:Partial Differential
of Mathematics
Equations
Lecture #1
Fourier Series

Z π Z π ∞
X
f (x) cos mxdx = an cos nx cos mxdx
−π −π n=1
∞ Z π
X
= an cos nx cos mxdx.
n=1 −π

X
= an πδn,m
n=1
= an π
1 π
Z
⇒ an = f (x) cos mxdx
π −π
1 π
Z
an = f (x) cos nxdx as m = n.
π −π

DR. ISDORY A E-mail: isdorya@maths.udsm.ac.tzOffice: Room #306,


MT Department
226:Partial Differential
of Mathematics
Equations
Lecture #1
Fourier Series

Similarly, Multiplying equation (1) by sin mx,we get



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

X
bn sin nx sin mx (3)
n=1

Integrating both sides of equation (3), we get


Z π Z π Z π ∞
a0 X
f (x) sin mxdx = sin mxdx + an cos nx sin mxdx
−π −π 2 −π n=1
Z π ∞
X
+ bn sin nx sin mxdx
−π n=1

DR. ISDORY A E-mail: isdorya@maths.udsm.ac.tzOffice: Room #306,


MT Department
226:Partial Differential
of Mathematics
Equations
Lecture #1
Fourier Series

Z π Z π ∞
X
f (x) sin mxdx = bn cos nx sin mxdx
−π −π n=1
∞ Z π
X
= bn sin nx sin mxdx.
n=1 −π

X
= bn πδn,m
n=1
= an π
1 π
Z
⇒ bn = f (x) sin mxdx
π −π
1 π
Z
bn = f (x) sin nxdx as n = m.
π −π

DR. ISDORY A E-mail: isdorya@maths.udsm.ac.tzOffice: Room #306,


MT Department
226:Partial Differential
of Mathematics
Equations
Lecture #1
Fourier Series

Example 1:
Expand
f (x) = (π − x)2
in
(−π, π)

DR. ISDORY A E-mail: isdorya@maths.udsm.ac.tzOffice: Room #306,


MT Department
226:Partial Differential
of Mathematics
Equations
Lecture #1
Fourier Series

Example 1:
We know that a Fourier series for the function f (x) in the interval
(−π, π) is given by
∞ ∞
a0 X X
f (x) = + an cos nx + bn sin nx (4)
2 n=1 n=1

Here, f (x) = (π − x)2 in (−π, π)


Z π
1
Now, a0 = f (x)dx
π −π
3 π
" #
1 π −
Z
1 (π x)
= (π − x)2 =
π −π π −3
−π
3 2
 
1 (2π) 8π
= 0− =
π −3 3

DR. ISDORY A E-mail: isdorya@maths.udsm.ac.tzOffice: Room #306,


MT Department
226:Partial Differential
of Mathematics
Equations
Lecture #1
Fourier Series

1 π 1 π
Z Z
an = f (x) cos nxdx = (π − x)2 cos nxdx
π −π π −π
  π
1 2 sin nx − cos nx − sin nx
= (π − x) − 2(π − x)(−1) +2
π n n2 n3 −
    
1 − cos nπ
= (0 + 0 + 0) − 0 − 2(2π)(−1) +0
π n2
  
1 −4π cos nπ
= 0−
π n2
 
1 4π cos nπ
=
π n2
4
= 2
(−1)n Note cos nπ = (−1)n
n

DR. ISDORY A E-mail: isdorya@maths.udsm.ac.tzOffice: Room #306,


MT Department
226:Partial Differential
of Mathematics
Equations
Lecture #1
Fourier Series

1 π 1 π
Z Z
bn = f (x) sin nxdx = (π − x)2 sin nxdx
π −π π −π
  cos nx π
1 2 − cos nx − sin nx
= (π − x) − 2(π − x)(−1) +2
π n n2 n3
   2
−π
1 2 cos nx −(2π) cos nπ 2 cos nπ
= 0−0+ 3
− 2
−0+
π n n n3
−4π 2 cos nπ 2 cos nπ
   
1 2 cos nπ
= − +
π n3 n n3
 2 
1 4π cos nπ
=
π n

= (−1)n Note cos nπ = (−1)n
n

DR. ISDORY A E-mail: isdorya@maths.udsm.ac.tzOffice: Room #306,


MT Department
226:Partial Differential
of Mathematics
Equations
Lecture #1
Fourier Series

Substituting the values of the coefficients into equation (4), we get


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

DR. ISDORY A E-mail: isdorya@maths.udsm.ac.tzOffice: Room #306,


MT Department
226:Partial Differential
of Mathematics
Equations
Lecture #1
Fourier Series

Example 2

Express
f (x) = x sin x
as a Fourier Series in 0 ≤ x ≤ 2π.

DR. ISDORY A E-mail: isdorya@maths.udsm.ac.tzOffice: Room #306,


MT Department
226:Partial Differential
of Mathematics
Equations
Lecture #1
Fourier Series

Solution example 2
We know that a Fourier series for the function f (x) in the interval
[0, 2π] is given by
∞ ∞
a0 X X
f (x) = + an cos nx + bn sin nx (5)
2 n=1 n=1
Here f (x)
x sin x =
1 2π 1 2π
Z Z
Now a0 = f (x)dx = x sin xdx
π 0 π 0
Z Z
Itegration by parts i.e udv = uv − vdu gives
1
a0 = [x(− cos x) − 1 · (−sinx)]2π
0
π
1
= (−2π) = −2 [∵ sin 2π = 0, cos 2π = 1]
π
DR. ISDORY A E-mail: isdorya@maths.udsm.ac.tzOffice: Room #306,
MT Department
226:Partial Differential
of Mathematics
Equations
Lecture #1
Fourier Series

1 2π
Z Z 2π
1
an = f (x) cos nxdx = x sin x cos nxdx
π 0 2π 0
Z 2π
1
= x [sin(n + 1)x − sin(n − 1)x] dx
2π 0
1
∵ cos A sin B = [sin(A + B) − sin(A − B)]
  2 
1 cos(n + 1)x cos(n − 1)x
∴ an = x − + −
2π n+1 n−1
 2π
sin(n + 1)x sin(n − 1)x
− +
(n + 1)2 (n − 1)2 0
  
1 cos 2(n + 1)π cos(2(n − 1))π
= 2π − +
2π n+1 n−1

DR. ISDORY A E-mail: isdorya@maths.udsm.ac.tzOffice: Room #306,


MT Department
226:Partial Differential
of Mathematics
Equations
Lecture #1
Fourier Series

Since sin 2(n + 1)π = 0, sin 2(n − 1)π = 0 and


cos 2(n + 1)π = 1, cos 2(n − 1)π = 1, when n is odd or even.
1 1 2
∴ an = − + = 2 provided n 6= 1.
n+1 n−1 n −1
when n = 1, we have
1 2π
Z Z 2π
1
a1 = x sin x cos xdx = x sin 2xdx
π 0 2π 0
∵ sin 2x = 2 sin x cos x.
    2π
1 cos 2x sin 2x
∴ a1 = x − −1· −
2π 2 4 0
1 1
= [−π] = −
2π 2

DR. ISDORY A E-mail: isdorya@maths.udsm.ac.tzOffice: Room #306,


MT Department
226:Partial Differential
of Mathematics
Equations
Lecture #1
Fourier Series

1 2π
Z Z 2π
1
bn = f (x) sin nxdx = x sin x sin nxdx
π 0 2π 0
Z 2π
1
= x [cos(n − 1)x − cos(n + 1)x] dx
2π 0
∵ 2 sin A sin B = [cos(A − B) − cos(A + B)]
  
1 sin(n − 1)x sin(n + 1)x
∴ bn = x − − −
2π n−1 n+1
 2π
cos(n − 1)x cos(n + 1)x
− +
(n − 1)2 (n + 1)2 0
 
1 cos 2(n − 1)π cos(2(n + 1))π
= − −
2π (n − 1)2 (n + 1)2

1 1
+ .
(n − 1)2 (n + 1)2
DR. ISDORY A E-mail: isdorya@maths.udsm.ac.tzOffice: Room #306,
MT Department
226:Partial Differential
of Mathematics
Equations
Lecture #1
Fourier Series

 
1 1 1 1 1
bn = − − +
2π (n − 1)2 (n + 1)2 (n − 1)2 (n + 1)2
= 0 provided n 6= 1.
when n = 1,
Z 2π
1
b1 = x sin x sin xdx
2π 0
Z 2π
1
= x(1 − cos 2x)dx
2π 0
    2 2π
1 sin 2x x cos 2x
= x x− −1· +
2π 2 2 4 0
2
 
1 4π 1 1
= 2π (2π) − − + =π
2π 2 4 4

DR. ISDORY A E-mail: isdorya@maths.udsm.ac.tzOffice: Room #306,


MT Department
226:Partial Differential
of Mathematics
Equations
Lecture #1
Fourier Series

The Fourier representation of the function f (x) = x sin x is


∞ ∞
a0 X X
f (x) = + an cos nx + bn sin nx
2 n=1 n=1
2
a0 = −2, an = for n 6= 1,
−1 n2
1
a1 = − , bn = 0 for n 6= 1, b1 = π
2

1 X 2
∴ f (x) = −1 − cos x + π sin x + 2
cos nx
2 n=2
n − 1
1 2 2
x sin x = −1 + π sin x − cos x + 2 cos 2x + 2 cos 3x + ..
2 2 −1 3 −1

DR. ISDORY A E-mail: isdorya@maths.udsm.ac.tzOffice: Room #306,


MT Department
226:Partial Differential
of Mathematics
Equations
Lecture #1
Fourier Series

Convergence of Fourier Series

We are now in a position where we can write a Fourier repsentation


of a function. The main question is this
Does the Fourier series of a function actually represent that
function?
In other words: If a value of x is chosen, the numbers cos nx
and sin nx are computed for each n and inserted into the
Fourier series of f , and the sum of the series is calculated, is
that sum equal to the functional value f (x) ?

DR. ISDORY A E-mail: isdorya@maths.udsm.ac.tzOffice: Room #306,


MT Department
226:Partial Differential
of Mathematics
Equations
Lecture #1
Fourier Series

Convergence of Fourier Series cont...


Define the right hand limit

f (x0 +) = lim f (x0 + h) = lim f (x0 + h) and the left limit


h→0+
h→0
h>0
f (x0 −) = lim f (x0 + h) = lim f (x0 + h) = lim+ f (x0 − h)
h→0− h→0
h→0
h<0

Note: Note that f (x0 +) and f (x0 −) need not be values of the
function f .
If both Left and the right hand limit exist and are equal, the
ordinary limit exists and is equal to one hand limits.

DR. ISDORY A E-mail: isdorya@maths.udsm.ac.tzOffice: Room #306,


MT Department
226:Partial Differential
of Mathematics
Equations
Lecture #1
Fourier Series

It is quite possible that the left- and right-handed limits exist


but are different.This is called Jump discontinuity.
If the limits exist and agree, but the function is not defined at
that point or its value is not equal to the limit, This limit is
called Removable discontinuity
Types of continuity behavior at x0
Name Criterion
Continuity (Ordinary) f (x0 +) = f (x0 −) = f (x0 )
Removable discontinuity f (x0 +) = f (x0 −) 6= f (x0 )
Jump discontinuity f (x0 +) 6= f (x0 −)

DR. ISDORY A E-mail: isdorya@maths.udsm.ac.tzOffice: Room #306,


MT Department
226:Partial Differential
of Mathematics
Equations
Lecture #1
Fourier Series

Figure 12: Typical sectionally continuous function made up of four


continuous “sections.”

DR. ISDORY A E-mail: isdorya@maths.udsm.ac.tzOffice: Room #306,


MT Department
226:Partial Differential
of Mathematics
Equations
Lecture #1
Fourier Series

A function is sectionally continuous (also called piecewise


continuous) on an interval a < x < b if it is bounded and
continuous, except possibly for a finite number of jumps and
removable discontinuities.
A function is sectionally continuous if it is sectionally
continuous on every interval of finite length.
(1) For example, the square wave, defined by

1 if 0 < x < a
f (x) =
−1 if −a<x <0
f (x + 2a) = f (x)

is sectinally continuous. There are jump discontinuities at


x = 0, ±a, ±2a etc.

DR. ISDORY A E-mail: isdorya@maths.udsm.ac.tzOffice: Room #306,


MT Department
226:Partial Differential
of Mathematics
Equations
Lecture #1
Fourier Series

1
(2) For example, the function f (x) = can not be sectionally
x
continuous on any interval that contain x = 0 or even has as an
end point, because the function is not bounded at x = 0.

(3) For instance, the function f (x) = x , in the interval


−1 < x < 1, the function f is continuous on that interval.
But its periodic extension is sectionally continuous but not
continuous.

Figure 13: Periodic extention of f (x) = x in −1 < x < 1


DR. ISDORY A E-mail: isdorya@maths.udsm.ac.tzOffice: Room #306,
MT Department
226:Partial Differential
of Mathematics
Equations
Lecture #1
Fourier Series

Sectionally Smooth Function

Definition
A function is sectionally smooth (also, piecewise smooth) in an
interval a < x < b if: f is sectionally continuous; f 0 (x) exists,
except perhaps at a finite number of points; and f 0 (x) is sectionally
continuous.
Examples
1
(1) f (x) = |x| 2 is continuous but not sectionally smooth in any
0

interval that contains 0, because f (x) −→ ∞ as x −→ 0.

(2) The square wave is sectionally smooth but not continuous.
Most of the functions useful in mathematical modeling are
sectionally smooth. Fortunately, we can also give a positive
statement about the Fourier series of such functions.
DR. ISDORY A E-mail: isdorya@maths.udsm.ac.tzOffice: Room #306,
MT Department
226:Partial Differential
of Mathematics
Equations
Lecture #1
Fourier Series

Theorem
If f (x) is sectionally smooth and periodic with period 2π, then at
each point x the Fourier series corresponding to f (x) converges, and
its sum is

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

This theorem gives an answer to the question at the beginning of


the section

DR. ISDORY A E-mail: isdorya@maths.udsm.ac.tzOffice: Room #306,


MT Department
226:Partial Differential
of Mathematics
Equations
Lecture #1
Fourier Series

Recall that a sectionally smooth function has only a finite


number of jumps and no bad discontinuities in every finite
interval. Hence
f (x+) + f (x−)
f (x−) = f (x+) = = f (x)
2
except perhaps at a finite number of points on any finite
interval.

DR. ISDORY A E-mail: isdorya@maths.udsm.ac.tzOffice: Room #306,


MT Department
226:Partial Differential
of Mathematics
Equations
Lecture #1
Fourier Series

Sum of a Fourier series at a point of discontinuity


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

Figure 14: As x → x1 , the expression f (x) approaches y1 or y2 depending


on the direction of approach.
DR. ISDORY A E-mail: isdorya@maths.udsm.ac.tzOffice: Room #306,
MT Department
226:Partial Differential
of Mathematics
Equations
Lecture #1
Fourier Series

Figure 15: (a) If we approach x = x1 , from below x1 , the limiting value of


f (x) is y1 .(b) If we approach x = x1 , from above x1 , the limiting value of
f (x) is y2 .

DR. ISDORY A E-mail: isdorya@maths.udsm.ac.tzOffice: Room #306,


MT Department
226:Partial Differential
of Mathematics
Equations
Lecture #1
Fourier Series

To distinguish between these values we write

y1 = f (x0 +)
y2 = f (x0 −)

In fact, if we subsitute x = x1 in the Fourier series for f (x) it can


be shown that the series convegerges to the value

f (x0 +) + f (x0 −)
2

DR. ISDORY A E-mail: isdorya@maths.udsm.ac.tzOffice: Room #306,


MT Department
226:Partial Differential
of Mathematics
Equations
Lecture #1
Fourier Series

In other words this condition states that: If f (x) is discontinuous at


at a point x, then the series converges to a value that is half-way
between the two possible function values.

DR. ISDORY A E-mail: isdorya@maths.udsm.ac.tzOffice: Room #306,


MT Department
226:Partial Differential
of Mathematics
Equations
Lecture #1
Fourier Series

Example 1

0 if − π < x < 0
Consider the function f (x) =
a if 0 < x < π
f (x + 2π) = f (x).
Determine the Fourier series representing this function. Find the
sum of series at the the point of discontinuity.

Figure 17:

DR. ISDORY A E-mail: isdorya@maths.udsm.ac.tzOffice: Room #306,


MT Department
226:Partial Differential
of Mathematics
Equations
Lecture #1
Fourier Series

1 π 1 π
Z Z
1
a0 = f (x)dx = adx = [ax]π0 = a
π −π π 0 π
Z π Z π
1 1
an = f (x) cos nxdx = a cos nxdx
π −π π 0
 π
a sin nx
= =0
π n 0
1 π 1 π
Z Z
bn = f (x) sin nxdx = a sin nxdx
π −π π 0
 π
a − cos nx a a
= = (1 − cosnπ) = (1 − (−1)n )
π n 0 nπ nπ
= 0 if n even and
2a
= if n odd.

DR. ISDORY A E-mail: isdorya@maths.udsm.ac.tzOffice: Room #306,


MT Department
226:Partial Differential
of Mathematics
Equations
Lecture #1
Fourier Series


1 X
∴ f (x) = a0 + bn sin nx
2 n=1
 
a 2a 1 1
= + sin x + sin3x + sin 5x + ...
2 π 3 5

A finite discontinuity, or jump, occurs at x = 0.


If we substitute x = 0 in the series obtained, all the sine terms
a
vanish and we get f (x) = , which is, in fact, the average of
2
the two function values at x = 0.

DR. ISDORY A E-mail: isdorya@maths.udsm.ac.tzOffice: Room #306,


MT Department
226:Partial Differential
of Mathematics
Equations
Lecture #1
Fourier Series

Figure 18: Note that at x = π, or x = −π, another finite discontinuity


occurs and substituting x = π or x = −π, in the series gives the same
result.

DR. ISDORY A E-mail: isdorya@maths.udsm.ac.tzOffice: Room #306,


MT Department
226:Partial Differential
of Mathematics
Equations
Lecture #1

You might also like