Professional Documents
Culture Documents
The functions sin nθ form a complete orthogonal basis for piecewise C 1 functions in 0 ≤ θ ≤ π,
Z π
π 0
if m = n = 0
sin mθ sin nθ dθ = δmn (1 − δn0 )) = π/2 if m = n 6= 0 (2)
0 2
0 if m 6= n
The functions cos nθ can only represent even functions in −π ≤ θ ≤ π. The functions sin nθ can
only represent odd functions in −π ≤ θ ≤ π. So both cos nθ and sin nθ are needed to represent
arbitrary piecewise C 1 functions in −π ≤ θ ≤ π, in that case it is more convenient to work with
complex exponentials exp(inθ) that are complex orthogonal in −π ≤ θ ≤ π
Z π
e−imθ einθ dθ = 2πδmn . (3)
−π
2 Fourier series
Thus a piecewise smooth function f (θ) can be represented as a Fourier cosine series
∞
X
f (θ) ≈ An cos nθ ≡ C(θ) (4a)
n=0
with Z π Z π
1 2
A0 = f (θ) dθ, An = f (θ) cos nθ dθ. (4b)
π 0 π 0
The same function f (θ) can also be represented as a Fourier sine series
∞
X
f (θ) ≈ Bn sin nθ ≡ S(θ) (5a)
n=1
with Z π
2
Bn = f (θ) sin nθ dθ. (5b)
π 0
Although these expansions will match in 0 < θ < π, they will differ outside that interval since the
cosine series (4a) is necessarily even C(θ) = C(−θ) while the sine series is odd S(θ) = −S(−θ). The
function f (θ) may not be even or odd, for example f (θ) = θ + θ2 is neither odd or even. The cosine
and sine series are also necessarily periodic of period 2π, C(θ + 2π) = C(θ), S(θ + 2π) = S(θ). The
function f (θ) is not necessarily periodic (see also Haberman figs. 3.3.15 and 3.3.16).
The full Fourier series of f (θ) is
∞
X
f (θ) ≈ Cn einθ ≡ F (θ) (6a)
n=−∞
1
Math 322 2
with Z π
1
Cn = f (θ) e−inθ dθ. (6b)
2π −π
Substituting einθ = cos nθ + i sin nθ in the full Fourier series (6a) and combining the cos nθ and
sin nθ terms yields
X∞
f (θ) ≈ (an cos nθ + bn sin nθ) = F (θ) (7a)
n=0
with
a0 = C0 , an = Cn + C−n , bn = i(Cn − C−n ), (7b)
and from (6b) with e−inθ + einθ = 2 cos nθ and i(e−inθ − einθ ) = 2 sin nθ
Z π
1 π f (θ) + f (−θ)
Z
1
a0 = f (θ)dθ = dθ
2π −π π 0 2
1 π 2 π f (θ) + f (−θ)
Z Z
an = f (θ) cos nθ dθ = cos nθ dθ (7c)
π −π π 0 2
1 π 2 π f (θ) − f (−θ)
Z Z
bn = f (θ) sin nθ dθ = sin nθ dθ.
π −π π 0 2
3 Examples
As calculated in class from (4b), (5b), for the even function f (θ) = 1 (see also Haberman 3.3.10)
∞
4 X sin(2m − 1)θ
1≈ , (8a)
π 2m − 1
m=1
∞
X
1=1+ 0 cos nθ, (8b)
n=1
and for the odd function f (θ) = θ (see also Haberman 3.3.11,12,21,22,23)
∞
X (−1)n+1
θ≈2 sin nθ, (9a)
n
n=1
∞
π 4 X cos(2m − 1)θ
θ≈ − (9b)
2 π (2m − 1)2
m=1
Now dθ/dθ = 1, and the derivative of the cosine series (9b) for θ indeed yields the sine series (8a)
for 1, but the term-by-term derivative of the slowly decaying (9a)
∞ ∞
!
d X (−1)n+1 X
2 sin nθ = 2 (−1)n+1 cos nθ 6= 1 (10)
dθ n
n=1 n=1
is a non-decaying cosine series that does not equal the cosine series (8b) for f (θ) = 1 (see also
Haberman section 3.4, counterexample). The cosine series (10) converges extremely slowly towards
1 for θ 6= (2k − 1)π and goes to −∞ at θ = (2k − 1)π, for any integer k.
Math 322 3
2
S( )
0
-2
-4
-2 -1.5 -1 -0.5 0 0.5 1 1.5 2
10
0
C( )
-10
-20
-2 -1.5 -1 -0.5 0 0.5 1 1.5 2
/
Figure 1: Sine and cosine series (9a), (10) truncated to 8 and 10 terms
Differentiation term-by-term reduces the rate of convergence of the series, and may prevent con-
Math 322 4
(−1)n+1
The first one is a cosine series for 21 θ2 = n An cos nθ, with constant term A0 = 2 ∞
P P
n=1 n2
,
but that term is simply the average of θ2 /2 over (0, π), that is
∞ π
(−1)n+1 θ2 π2
Z
X 1
2 = A0 = dθ = ,
n2 π 0 2 6
n=1
The sine series for θ2 /2 follows from (11b) with (9a) for θ, yielding
∞ ∞
θ2 X (−1)n+1 4 X sin(2m − 1)θ
≈π sin nθ −
2 n π (2m − 1)3
n=1 m=1
∞ (13)
X π 4 π
= − sin(2m−1)θ − sin 2mθ.
2m − 1 π(2m − 1)3 2m
m=1
Of course, the cosine coefficients An in (12) and Bn in (13) can also be computed directly using
two integration by parts from
2 π θ2 2 π θ2
Z Z
An = cos nθ dθ, Bn = sin nθ dθ.
π 0 2 π 0 2
Finally, the sine series for θ(1 − θ/π) follows directly from (11b), since
∞
θ2
π θ π 4 X sin(2m − 1)θ
θ 1− = θ− ≈ . (14)
2 π 2 2 π (2m − 1)3
m=1
4 Convolution
Could we also obtain the Fourier series of θ2 by squaring that for θ? Yes, but this involves convo-
lution products, and that is easier to analyze in the case of full Fourier series.
Given two Fourier series F (θ) and G(θ),
∞
X ∞
X
inθ
F (θ) = F̂n e , G(θ) = Ĝn einθ , (16)
n=−∞ n=−∞
what is the Fourier series of their product H(θ) = F (θ)G(θ)? Multiplying the two series, we find
∞ ∞ ∞ ∞ ∞
!
X X X X X
i(m+n)θ ikθ
H(θ) = F̂m Ĝn e = F̂k−n Ĝn e ≡ Ĥk eikθ
m=−∞ n=−∞ k=−∞ n=−∞ k=−∞
thus the Fourier coefficients of H(θ) = F (θ)G(θ) are given by the convolution sum
∞
X ∞
X
Ĥk = F̂k−n Ĝn = F̂m Ĝk−m . (17)
n=−∞ m=−∞
P∞
so θ2 ≈ k=−∞ Ĥk eikθ with from (17)
∞
k+1
X 1
Ĥk = (−1) .
n=−∞
n (k − n)
n6=0,k
That Ĥk is a bit scary, but it is obviously real, and it must equal Ĥ−k since the Fourier series adds
up to the real θ2 . Now
1 1 1 1
= + ,
n(k − n) k n k−n
then, boldly,
∞ ∞ ∞
X 1 1 X 1 1 X 1 2
= + =− 2
n=−∞
n(k − n) k n=−∞ n k n=−∞ k − n k
n6=0,k n6=0,k n6=0,k