Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Fourier

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

Notes on Introduction on Fourier Series

Manuela Girotti

MATH 317-01 Advanced Calculus of one variable

Contents
1 Introduction and motivations 1

2 Fourier Series 3
2.1 Fourier series over any interval . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

3 Point-wise convergence 7

4 The Gibb’s phenomenon 10

1 Introduction and motivations


In the early 1800s Joseph Fourier developed a new type of series (that will later on take his name)
in his famous treatise on heat flow. We will give here a quick introduction of this very wide theory
that is Fourier Analysis.

Definition 1. A function f : [a, b] → R is said piece-wise continuous if it is continuous on [a, b]


except on a finite number of points a = x0 < x2 < . . . < xn = b where

lim f (x) and lim f (x)


x→(xi )+ x→(xi−1 )−

exist for all i = 1, . . . , n.

Definition 2. A function f : R → R is periodic with period P > 0 if f (x + P ) = f (x) for all


x ∈ R.

Examples. The function f (x) = sin(x) or the function g(x) = cos(x) are both periodic function
with period P = 2π. The function h(x) = tan(x) is a periodic function with period P = π.

Definition 3. Given a positive function q : [a, b] → R+ (we call it weight function), two functions
f, g : [a, b] → R are said to be orthogonal with respect to the weight q if
Z b
f (x)g(x) q(x)dx = 0
a

1
For a given (positive) function q, it is often possible to find an infinite sequence of functions
{φn (x)}∞
n=0 such that they are all mutually orthogonal between each other
Z b
φn (x)φm (x) q(x)dx = 0 if m 6= n.
a

If such a sequence exists, then it is called an orthogonal system of functions. Suppose that we
are also imposing that
Z b Z b
!
0< φn (x)φn (x) q(x)dx = φn (x)2 q(x)dx = 1
a a

then the orthogonal system is called an orthonormal system.

Example 1. The sequence of functions {φn (x) = sin(nx)}∞ n=0 is an orthogonal system on the
interval [0, π] with respect to the weight q(x) = 1: indeed, for any m, n ∈ N (m 6= n)
Z π
1 π
Z
sin(nx) sin(mx)dx = [cos((m − n)x) − cos((m + n)x)] dx =
0 2 0
1 sin((m − n)x) sin((m + n)x) π
 
= − =0
2 m−n m+n 0
nq o
2
Also, the sequence π sin(nx) is an orthonormal system on [0, π] with respect to the
n≥0
weight q(x) = 1.
Exercise: prove that this sequence is indeed an orthonormal system.
Remark 4. Given a (piece-wise continuous) function f : [a, b] → R, it is always possible to define
a new function f˜ : R → R that is piece-wise continuous and periodic with period P = b − a (f˜ is
called periodic extension of f ). This result is easily achievable by just “glueing” several copies
of f next to each other until it covers the whole real line.
Remark 5. If f : R → R is a periodic function of period P > 0, then the function g : R → R
defined as g(x) = f PS x is periodic with period S > 0.
From now on, we will just consider periodic functions with period P = 2π and the function f
can be considered to be defined on the interval [a, b] = [−π, π] and extended periodically to the
whole real line.

Example 2 [Trigonometric system]. The sequence of functions

{1, cos(x), cos(2x), cos(3x), . . . , sin(x), sin(2x), sin(3x), . . .}

is an orthogonal system on [−π, π] with respect to the weight q(x) = 1.


Any finite combination of elements of this sequence
N
a0 X
TN (x) = + [an cos(nx) + bn sin(nx)]
2
n=1

is called a trigonometric polynomial of degree N .

2
Remark 6. Clearly, TN : R → R is a continuous and periodic function over the whole real line
with period P = 2π.
Now we can pose some “reverse” questions:
1. If f : R → R is a 2π-periodic function, can we express it or approximate it as a trigonometric
polynomial of degree N for some N ∈ N? This would mean
N
a0 X
f (x) = TN (x) + {error term} = + [an cos(nx) + bn sin(nx)] + {error term}
2
n=1

for some coefficients a0 , {an }, {bn }.


Remark 7. The setting looks similar to the one for the Taylor polynomials.

