[go: up one dir, main page]

0% found this document useful (0 votes)
40 views11 pages

Solutions1 PDF

Download as pdf or txt
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 11

Stony Brook University MAT 341 Fall 2011

Homework Solutions, Section 1.2, Problems 1, 7, 11

§1.2 # 1 Find the Fourier series of the following functions, and sketch the graph
of their periodic extensions for at least two periods.

a. f (x) = |x|, −1<x<1


SOLUTION: f (x) = |x| is an even function. Consequently its
Fourier series only has cosines, and the integrals are
1 Za Z 1
a0 = f (x) dx = f (x) dx
2a −a 0

1Z a π Z 1
an = f (x) cos n x dx = 2 f (x) cos nπx dx
a −a a 0
since here a = 1, using Theorem 2, p. 60.
Between 0 and 1, |x| = x, so
Z 1 1 1
a0 = x dx = x2 |10 = .
0 2 2
Z 1
an = 2 x cos nπx dx.
0
We integrate by parts taking u = x and dv = cos nπx dx, so
1
v = nπ sin nπx and du = dx. Consequently
1 1 1 Z1 2 Z1
an = 2[x sin nπx|0 − sin nπx dx] = − sin nπx dx,
nπ nπ 0 nπ 0
since the first term is zero at x = 0 and x = 1. The anti-derivative
1
of sin nπx is − nπ cos nπx, so
2
an = cos nπx|10 .
n2 π 2
(
−1 if n is odd
Now cos 0 = 1 and cos nπ = , so
1 if n is even
( (
2 −1 − 1 if n is odd −4
n2 π 2
if n is odd
an = 2 2 =
nπ 1 − 1 if n is even 0 if n is even

1
and the Fourier series is
1 4 X ∞
1
f (x) ∼ − 2 cos nπx.
2 π n2
n odd
n=1

f(x)

x
-1 0 1 2 3 4
periodic
f(x)= |x|, -1 < x < 1
extension

(
−1 −2 < x < 0
b. f (x) =
1 0<x<2
SOLUTION: This is an odd function. Consequently only sines will
appear in the Fourier series, and the coefficients are

2Z a π Z 2
π
bn = f (x) sin n x dx = f (x) sin n x dx
a 0 a 0 2
since here a = 2, and using Theorem 2, p. 60.

Since f (x) = 1 on (0, 2), the integral becomes


Z 2 π 2 π
bn = sin n x dx = − cos n x|20 .
0 2 nπ 2
(
−1 if n is odd
Since cos(0) = 1 and cos nπ = we get
1 if n is even
( ) (
2 4
−1 if n is odd if n is odd
bn = − ( − 1) = nπ
nπ 1 if n is even 0 if n is even

2
The Fourier series is then
4 X ∞
1 π
f (x) ∼ sin n x.
π n 2
n odd
n=1

1
x
-2 0 2 4 6 8
-1

f(x)= 1, 0 < x < 2 periodic


= -1, -2 < x < 0 extension

§1.2 # 7 Find the Fourier series of the functions:

a. f (x) = x, −1<x<1
SOLUTION: This is an odd function, so using Theorem 2 p. 60
only the sines will have non-zero coefficients, and
2Z a π Z 1
bn = f (x) sin n x dx = 2 x sin nπx dx
a 0 a 0

since here a = 1 and f (x) = x. Integrate by parts, with u = x


1
and dv = sin nπx dx, so du = dx and v = − nπ cos nπx. We get
x 1 Z1
bn = 2[− cos nπx|10 + cos nπx dx].
nπ nπ 0
In this case the integral is zero since sin nπx equals zero when
x = 1 and when x = 0. Also nπ x
cos nπx is zero at x = 0.
So
2

( if n is odd
−2 −2 −1 if n is odd

 nπ
bn = cos nπ = · =
nπ nπ 1 if n is even  −2

if n is even

3
and the Fourier series is
2X ∞
1
f (x) ∼ (−1)n+1 sin nπx.
π n=1 n

b. f (x) = 1, − 2 < x < 2.


SOLUTION: This function is constant, so it is even, but we can
calculate the Fourier coefficients directly, and they do not depend
on a:
1 Za
a0 = 1 · dx = 1
2a −a
1Z a π 1 a π
an = cos n x dx = sin n x|a−a = 0
a −a a a nπ a
since sin n a a = sin n a (−a) = 0.
π π

1Z a π 1 −a π
bn = sin n x dx = cos n x|a−a = 0
a −a a a nπ a
since cos n πa a = cos n πa (−a). So the Fourier series is just f (x) ∼ 1.
1


 x −1
2
<x< 2
c. f (x) = 
1 3

1−x 2
<x< 2
1
SOLUTION: Look at the graph of f . If we shift it by 2
to the left
it becomes the even function g(x) = f (x + 21 ).
(
1 x + 21 −1
< x + 12 < 21
g(x) = f (x + ) = 2
2 1 − (x + 12 ) 1
2
< x + 21 < 32
or (
x + 21 −1 < x < 0
g(x) = 1
2
−x 0<x<1
We first calculate the Fourier series for g. It is an even function
with a = 1, so (using Theorem 2 on p. 60) the bn are zero and
Z 1 Z 1 1
a0 = g(x) dx = ( − x) dx = 0
0 0 2
Z 1 1 Z 1 Z 1
an = 2 g(x) cos nπx dx = 2[ cos nπx dx − x cos nπx dx]
0 2 0 0

4
R1
As we have calculated in an earlier problem, cos
( nπx dx = 0. 0
R1 −4
if n is odd
Also in problem 1 we calculated 2 0 x cos nπx dx = n2 π2
0 if n is even
So the Fourier coefficients for g(x) are
4

Z 1

 n2 π 2
if n is odd
an = −2 x cos nπx dx = 
0 
0 if n is even

and the Fourier series is


4 X ∞
1
g(x) ∼ 2 cos nπx.
π n2
n odd
n=1

Now we use this series to get the Fourier series for f :

1 4 X ∞
1 1 4 X ∞
1 nπ
f (x) = g(x− ) ∼ 2 cos nπ(x− ) = cos(nπx− ).
2 π n2 2 π2 n2 2
n odd n odd
n=1 n=1

If n is odd cos(y − nπ
2
) = ± sin y, plus if n = 1, 5, 9, ..., minus if
n = 3, 7, 11, .... So:

4 1 1 1
f (x) ∼ (sin x − sin 3x + sin 5x − sin 7x + etc.)
π 2 9 25 49
or
4 X∞
1
f (x) ∼ (−1)n sin(2n + 1)x.
2
π n=0 (2n + 1)2

§1.2 # 11 Find the Fourier sine and cosine series of the functions:

a. f (x) = 1, 0<x<a

SOLUTION: Cosine series. The even extension of f is the con-


stant function f (x) = 1 on (−a, a). As calculated in problem
7b, the only nonzero coefficient is a0 = 1. The cosine series is
f (x) ∼ 1.

5
Sine series. The odd extension of f is the “square wave”
(
−1 −a < x < 0
f (x) =
1 0<x<a

For an odd function (Theorem 2 p.60) the an = 0 and bn =


2 Ra
a 0
sin n πa x dx since f (x) = 1 on that interval. As in problem
7b, this integral is
( (
2 −a π −2 4
−2 if n is odd if n is odd
bn = cos n x|a0 = = nπ
a nπ a nπ 0 if n is even 0 if n is even

and the Fourier sine series is


4 X ∞
1 π
f (x) ∼ sin n x.
π n a
n odd
n=1

x
-a 0 a 2a 3a 4a

-1
even odd
f(x)=1, 0 < x < a extension extension

b. f (x) = x, 0<x<a

SOLUTION: Cosine series. The even extension of f is


(
−x −a < x < 0
f (x) = = |x|, −a<x<a
x 0<x<a

6
Using Theorem 2 on p.60 as usual, the bn coefficients are zero,
1Z a a
a0 = x dx =
a 0 2
2Z a π
an = x cos n x dx.
a 0 a
The an integral is done by parts as usual, with u = x and dv =
cos n πa x dx, so v = nπ
a
sin n πa x, du = dx and

a π a Za π a2 π
an = x sin n x|a0 − sin n x dx = 2 2 cos n x|a0
nπ a nπ 0 a nπ a
since the first term is zero at both ends, and
2 2
an = na2 π2 (cos(nπ) − 1) = −2 na2 π2 if n is odd, and 0 if n is even.

The Fourier cosine series is:


a 2a2 X ∞
1 π
f (x) ∼ − 2 cos n x.
2 π n 2 a
n odd
n=1

Sine series. Since f (x) = x is itself an odd function, the function


f (x) = x, − a < x < a is the odd extension of f (x) = x, 0 <
x < a. The Fourier series of this function has no cosine terms,
and the sine coefficients are given (see Theorem 2 page 60) by
2Z a π
bn = x sin n x dx.
a 0 a
We have calculated this before when a = 1, in problem 7a. Here
again we integrate by parts, with u = x and dv = sin n πa x dx, so
v = −a

cos n πa x and du = dx. This gives

2 −a π a Za π
bn = [ x cos n x|a0 + cos n x dx]
a nπ a nπ 0 a
The integral gives zero since sin n πa x is 0 when x = 0 and when
x = a. Also x cos n πa x is 0 when x = 0, so what is left is −2a

cos nπ,
2a
which is nπ if n is odd, and nπ if n is even.
−2a

7
The Fourier sine series is then
2a X

1 π
f (x) ∼ (−1)n+1 sin n x.
π n=1 n a

c. f (x) = sin x, 0 < x < 1.

x
-a 0 a 2a 3a 4a

-a

even odd
f(x)=x, 0 < x < a extension extension

SOLUTION: Cosine series. The even extension of f is


(
− sin x −1 < x < 0
f (x) =
sin x 0<x<1

(or f (x) = | sin x|, − 1 < x < 1). Using Theorem 2 on page 60,
the sine coefficients are all zero, and (here a = 1)
Z 1
a0 = sin x dx = 1 − cos 1 = 0.4596...
0
Z 1
an = 2 sin x cos nπx dx.
0

Using the identity sin A cos B = 21 (sin(A + B) + sin(A − B)) we


can rewrite the integral as
Z 1 Z 1
an = sin(1 + nπ)x dx + sin(1 − nπ)x dx
0 0

8
−1 −1
an = cos(1 + nπ)x|10 + cos(1 − nπ)x|10
1 + nπ 1 − nπ
1 1
an = (1 − cos(1 + nπ)) + (1 − cos(1 − nπ))
1 + nπ 1 − nπ
so a1 = −.3473..., a2 = −.0238..., a3 = −.0350..., etc.

Sine series. The odd extension of f is the odd function f (x) =


sin x, − 1 < x < 1. Using Theorem 2 on page 60, all the cosine
coefficients are zero, and the sine coefficients are (here a = 1)
Z 1
bn = 2 sin x sin nπx dx.
0

Here use the trigonometric identity sin A sin B = 12 (cos(A − B) −


cos(A + B)) which gives
Z 1 Z 1
bn = cos(1 − nπ)x dx − cos(1 + nπ)x dx
0 0

1 1
bn = sin(1 − nπ) − sin(1 + nπ)
1 − nπ 1 + nπ
So b1 = .5960..., b2 = −.2748..., b3 = .1805..., etc.

sin(1) = 0.8414..
1

x
-1 0 1 2 3 4

-1

even odd
f(x)=sin(x), 0 < x < 1 extension extension

9
d. f (x) = sin x 0 < x < π.

SOLUTION. Cosine series. As in part c., the even extension is


f (x) = | sin x|, − π < x < π; the sine coefficients are all zero;
1Zπ 2
a0 = sin x dx =
π 0 π
2Zπ
an = sin x cos nx dx.
π 0
Notice that orthogonality does not apply since we are only in-
tegrating over half a period! Using the trigonometric identity
sin A cos B = 21 (sin(A + B) + sin(A − B)) as before,

1Zπ 1Zπ
an = sin(1 + n)x dx + sin(1 − n)x dx
π 0 π 0
1 −1 1 −1
an = cos(1 + n)x|π0 + cos(1 − n)x|π0
π1+n π1−n
When n is odd, cos(1 + n)π = cos(1 − n)π = cos 0 so both of the
terms give zero. When n is even, cos(1 + n)π = cos(1 − n)π = −1
so
1 2 2 4 1
an = ( + )= ·
π 1+n 1−n π 1 − n2
and the Fourier cosine series is
2 4 X

1
f (x) ∼ + cos nx.
π π n even 1 − n2
n=2

Sine series. This function is its own Fourier sine series: b1 = 1


and all the other coeficients are zero.

10
1

x
-1 0 1 2 3 4 5 6 7 8 9 10
-„ „ 2„ 3„ 4„
-1
even odd
sin x, 0 < x < „ extension extension

11

You might also like