You are on page 1of 2

AE2 Mathematics

Solutions to Example Sheet 2: Fourier Series


f (x) = | sin x| on (, ) with L = : f (x) is
an even function so bn = 0. On [0, ] we have
| sin x| = sin x.
Z
Z
2
2
| sin x| dx =
sin x dx
a0 =
0
0
= 4/

| sin x|

1)

where cos n = (1)n .

2
an =

sin x cos nx dx

We also know that 2 sin x cos nx = sin[(n + 1)x] sin[(n 1)x] so for n 2 (note: a1 = 0)
Z
Z
1
1
sin[(n + 1)x] dx
sin[(n 1)x] dx
an =
0
0




1 cos[(n + 1)x] 1 cos[(n 1)x]
=
+

n+1

n1
0
 0 n+1




2
(1)
1
1
1
1
n+1
=

= (1)
1

n+1 n1
(n2 1)
Therefore

an =

0
(4m42 1)

and so
| sin x| =

n = 2m + 1 (odd)
n = 2m (even)

2
4 X cos 2mx


(4m2 1)
m=1

f (x) =
f (x)

2)

x(1 x)
0

L = 1 & the function is neither odd nor even.


Z 1
Z 1
f (x) dx =
x(1 x) dx = 1/6
a0 =
1

an =

1
0

x(1 x) cos nx dx

bn =

By evaluating these integrals, one finds


an =

0x1
1x0

0
2m12 2

n = 2m + 1
n = 2m

(odd)
(even)

bn =
1

1
0

x(1 x) sin nx dx

4
(2m+1)3 3

n = 2m + 1
n = 2m

(odd)
(even)

thus giving the answer. The odd extension


R 1of f (x) = x(1 x), originally defined on 0 x 1,
on the range 1 x 1, has bn = 2 0 x(1 x) sin(nx) dx. Thus the answer is an odd
8
sine-series with coefficient twice that above, namely (2m+1)
3 3 .
R
3) x sin x is an even function over (, ) so bn = 0 and an = 2 0 x sin x cos nx dx . Using the
fact that 2 sin x cos nx = sin[(n + 1)x] sin[(n 1)x], we have (except for n = 1)
Z
2(1)n+1
1
x sin[(n + 1)x] sin[(n 1)x] dx =
by parts
an =
n2 1
0
Thus a0 = 2 and a1 is

a1 =

x sin x cos x dx =

X
(1)n+1

x sin x = 1 cos x + 2
1
2

4)

x sin 2x dx = 12

n=2

n2 1

(by parts)

cos nx

f (x)

f (x) = x

/2

/2

f (x) = x

The figure shows that f (x) is even about x = 0; thus L = and bn = 0 and
)
(Z
Z
/2
2
x dx +
(x ) dx = 0
a0 =

0
/2
an =
=

(Z
Z

/2

x cos nx dx +

x cos nx dx 2

/2

(x ) cos nx dx

cos nx dx

/2

By parts
Z

x cos nx dx =
0

1
2
(1)n 1

[nx
sin
nx
+
cos
nx]
=
=
0
2
2
n
n
(2m + 1)2

when n = 2m + 1 and zero when n is even. Moreover,


Z
sin 12 n
1
(1)m
cos nx dx = [sin nx]/2 =
=
2m + 1
n
n
/2
thus giving the answer as advertised.
2

You might also like