2. Also, if this is the case, what coefficients should we use?


3. Even more generally: suppose that the approximation gets better and better as we are taking
the degree of the polynomial bigger and bigger (N → +∞). What can we say about this object:

a0 X
SF (x) = + [an cos(nx) + bn sin(nx)]?
2
n=1

Does the series converges? For which x ∈ R?


Would it be true that given a 2π-periodic function f we have the equality

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

2 Fourier Series
Let’s start with considering a piece-wise continuous function f : [−π, π] → R and let’s assume that
indeed the equality

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

makes sense, meaning that there exists some coefficients a0 , {an } and {bn } such that f can be
written as a trigonometric series.
To find the coefficients explicitly, we use the property that the set of functions {1}∪{cos(nx)}∞ n=1 ∪
{sin(nx)}∞ n=1 is an orthogonal system.
First of all we integrate the function f itself (remember that f is piece-wise continuous, therefore
f ∈ R([−π, π])):
Z π" ∞
Z π #
a0 X
f (x)dx = + [an cos(nx) + bn sin(nx)] dx
−π −π 2
n=1
∞  ∞ 
sin(nx) π − cos(nx) π
Z π Z π      
? a0
X X
= · 2π + an cos(nx)dx + bn sin(nx)dx = a0 π + an + bn
2 −π −π n −π n −π
n=1 n=1
= a0 π

3
Therefore,
Z π
1
a0 = f (x)dx
π −π

We integrate now the product of the function f with any other element of our trigonometric
(orthogonal) system: for any k ∈ N,
π ∞  Z π
a0 π
Z Z  Z π 
?  X 
f (x) sin(kx)dx =  sin(kx)dx +
  an cos(nx)
 sin(kx)dx + bn
  sin(nx) sin(kx)dx
−π 2 −π 
−π −π
n=1
sin(2kx) π
Z π Z π  
2 1 − cos(2kx) bk
= bk (sin(kx)) dx = bk dx = 2π − = bk π
−π −π 2 2 2k −π

and
Z π ∞ 
a0 π
Z Z π Z π 
?  X 
f (x) cos(kx)dx = cos(kx)dx
  + an cos(nx) cos(kx)dx + bn sin(nx)
  cos(kx)dx

−π 2 −π −π −π
n=1
Z π
= ak (cos(kx))2 dx = ak π
−π

implying
Z π Z π
1 1
ak = f (x) cos(kx)dx and bk = f (x) sin(kx)dx
π −π π −π

?
Note 8. The equalities = is not automatic and it requires some theorems to be justified; in general
you need to prove that some conditions hold so that you can swap the integral with the series.

Definition 9. Given a function f : [−π, π] → R, piece-wise continuous, the coefficients

1 π 1 π 1 π
Z Z Z
a0 = f (x)dx, an = f (x) cos(nx)dx and bn = f (x) sin(nx)dx
π −π π −π π −π

are called Fourier coefficients of the function f .


The trigonometric series built out combining the above coefficients and the trigonometric system

a0 X
SF (x) = + [an cos(nx) + bn sin(nx)]
2
n=1

is called Fourier series associated to the function f .

Remark 10. We can notice that since f is piece-wise continuous on [−π, π], then f ∈ R([π, π])
and therefore the Fourier coefficients are well-defined (f · cos, f · sin ∈ R([π, π])).

