Chapter 12
Orthogonal Functions and Fourier Series
Orthogonality and the Fourier Series
Department of Electronics Engineering
Pusan National University
Lecture Notes for Engineering Mathematics (II)
Lecture 2 of 30 (Week 1, Thu)
Where today sits in the semester
Stage 1
Stage 2
Stage 3
Stage 4
Fourier series
Fourier transforms
Complex calculus
Residues
The interval grows; the list
becomes a curve
Calculus rebuilt on the
plane
19.6
Week 1
Week 2
Week 3
Week 4
Orthogonality and the
Fourier series
Complex form and the
spectrum
Boundary value problems
Sec 12.1–12.2
Convergence, cosine and
sine series, half-range
expansions
Lecture 2 is today
Sec 12.2–12.3
Weeks 1–4 · Ch 12–13
→ Weeks 5–6 · Ch 15
A function becomes a list
of numbers
→ Weeks 7–12 · Ch 17–19.3 → Weeks 13–15 · Sec 19.4–
Blocked integrals become
a short sum
you are here
Stage 1, week by week
→
→
→
Sec 13.1–13.4
Sec 12.4
• Today’s target: a formula that turns a function f into the numbers a0, an, bn
2
Two kinds of infinity
• Infinite collections come in two sizes, and the difference decides the tool
Countable: a list reaches everything
Uncountable: no list can reach everything
ℕ 1, 2, 3, … the counting numbers
ℝ the reals. Any list you write down misses one (Cantor)
ℤ 0, 1, −1, 2, −2, … alternate and nothing is missed
the irrationals, and every interval (a, b) however short
ℚ the fractions. Dense everywhere, yet still listable
ℂ the complex plane, where Weeks 7 to 15 take place
anything you can put in a numbered queue
no queue is long enough, however clever the order
the harmonics n = 0, 1, 2, … and so a0, an, bn
the values f(x) of a function, one for every x
• Counting here means reaching everything, not reaching an end. Both columns are infinite
• ℚ is dense yet countable, so crowding is not the test
3
Why we want the list
• A Fourier series turns the second kind into the first
• A list has a first, a second, a third. Uncountably many values have no such order
• With an order you may stop after N terms, so an infinite object becomes a finite computation
• And what you dropped can be measured: that is a partial sum, and its error
• whether the part you dropped really goes to zero is the question the next lecture answers
4
Time domain → frequency domain
• A complicated waveform may be just a few sinusoids
• Q. How do we extract the components? → orthogonality (Sec 12.1)
6
Vectors and functions, line by line
• Before anything is defined: every idea today already exists for vectors
Vectors in R³ (you already know this)
Functions on [a, b] (today)
u = (u1, u2, u3): three components
f: one value f(x) for every x, uncountably many
(u, v) = u1v1 + u2v2 + u3v3
(f, g) = ∫ f(x) g(x) dx
‖u‖2 = (u, u)
‖f‖2 = (f, f)
orthogonal basis v1, v2, v3: three of them
orthogonal set ϕ0, ϕ1, ϕ2, … : infinitely many
u = c1v1 + c2v2 + c3v3
f = c0ϕ0 + c1ϕ1 + c2ϕ2 + ⋯
ci = (u, vi) / ‖vi‖2
a finite sum
cn = (f, ϕn) / ‖ϕn‖2
the sum becomes an integral
an infinite series
today’s target
• The last row is what we are after. The rest of today is spent earning the right to write it
• x labels the values of f and runs over a continuum; n labels the coefficients and runs over a list
7
12.1 Inner product of functions
• Vectors: multiply corresponding components, then add
• Functions: multiply pointwise, then integrate
Definition 12.1.1 Inner product of two functions
The definition is chosen so that the integral keeps all four properties of the dot product
8
Orthogonal functions and sets
Definition 12.1.3 Orthogonal set, eq (2). A pair is Definition 12.1.2
Example 1 (Sec 12.1)
f1 = x2, f2 = x3 on [−1, 1]
integrand x⁵ is odd, so the integral
is 0
⇒ (f1, f2) = 0
Definition 12.1.4
orthogonal with respect to a weight
w(x) > 0
9
Showing the set is orthogonal (1 of 3)
• Claim (Example 2, Sec 12.1): the set {1, cos x, cos 2x, …} is orthogonal on [−π, π]
• Every pair has to be checked. Step 1 is the constant against a cosine
• n is an integer, so both endpoints give sin (integer · π) = 0
• Step 2 is a cosine against another cosine, m ≠ n. The product is not a standard integral,
• so turn it into a sum first (product-to-sum identity)
10
Showing the set is orthogonal (2 of 3)
• Substitute, then use linearity to split the integral
• Antidifferentiate each cosine, then evaluate at both limits
• sin is odd, so each bracket gives twice its value at π and the ½ cancels
• m + n and m − n are integers, so both sines are sin (integer · π) = 0. The denominators need m ≠ n
11
Showing the set is orthogonal (3 of 3)
• Two of the three come from symmetry alone: sin is odd, 1 and cos are even
• an odd integrand over a symmetric interval integrates to zero, whatever m and n are
• Only sin against sin needs work, and it is Step 2 with one identity swapped
All five pairs check out: the whole set is orthogonal on [−π, π]
(1, cos) = 0
(1, sin) = 0
(cos m, cos n) = 0
(sin m, sin n) = 0 for m ≠ n
(sin m, cos n) = 0 always
12
The norms of the same set
• The norm is the m = n case: a function against itself (eq (3))
• Our set lives on [−π, π], so every integral below runs from −π to π
• cos² nx is not a standard integral either, so use the half-angle identity first
• The sine is the same work with one sign flipped in the identity
• every cosine and every sine has squared norm π; only the constant differs, at 2π
13
The derivation: the vector case, term by term
• Expand u in an orthogonal basis; in R³ three orthogonal nonzero vectors are a basis
• To get c1, take the inner product with v1, then expand the sum term by term
• Orthogonality: (v2, v1) = 0 and (v3, v1) = 0, so two of the three terms die
• line one was free: in R³ three orthogonal nonzero vectors are a basis, count equals dimension
14
The derivation: substituting the series
• Assume f has such an expansion. Orthogonality alone does not give one
• Multiply by ϕn and integrate. Put the whole series where f used to be
• ϕn does not depend on k, so it goes inside the sum; then take the sum outside
• Compare with the vector slide: the only change is that the sum inside became an integral
• two things assumed, not proved: that the expansion exists, and that the sum may leave the integral
15
The derivation: orthogonality does the work
• Write the sum out. Every term is an inner product of two basis functions
• Every one with k ≠ n is zero. One term out of infinitely many survives
• Divide by the squared norm and the coefficient is yours. Textbook eq (8)
• Orthogonality is a filter: one component passes, the rest are rejected. It returns in Week 14
16
Which orthogonal set, and on which interval
• The interval is now [−p, p], so cos x no longer fits: its period is 2π, not 2p
• Stretch every harmonic by that factor and the textbook’s set (1) appears
• Is it still orthogonal? Substitute t = πx/p, which sends [−p, p] back to [−π, π]
• nothing is re-proved: dx brings out a constant p/π, and 0 times anything is still 0
• The norms we computed travel the same way
• the constant is the odd one out at 2p; cosines and sines are p. That gap becomes a0/2
17
Textbook eq (8) applied to the trig set
• Put the trig set into the expansion, eq (7): three kinds of member
• Each coefficient comes from eq (8), two slides back. Take ϕ0 = 1 first
• Then the cosines and the sines, each divided by its own squared norm, which is p
• Now put n = 0 into the an formula: cos 0 = 1, so it returns twice c0
• naming that value a0 lets one formula cover every coefficient, n = 0 included
18
12.2 The Fourier series (Def 12.2.1)
Definition 12.2.1 Fourier series of f on (−p, p), eqs (8) to (11)
• a0/2 convention: the an formula at n = 0 reduces to a0, so there is one formula to know
• EE reading: a0/2 = DC component; an, bn = n-th harmonic strength
19
Example 1 (Sec 12.2): your turn
f(x) = 0 on (−π, 0), f(x) = π − x on [0, π)
with p = π
(textbook Fig 12.2.1)
• Find a0
• Find an for every n ≥ 1
• Find bn for every n ≥ 1
• Write out the Fourier series of f
• the three coefficient formulas are on the previous slide, with p = π
• Before you start: look at where f is zero, and at the polynomial times a cosine
20
Example 1 (Sec 12.2): the function and a0
f(x) = 0 on (−π, 0), f(x) = π − x on [0, π)
(p = π, textbook Fig 12.2.1)
• a0: the left half is 0, so the integral only runs over [0, π]
• So a0/2 = π/4, which is the average value of f
21
Example 1: an by integration by parts
• Integration by parts is the product rule, integrated and rearranged
• Pick u to be the factor that differentiates away; π − x does, cos nx does not
• du carries a minus, so the minus in the formula turns into a plus
• The boundary term is zero at both ends: π − x = 0 at x = π, and sin 0 = 0
• so only the remaining integral is left. Antidifferentiate and evaluate
• cos nπ = (−1)ⁿ, so an = 0 for even n and 2/(n2π) for odd n
22
Example 1: bn and a surviving boundary term
• Same u, but now dv is the sine. Watch the minus that comes with v
• This time the lower limit does not vanish: cos 0 = 1
• The remaining integral is 0, so only the boundary term contributes
• an dies for even n and decays like 1/n2; bn survives for every n and decays like 1/n
23
Example 1: the series and its partial sums
Example 1 (Sec 12.2), result: the Fourier series of this f, eq (13)
• The tilde, not an equals sign: convergence has not been proved yet
• At the jump x = 0 the sums hesitate. Converge to what? → next lecture
24
Summary
• Inner product = "multiply, then integrate"; orthogonal ⇔ inner product 0
• Proved the whole trig set orthogonal; ‖1‖² = 2π, ‖cos nx‖² = ‖sin nx‖² = π
• Coefficient formula: inner product over squared norm (textbook eq (8))
• Example 1 by parts: a0 = π/2; an nonzero for odd n only; bn = 1/n
• EE dictionary: a0/2 = DC, (an, bn) = harmonics, coefficient plot = spectrum
25
Next: convergence (Thm 12.2.1)
• Lecture 3 (Week 2, Tue)
◦ Theorem 12.2.1: value at a jump = average [f(x⁺)+f(x⁻)]/2
◦ Periodic extension (Fig 12.2.2); endpoint values
◦ Series summation: 1 + 1/9 + 1/25 + ⋯ = π²/8
◦ Gibbs phenomenon (Sec 12.3 preview); RC-filter application
26