You are on page 1of 5

Assignment 9 Solutions Fourier Series

{
1.

f (x) =

x for x 0
x for x < 0

This function f (x) is an odd function, so all the an coecients are 0. We only need to
calculate bn :

2
f (x) sin nx dx =
( x) sin nx dx
0

(
)

2
2 1
1

= ( x) cos nx
cos nx dx

n
0 n

1
bn =

(since f (x) is an odd function)


(integration by parts)

2
=
n
This means that the rst three nonzero terms of the Fourier series will be:
3

2
G(x) =
sin nx
n
n=1

Here is the plot of G(x) in this case:

{
2.

g(x) =

for 2 x 2
for all other x values

This function g(x) is an even function, so all the bn coecients are 0. We only need to
calculate an .
1
a0 =
2

1
g(x) dx =
2

/2

dx =
/2

/2
1


x
=
2
2
/2

1
an =
g(x) cos nx dx (for n > 0)

2
=
g(x) cos nx dx (since g(x) is even)
0

2 /2
cos nx dx
=
0
2
n
= sin
n
2

2
2
3
2
a0 =
a1 = 2
a2 = sin = 0
a3 = sin
=
2
2
3
2
3
This means that the rst three nonzero terms of the Fourier series will be:
G(x) =

+ 2 cos x cos 3x
2
3

(x) = 2 x2

3.

This function (x) is an even function, so all the bn coecients are 0.


1
a0 =
2

x
2

1
dx =

[
]
( 2
)
1 2
1 3
2
2
x dx =
x x
= 2

3
3
0

Next, we do the calculation for n > 0. We will exploit the fact that the function is an even
function and we will also use integration by parts.

)
)
1 ( 2
2 ( 2
2
an =
x cos nx dx =
x2 cos nx dx

0

) sin nx 2
2( 2
sin nx
=
x2
(2x)
dx

n 0 0
n



4
4
4

=
x sin nx dx = 2 x cos nx +
cos nx dx
n 0
n
n2 0
0
4
4
= 2 cos n = 2 (1)n
n
n
So, the rst nonzero terms, up to n = 3 are:
G(x) =

2 2
2 2
4
(1)n
4
cos
nx
=
+
4
cos
x

cos
2x
+
cos 3x
2
3
n
3
9
n=1

4.

(x) = sinh x

The quickest way to generate the answer is to make use of the following Fourier series from
the classnotes:
ex =

sinh 2 sinh (1)n


+
(cos nx n sin nx)
2+1

n
n=1

If we replace x with x, we get:


ex =
=

sinh 2 sinh (1)n


+
(cos(nx) n sin(nx))
2+1

n
n=1

sinh 2 sinh (1)n


+
(cos(nx) + n sin(nx))
2+1

n
n=1

Now, we subtract these expressions:


ex ex =

2 sinh 2n(1)n
sin nx
2+1

n
n=1

Divide by 2 to get the hyperbolic sine

) 2 sinh
1( x
n(1)n
x
sinh x =
e e
=
sin nx
2

n2 + 1
n=1

Note that an = 0 for all n. This makes sense because the hyperbolic sine is an odd function.
n
sinh
bn = 2n(1)
.
(n2 +1)

5. For this next problem, take L = 1 so the Fourier series will have the form
a0 +

(an cos nx + bn sin nx)

Find an and bn and express the Fourier series in summation notation for the following odd
function U (x). You may omit the plot of G(x) for problem 5.
{
U (x) =

x x2 for 0 x 1
x2 + x for 1 x 0

Since U (x) is an odd function, an = 0 for all n 0. We only have to calculate bn

(x x2 ) sin nx dx

bn = 2
0

2
=
n

(1 2x) cos nx dx

(after an integration by parts)

1
4
= 2 2
sin nx dx
n 0
4
= 3 3 (1 (1)n )
n
U (x) =

(after another integration by parts)

4 (1 (1)n )
sin nx
3 n=1
n3

You might also like