FOURIER SERIES: for even, odd function and 4/8/2022
half range series
for even, odd functions & half range series
Mathematics Section UniKL MFI
Norhayati Bakri
Even Functions & Odd Functions
Even functions and odd functions
are functions which satisfy particular
symmetry relations.
[email protected] 1
FOURIER SERIES: for even, odd function and 4/8/2022
half range series
Even Functions
A function is even if for each 𝑥 in the domain of 𝑓,
𝑓 −𝑥 = 𝑓 𝑥 . Even functions have reflective symmetry
across the y-axis.
Odd Functions
A function is odd if for each 𝑥 in the domain of 𝑓,
𝑓 −𝑥 = −𝑓 𝑥 . Odd functions have 180° rotational
symmetry about the origin.
[email protected] 2
FOURIER SERIES: for even, odd function and 4/8/2022
half range series
Example 1a
Analyze each graph. Determine whether the function of the
graph is even, odd or neither even nor odd.
Example 1b
Is the function of this graph even, odd or neither even nor
odd? Justify your answer.
[email protected] 3
FOURIER SERIES: for even, odd function and 4/8/2022
half range series
Example 2
Draw the following function and state whether they are even
or odd functions.
𝜋
1 𝑤ℎ𝑒𝑛 0<𝑥<
2
𝜋 3𝜋
𝑓 𝑥 = −1 𝑤ℎ𝑒𝑛
2
<𝑥<
2
and is periodic of period 2𝜋
3𝜋
1 𝑤ℎ𝑒𝑛 < 𝑥 < 2𝜋
2
Example 3
Determine whether the following functions are even, odd or
neither even nor odd.
• 𝑓 𝑥 = 𝑒 𝑥 + 𝑒 −𝑥
𝑓 −𝑥 = 𝑒 −𝑥 + 𝑒 − −𝑥
= 𝑒 −𝑥 + 𝑒 𝑥
𝑓 𝑥 = 𝑒 𝑥 + 𝑒 −𝑥
𝑓 −𝑥 = 𝑓 𝑥 is an even function
• 𝑓 𝑥 = 4 + 𝑥4
𝑓 −𝑥 = 4 + −𝑥 4
= 4 + 𝑥4
𝑓 𝑥 = 4 + 𝑥4
𝑓 −𝑥 = 𝑓 𝑥 is an even function
[email protected] 4
FOURIER SERIES: for even, odd function and 4/8/2022
half range series
Example 3 … continue
• 𝑓 𝑥 = 𝑥𝑐𝑜𝑠 𝑥
𝑓 −𝑥 = −𝑥 𝑐𝑜𝑠 −𝑥
= −𝑥𝑐𝑜𝑠 𝑥
𝑓 −𝑥 = −𝑓 𝑥 𝑓 𝑥 = 𝑥𝑐𝑜𝑠 𝑥
is an odd function
• 𝑓 𝑥 = 𝑥 3 𝑠𝑖𝑛 𝑥
𝑓 −𝑥 = −𝑥 3 𝑠𝑖𝑛 −𝑥
= −𝑥 3 −𝑠𝑖𝑛 𝑥
𝑓 −𝑥 = 𝑓 𝑥
𝑓 𝑥 = 𝑥 3 𝑠𝑖𝑛 𝑥
is an even function
Properties of Even, Odd Functions
Let 𝑔 𝑥 be an even function and ℎ 𝑥 be an odd function.
• Then the product 𝑔 𝑥 ℎ 𝑥 is an odd function.
𝑔 −𝑥 ℎ −𝑥 = 𝑔 𝑥 −ℎ 𝑥 = −𝑔 𝑥 ℎ 𝑥
• Then the product 𝑔 𝑥 𝑔 𝑥 is an even function.
𝑔 −𝑥 𝑔 −𝑥 = 𝑔 𝑥 𝑔 𝑥 =𝑔 𝑥 𝑔 𝑥
• Then the product ℎ 𝑥 ℎ 𝑥 is an even function.
ℎ −𝑥 ℎ −𝑥 = −ℎ 𝑥 −ℎ 𝑥 =ℎ 𝑥 ℎ 𝑥
[email protected] 5
FOURIER SERIES: for even, odd function and 4/8/2022
half range series
Properties of Even, Odd Functions
𝜋 𝜋
න 𝑒𝑣𝑒𝑛 𝑓𝑢𝑛𝑐𝑡𝑖𝑜𝑛 𝑑𝑥 = 2 න 𝑒𝑣𝑒𝑛 𝑓𝑢𝑛𝑐𝑡𝑖𝑜𝑛 𝑑𝑥
−𝜋 0
𝜋
න 𝑜𝑑𝑑 𝑓𝑢𝑛𝑐𝑡𝑖𝑜𝑛 𝑑𝑥 = 0
−𝜋
Example 4
State whether the following product is even, odd or neither
even nor odd function.
• 𝑓 𝑥 = 𝑥 2 𝑠𝑖𝑛 2𝑥
• 𝑓 𝑥 = 𝑥 3 𝑐𝑜𝑠 𝑥
• 𝑓 𝑥 = 2𝑥 + 3 𝑠𝑖𝑛 4𝑥
• 𝑓 𝑥 = 𝑠𝑖𝑛2 𝑥 𝑐𝑜𝑠 3𝑥
[email protected] 6
FOURIER SERIES: for even, odd function and 4/8/2022
half range series
Fourier Cosine series
The Fourier series of an even periodic function 𝑓 𝑥 having
period 2𝜋 contains cosine terms only and may contain a
constant term. (contains no sine terms)
∞
𝑎0 𝑛𝜋𝑥
𝑓 𝑥 = + 𝑎𝑛 𝑐𝑜𝑠
2 𝐿
𝑛=1
Due to symmetry about y-axis
1 𝐿 2 𝐿
𝑎0 = න 𝑓 𝑥 𝑑𝑥 = න 𝑓 𝑥 𝑑𝑥
𝐿 −𝐿 𝐿 0
1 𝐿 𝑛𝜋𝑥 2 𝐿 𝑛𝜋𝑥
𝑎𝑛 = න 𝑓 𝑥 𝑐𝑜𝑠 𝑑𝑥 = න 𝑓 𝑥 𝑐𝑜𝑠 𝑑𝑥
𝐿 −𝐿 𝐿 𝐿 0 𝐿
Fourier Sine series
The Fourier series of an odd periodic function 𝑓 𝑥 having
period 2𝜋 contains sine terms only. (contains no constant
term and no cosine term)
∞
𝑛𝜋𝑥
𝑓 𝑥 = 𝑏𝑛 𝑠𝑖𝑛
𝐿
𝑛=1
Due to symmetry to origin
𝑎0 = 0 and 𝑎𝑛 = 0
1 𝐿 𝑛𝜋𝑥 2 𝐿 𝑛𝜋𝑥
𝑏𝑛 = න 𝑓 𝑥 𝑠𝑖𝑛 𝑑𝑥 = න 𝑓 𝑥 𝑠𝑖𝑛 𝑑𝑥
𝐿 −𝐿 𝐿 𝐿 0 𝐿
[email protected] 7
FOURIER SERIES: for even, odd function and 4/8/2022
half range series
Example 4
−𝑎 −𝜋 < 𝑥 < 0
Given the periodic function 𝑓 𝑥 = ቊ
𝑎 0<𝑥<𝜋
(a) Sketch the graph of 𝑓 𝑥 and determine whether 𝑓 𝑥 is even
function, odd function or neither even nor odd function.
(b) Obtain the Fourier series for 𝑓 𝑥 .
𝑓 𝑥
𝑥
−2𝜋 −𝜋 0 𝜋 2𝜋 3𝜋 4𝜋
(a) 𝑓 𝑥 is an odd
function because the
−𝑎
graph is symmetric
with respect to the
origin 1 period
Example 4 … continue
(b) Since 𝑓 𝑥 is an odd function, 𝑎0 = 0 and 𝑎𝑛 = 0
2 𝐿 𝑛𝜋𝑥 𝑇 2𝜋
𝑏𝑛 = න 𝑓 𝑥 𝑠𝑖𝑛 𝑑𝑥 since, 𝐿 = = =𝜋
𝐿 0 𝐿 2 2
2 𝜋
𝑏𝑛 = න 𝑎 𝑠𝑖𝑛 𝑛𝑥 𝑑𝑥
𝜋 0
𝜋
2 𝑎
= − 𝑐𝑜𝑠 𝑛𝑥
𝜋 𝑛 0
2𝑎
=− 𝑐𝑜𝑠 𝑛𝜋 − 𝑐𝑜𝑠 0
𝜋𝑛
2𝑎
𝑏𝑛 = 1 − 𝑐𝑜𝑠 𝑛𝜋
𝜋𝑛
[email protected] 8
FOURIER SERIES: for even, odd function and 4/8/2022
half range series
Example 4 … continue
Evaluate 𝑏𝑛 for 𝑛 = 1, 2, 3, …
𝑦 = 𝑐𝑜𝑠 𝑥
• when 𝑛 is even: 𝑛 = 2, 4, 6, …
2𝑎 2𝑎
𝑏𝑛 = 1 − 𝑐𝑜𝑠 𝑛𝜋 = 1−1 =0
𝜋𝑛 𝜋𝑛
• when 𝑛 is odd: 𝑛 = 1, 3, 5, …
2𝑎 2𝑎 4𝑎
𝑏𝑛 = 1 − 𝑐𝑜𝑠 𝑛𝜋 = 1 − −1 =
𝜋𝑛 𝜋𝑛 𝑛𝜋
4𝑎 4𝑎 4𝑎 4𝑎
𝑏1 = , 𝑏3 = , 𝑏5 = , 𝑏7 = , …………
𝜋 3𝜋 5𝜋 7𝜋
Example 4 … continue
−𝑎 −𝜋 < 𝑥 < 0
The Fourier series for 𝑓 𝑥 = ቊ
𝑎 0<𝑥<𝜋
∞
𝑓 𝑥 = 𝑏𝑛 𝑠𝑖𝑛 𝑛𝑥
𝑛=1
𝑓 𝑥 = 𝑏1 𝑠𝑖𝑛 𝑥 + 𝑏3 𝑠𝑖𝑛 3𝑥 + 𝑏5 𝑠𝑖𝑛 5𝑥 + ⋯
4𝑎 4𝑎 4𝑎
𝑓 𝑥 = 𝑠𝑖𝑛 𝑥 + 3𝜋 𝑠𝑖𝑛 3𝑥 + 5𝜋 𝑠𝑖𝑛 5𝑥 + ⋯
𝜋
4𝑎 1 1
𝑓 𝑥 = 𝑠𝑖𝑛 𝑥 + 𝑠𝑖𝑛 3𝑥 + 𝑠𝑖𝑛 5𝑥 + ⋯
𝜋 3 5
[email protected] 9
FOURIER SERIES: for even, odd function and 4/8/2022
half range series
Example 5
Determine the Fourier series for the function 𝑓 𝜃 = 𝜃 2 in
the range −𝜋 < 𝜃 < 𝜋. The function has a period of 2𝜋.
𝑓 𝜃
𝜋2
𝜃
−2𝜋 −𝜋 0 𝜋 2𝜋 3𝜋 4𝜋
1 period
𝑓 𝑥 is an even function because the graph is symmetric with respect
to the y-axis, then
∞
𝑎0 𝑛𝜋𝜃
𝑓 𝜃 = + 𝑎𝑛 𝑐𝑜𝑠
2 𝐿
𝑛=1
Example 5 … continue
𝜋
2 𝜋 2 𝜃3 2 2
𝑎0 = න 𝜃 2 𝑑𝜃 = = 𝜋3 − 0 = 𝜋2
𝜋 0 𝜋 3 3𝜋 3
0
integration by parts – tabular method
𝑢 𝑑𝑣
+ 𝜃2 𝑐𝑜𝑠 𝑛𝜃
differentiate
integrate
1
- 2𝜃 𝑛
𝑠𝑖𝑛 𝑛𝜃
1
− 2𝑐𝑜𝑠 𝑛𝜃
2 𝜋 2 + 2 𝑛
𝑎𝑛 = න 𝜃 𝑐𝑜𝑠 𝑛𝜃 𝑑𝜃 0 −𝑛13𝑠𝑖𝑛 𝑛𝜃
𝜋 0
𝜋
2 𝜃2 2𝜃 2
= 𝑠𝑖𝑛 𝑛𝜃 + 2 𝑐𝑜𝑠 𝑛𝜃 − 3 𝑠𝑖𝑛 𝑛𝜃
𝜋 𝑛 𝑛 𝑛
0
[email protected] 10
FOURIER SERIES: for even, odd function and 4/8/2022
half range series
Example 5 … continue
𝜋
2 𝜃2 2𝜃 2
𝑎𝑛 = 𝑠𝑖𝑛 𝑛𝜃 + 2 𝑐𝑜𝑠 𝑛𝜃 − 3 𝑠𝑖𝑛 𝑛𝜃
𝜋 𝑛 𝑛 𝑛
0
0 0
2 𝜋2 2𝜋 2
= 𝑠𝑖𝑛 𝑛𝜋 + 2 𝑐𝑜𝑠 𝑛𝜋 − 3 𝑠𝑖𝑛 𝑛𝜋
𝜋 𝑛 𝑛 𝑛
0 0 0
2 02 0 2
− 𝑠𝑖𝑛 0 + 2 𝑐𝑜𝑠 0 − 3 𝑠𝑖𝑛 0
𝜋 𝑛 𝑛 𝑛
4
𝑎𝑛 = 𝑐𝑜𝑠 𝑛𝜋
𝑛2
• when 𝑛 is odd: 𝑛 = 1, 3, 5, …
𝑎1 = −4 , 𝑎3 = −49 , 𝑎5 = −25
4
,…
• when 𝑛 is even: 𝑛 = 2, 4, 6, …
𝑎2 = 1 , 𝑎4 = 14 , 𝑎6 = 19 , …
Example 5 … continue
The Fourier series for 𝑓 𝜃 = 𝜃 2
∞
𝑎0
𝑓 𝜃 = + 𝑎𝑛 𝑐𝑜𝑠 𝑛𝜃
2
𝑛=1
𝑎0
𝑓 𝜃 = + 𝑎1 𝑐𝑜𝑠 𝜃 + 𝑎2 𝑐𝑜𝑠 2𝜃 + 𝑎3 𝑐𝑜𝑠 3𝜃
2
+ 𝑎4 𝑐𝑜𝑠 4𝜃 + 𝑎5 𝑐𝑜𝑠 5𝜃 + …
2 2
𝜋
𝑓 𝜃 =3 −4 𝑐𝑜𝑠 𝜃 + 𝑐𝑜𝑠 2𝜃 − 49 𝑐𝑜𝑠 3𝜃
2
+ 14 𝑐𝑜𝑠 4𝜃 − 25
4
𝑐𝑜𝑠 5𝜃 + …
𝜋2
𝑓 𝜃 = −4൫𝑐𝑜𝑠 𝜃 − 14𝑐𝑜𝑠 2𝜃 + 19𝑐𝑜𝑠 3𝜃 − 16
1
𝑐𝑜𝑠 4𝜃
3
[email protected] 11
FOURIER SERIES: for even, odd function and 4/8/2022
half range series
Half range Fourier Series
When a function is defined over the range 0
to 𝐿 instead of the full range −𝐿 to 𝐿, it may
be expanded in a series of sine terms only or
of cosine terms only. The series produced is
called a half-range Fourier Series.
Half range cosine series
A function 𝑓 𝑥 = 𝑥 is defined in the range 0 to 𝜋.
outside of the range we have
𝑓 𝑥
a triangular waveform
𝑥
−2𝜋 −𝜋 0 𝜋 2𝜋 3𝜋 4𝜋
1 period
If a half range cosine series is required, then an even
periodic function is needed.
∞
𝑎0 𝑛𝜋𝑥
𝑓 𝑥 = + 𝑎𝑛 𝑐𝑜𝑠
2 𝐿
𝑛=1
[email protected] 12
FOURIER SERIES: for even, odd function and 4/8/2022
half range series
Half range sine series
A function 𝑓 𝑥 = 𝑥 is defined in the range 0 to 𝜋.
𝑓 𝑥
outside of the range
𝜋
𝑥
−2𝜋 −𝜋 0 𝜋 2𝜋 3𝜋 4𝜋
1 period
If a half range sine series is required, then an odd
periodic function is needed.
∞
𝑛𝜋𝑥
𝑓 𝑥 = 𝑏𝑛 𝑠𝑖𝑛
𝐿
𝑛=1
Example 6
Expand 𝑓 𝑥 = 𝑐𝑜𝑠 𝑥 as a half range Fourier sine series in
the range 0 ≤ 𝑥 ≤ 𝜋 and sketch the function within and
outside of the given range.
an odd periodic
𝑓 𝑥
function
𝑥
−2𝜋 −𝜋 0 𝜋 2𝜋 3𝜋 4𝜋
−1
The half range sine series ∞
𝑛𝜋𝑥
𝑓 𝑥 = 𝑏𝑛 𝑠𝑖𝑛
𝐿
𝑛=1
[email protected] 13
FOURIER SERIES: for even, odd function and 4/8/2022
half range series
Example 6 … continue ∞
The half range sine series 𝑓 𝑥 = 𝑏𝑛 𝑠𝑖𝑛 𝑛𝑥
𝑛=1
2 𝜋
𝑏𝑛 = න 𝑓 𝑥 𝑠𝑖𝑛 𝑛𝑥 𝑑𝑥
𝜋 0
2 𝜋
𝑏𝑛 = න 𝑐𝑜𝑠 𝑥 𝑠𝑖𝑛 𝑛𝑥 𝑑𝑥
𝜋 0
2 𝜋1
= න 𝑠𝑖𝑛 𝑥 + 𝑛𝑥 − 𝑠𝑖𝑛 𝑥 − 𝑛𝑥 𝑑𝑥
𝜋 0 2
𝜋
1 𝑐𝑜𝑠 1 + 𝑛 𝑥 𝑐𝑜𝑠 1 − 𝑛 𝑥
𝑏𝑛 = − +
𝜋 1+𝑛 1−𝑛 0
Example 6 … continue
1 𝑐𝑜𝑠 1 + 𝑛 𝜋 𝑐𝑜𝑠 1 − 𝑛 𝜋 𝑐𝑜𝑠 0 𝑐𝑜𝑠 0
𝑏𝑛 = − + − − +
𝜋 1+𝑛 1−𝑛 1+𝑛 1−𝑛
• when 𝑛 is odd: 𝑛 = 1, 3, 5, …
1 −1 1 −1 1
𝑏𝑛 = + − + =0
𝜋 1+𝑛 1−𝑛 1+𝑛 1−𝑛
• when 𝑛 is even: 𝑛 = 2, 4, 6, …
1 1 −1 −1 1
𝑏𝑛 = + − +
𝜋 1+𝑛 1−𝑛 1+𝑛 1−𝑛
1 1 1 1 1 1 −4𝑛
𝑏𝑛 = − + − =
𝜋 1+𝑛 1−𝑛 1+𝑛 1−𝑛 𝜋 1 − 𝑛2
4𝑛
𝑏𝑛 =
𝜋 𝑛2 − 1
[email protected] 14
FOURIER SERIES: for even, odd function and 4/8/2022
half range series
Example 6 … continue
Therefore, when 𝑛 is even: 𝑛 = 2, 4, 6, …
4 2 8
𝑏2 = 2
=
𝜋 2 −1 3𝜋
4 4 16 4 6 24
𝑏4 = 2
= 𝑏6 = =
𝜋 4 −1 15𝜋 𝜋 6 2 −1 35𝜋
The half range sine series for 𝑓 𝑥 = 𝑐𝑜𝑠 𝑥 in the range
0 ≤ 𝑥 ≤ 𝜋 is
∞
𝑓 𝑥 = 𝑏𝑛 𝑠𝑖𝑛 𝑛𝑥
𝑛=1
8 16 24
𝑓 𝑥 = 𝑠𝑖𝑛 2𝑥 + 𝑠𝑖𝑛 4𝑥 + 𝑠𝑖𝑛 6𝑥 + ⋯
3𝜋 15𝜋 35𝜋
[email protected] 15