May 2, 2007 Lecturer Dmitri Zaitsev Trinity Term 2007

advertisement
May 2, 2007
Lecturer Dmitri Zaitsev
Trinity Term 2007
Course 2E1 2006-07 (SF Engineers & MSISS & MEMS)
S h e e t 23
Due: at the end of the tutorial
Exercise 1
Find the Fourier series of the function f (x):
n
2x − 1 if − π < x < 0
(iii) f (x) =
.
1 − 2x if 0 < x < π
Solution
First split f (x) into the sum of its even and odd parts:
f (x) = g(x) + h(x),
g(x) =
f (x) + f (−x)
,
2
h(x) =
f (x) − f (−x)
.
2
Then
g(x) =
n
2x if − π < x < 0
,
−2x if 0 < x < π
h(x) =
n
−1 if − π < x < 0
.
1 if 0 < x < π
Now for g(x), we only need to calculate its even expansion, i.e. a0 and an :
1
a0 =
2π
=
1
an =
π
Z
1
g(x) dx =
2π
−π
Z
π
0
Z
(−2x) dx +
−π
Z
π
2x dx
0
π 0
1 1
(−x2 )−π + x2 0 =
π 2 + π 2 ) = π.
2π
2π
π
1
g(x) cosnx dx =
2π
−π
Z
0
(−2x) cosnx dx +
−π
Z
π
2x cosnx dx .
0
In the first integral we change the variable y = −x:
Z
0
(−2x) cosnx dx =
−π
Z
Z
π
(2y) cosny dy =
0
0
(2y) cosny d(−y) =
π
Z
0
π
(2x) cosnx dx.
Then
1
2
an =
2π
Z
π
0
2
2x cosnx dx =
π
Z
π
x cosnx dx.
0
To integrate by parts, we write x cosnx = uv ′ with u = x and v ′ = cosnx, whence
v = sinnnx . Then
2
an =
π
π
(uv)|0
−
Z
π
′
u v dx
0
=
2
=
π
π Z π
xsinnx sinnx
2 cosnx π
dx =
−
n 0
n
π n2 0
0
2(cosnπ − 1)
2((−1)n − 1)
=
.
πn2
πn2
Finally, for the odd function h(x), we only have the odd expansion:
1
bn =
π
1
h(x) sinnx dx =
π
−π
Z
π
=
Z
0
sinnx dx +
−π
Z
π
−sinnx dx
0
2
=−
π
Z
π
sinnx dx
0
2 cosnx π
2 (−1)n − 1
.
=
π
n 0
π
n
To find the series for f we add those for g and h:
a0 +
∞
X
n=1
(an cosnx + bn sinnx) = π +
∞ X
2((−1)n − 1)
n=1
πn2
2((−1)n − 1)
cosnx +
sinnx .
πn
Download