You are on page 1of 8

Math 1005 H Fall 2015

Tutorial 7
Note that when integrating to solve for an and bn , here I have used integration by
parts, while in class I have been using the table method. Please use the table method
if you know it well enough, as it’s considerably faster. Using integration by parts
is fine too. Actually computing the integrals is tedious and time consuming. You
should do at least one fully, but you can skip the calcuations in the others. Set it
up, and give the final answer, but you can leave the middle part as an exercise if you
want to save time.
1. Let f (x) = 4 − 3x for 1 ≤ x < 2 and f (x + 1) = f (x) for all x. Find the Fourier
series of f .
T
Solution: f is periodic with period T = 1, so L = 2
= 12 .

We integrate between 1 and 2 (one period long, and we have a formula for f on
this interval). We have
1 2
Z
a0 = f (x)dx
L 1
Z 2
=2 (4 − 3x)dx
1
  2
3 2
= 2 4x − x
2
  1 
3
=2 8−6− 4−
2
= −1.
For n ≥ 1, we have
1 2
Z  nπx 
an = f (x) cos dx
L 1 L
Z 2
=2 (4 − 3x) cos(2nπx)dx
1
Z 2 Z 2
=8 cos(2nπx)dx − 6 x cos(2nπx)dx
1 1
2 2 Z 2
4 3x 3
= sin(2nπx) −
sin(2nπx) + sin(2nπx)dx
nπ 1 nπ 1 nπ 1
2
3
= 0 + 0 − 2 2 cos(2nπx)
2n π 1
3
= − 2 2 (cos(4nπ) − cos(2nπ))
2n π
3
= − 2 2 (1 − 1)
2n π
=0

(to get from the third line to the fourth, we used integration by parts). Finally,
we have
1 2
Z  nπx 
bn = f (x) sin dx
L 1 L
Z 2
=2 (4 − 3x) sin(2nπx)dx
1
Z 2 Z 2
=8 sin(2nπx)dx − 6 x sin(2nπx)dx
1 1
2 2 Z 2
4 3x 3
=− cos(2nπx) + cos(2nπx) −
cos(2nπx)dx
nπ 1 nπ 1 nπ 1
2
4 3 3
= − (cos(4nπ) − cos(2nπ)) + (2 cos(4nπ) − cos(2nπ)) − 2 2 sin(2nπx)
nπ nπ 2n π 1
4 3
= − (1 − 1) + (2 − 1) − 0
nπ nπ
3
=

(again, to get from the third line to the fourth, we used integration by parts).
Thus the Fourier series for f (x) is
∞ ∞
a0 X   nπx   nπx  1 3X1
+ an cos + bn sin =− + sin(2nπx).
2 n=1
L L 2 π n=1 n

2. Let  
1 + 2x if 0 ≤ x < 1,
f (x) = ,
3 − 2x if 1 ≤ x < 2
and f (x + 2) = f (x) for all x. What does the Fourier series for f converge to at
(a) x = 3?
(b) x = 3.5?
(c) x = 4?

Solution: f is a periodic function with period T = 2.

Both f and f 0 are piecewise continuous. The Fourier Convergence Theorem


tells us that the Fourier series for f converges to
1
(f (x−) + f (x+))
2
(the average value of f ). We use our drawing of f to help us.

(a) At x = 3, the Fourier series of f converges to


1 1
(f (3−) + f (3+)) = (3 + 1) = 2.
2 2

(b) At x = 3.5, the Fourier series of f converges to


1 1
(f (3.5−) + f (3.5+)) = (0) = 0
2 2
(or, since f is continuous at x = 3.5, the Fourier series converges to
f (3.5) = 0).
(c) At x = 4, the Fourier series of f converges to
1 1
(f (4−) + f (4+)) = (−1 + 1) = 0.
2 2
3. Let  
2x if 0 ≤ x < 1,
f (x) = .
2 if 1 ≤ x < 2
Find the Fourier sine series of f .
Solution: We first extend f to an odd function f1 defined on [−2, 2].

