3chapter12 Fourier Series
3chapter12 Fourier Series
1
Chapter Contents
12.1 Orthogonal Functions
2
12.1 Orthogonal Functions
For functions on an interval [a, b]
b
Inner Product of Functions: ( f1 , f 2 ) = ∫a f1 ( x) f 2 ( x)dx
b
=
Orthogonal Functions: ∫=
( f1 , f 2 )f ( x) f ( x) dx 0
a 1 2
2 b b
a function: φ ( x) ∫= φ dx and φ ( x) ∫ φn2 ( x)dx
2
Square norm of = n n n
a a
3
{φn(x)}: orthogonal
Orthogonal Series Expansion ∞ set on [a, b].
f (= x) c0φ0 ( x) + c1φ1 ( x) + + cnφn ( x) + or f ( x) = ∑ cnφn ( x),
n =0
b b b
∫a m ∫ m ∫
f ( x)φ ( x) dx = c φ ( x)φ ( x) dx + c φ ( x)φ ( x) dx +
0 a 0 1 a 1 m
cn =
∫a
f ( x) w( x)φn ( x) dx
2
b
|| φn ( x) || = ∫ w( x)φn ( x) dx
2
|| φn ( x) ||2 a
π 2π 3π π 2π 3π
1, cos p x, cos p x, cos p x, , sin p x, sin p x, sin p x, is orthogonal on [−p, p].
Function:
a0 ∞ nπ nπ
f ( x) = + ∑ an cos x + bn sin x 1 p
2 n=1 p p a0 = ∫ f ( x)dx
0 (orthogonality) 0
p −p
p a0 p ∞
p nπ p nπ
𝑓𝑓 𝑥𝑥 , 1 = ∫− p f ( x )dx =
2 ∫ − p
dx + ∑
n =1
an ∫− p cos
p
xdx + bn ∫− p sin
p
xdx = pa0
𝑚𝑚𝜋𝜋 p mπ 1 nπ
𝑓𝑓 𝑥𝑥 , cos 𝑥𝑥 = ∫− p f ( x )cos xdx 0, m ≠ n
p
an = ∫ f ( x)cos x dx
𝑝𝑝 p =
p − p p
0 p, m = n 0
a0 p mπ ∞
p mπ nπ p mπ nπ
2 ∫− p
= cos
p
xdx + ∑ n ∫− p
n =1
a cos
p
x cos
p
x dx + bn ∫− p cos
p
x sin
p
x dx = an p
𝑚𝑚𝜋𝜋 1 p nπ
Similarly, from 𝑓𝑓 𝑥𝑥 , sin 𝑥𝑥 bn = ∫ f ( x)sin xdx
𝑝𝑝 p −p p
5
Fourier Series
a0 ∞ nπ nπ
Fourier series of f(x) on (−p, p): f ( x) = + ∑ (an cos x + bn sin x)
2 n=1 p p
1 p 1 p nπ 1 p nπ
a0 = ∫ f ( x) dx an = ∫ f ( x) cos x dx bn = ∫ f ( x) sin x dx
p −p p −p p p −p p
EX1: Expand 0, −π < x < 0
f ( x) = in a Fourier series.
π − x, 0≤ x <π
Solution:
1 π
a0 = ∫
π π
f ( x) dx
−
π
1 0 π
1 x π 2
= ∫
π −π
0dx + ∫ (π − x) dx = π x − =
0 π 2 0 2
6
Example 1
1 π 1 π 1
an = ∫
π π
f ( x)cos nx dx
−
bn =∫ (π − x)sin nxdx =
π 0 n
1 0 π
π ∫−π ∫0
= 0 dx + (π − x )cos nx dx f ( x) =
π
1 sin nx 1 π
= (π − x) + ∫ sin nx dx π 1 − (−1) n
∞
1
π n 0 n 0 + ∑ cos nx + sin nx
4 n=1 n π 2
n
π
1 cos nx − cos nπ + 1
=
− = ←cos nπ = (–1) n
nπ n 0 n 2π
1 − (−1) n
=
n 2π
7
Convergence of a Fourier Series
At points of continuity, Fourier series of f converge to f(x).
At points of discontinuity, the Fourier series converge to f ( x + ) + f ( x −)
2
Periodic extension of the f in Example 1:
Partial Sums:
Series of 15 terms
converge to converge to
f (π −) + f (−π + ) f (0+ ) + f (0−) π
=0 =
2 2 2
Gibbs phenomenon: Spikes near the discontinuities;
remains constant even when N is large.
8
12.3 Fourier Cosine and Sine Series
Even and Odd Functions
even odd
Properties: f(−x) = f(x) f(−x) = −f(x)
(a) even*even=even
(b) odd*odd=even
(c) even*odd=odd
(d) even +/- even = even f is even
(e) odd +/- odd = odd a a Fourier series become…
(f) If f is even then a ∫− a f ( x)dx = 2 ∫0 f =( x)dx 1 p 2 p
(g) If f is odd then ∫− a f ( x)dx = 0
a0 =
p ∫− p
f ( x)dx
p ∫0
f ( x)dx
1 p nπ 2 p = nπ 1 p nπ
an
p ∫− p
= f ( x )cos
p
x dx
p ∫0
f ( x )cos
p
xdx bn =∫
p −p
f ( x)sin x dx 0
p
even odd
9
Fourier Cosine and Sine Series
Fourier Cosine Series (even function f on (−p, p) )
a0 ∞ nπ 2 p 2 p nπ
f ( x=
) + ∑ an cos x a0 = ∫ f ( x) dx an = ∫ f ( x)cos x dx
2 n=1 p p 0 p 0 p
Fourier Sine Series (odd function f on (−p, p) )
∞
nπ 2 p nπ
f ( x) = ∑ bn sin x bn = ∫ f ( x)sin x dx
i =1 p p 0 p
Half-Range Expansions (arbitrary function defined on −L < x < 0)
L2 4 L2 ∞ (−1) n nπ
f ( x=
) + 2 ∑ 2 cos x
3 π n=1 n L
(b) 2 L 2 nπ 2 L2 (−1) n+1 4 L2
∫
n
= bn x sin = x dx + [( −1) − 1]
L 0 L nπ nπ
3 3
2 L2 ∞ (−1) n+1 2 nπ
f ( x) = ∑
π n=1 n nπ
n
+ 3 2 [(−1) − 1] sin
L
x
11
Example 3
(c) With p = L/2, nπ/p = 2nπ/L
2 L 2 2 2
a0 =∫
L 0
x dx
3
L
2 L 2 2nπ L2
bn = ∫ x sin xdx = −
L 0 L nπ
2 L 2 2nπ L2
an =
L ∫0
x cos
L
xdx
n 2π 2
L2 L2 ∞ 1 2nπ 1 2nπ
f ( x) = + ∑ 2 cos x − sin x
3 π n=1 n π L n L
12
12.4 Complex Fourier Series Euler’s Formula
a ∞
nπ nπ eix + e − ix
Fourier series f ( x) = 0
+ ∑ (an cos x + bn sin x) cos x =
2 n=1 p p 2
a0 ∞ einπ x/p + e − inπ x/p einπ x/p + e − inπ x/p eix − e − ix
= + ∑ an + bn sin x =
2 n=1 2 2i 2i
a0 ∞ 1 1 −inπ x/p
= + ∑ (an − ibn )e inπ x/p
+ (an + ibn )e
c0 2 n=1 2 cn 2 c-n
1 1 p 1
c0 = . ∫ f ( x) dx c−n = (an + ibn )
2 p −p 2
1 1 p nπ nπ
cn = (an − ibn )
2 =e −inπ x / p =
2 p −p ∫ f ( x) cos
p
x + i sin dx
p
1 p nπ nπ 1 p
= ∫
2 p −p
f ( x )
cos
p
x − i sin
p
x
dx =
2 ∫− p
f ( x ) e inπ x / p
dx
13
Complex Fourier Series
Complex Fourier Series - f defined on an interval (−p, p)
∞
1 p
∑ce ∫
− inπ x / p
f ( x) = n
inπ x / p
cn = f ( x ) e dx, n = 0, ± 1, ± 2,
n =−∞ 2p −p
f ( x + ) + f ( x −)
Convergence: converges to f(x) at a point of continuity and to
at a point of discontinuity. ∞
2
Fundamental period: T = 2p. Fourier series f ( x) = ∑ n
inω x
c e
n =−∞
a0 ∞
= + ∑ (an cos nω x + bn sin nω x)
2 n=1
Fundamental angular frequency: ω = 2π/T
If f is periodic and has fundamental period T, the plot of the points (nω,
|cn|) is called the frequency spectrum of f.
14
Example 1&2: Complex Fourier Series
Expand f(x) = e–x, −π < x <π, in a complex Fourier series.
Solution: 1 π − x − inx 1 π − ( in+1) x 1
∫ ∫
− ( in +1)π ( in +1)π
= c
with p = π, n = e e dx e dx = −
e − e
2π −π 2π −π 2π (in + 1)
π −π
n ( e − e ) n sinh π 1 − in π
=e −π
(cos nπ − i sin n π ) = ( −1) n −π
e
cn = (−1) = (−1)
2(in + 1)π π n2 + 1 = eπ (cos nπ + i sin nπ ) = (−1) n eπ
sinh π ∞
1 − in inx (converges to the 2π-
f ( x)
=
π
∑
n =−∞
n
(−1) 2 e
n +1 periodic extension of f )
2 inπ x 1/ 4
e 1 einπ / 2 − e − inπ / 2 1 nπ
= = sin
2inπ −1/ 4 nπ 2i nπ 2
16
12.5 Sturm-Liouville Problem
Solve the homogeneous boundary-value problem
y′′ + λ=
y 0, y (0)
= 0, y ( L=) 0
Solution:
Case I: λ = 0 y = c1x + c2, y(0) = c2 = 0, y(L) = c1L = 0, c1 = 0
then y = 0, trivial solution.
Case II: λ < 0, λ = −α2, α > 0 Choose y = c1 cosh αx + c2 sinh αx,
y(0) = 0, c1 = 0; y(L) = 0, c2 = 0 then y = 0, trivial solution.
Case III: λ > 0, λ = α2, α > 0 Choose y = c1 cos αx + c2 sin αx
y(0) = 0, c1 = 0; y(L) = 0, c2 sin αL= 0, if c2 = 0, y = 0, trivial solution.
So c2 ≠ 0, sin αL = 0, αL = nπ, α = nπ/L y = c2 sin (nπx/L) are solutions.
Eigenvalues: λn = n2π2/L2, n = 1, 2, 3,….
Eigenfunctions: y = sin (nπx/L)
17
Self-Adjoint Form
L is a linear differential operator
Adjoint differential operator: (Lu, v) = (u, 𝐿𝐿∗ v)
𝑏𝑏 𝑏𝑏
or ∫𝑎𝑎 𝐿𝐿𝐿𝐿 𝑣𝑣𝑣𝑣𝑣𝑣 = ∫𝑎𝑎 𝑢𝑢 𝐿𝐿∗ 𝑣𝑣 𝑑𝑑𝑑𝑑
Self-adjoint differential operator: (Lu, v) = (u, Lv) (say, 𝐿𝐿 = 𝐿𝐿∗ )
For 2nd-order differential equation, 𝑎𝑎 𝑥𝑥 𝑦𝑦 ′′ + 𝑏𝑏 𝑥𝑥 𝑦𝑦 ′ + 𝑐𝑐 𝑥𝑥 𝑦𝑦 = 0 or
𝑑𝑑 2 𝑑𝑑
𝐿𝐿𝑦𝑦 = 0 where 𝐿𝐿 = 𝑎𝑎 𝑥𝑥 + 𝑏𝑏 𝑥𝑥 + 𝑐𝑐 𝑥𝑥
𝑑𝑑𝑥𝑥 2 𝑑𝑑𝑑𝑑
𝑑𝑑 𝑑𝑑
If 𝑏𝑏 𝑥𝑥 = 𝑎𝑎′ 𝑥𝑥 , 𝐿𝐿 = 𝑎𝑎 𝑥𝑥 + 𝑐𝑐 𝑥𝑥 which is a self-adjoint operator
𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑
𝑒𝑒 ∫ 𝑏𝑏(𝑥𝑥)/𝑎𝑎 𝑥𝑥 𝑑𝑑𝑑𝑑
If L is not a self-adjoint operator, the integrating factor 𝐼𝐼(𝑥𝑥) =
𝑎𝑎 𝑥𝑥
can be always found to let 𝐼𝐼 𝑥𝑥 𝐿𝐿 becomes a self-adjoint operator.
18
Sturm-Liouville Equation
Sturm-Liouville Equation: 𝐿𝐿𝑦𝑦 𝑥𝑥 = −λ𝑝𝑝 𝑥𝑥 𝑦𝑦(𝑥𝑥)
𝑑𝑑 𝑑𝑑
where 𝐿𝐿 = 𝑟𝑟 𝑥𝑥 + 𝑞𝑞 𝑥𝑥 is a self-adjoint operator; 𝑝𝑝 𝑥𝑥 is a weighting
𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑
function. Or, d
[r ( x) y′] + (q ( x) + λ p ( x)) y =
0
dx
p, q, r and r′ are real-valued functions continuous on [a, b]
r(x) > 0 and p(x) > 0 for every x in [a, b]
λ is the eigenvalue; the solutions y are the eigenfunctions.
If 𝑢𝑢 𝑥𝑥 , 𝑣𝑣 𝑥𝑥 are eigenfunctions and (Lu, v) = (u, Lv), the system is called
Sturm-Liouville boundary value problem.
19
Sturm-Liouville Boundary Value Problem
Boundary Conditions:
Regular A1 y (a ) + B1 y′(a ) =
0
A2 y (b) + B2 y′(b) = 0
Periodic r(a) = r(b), and y(a) = y(b); y′(a) = y′(b)
Singular (1) r(a) = 0 and no B.C. at x=a; A2 y (b) + B2 y′(b) = 0
(2) r(b) = 0 and no B.C. at x=b; A1 y ( a ) + B1 y′( a ) =
0
(3) r(a) = r(b) = 0 and no B.C. at x=a or b;
Properties:
(a) Infinite number of real eigenvalues (d) Eigenfunctions are
(b) One eigenfunction for each eigenvalue orthogonal through p(x) on [a, b].
b
(c) Eigenfunctions are linearly independent. ∫a p ( x) ym ( x) yn (=
x) dx 0, λm ≠ λn
20
Proof of Orthogonality
Eigenfunctions: ym and yn d
[r ( x) ym′ ] + (q ( x) + λm p ( x)) ym = 0
Eigenvalues: λm and λn. dx
d
[r ( x) yn′ ] + (q ( x) + λn p ( x)) yn = 0
dx
d d
Subtraction of equations (λm − λn ) p ( x) ym yn = ym [ r ( x) yn ] − yn [ r ( x) ym′ ]
′
b dx dx
Integration (λm − λn ) ∫ p ( x) ym yn dx
a
22
Integrating Factor
Convert a ( x) y′′ + b( x) y′ + (c( x) + λ d ( x)) y =
0 into self-adjoint form
We want µ𝑏𝑏 𝑥𝑥 = µ𝑎𝑎 𝑥𝑥 ′
𝑏𝑏(𝑥𝑥) 𝑏𝑏(𝑥𝑥)
From a (x)y′ + b(x)y = 0, we need μ′ = μ so that µy′ + µ y=0
𝑎𝑎(𝑥𝑥) 𝑎𝑎(𝑥𝑥)
integrating factor: µ = e∫ b(x)/a(x)dx
Let Y = y′ e ∫ b ( x )/ a ( x ) dxY ′ + b( x) e ∫ b= ( x )/ a ( x ) dx
Y + ...
d ∫ b ( x )/ a ( x ) dx
e Y + ...
a( x) dx
∫ ( b / a ) dx b ( x ) ∫ ( b / a ) dx c ( x ) ∫ ( b / a ) dx d ( x ) ∫ ( b / a ) dx
e y′′ + e y′ + e +λ e y= 0
a( x) a( x) a( x)
or d ∫ ( b / a ) dx c( x) ∫ ( b / a ) dx d ( x) ∫ ( b / a ) dx
e y′ + e +λ e 0
y=
dx
a( x) a( x)
23
Example 3: Parametric Bessel Equation
2
′′ ′
Parametric Bessel DE: x y + xy + (α x − n ) y = 0, n = 0, 1, 2, ...
2 2 2
=
general solution: y c1 J n (α x) + c2Yn (α x)
Integrating factor: e∫ (1/x) dx = eln x = x, x > 0
2 n2 d 2 n2
′′ ′
xy + y + α x −= y 0 or [ xy ] + α x −=
′ y 0 𝑌𝑌𝑛𝑛 0 = −∞
x dx x
where r = x, q = x, λ =
− n 2 /x , p = α2 eigenvalues
B.C. for singular S-L BVP: r(0) = 0, λi = αi2
no B.C. at x=a, but y still should be bounded at x=a 𝑐𝑐2 = 0
set {Jn(αix)}, i = 1, 2, 3, …, is orthogonal through p(x) = x on [0, b].
b xJ (α x) J (α x)=
∫0 n i n j dx 0, λ ≠ λ , B.C. at x=b: A J (αb) + B αJ ′(αb) = 0
i j 2 n 2 n
24
Example 4: Legendre’s Equation
Re-write the Legendre’s differential equation (1 − x 2
) y′′ − 2 xy′ + n(n + 1) y =
0
as d
[(1 − x 2 ) y′] + n(n + 1) y =
0
dx
2
𝑛𝑛
= J n (α i x) = 𝐽𝐽𝑛𝑛 𝛼𝛼𝑏𝑏 − 𝐽𝐽𝑛𝑛+1 𝛼𝛼𝑏𝑏
𝑥𝑥
*Using the recurrence relation:
xJ= ′
v ( x) vJ v ( x) − xJ v +1 ( x) (EX6 in Ch5.3.1)
𝑥𝑥𝐽𝐽′ ν 𝑥𝑥 = −ν𝐽𝐽ν 𝑥𝑥 + 𝑥𝑥𝐽𝐽ν−1 𝑥𝑥
(Prob27 in Ch5.3.1)
27
Fourier-Bessel Series square norm
b 2
n i n i
Infinite positive eigenvalues: λi = αi2 = xi2/b2. 2α i2
0 is not an eigenvalue for n = 1, 2, 3, ….
Case III: Choose A2 = 0, B2 = b, n = 0 B.C. J 0′ (α b) = 0
J1(αb) = -J0′(αb) = 0 0 is an eigenvalue 2
b b
∫
2
For αi = 0 J0(0) = 1 is a nontrivial function 2 square norm:= ||1|| = x dx
b 2 0 2
For αi > 0 square norm: || J 0 (α i x) || =
2
J 0 (α ib)
2 28
Fourier-Bessel Series Converges to f(x) at continuities
f ( x + ) + f ( x −)
Case I: αi are defined by Jn(αb) = 0 Converge to 2 at discontinuities
∞ 2 b
f ( x) = ∑ ci J n (α i x) ci = 2 2 ∫
b J n+1 (α ib) 0
xJ n (α i x) f ( x) dx
i =1
30
Example 1
Expand f(x) = x, 0 < x < 3, in a Fourier-Bessel series, using Bessel function
of order one satisfying the boundary condition J1(3α) = 0.
Solution: 2 3
∫ J1 (α i x)dx
2
c
Case I, b = 3: i = x
3 J 2 (3α i ) 0
2 2
∞
α i J 2 (3α i )
f ( x) = 18∑ J1 (α i x)
i =1 (9α i + 8) J1 (3α i )
2 2
32
Fourier–Legendre Series Converges to f(x) at continuities
f ( x + ) + f ( x −)
Converge to 2 at discontinuities
33
Example: Spherical Harmonics
https://en.wikipedia.org/wiki/Sph
erical_harmonics
https://www.theochem.ru.nl/~pw
ormer/Knowino/knowino.org/wik
i/Spherical_harmonics.html
https://www.youtube.com/watch?
v=2yprbHra3yU&ab_channel=Q
uantumVisions%28WWUM%C3
%BCnster%29
34
Solution: Example 3
1 1 1 1 1 Write out the first four nonzero
c0 = ∫
2 −1
f ( x) P0 ( x)dx = ∫
2 0
1 ⋅1dx =
2 terms in the Fourier-Legendre
3 1 3 1 3 expansion of
c1 = ∫ f ( x) P1 ( x)dx = ∫ 1 ⋅ xdx = 0, − 1 < x < 0
2 −1 2 0 4 f ( x) =
5 1 5 1 1 2 1, 0 ≤ x < 1
c2 = ∫ f ( x) P2 ( x)dx = ∫ 1 ⋅ (3 x − 1)dx = 0
2 −1 2 0 2
7 1 7 1 1 3 7
c3 = ∫
2 −1
f ( x) P3 ( x)dx =∫ 1 ⋅ (5 x − 3 x)dx =
2 0 2
−
16
9 1 9 1 1
c4 = ∫ f ( x) P4 ( x)dx = ∫ 1 ⋅ (35 x 4 − 30 x 2 + 3)dx = 0
2 −1 2 0 8
11 1 11 1 1 11
c5 = ∫ f ( x) P5 ( x)dx = ∫ 1 ⋅ (63 x − 70 x + 15 x)dx =
5 3
2 −1 2 0 8 32 35
Example 3
1 3 7 11 65
S5 ( x) = P0 ( x) + P1 ( x) − P3 ( x) + P5 ( x) − P7 ( x)
2 4 16 32 256
See Fig 12.6.2.
36
Generalized Fourier Series
A function f on an interval can be expanded by a complete orthogonal set
(inner product w.r.t. the weighting function p(x))
𝑛𝑛𝜋𝜋𝑥𝑥 ∞
Fourier Cosine Series: Set 1, cos , interval (−p, p), 𝑝𝑝 𝑥𝑥 = 1
𝑝𝑝 𝑛𝑛=1
𝑛𝑛𝜋𝜋𝑥𝑥 ∞
Fourier Sine Series: Set sin , interval (−p, p), 𝑝𝑝 𝑥𝑥 = 1
𝑝𝑝 𝑛𝑛=1
𝑛𝑛𝜋𝜋𝑥𝑥 𝑛𝑛𝜋𝜋𝑥𝑥 ∞
Fourier series: Set 1, cos , sin , interval (−p, p), 𝑝𝑝 𝑥𝑥 = 1
𝑝𝑝 𝑝𝑝 𝑛𝑛=1
∞
Fourier-Bessel series: Set 𝐽𝐽𝑛𝑛 (𝛼𝛼𝑖𝑖 𝑥𝑥) 𝑖𝑖=1 , interval (0, b), 𝑝𝑝 𝑥𝑥 = 𝑥𝑥
∞
Fourier-Legendre series: Set 𝑃𝑃𝑛𝑛 (𝑥𝑥) 𝑛𝑛=0 , interval (-1, 1), 𝑝𝑝 𝑥𝑥 = 1
37