Академический Документы
Профессиональный Документы
Культура Документы
=
OMMRJOMMS=
=
=
=
=
cçìêáÉê=pÉêáÉë==
=
=
=
aê=dÉçêÖÉ=açÄêÉ=
_~êçå=gçëÉéÜ=cçìêáÉê=
NTSUJNUPM
j^RUU=j~íÜÉã~íáÅ~ä=qÉÅÜåáèìÉëW===clrofbo=pbofbp 2.
A large number of phenomena and processes have a periodic nature. Consider for example
waves, vibrations, an electrocardiogram, parts of machines, low and high tide, the string of a
violin etc.
Many functions can be written as infinite series involving ascending powers of x. Fourier series
are unusual and particularly useful in as a mathematical technique because they are expansions of
periodic functions f(x) written using just sines and cosines.
A function f is periodic when f(x+p) = f(x) for all x where p is the period of the function.
When periodic functions are integrated over one period the same result is always obtained
irrespective of where the limits are set:
∫ f (x ) dx ∫ f (x ) dx ∫ f (x ) dx ∫ f (x ) dx
1
+ p
a+ p b+ p 2 p
= = =
a b 1 0
− p
2
Exercise 1. Check that the result above is valid for f(x) = –sin x integrated between 0 and 2π
and again between –π/4 and 7π/4.
-2π 0 2π
x
-2π 0 2π
∫ f ( x ) dx = − ∫ f ( x ) dx
b 0
0 −b
Therefore,
∫ f (x ) dx
b
= 0
−b
∫ f (x ) dx ∫ f ( x ) dx
b 0
=
0 −b
Therefore,
∫ f ( x ) dx = 2 ⋅ ∫ f ( x ) dx
b b
−b 0
• Products of odd and even functions will give either an odd or an even function:
Fourier sums
To approximate complicated functions the power series can be used. For periodic functions the
Fourier series are better suited.
1
TPn = a0 + a1 cos x + a2 cos2 x + a3 cos3x ... + an cosnx
2
+ b1 sin x + b2 sin 2 x + b3 sin 3x ... + bn sin nx
f ( x ) = a0 + ∑ ( an cos nx + bn sin nx )
∞
1
2 n =1
Example: Consider the function A sin(nπx), where A and n are constants. It can be
thought of as the instantaneous amplitude (displacement from horizontal)
at position x along an oscillating string. The maximum amplitude of the
wave is A, and the period will be 2/n, where n is the wavenumber. So, for
example, the function 4 sin(5πx) has amplitude 4 and period 2/5.
In a Fourier series, instead of the power of x increasing by 1 each time, like in the Maclaurin and
Taylor expansions, the wavenumber increases by 1.
If we increase the wavenumber, then the function oscillates more rapidly, so sin(10x) has ten
peaks and troughs between x = 0 and x = 2π whereas sin(x) only has one peak and one trough.
Exercise 3. Plot (to scale) the functions sin(x), sin(2x), sin(5x) and sin(10x)
The terms of a Fourier series represent waves of different periods (or wavelengths), with each
successive term giving a more rapidly oscillating contribution than the previous.
• Shorter-scale features - more accurately captured by the subsequent terms in the Fourier
series.
In this way we can recreate the function as accurately as we choose, by taking more and more
terms, thus including shorter and shorter scales.
f ( x ) = a0 + ∑ ( an cos nx + bn sin nx )
∞
1
2 n =1
The task is then to find all the coefficients a0, a1, b1, and so on, to model the function f(x) as
accurately as possible.
-2π 0 2π
The longer the Fourier series modelling this function, the more accurate it gets!
Orders 3, 9 and 27 of the trigonometric polynomials are shown below for comparison purposes.
Please accept the coefficients without proof for now – that will come in the next lecture. Also,
notice how the sine terms are conspicuously absent!
The third order Fourier sum that approximates the square wave:
TP3 =
4
(cos x − 13 cos 3x )
π
y
-2π 0 2π
TP9 =
4
(cos x − 13 cos 3x + 15 cos 5x − 17 cos 7 x + 19 cos 9 x )
π
-2π 0 2π
TP27 =
4
(cos x − 13 cos3x + 15 cos5x − 17 cos7 x + ... − 271 cos27 x )
π
-2π 0 2π
Fourier coefficients
To find the coefficients an and bn we calculate the average of f(x) over one period p
= 2π:
∫ ∫ ∫ 2 π −∫π
π π π π
1 1 1 1 1
f ( x ) dx = 2 a 0 dx + a1 cos x dx + a2 cos 2 x dx + ...
2 π −π 2π −π 2π − π
2 π −∫π 2 π −∫π
π π
1 1
+ b1 sin x d x + b2 sin2 x dx + ...
Before we can proceed, we need to evaluate the integrals of cos nx and sin nx with
n = 1,2,3…
∫
1 an
sin nπx − sin ( −nπx ) = 0
π π
2π n
1 an
a cos n x d x = sin n x =
π
n
2π −π −π 2 n
and likewise:
∫ bnsin nx dx = 0 , n = 1, 2,3,...
π
1
2 π −π
∫ ∫
π π
1
f ( x ) dx = [2 a 0 x ]π−π
1 1
→
1
f ( x ) dx = 12 a 0
2π −π 2π 2π −π
Hence,
a0 = ∫ f ( x ) dx
π
1
π −π
To find a1 multiply both sides with cos x and calculate the average over one period
again:
∫ ∫ a1 ∫ cos2 x dx
π π π
1
f ( x ) cos x dx =
1 1
a cos x d x +
1
2π −π 2π 2π −π
2 0
−π
2π −∫π
π
1
+ a 2 cos 2 x ⋅ cos x dx + ...
b1 ∫ sin x ⋅ cos x dx +
2 π −∫π
π π
1 1
+ b2 sin 2 x ⋅ cos x dx + ...
2π −π
To evaluate the integrals we would like to have some general expressions for the
integrals of
(cos mx · cos nx), (cos mx · sin nx) and (sin mx · sin nx) over a period of 2π:
0, m ≠ n
∫−πcos mx ⋅ cos nx dx = 12 , m = n ≠ 0
π
1
2π 1, m = n = 0
∫ cos mx ⋅ sin nx dx = 0
π
1
2π −π
0, m ≠ n
∫
π
sin mx ⋅ sin nx dx = 12 , m = n ≠ 0
1
2π −π 0, m = n = 0
We can now find the average of f(x) · cos x over one period p = 2π:
∫ a1 ∫ cos2 x dx
π π
f ( x ) cos x dx =
1 1
2π −π 2π −π
2 π −∫π π −∫π
π π
1
f ( x ) cos x d x = 1
a
2 1 → a 1 =
1
f ( x ) cos x dx
2 π −∫π ∫ 2π −∫π
π π π
1
f ( x ) cos nx d x =
1 1
a cos nx dx +
1
a1 cos x ⋅ cos nx dx
2π
2 0
−π
b1 ∫ sin x ⋅ cos nx dx +
2π −∫π
π π
1 1
+ b2 sin 2 x ⋅ cos nx dx + ...
2π −π
∫
π
1 1
an cos2 nx dx = an
2π − π 2
an = ∫ f ( x ) ⋅cos nx dx
π
1
π −π
π −∫π
π
1
bn = f ( x ) ⋅sin nx dx
Hence, the complete Fourier Series for a function with period p = 2π is:
f ( x ) = 12 a0 + ∑ ( ancos nx + bnsin nx )
∞
n =1
π −∫π
π
1
a0 = f ( x ) dx
an = ∫ f ( x ) ⋅cos nx dx bn = ∫ f ( x ) ⋅sin nx dx
π π
1 1
π −π π −π
Exercise 4: For the square wave defined below, calculate the Fourier coefficients
y
1
x
-2π -π 0 π 2π
a 0 = ∫ f ( x ) dx = ∫ 0 dx + ∫ 1 dx = 1
π 0 π
1 1 1
π −π π −π π0
a n = ∫ f ( x ) ⋅ cos nx dx
π
1
π −π
⋅ [sin nx ] 0π = 0
1 1
an =
π n
b n = ∫ f ( x ) ⋅ sin nx dx
π
1
π −π
0 for even n
bn = 2
nπ for odd n
x 2 [− π ,π]
Given the function f( x ) =
f (x + 2π )
Exercise 5.
Dirichlet Conditions
What are the conditions a function needs to fulfil in order to be able to write it as a Fourier
Series?
If f (x) is:
periodic of period 2π
has a finite number of discontinuities between –π, π (such functions are said to be
“piecewise continuous”)
has a finite number of jumps between –π, π (jumps = points where the lateral limits f(x+)
and f(x-) are well defined and finite).
∫ f (x )
π
dx is finite
−π
Then
f ( x ) = T∞ ( x )
T∞ ( u ) =
1
( )
lim f ( x ) + lim f ( x )
2 x ↑u x ↓u
Exercise 6. Of the following two periodic functions only one violates a Dirichlet condition.
Which Dirichlet condition is violated and show with calculations on both functions which one
can be represented by a Fourier series and which one can’t.
Function Period
sin x, cos x, eix 2π
2π
2π 2π i x
sin x, cos x, e p p
p p
π
π π i x
sin x, cos x, e l 2l
l l
If we want to obtain the Fourier Series for a function with an arbitrary period p = 2l we need:
πx 2πx 3πx
f( x ) = 12 a 0 + a1 cos + a 2 cos + a 3 cos + ...
l l l
πx 2πx 3πx
+ b1 sin + b2 sin + b3 sin
l l l
nπx
= 12 a 0 + ∑ a n cos
∞
nπx
+ bn sin
n =1 l l
The Fourier coefficients can be found by calculating the average value of f (x), f (x) · cos x, and
l −∫l
l
f ( x ) dx
1
a0 =
a n = ∫ f ( x ) ⋅ cos
nπ x
l
1
dx
l −l l
∫
nπ x
l
f ( x ) ⋅ sin
1
bn = dx
l −l l
y
Example: Saw Function:
1
-1
∫ x d x = 2 ⋅ ∫ x dx = 2 ⋅ [x]
1 1
a0 = 1
2
2 1
0 =1
−1 0
1
0
= 2 2 (cos nπ − cos0) = 2 2 (− 1) − 1
nπ
2
nπ
2 n
( )
0 for even n
an =
−4
n 2 π2 for odd n
Since f (x) is an even function all the sine terms bn are zero (check this yourself by calculating bn)
1 4
− 2 cos πx + + ...
cos 3πx cos 5πx cos 7πx
f( x ) = + +
2 π 9 25 49
πx
sin 2 [0 , 2]
Given the function f( x ) = 0 [2 , 4]
Exercise 7.
f ( x + 4 )
Sketch the graph of this function for at least 3 periods. Is the function even or odd or
neither? Calculate the first Fourier coefficient a0
4, 0 < x ≤ 1
2 , 1 < x ≤ 3
Given the following periodic function f( x ) =
Exercise 8.
0, 3 < x ≤ 4
f ( x + 4 )
a) Sketch a graph of the function. Is it even, odd or neither?
b) Derive the Fourier Series for this function and write down the expansion up to the term
with n=8
3 cos 2 x − 1 x ∈ [0 , π / 2]
f( x ) =
f( x + π/ 2)
g( x + 2 ) 1 + x 0 < x < 1
,
1, 0 < x < 1
f ( x + 2 ) h( x + 2 )
sin nx =
2i
e −e [
1 inx −inx
]
cos nx =
2
[
1 inx
e + e −inx ]
By substituting the complex exponentials for the sines and cosines one arrives at the following
formula:
where:
c0 = 12 a 0
cn = 12 (a n − i bn )
c-n = 1
2 (a n + i bn )
Calculating c0:
⋅ ∫ f ( x ) dx = ∫ 2π −∫π
π π π
f ( x ) ⋅ 1 dx = f ( x ) ⋅ e −i⋅0⋅x dx
1 1 1 1
c0 =
2 π −π 2π −π
2π −∫π
π
f ( x ) ⋅ e −inx dx
1
c0 = n=0
Calculating cn:
1 1
c n = ∫ f ( x ) ⋅ cos nx dx − ∫ f ( x ) ⋅ sin nx dx
π π
i
2 π −π π −π
1
∫ f ( x ) ⋅ (cos nx − i ⋅ sin nx ) dx
π
=
2π −π
∫
π
f ( x ) ⋅ e −inx dx
1
= n = 1, 2 , 3,...
2π −π
Calculating c-n:
∫
π
f ( x ) ⋅ einx dx
1
c-n = n = 1, 2 , 3,...
2π −π
∫
π
f ( x ) ⋅ e −inx dx
1
cn = n = −1, − 2 , − 3,...
2π −π
∑c
n = +∞
f(x)= n einx
n = −∞
∫
π
f ( x ) ⋅ e −inx dx
1
cn =
2π −π
∑c
n = +∞
f(x)= n einx with cn:
n = −∞
∫ ∫ 2 π − π∫/ 2
π π/2 3 / 2π
f ( x ) ⋅ e −inx dx =
1 1 1
cn = 1 ⋅ e −inx dx + − 1 ⋅ e −inx dx
2π −π 2π −π / 2
=
− 1 −inx
2πin
e [ ] π/2
−π / 2 +
2πin
e [ ]
− 1 −inx 3 / 2π
π/2 =
1
2πin
[
e −in3/2 π − e −inπ / 2 − e −inπ / 2 + einπ / 2 ]
=
1
2 π in
[
2einπ / 2 − 2e −inπ / 2 =
2
nπ
]
sin n
π
2
0 for even n
cn =
2
(n + 1) / 2 odd, c0 = 0
nπ
−2
(n + 1) / 2 even
nπ
Question:
1 1 1 1 1 1
How much is 1 − + − + − + − ... ?
3 5 7 9 11 13
Answer:
f (0) = 1
1 1 1 1 1 1 π
1 − + − + − + − ... =
3 5 7 9 11 13 4
∑c
n = +∞
f(x)= n einπx / l
n = −∞
c n = ∫ f ( x ) ⋅ e −inπx / l dx
l
1
2l − l
x (2 π − x ) [0 , 2 π]
Given f( x ) =
f ( x + 2π )
Exercise 11.
a) obtain the complex Fourier Series for f (x) by using the complex notation
b) rewrite the complex form as the regular sine and cosine series
e 3 x x ∈ [0 , ln 2]
Sketch a graph and find the Fourier series for f( x ) =
f ( x + ln 2 )
Exercise 12.
ex
−x
− ln 2 ≤ x ≤ 0
Given f( x ) = e 0 ≤ x ≤ ln 2
f ( x + 2 ln 2 )
Exercise 13.
a) Sketch the periodic function for at least 3 periods, is it even or odd or neither?
b) Obtain the complex form of the Fourier series for this function and write down all terms
for –3 ≤ n ≤ 3
c) Rewrite these terms into the sine and cosine representation of the Fourier Series and
comment.
Parseval’s Theorem:
∫ ∑
π
1 ∞ 2
1
2π −π
( f ( x ))2
d x = ( 1
2 a 0 )2
+
2 n =1
(a n + b 2n )
Derive Parseval’s equation by squaring f (x) and calculating the average (f (x))2:
f ( x ) = 12 a 0 + ∑ (a n cos nx + b n sin nx )
∞
n =1
= 12 a 0 + ∑ (a n cos nx + b n sin nx )
∞ 2
( f (x ))
2
n =1
∑
1 1
∫ ∫ (a n cos nx + bn sin nx ) dx
π π ∞ 2
1
( ( )) = +
2 π − π
2
f x dx a
2π − π
2 0
n =1
Average = ∫ Term dx
π
1
Term 2π
−π
( 12 a 0 )2 ( 12 a 0 )2
(a n cos nx )2 1
2 a 2n
(bn sin nx )2 1
2 b 2n
1
2 a 0a n cos nx 0
1
2 a 0 b n sin nx 0
Example:
1
π π
− <x<
2 2
The square wave f ( x ) = − 1
π 3π
<x<
2 2
f ( x + 2π )
∫ ∫ ∫ (− 1)
+π 3π
π
1 22 2
1
( f ( x ))2
d x = 1 dx +
1 2
dx = 1
2π −π 2π − π 2 2π π
2
Hence:
π
1 + 2 + 2 + 2 + 2 + 2 + ... =
2
1 1 1 1 1
3 5 7 9 11 8
sin x [− π / 2 , π / 2]
Given the function f( x ) =
f( x + π)
Exercise 14.
1 1 1 1 1
− 2 + 2 − 2 + 2 − ...
2 − 1 4 − 1 6 − 1 8 − 1 10 − 1
2
1
∑ 2
2
∞
n = even (n − 1)
Exercise 15. Using Parseval’s Theorem, previous questions and some common sense (c),
calculate:
∑n
∞
1
a) 4
n =1
1 1 1 1 1 1
b) 4
+ 4 + 4 + 4 + 4 + 4 + ...
1 3 5 7 9 11
1 1 1 1 1 1
c) 4
+ 4 + 4 + 4 + 4 + 4 + ...
2 4 6 8 10 12