We then extend f1 to a periodic function f˜ with period T = 4, so that L = T


2
=
2.

We have
2 L
Z  nπx 
bn = f (x) sin dx
L 0 L
Z 2  nπx 
= f (x) sin dx
0 2
Z 1  nπx  Z 2  nπx 
= 2x sin dx + 2 sin dx
0 2 1 2
4x  nπx  1 4
Z 1  nπx  4  nπx  2
=− cos + cos dx − cos
nπ 2 0 nπ 0 2 nπ 2 1
4  nπ  8  nπx  1 4   nπ 
=− cos + 2 2 sin − cos(nπ) − cos
nπ 2 nπ 2 0 nπ 2
n
8  nπ  4(−1)
= 2 2 sin − .
nπ 2 nπ
Thus the Fourier sine series of f is
∞   nπ  4(−1)n 
X 8  nπx 
sin − sin .
n=1
n2 π 2 2 nπ 2
4. Let  
x2 if 0 ≤ x < 1,
f (x) = .
5 − 3x if 1 ≤ x < 2
What does the Fourier sine series of f converge to at x = 5? What about at
x = 6? At x = 7?
Solution: We first extend f to an odd function f1 defined on [−2, 2].

We then extend f1 to a periodic function f˜ with period T = 4.

Both f˜ and f˜0 are piecewise continuous. We use the Fourier convergence theorem
and our drawing of f˜. At x = 5, the Fourier sine series of f converges to
1 1 3
(f (5−) + f (5+)) = (1 + 2) = .
2 2 2
At x = 6, the Fourier sine series of f converges to
1 1
(f (6−) + f (6+)) = (−1 + 1) = 0.
2 2
At x = 7, the Fourier sine series of f converges to
1 1 3
(f (7−) + f (7+)) = (−2 + (−1)) = − .
2 2 2

Additional examples if you have extra time


5. Find the Fourier series for the “triangle wave”
 
1 + x if −1 ≤ x < 0,
f (x) = ,
1 − x if 0≤x<1

f (x + 2) = f (x) for all x.


T
Solution: f is a periodic function period T = 2, so that L = 2
= 1.

Notice that f is even. Thus bn = 0 for all n and the Fourier series is a Fourier
cosine series. We have
2 L
Z
a0 = f (x)dx
L 0
Z 1
=2 (1 − x)dx
0
  1
1 2
=2 x− x
2 0
= 1,

and
2 L
Z  nπx 
an = f (x) cos dx
L 0 L
Z 1
=2 (1 − x) cos(nπx)dx
0
Z 1 Z 1
=2 cos(nπx)dx − 2 x cos(nπx)dx
0 0
1 1 Z 1
2 2x 2
= sin(nπx) −
sin(nπx) +
sin(nπx)dx
nπ 0 nπ 0 nπ 0
1
2
= 0 + 0 − 2 2 cos(nπx)
nπ 0
2
= − 2 2 (cos(nπ) − 1)

2
= 2 2 (1 − (−1)n )

Thus the Fourier cosine series of the triangle wave is

1 2 X 1 − (−1)n
+ cos(nπx).
2 π 2 n=1 n2

6. Find the Fourier series for the “square wave”


 
−1 if −2 ≤ x < 0,
f (x) = ,
1 if 0≤x<2
f (x + 4) = f (x) for all x.
T
Solution: f is a periodic function period T = 4, so that L = 2
= 2.

This function is often drawn with vertical lines connecting the pieces:

Notice that f is odd. Thus an = 0 for all n and the Fourier series is a Fourier
sine series. We have
2 L
Z  nπx  Z 2  nπx 
bn = f (x) sin dx = sin dx
L 0 L 0 2
2  nπx  2
=− cos
nπ 2 0
2
= − (cos(nπ) − 1)

2
= (1 − (−1)n ).

Thus the Fourier sine series of the square wave is

2 X 1 − (−1)n  nπx 
sin .
π n=1 n 2

You might also like