Upload
vashish-ramrecha
View
57
Download
0
Embed Size (px)
Citation preview
Section 3. Fourier series and Periodic Functions
A function f (x) is said to be periodic if
f (x) = f (x + p) for any x , and fixed period p.
In this section we shall consider how such functions can be approximatedusing trigonometric functions. In order to simplify the analysis we shall, forthe moment, restrict our attention to functions f (·) which are 2π periodic,such that f (x) = f (x + 2π). With this in mind we shall attempt toapproximate f (x) by the 2π periodic trigonometric sum
f (x) ≈ fN(x) =a0
2+
N∑
n=1
an cos(nx) + bn sin(nx). (1)
(School of Mathematical Sciences) HG2M13 August 11, 2010 1 / 31
Before proceeding to calculate the coefficients of this polynomial it ishelpful to evaluate the following integrals:
Imn =
∫ π
−πcos(mx) cos(nx)dx , Jmn =
∫ π
−πsin(mx) sin(nx)dx ,
Kmn =
∫ π
−πsin(mx) cos(nx)dx ,
where m and n are positive integers. Using standard trigonometricidentities we can write
Imn =
∫ π
−π
1
2[cos((m − n)x) + cos((m + n)x)] dx ,
Jmn =
∫ π
−π
1
2[cos((m − n)x)− cos((m + n)x)] dx ,
Kmn =
∫ π
−π
1
2[sin((m − n)x) + sin((m + n)x)] dx .
(School of Mathematical Sciences) HG2M13 August 11, 2010 2 / 31
It follows (for m ≥ 1 and n ≥ 0) that
Imn = 0 for m 6= n, Imm =
∫ π
−π
1
2dx = π,
Jmn = 0 for m 6= n, Jmm =
∫ π
−π
1
2dx = π, Kmn = 0.
(School of Mathematical Sciences) HG2M13 August 11, 2010 3 / 31
To summarise ∫ π
−πcos(mx) cos(nx)dx = πδmn,
∫ π
−πsin(mx) sin(nx)dx = πδmn,
∫ π
−πsin(mx) cos(nx)dx = 0, (2)
∫ π
−π1 cos(mx)dx = 2πδ0m
∫ π
−π1 sin(mx)dx = 0.
where the Kronecker delta function δmn is equal to 1 if m = n and is equalto zero otherwise.
(School of Mathematical Sciences) HG2M13 August 11, 2010 4 / 31
Fourier Series
By taking N →∞, we hope to obtain an exact series representation off (x). In other words can we write any 2π periodic piecewise continuousfunction f as an infinite series of the following form:
f (x) =a0
2+
∞∑
n=1
an cos(nx) + bn sin(nx). (3)
If this is the case, coefficients an and bn can be found as follows:
Multiplying the above by cos(mx), integrating between −π and πgives
(School of Mathematical Sciences) HG2M13 August 11, 2010 5 / 31
∫ π
−πf (x) cos(mx)dx =
a0
2
∫ π
−πcos(mx)dx
+∞∑
n=1
[an
(∫ π
−πcos(mx) cos(nx)dx
)
+bn
(∫ π
−πsin(nx) cos(mx)dx
)]
= a0πδ0m +∞∑
n=1
anπδmn = πam.
Here we have made use of the results in (2). The coefficients am are thus
am =1
π
∫ π
−πf (x) cos(mx)dx , for all m. (4)
(School of Mathematical Sciences) HG2M13 August 11, 2010 6 / 31
A similar result can be derived for the coefficients bm by multiplying (3) bysin(mx) and integrating between −π and π.
This gives
bm =1
π
∫ π
−πf (x) sin(mx)dx , for all m. (5)
Example
Obtain the Fourier series for the 2π -periodic sawtooth wave
f (x) =
x +π
2for − π < x < 0,
π
2− x for π ≥ x ≥ 0.
Using (4) and (5) to calculate the coefficients in the Fourier series gives
(School of Mathematical Sciences) HG2M13 August 11, 2010 7 / 31
a0 = 0,
am =1
π
(∫ π
−π
π
2cos(mx)dx +
∫ 0
−πx cos(mx)dx
+
∫ π
0−x cos(mx)dx
)for m ≥ 1,
bm =1
π
(∫ π
−π
π
2sin(mx)dx +
∫ 0
−πx sin(mx)dx
∫ π
0−x sin(mx)dx
)= 0.
Note that the first integrals in the expressions for both am and bm are zeroand that the second and third integral in the expression for am take thesame value whilst those in the expression for bm cancel. Thus
(School of Mathematical Sciences) HG2M13 August 11, 2010 8 / 31
am = − 2
π
∫ π
0x cos(mx)dx = − 2
π
[x sin(mx)
m+
cos(mx)
m2
]π
0
⇒ am =2
m2π(1− (−1)m) ,
and the Fourier series for f (x) is
f (x) =∞∑
m=1
2
m2π(1− (−1)m) cos(mx).
Plots of the first 10 terms in the Fourier series are shown in figure (1).
(School of Mathematical Sciences) HG2M13 August 11, 2010 9 / 31
–1.5
–1
–0.5
0.5
1
1.5
–4 –2 2 4
x
f (x)
x
Figure 1: The first 10 terms in the Fourier series of f (x).
(School of Mathematical Sciences) HG2M13 August 11, 2010 10 / 31
Remark
Note that f (x) is an even function and furthermore that its Fourier seriescontains no terms involving sin(mx). It is in general true that the Fourierseries for an even function f (x) takes the form
f (x) =a0
2+
∞∑
n=1
an cos(nx),
while that for an odd function g(x) takes the form
g(x) =∞∑
n=1
bn sin(nx),
(convince yourself that these statements are true). Remembering thesefacts can save time when evaluating the coefficients in a Fourier series.
(School of Mathematical Sciences) HG2M13 August 11, 2010 11 / 31
3.1 Fourier series for 2`-periodic functions
Consider now a function f (x) which has period 2`. It is straightforward totransform the problem of finding a Fourier series for f (x) on the interval−` < x < ` into one on the interval −π < x < π.
It follows that its Fourier series is given by
f (x) =a0
2+
∞∑
n=1
an cos(nπ
`x)
+ bn sin(nπ
`x)
, (6)
wheream =
1
`
∫ `
−`f (x) cos
(mπ
`x)
dx ,
bm =1
`
∫ `
−`f (x) sin
(mπ
`x)
dx
(7)
Example
Obtain the Fourier series for the periodic function
g(x) = x for − 1 < x < 1.
(School of Mathematical Sciences) HG2M13 August 11, 2010 12 / 31
Note that this is an odd function in x and hence am = 0 for all m. Thevalues of bm are determined using (7)
bm =
∫ 1
−1x sin(mπx)dx =
[−x cos(mπx)
mπ+
sin(mπx)
(mπ)2
]1
−1
⇒ bm = − 2
mπ(−1)m.
Substituting this expression for bm back into (6) gives the Fourier series as
g(x) =∞∑
n=1
−21
nπ(−1)n sin(nπx).
The first 5 and first 40 terms of this series are plotted in figure 2.
(School of Mathematical Sciences) HG2M13 August 11, 2010 13 / 31
–1
–0.5
0.5
1
–1.5 –1 –0.5 0.5 1 1.5
x x
g(x)
Figure 2: The first 5 terms and the first 40 terms in the Fourier series ofg(x).
(School of Mathematical Sciences) HG2M13 August 11, 2010 14 / 31
Remark
The Fourier series converges much more slowly for the function g(x) (aswe take more terms in the series) than it did for f (x). This is because theperiodic function g(x) has a discontinuity in contrast to f (x) which iscontinuous. In particular note that the Fourier series has difficultyapproximating g close to the discontinuity where it has many finescaleoscillations; this is termed Gibb’s phenomenon. We consider these aspectsin more detail after a summary and some examples.
(School of Mathematical Sciences) HG2M13 August 11, 2010 15 / 31
3.2 Summary of formulae and examples
If f (x) is a periodic function with fundamental period 2π then
I the Fourier series for f (x) is written
12a
0+
∞∑
n=1
(an cos nx + bn sin nx)
where a0, a
n, b
nfor n = 1, 2, . . . are the Fourier coefficients.
I the Fourier coefficients are determined by the Euler formulae
a0
=1
π
∫ π
−πf (x)dx
an
=1
π
∫ π
−πf (x) cos nxdx , n = 1, 2, . . .
bn
=1
π
∫ π
−πf (x) sin nxdx n = 1, 2, . . . .
(School of Mathematical Sciences) HG2M13 August 11, 2010 16 / 31
Example
Find the Fourier coefficients of f (x) defined
f (x) = x for − π < x ≤ π and f (x + 2π) = f (x)
The graph of the function in the region −3π < x < 3π is
0
f (x)
π
x−3π −2π −π π 2π 3π
−π
(School of Mathematical Sciences) HG2M13 August 11, 2010 17 / 31
Note:
∫ π
−πx cos nxdx =
[x sin nx
n
]π
−π
−∫ π
−π
sin nx
ndx
= 0 +[cos nx
n2
]π
−π
= 0∫ π
−πx sin nxdx =
[−x cos nx
n
]π
−π+
∫ π
−π
cos nx
ndx
= −2π cos nπ
n+
[sin nx
n2
]π
−π
= −2π(−1)n
n+ 0
=2π(−1)n+1
n
since cos nπ = (−1)n and − cos nπ = (−1)n+1.
(School of Mathematical Sciences) HG2M13 August 11, 2010 18 / 31
The Fourier coefficients are
a0 =1
π
∫ π
−πxdx
an =1
π
∫ π
−πx cos nxdx n = 1, 2, . . .
bn =1
π
∫ π
−πx sin nxdx n = 1, 2, . . . .
Evaluating the integrals we obtain the results
a0 = 0, an = 0, bn =2(−1)n+1
nfor n = 1, 2, . . . .
Hence the required Fourier series is
2(sin x − 1
2 sin 2x + 13 sin 3x − 1
4 sin 4x . . .)
ie f (x) = 2∞∑
n=1
(−1)n+1 sin nx
n.
(School of Mathematical Sciences) HG2M13 August 11, 2010 19 / 31
Example
Find the Fourier coefficients of f (x) defined
f (x) = x2 for − π < x ≤ π, and f (x + 2π) = f (x).
The graph of the function in the region −3π < x < 3π is
f (x)
−π 0 π x
(School of Mathematical Sciences) HG2M13 August 11, 2010 20 / 31
The Fourier coefficients are
a0 = 1π
∫ π
−πx2dx
an = 1π
∫ π
−πx2 cos nxdx n = 1, 2, . . . .
bn = 1π
∫ π
−πx2 sin nxdx n = 1, 2, . . . .
Evaluating the integrals we obtain the results
a0 =2π2
3, an =
4(−1)n
n2, bn = 0 for n = 1.2. . . . .
Hence the required Fourier series is
π2
3 + 4(− cos x + 1
4 cos 2x − 19 cos 3x + 1
16 cos 4x + . . .)
ie π2
3 + 4∞∑
n=1
(−1)n cos nxn2 .
(School of Mathematical Sciences) HG2M13 August 11, 2010 21 / 31
If f (x) is a periodic function with period 2` i.e. f (x + 2`) = f (x).
The Fourier series for f (x) is
1
2a0 +
∞∑
n=1
[an cos
(nπx
`
)+ bn sin
(nπx
`
)]
where
a0 = 1`
∫ `
−`f (x)dx
an = 1`
∫ `
−`f (x) cos
(nπx
`
)dx n = 1, 2, . . .
bn = 1`
∫ `
−`f (x) sin
(nπx
`
)dx n = 1, 2, . . .
(School of Mathematical Sciences) HG2M13 August 11, 2010 22 / 31
Example
If g(x) = x2 for −` ≤ x < `
g(x + 2`) = g(x)
the Fourier series for g(x) is
12a0 +
∞∑
n=1
an cos(nπx
`
)
where a0 = 1`
∫ `
−`x2dx =
2`2
3
and an = 1`
∫ `
−`x2 cos
(nπx
`
)dx =
4`2(−1)n
n2π2
Note:(1) bn = 0 because g(x) is an even function(2) set ` = π then series reduces to that in a previous example.
(School of Mathematical Sciences) HG2M13 August 11, 2010 23 / 31
3.3 Properties of Fourier Series
A Fourier series is an infinite series used to represent function values andtherefore we must ask the questions
I Is it convergent?
I If so, to what does it converge?
I Can we apply differentiation to represent f ′(x)?
I Can we apply integration to represent∫
f (x)dx?
(School of Mathematical Sciences) HG2M13 August 11, 2010 24 / 31
Continuity
I A function f (x) is continuous at x = a if
(1) the limit as x → a from values of x > a, written x → a+, is f (a) and
(2) the limit as x → a from values of x < a, written x → a−, is also f (a)
Examples(1) a continuous function (2) a discontinuous function
f(x)
xa
f(a)
x
f(x)
2
1
a
(School of Mathematical Sciences) HG2M13 August 11, 2010 25 / 31
I A function is continuous inthe interval a < x < b if itis continuous at every pointof the interval a < x < b
Example
f(x)
xa b
I A function is said to bepiecewise continuous in aninterval a < x < b if it hasat most a finite number offinite discontinuities in theinterval a < x < b
Example
bax
f(x)
(School of Mathematical Sciences) HG2M13 August 11, 2010 26 / 31
DifferentiabilityI A function f (x) is differentiable at x = a if
limx→a
[f (x)− f (a)
x − a
]exists.
If it exists the derivative is labelled f ′(a).I This limit may not exist at x = a, that is f (x) may not be
differentiable at x = a if
(1) f (x) is discontinuousat x = a
or (2) the curve y = f (x)does not have a tangentat x = a.
f(x)
xa
x
f(x)
a
(School of Mathematical Sciences) HG2M13 August 11, 2010 27 / 31
Example
f (x) =
{0 for − π < x ≤ 0
1 for 0 < x ≤ π
f (x + 2π) = f (x)
The Fourier coefficients are
a0 = 1, an = 0, bn =1− (−1)n
nπn = 1, 2, . . .
The Fourier series is therefore
12 + 2
π sin x + 23π sin 3x + 2
5π sin 5x . . . .
Define S1 = 12 + 2
π sin x
S3 = S1 + 23π sin 3x
S5 = S3 + 25π sin 5x etc.
(School of Mathematical Sciences) HG2M13 August 11, 2010 28 / 31
S1
S3
S5
(School of Mathematical Sciences) HG2M13 August 11, 2010 29 / 31
We see from this example that as n →∞I At points where f (x) is continuous, say x = a, the sum of the Fourier
series is f (a)
I At points where f (x) is discontinuous, say x = b, the sum of theFourier series is
12
[f (b+) + f (b−)
]
ie mid-way between the two values.
This result is Fourier’s theorem.
(School of Mathematical Sciences) HG2M13 August 11, 2010 30 / 31
A Fourier series can be used for integrating functions.
TheoremIf f (x) is piecewise continuous in −` < x < ` and periodic with period `then the Fourier series can be integrated term by term.
The Fourier series for a smooth function f (x) may be differentiated termby term.
TheoremThe Fourier series for f ′(x) can be obtained by differentiating the Fourierseries for f (x)
ONLY
if f (x) is continuous for all x .
(School of Mathematical Sciences) HG2M13 August 11, 2010 31 / 31