18.03 Practice Problems On Fourier Series - Solutions
18.03 Practice Problems On Fourier Series - Solutions
18.03 Practice Problems On Fourier Series - Solutions
2. Graph the function f (t) which is even, periodic of period 2π, and such that f (t) = 2 for
0 < t < π2 and f (t) = 0 for π2 < t < π. Is the function even, odd, or neither?
Here is the graph of f (t). Note that there is only one way to extend the definition of f over
all real t since f is specified to be even and periodic.
The function f (t) is even.
Find its Fourier series in two ways:
(a) Use parity if possible to see that some coefficients are zero. Then use the integral expres-
sions for the remaining Fourier coefficients.
The function f (t) is even, so bn = 0 for all n > 0. The only possibly nonzero coefficients are
the an ’s. Compute a0 first.
1 π 1 π/2
Z Z
a0 = f (t) dt = 2 dt = 2.
π −π π −π/2
Now compute an for n > 0. Since the function is even,
π/2
2 π 2 π/2
Z Z
4 4 nπ
an = f (t) cos(nt) dt = 2 cos(nt) dt = sin(nt) = sin
π 0 π 0 nπ 0 nπ 2
4
If n is even, this is always zero. If n is odd, then this alternates between + nπ when n of the
4
form 4k + 1 and − nπ when n is of the form 4k + 3.
The Fourier series is then
4 4 4 4
f (t) = 1 + cos t − cos(3t) + cos(5t) − cos(7t) + · · ·
π 3π 5π 7π
(b) Express f (t) in terms of sq(t), substitute the Fourier series for sq(t) and use some trig
identities.
First we see that f can be expressed in terms of the standard square wave as
π
f (t) = 1 + sq t + .
2
Now (see overleaf) the Fourier series for sq(t) is
4 sin(3t) sin(5t)
sq(t) = sin(t) + + + ··· ,
π 3 5
so we can substitute this in to get the Fourier series for f (t):
!
π sin 3t + 3π 5π
4
2
sin 5t + 2
f (t) = 1 + sin t + + + + ···
π 2 3 5
4 4 4
=1+ cos t − cos(3t) + cos(5t) − · · · .
π 3π 5π
Here we have used the angle addition formula for sine, and the same values of sine that we
used in (a). This coincides with the answer we got for Part (a).
3. Graph the function h(t) which is odd and periodic of period 2π and such that h(t) = t
for 0 < t < π2 and h(t) = π − t for π2 < t < π. What is its average value? Observe that
h0 (t) = f (t) − 1, where f (t) is the function studied in Problem 2.
The graph of h(t) is a zigzag wave.
The function is odd, so its average is zero.
Use these observations to find its Fourier series.
We observe that the function h(t) has derivative f (t)−1, where f (t) is the function described
in Problem 1. The Fourier series for f (t) − 1 has zero constant term, so we can integrate it
term by term to get the Fourier series for h(t), up to a constant term given by the average
of h(t). Since h(t) is odd, its average is 0. The rest of the series is computed below.
Z Z
4 cos(3t) cos(5t)
h(t) + c = (f (t) − 1)dt = cos t − + − · · · dt
π 3 5
4 sin(3t) sin(5t)
= sin t − + − ···
π 9 25
Since the right hand side has average value zero, c = 0.
4. Explain why any function F (x) is a sum of an even function and an odd function in just
F (x) + F (−x)
one way. Hint: F+ (x) = is even. What is the even part of ex ? What is the
2
odd part?
F (−x) + F (x)
First, F+ (x) is even: F+ (−x) = = F+ (x).
2
F (x) − F (−x)
Now notice that F (x) = F+ (x) + F− (x) where F− (x) = . I claim that F− (x)
2
F (−x) − F (x)
is odd: F− (−x) = = −F− (x).
2
So F (x) is the sum of an even function and an odd function.
To show that this decomposition is unique, we suppose we have another decomposition
F̃+ (x) + F̃− (x) = F (x), where F̃+ (x) is even and F̃− (x) is odd.
Then F+ (x) + F− (x) = F (x) = F̃+ (x) + F̃− (x), so F+ (x) − F̃+ (x) = F̃− (x) − F= (x). But the
left hand side is even and the right hand side is odd, so they both must be zero, which says
that F+ (x) = F̃+ (x) and F− (x) = F̃− (x).
This decomposition might seem familiar from hyperbolic trig function formulas: The even
ex + e−x ex − e−x
part of ex is = cosh x, and the odd part of ex is = sinh x.
2 2
Figure 1: Graph of f (t) over three periods.