4
Example 1. Consider the function
(
−1 x ∈ [−π, 0)
f (x) =
1 x ∈ [0, π]

and calculate its Fourier series.


Then,

1 π
Z Z 0 Z π
a0 = f (x)dx = (−1)dx + (1)dx = 0
π −π π 0
1 π
Z Z 0 Z π
an = f (x) cos(nx)dx = − cos(nx)dx + cos(nx)dx = 0
π −π π 0
1 π
Z Z 0 Z π
bn = f (x) sin(nx)dx = − sin(nx)dx + sin(nx)dx
π −π π 0
(
1 cos(nx) 0 1 − cos(nx) π
   
2 0 n = 2k (even)
= + = (1 − cos(nπ)) = 4
π n −π π n 0 nπ π(2k−1) n = 2k − 1 (odd)

Therefore, the Fourier series associated to the function f above is equal to



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

Example 2. Consider the function f (x) = x2 restricted over the interval [−π, π] and calculate
its Fourier series.
Then,
1 π 2 2 π3 2π 2
Z
a0 = x dx = =
π −π π 3 3
Z π  π Z π 
1 2 1 2 sin(nx)  2 π 2 
an = x cos(nx)dx = . . . by parts . . . = x   + 2 [x cos(nx)]−π − 2 cos(nx)dx
 
π −π π  n −π n n  −π

2 (−1)n 4
= · 2π cos(nπ) =
n2Z n2
π
1
bn = x2 sin(nx)dx = 0
π −π
Therefore, the Fourier series associated to the function f above is equal to

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

Remark 11. Assume that we have the equality f (x) = SF (x) for x ∈ [−π, π] (this is indeed the
case; we will get there shortly), i.e.

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

5
and evaluate the function at the endpoint x = π:
∞ ∞ ∞
2 π2 X (−1)n π2 X (−1)n
n π2 X 1
π = +4 cos(nπ) = + 4 (−1) = + 4
3 n2 3 n2 3 n2
n=1 n=1 n=1

meaning

X 1 π2
= .
n2 6
n=1

Proposition 12. If a function is odd (i.e. f (−x) = −f (x)), then the coefficients an = 0 for all
n ∈ N ∪ {0}.
If a function is even (i.e. f (−x) = f (x)), then the coefficients bn = 0 for all n ∈ N.

2.1 Fourier series over any interval


In general, Fourier series (with sine and cosine) can be defined over any interval [α, β]. Let us
consider a function f (t) periodic with period 2π over the interval [−π, π], then its Fourier series is
given as before

a0 X
SF (t) = + [an cos(nt) + bn sin(nt)]
2
n=1

with
Z π Z π
1 1
an = f (t) cos(nt)dt and bn = f (t) sin(nt)dt.
π −π π −π

Let α, β ∈ R (suppose α < β) and define a new variable


β−α β+α
x= t+ , t ∈ [−π, π]
2π 2
π
or viceversa t = β−α (2x − β − α) (x ∈ [α, β]). We can then perform a change of variable and
define a new function g : [α, β] → R as
 
π
g(x) = f (t) =f (2x − β − α) .
π β−α
t= β−α (2x−β−α)

Then, the Fourier transform of g is


∞     
a0 X nπ nπ
SF (x) = + an cos (2x − β − α) + bn sin (2x − β − α)
2 β−α β−α
n=1

with
Z β  
2 nπ
an = g(x) cos (2x − β − α) dx
β−α α β−α
Z β  
2 nπ
bn = g(x) sin (2x − β − α) dx.
β−α α β−α

6
3 Point-wise convergence
Theorem 13 (Point-wise convergence). If f is a periodic function with period P = 2π and
both f and f 0 are piece-wise continuous on [−π, π], then the Fourier series
+∞
a0 X
SF (x) = + [an cos(nx) + bn sin(nx)]
2
n=1

is convergent. Moreover, for any x ∈ [−π, π] where the function is continuous, we have the equality
+∞
a0 X
f (x) = + [an cos(nx) + bn sin(nx)]
2
n=1

while for the points x ∈ [−π, π] where the function is discontinuous (remember that we only have a
finite number of them and the left- and righ-side limits exist), we have
+∞
f (x− ) + f (x+ ) a0 X
= + [an cos(nx) + bn sin(nx)]
2 2
n=1

Proof. The proof consists of showing that the sequence of partial sums is convergent and indeed it
converges to the value of the function f at the point x (or the average of the left- and right-side
limit). To achieve the result, we will use three Lemmas that will be stated and proved along the
way.
Lemma 14. For all n ∈ N ∪ {0}, we have
Z π
1
an cos(nx) + bn sin(nx) = f (x + t) cos(nt)dt
π −π
Z π
1
a0 = f (x − t)dt
π −π

Proof. It follows from the definition of the Fourier coefficients plus some smart manipulations:
1 π
Z
an cos(nx) + bn sin(nx) = f (t) [cos(nt) cos(nx) + sin(nt) sin(nx)] dt
π −π
1 π 1 π−x 1 π
Z Z Z
= f (t) cos(n(t − x))dt = f (s + x) cos(ns)ds = f (x + s) cos(ns)ds
π −π π −(π−x) π −π
R α+2π
where
Rπ in the last equality we used the fact that if a function g has period P = 2π, then α g(t)dt =
−π g(t)dt for any α ∈ R. The same holds for the coefficients a 0 .

Let’s consider now the sequence of partial sums:


N
a0 X
SN (x) = + [an cos(nx) + bn sin(nx)]
2
n=1
N
!
π
1 π
Z Z
1 1 X
= f (x + t) + cos(nt) dt = f (x + t)DN (t)dt
π −π 2 π −π
n=1

7
by Lemma 14. We introduced here a new function called Dirichlet’s kernel
N
1 X
DN (x) := + cos(nt)
2
n=1

which has the following property:


Lemma 15.
sin (N + 21 )x

DN (x) = ∀ x ∈ R.
2 sin x2


Furthermore,
Z π Z 0
π π
DN (x)dx = , DN (x)dx = .
0 2 −π 2
ix −ix
Proof. Indeed, we rewrite the cosine function into its exponential form cos(x) = e +e 2 P (there’s
a similar one for the sine function) and we use a result about geometric sums, namely N n
n=0 q =
1−q N +1
ix
1−q , provided that q 6= 1. Let’s assume x 6= 0 (i.e. e 6= 1),
N N N
! !
1 X 1 X X 1 e ix − ei(N +1)x e−ix − e−i(N +1)x
DN (x) = + cos(nx) = 1+ einx + e−inx = 1+ +
2 2 2 1 − eix 1 − e−ix
n=1 n=1 n=1

! " #
1 eix − ei(N +1)x e−ix − e−i(N +1)x 1 1  ix
i(N + 12 )x − ix −i(N + 21 )x

= 1+ ix ix ix + ix ix ix = 1+ x
 −e 2 +e +e 2 −e
2 e 2 (e− 2 − e 2 ) e− 2 (e 2 − e− 2 ) 2 2i sin 2

"  #
sin (N + 12 )x
  
1 1 x 1
= 1+ x −2i sin + 2i sin N+ x =  .
2 sin x2

2 2i sin 2
2 2
sin((N + 21 )x)
This formula is now clearly valid for x = 0: we just need to calculate a limit: limx→0 2 sin( x2 )
=
sin (N + 12 )x
( ) x (N + 12 )x
limx→0 (N + 21 )x 2 sin( x2 ) x = N + 21 .
The second batch of formulægiven in the Lemma is just a matter of straightforward calculations.

Getting back to the sequence of partial sums and using Lemma 15, we have
sin (N + 12 )t

1 π
Z
SN (x) = f (x + t)  dt
π −π 2 sin 2t
+ −
Now, instead of proving that SN (x) → f (x )+f2
(x )
as N → +∞, we will prove that
sin (N + 12 )t
Z π 
1 f (x+ )
f (x + t) dt −→
2 sin 2t

π 0 2
1

f (x− )
Z 0
1 sin (N + 2 )t
f (x + t) t
 dt −→ .
π −π 2 sin 2 2

8
We will focus only on the first limit (the second one follows the same procedure): from Lemma 15
(the second batch of formulæ),
f (x+ )
sin (N + 12 )t
π

f (x+ ) 1 π f (x + t) − 2
Z Z  
1 1
f (x + t)  dt − = sin (N + )t dt
2 sin 2t 2 sin 2t

π 0 2 π 0 2
Z π  
1 1
= gx (t) sin (N + )t dt
π 0 2
where
+)
f (x + t) − f (x2
gx (t) := .
2 sin 2t


By the properties of f , g is piece-wise continuous for all t ∈ (0, π]. Moreover,


+) f (x+ )
f (x + t) − f (x2 f (x + t) − 2 t
lim gx (t) = lim = lim  = D+ f (x)
2 sin 2t t

t→0+ t→0+ t→0+ t 2 sin 2

(the right-side derivative of f at the point x), meaning that gx (t) is also well-defined in zero and
gx ∈ R([0, π]).
Lemma 16 (Riemann-Lebesgue Lemma). Let f ∈ R([a, b]), then as λ → +∞
1 π 1 π
Z Z
f (t) sin (λt) dt → 0 and f (t) cos (λt) dt → 0.
π 0 π 0

1 Rπ C h − cos(λt) ib
Proof. If f (t) = C a constant function, then it is obvious: π 0 f (t) sin (λt) dt = π

λ a
2|C|
πλ → 0.
If f (x) = K {xk }K
P
k=1 Ck |[xk−1 ,xk ] is piecewise constant (where 0 is a partition of [a, b]), then the
P K
1 Rπ 2|C |
same principle holds and we have π 0 f (t) sin (λt) dt ≤ k=1πλ k → 0.
For a generic function that is Riemann-integrable f ∈ R([a, b]), we know that we can find a
partition P that can approximate the value of the integral arbitrarily well: let  > 0 and call g(t)
the piecewise constant function that describes the lower sums of f with the partition P , then

1 π 1 π 1 b 1 π
Z Z Z Z
0≤ f (t)dt − L(f, P ) = f (t)dt − g(t)dt = (f (t) − g(t)) dt < 
π 0 π 0 π a π 0
(by construction f (t) − g(t) is a non-negative function).
In conclusion,
Z π Z π Z π
1 1 1

π f (t) sin (λt) dt ≤ (f (t) − g(t)) sin (λt) dt + g(t) sin (λt) dt
0 π π 0
Z π 0
1 K K
≤ |f (t) − g(t)| dt + <  + → 0
π 0 λ λ
(we take  smaller and smaller).
The same arguments hold for the “cos” version.

9
Finally, thanks to Lemma 16, as N → +∞ we have
sin (N + 12 )t

1 π f (x+ ) 1 π
Z Z  
1
f (x + t)  dt − = gx (t) sin (N + )t dt → 0.
π 0 2 sin 2t 2 π 0 2
f (x− )
The same holds for the convergence to 2 .

4 The Gibb’s phenomenon


We start with the remark that a function f has a jump discontinuity of amplitude b at the point
x = c if
lim |f (c − ) − f (c + )| = b
→0; >0

Viceversa, f is continuous at x = c if the limit above equals zero.


We will see that if a periodic function f is discontinuous, then its Fourier series behaves in a
strange way.
The behaviour is called Gibbs’ phenonemon and it says that the truncated Fourier series
(i.e. the Fourier trigonometric polynomial)
N
a0 X
TN (x) = + [an cos(nx) + bn sin(nx)]
2
n=1

near a jump discontinuity exceeds the jump by about 9% of the size of the jump, no matter how
big the order N of the polynomial is. This means that the entire Fourier series doesn’t match
the function very well in a neighbourhood of the discontinuity (not only at the discontinuity point
itself, where we know that the value of the Fourier series is equal to f (x− )+f
2
(x+ )
, thanks to the
theorem above).
To study this phenomenon we will consider one simple example. Consider the “square wave”
function that we saw in Example 1:
f : [−π, π] → R
(
−1 x ∈ [−π, 0)
f (x) =
1 x ∈ [0, π]
periodically extended over the whole real line.
Since the jump discontinuity at x = 0 is equal to b = 1 + (−1) = 2, we will see that the peak
value of the Fourier series is about 0.18 (i.e. 9% of the value 2) higher than the maximum value of
the function f at the discontinuity point x = 0.
We already know its Fourier series:

4 X sin ((2n − 1)x)
SF (x) = ;
π 2n − 1
n=1

and its truncated Fourier series (i.e. the Fourier trigonometric polynomial of degree N ):
N  
4 X sin ((2n − 1)x) 4 sin(3x) sin ((2N − 1)x)
TN (x) = = sin(x) + + ... + .
π 2n − 1 π 3 2N − 1
n=1

10
Proposition 17. For all x ∈ R
2 sin(2N x)
[TN (x)]0 = .
π sin(x)
Proof. We first take the derivative of the truncated Fourier series from the formula above
4
[TN (x)]0 = (cos(x) + cos(3x) + . . . + cos ((2N − 1)x))
π
eix +e−ix
and we use the equivalent expressions for sine and cosine functions (cos(x) = 2 and sin(x) =
eix −e−ix
2i ) to get
!
0 4 eix + e−ix e3ix + e−3ix e(2N −3)ix + e−(2N −3)ix e(2N −1)ix + e−(2N −1)ix
[TN (x)] = + + ... +
π 2 2 2 2
4N −2
2 −(2N −1)ix   2 X n
= e 1 + e2ix + e4ix + . . . + e(4N −4)ix + e(4N −2)ix = e−(2N −1)ix e2ix
π π
n=0

this is a geometric sum with general term q = e2ix (and |q| = |e2ix | < 1), therefore its sum is equal
to
−2N ix
−e 2N ix
2 −(2N −1)ix 1 − e(4N −2)ix 1 e−(2N −1)ix − e(2N −1)ix 1 2eix e 2i
= e = −ix ix =
π 1 − e2ix π ieix (e −e ) π eix (− sin(x))
2i
2 sin(2N x)
=
π sin(x)

In order to find the maximum value(s) of the function TN (x) we study the zeroes of the derivative
π
and we can clearly see that the first zero of the derivative is for x = 2N . Since TN (0) = 0 and the
π π
terms in the sum for TN ( 2N ) are all positive, we can conclude that x = 2N is a maximum (it’s
actually a global maximum).
π π
We know that f ( 2N ) = 1 (since x = 2N ∈ [0, π]) and we want to calculate (or better, to
π
estimate) what is the value of the trigonometric polynomial TN (x) at the point x = 2N .
Remember that TN (x) should approximate the “square-wave” function f (x) and eventually
should be equal to f (x) when N → +∞ (i.e. when we get the full Fourier series and not just a
truncation of it).

 
−1)π

 π  4  π  sin 3π  sin (2N2N
2N
TN = sin + + ... + 
2N π 2N 3 2N − 1
 
(2N −1)π

π
 3π

sin N
4 π  sin 2N sin 2N 2N 2X
= π + 3π + ... + (2N −1)π
 = g (xmid, j ) ∆x
π 2N 2N 2N
π
2N j=0

the last expression is the Riemann sum using the midpoints of the partition P = {x0 = 0, x1 =
(N −1)π
π 2π
N , x2 = N , . . . , xN −1 = N
π
, xN = π} and ∆x = xj − xj−1 = N for the function g(x) = sin(x)
x .

11
The functions is Riemann integrable g ∈ R([0, π]) and therefore, as N % +∞ (meaning, when
the partition gets finer and finer) we have
N
2 π sin(x)
 π  Z
2X
lim TN = lim g (xmid, j ) ∆x = dx
N →+∞ 2N N →+∞ π π 0 x
j=0

All that?s left is to estimate is the value of the integral. For this we integrate the power series
for g(x) = sin(x)
x . We have that for all x ∈ R


sin(x) x2 x4 x6 X (−1)n
=1− + − + ... = x2n ,
x 3! 5! 7! (2n + 1)!
n=0

which gives
π ∞
πX ∞ Z π ∞  2n+1 π
(−1)n 2n 2 X (−1)n 2 X (−1)n
Z Z
2 sin(x) 2 2n x
dx = x dx = x dx =
π 0 x π 0 (2n + 1)! π (2n + 1)! 0 π (2n + 1)! 2n + 1 0
n=0 n=0 n=0
π3 π4 π6
 
=2 1− + − + . . . ≈ 1.18
3 · 3! 5 · 5! 7 · 7!

This series converges very rapidly and after five terms we have the value 1.18 correct to two decimal
places.
π π
We have seen that as N gets large the maximum value of TN (x) at x = 2N (and N → 0)
becomes 1.18, which is 9% bigger than the value of the jump of f (x) at the same point in the limit
x = 0.

12
Figure 1: Fourier series approximation to the square wave function. The number of terms in the
truncated Fourier sum is indicated in each plot, and the square wave is shown as a dashed line over
two periods.

13

You might also like