Fourier Series with Period 2

Fourier Series
1
Fourier Series
Fourier Series with Period 2 • Fourier Series for Even and Odd Functions •
Fourier Series with Period 2p
Fourier Series with Period 2
In Chapter 10, you looked at several ways to represent functions. You will now study
the problem of approximating periodic functions. Recall from Section 8.2 that a function f is periodic if there exists a nonzero number p such that f x p f x for all
x in the domain of f. The smallest such value of p is called the period of f. To approximate a periodic function with period 2, you can use a series made of cosine and sine
terms called a Fourier series.
Definition of Fourier Series with Period 2
A Fourier series is an infinite series of cosine and sine terms of the following
form.
gx a0 a1 cos x a2 cos 2x a3 cos 3x . . . an cos nx . . .
b1 sin x b2 sin 2x b3 sin 3x . . . bn sin nx . . .
The coefficients are
a0 1
2
an 1
bn 1
f x dx
f x cos nx dx
f x sin nx dx
where n 1, 2, 3, . . . . Note that the Fourier series is periodic with period 2
and the average value of f on the interval , is a0.
Note that you could use a Taylor series to approximate a periodic function f. The
Taylor series would be a good approximation of f near x c, but not necessarily a
good approximation over the entire period. A Fourier series for f will often give a
better approximation of the function over the entire period than a Taylor series.
EXAMPLE 1
Finding a Fourier Series
Find the Fourier series for f x 2x, ≤ x < .
Solution
a0 1
2
an 1
2x dx 1 x2
2
1 2 2
0
2
2
2x cos nx dx
2
cos nx nx sin nx
n2
Formula 53, u nx
2
Fourier Series
2
cos n n sin n cosn n sinn
n2
2
2 0 0
n
1
bn 2
n2
2
n2
Formula 52, u nx
sin n n cos n sin n ncosn
2 sin n 2n cos n
4
sin n n cos n
n2
Because sin n 0 for n 1, 2, 3, . . . ,
8
bn 6
f
4
4
4 cos n
0 n cos n .
n2
n
For n 1, 2, 3, . . . , the Fourier series for f is
2
3π
4
2x sin nx dx
−
2
sin nx nx cos nx
n2
y
π
4
π
2
3π
4
π
x
−4
gx 0 0cos x 0cos 2x 0cos 3x . . .
−6
−8
Graph of f compared to a curve made using
the first several terms of g.
Figure 1
2
3
4 cos
sin x 4 cos
sin 2x 4 cos
sin 3x . . .
1
2
3
4 sin x 2 sin 2x 4
sin 3x . . . .
3
Notice that g has no constant term and no cosine terms. Figure 1 shows a graph of f
compared to a curve made using the first several terms of g. The greater the number
of terms of g used to make the curve, the better the curve will fit f.
Letting f x 2 f x for the function in Example 1, you can graph f for
several periods and compare the graph to a curve made using the first several terms of
g. You can see that the Fourier series representation follows f over each period.
y
8
6
f
4
2
−4
π
2
5π
2
−6
−8
Graph of f compared to a curve made using the first several terms of g.
Figure 2
9π
2
5π
x
Fourier Series
EXAMPLE 2
3
Finding a Fourier Series
x,1,
Find the Fourier series for f x ≤ x < 0
.
0 ≤ x < Solution
Begin by noticing that f has a different definition for each interval of x. So,
you will need two integrals for each coefficient.
a0 an 0
1
2
1
x dx 1
2
0
0
dx x cos nx dx 1
0
1
x
2
0
1 2
4
2
4
1cos nx dx
0
cos nx nx sin nx
1
sin nx
n
0
1 cos n n sin n sin n
n2
n
Because sin n 0 for n 1, 2, 3, . . . , an bn 0
1
n2
1 x2
2 2
1
0
x sin nx dx 1
1 cos n
.
n2
1sin nx dx
0
1
sin nx nx cos nx
n2
0
1
cos nx
n
0
sin n n cos n cos n
1
2
n
n
n
Because sin n 0 for n 1, 2, 3, . . . ,
bn y
For n 1, 2, 3, . . . , the Fourier series for f is
4
3
gx f
2
1
−
3π
4
cos n cos n
1
1 cos n cos n
.
n
n
n
n
π
4
π
2
3π
4
x
−2
−3
−4
Graph of f compared to a curve made using
the first several terms of g.
Figure 3
2
1 cos 1 cos 2
cos x cos 2x
4
22
1 3cos 3 cos 3x . . . 1 cos cos sin x
1 cos 22 cos 2 sin 2 1 cos 33 cos 3 sin 3x . . .
2
2 2
2
2
1
2
cos x cos 3x . . . sin x sin 2x sin 3x.
4
9
2
3
Figure 3 shows a graph of f compared to a curve made using the first several terms
of g.
4
Fourier Series
For Fourier series coefficients that have integrals with forms such as sin au sin bu,
sin au cos bu, and cos au cos bu, you can use the following formulas. Notice that the formulas
are not valid when a2 b2.
1.
2.
3.
sin au sin bu du 1 sina bu sina bu
2
ab
ab
sin au cos bu du cos au cos bu du EXAMPLE 3
1 cosa bu cosa bu
2
ab
ab
1 sina bu sina bu
2
ab
ab
Solution
1
2
0
0 dx 1
2
0,sin x,
1
0
0 cos x dx ≤ x < 0
.
0 ≤ x < sin x dx 0 0
For n 1, a1 is
a1 Finding a Fourier Series
Find the Fourier series for f x a0 1
1
cos x
2
sin x cos x dx 0 0
0
1
1 sin2 x
2
0
0.
For n 2, 3, 4, . . . , you can find an using the formula
sin au cos bu du an 1
1 cosa bu cosa bu
.
2
ab
ab
0
0
0cos nx dx 1
sin x cos nx dx
0
1 cos1 nx cos1 nx
2
1n
1n
0
1 cos1 n cos1 n cos1 n 0 cos1 n 0
2
1n
1n
1n
1n
1
1
1 cos1 n cos1 n
2
1n
1n
1n 1n
For n 1, b1 is
b1 1
0
0
0sin x dx 1
1
sin x sin x dx
0
sin2 x dx
0
1
x sin x cos x
2
1
2
0
For n 2, 3, 4, . . . , you can find bn using the formula
sin au sin bu du 1 sina bu sina bu
.
2
ab
ab
Fourier Series
bn 1
0
0
−
π
2
sin x sin nx dx
0
1 sin1 nx sin1 nx
2
1n
1n
0
1 sin1 n sin1 n sin1 n 0 sin1 n 0
2
1n
1n
1n
1n
1 sin1 n sin1 n
2
1n
1n
Because sin1 n 0 for n 2, 3, 4, . . . , bn 0.
1
f
−π
1
y
2
0sin nx dx 5
π
2
π
x
−1
−2
Graph of f compared to a curve made using
the first several terms of g.
Figure 4
For n 1, 2, 3, . . . , the Fourier series for f is
1
1 4
1 4
0cos x cos 2x 0cos 3x cos 4x
2 3
2 15
1
. . . sin x 0sin 2x 0sin 3x 0sin 4x . . .
2
1
1 4
4
1
cos 2x cos 4x . . . sin x.
2 3
15
2
gx Figure 4 shows a graph of f compared to a curve made using the first several terms
of g.
Fourier Series for Even and Odd Functions
In Example 1, the Fourier series you found had no cosine terms. This will occur
anytime you find a Fourier series for a function that is symmetric with respect to the
origin. If a function is symmetric with respect to the y-axis, the Fourier series for
the function will have no sine terms. You can determine which terms to eliminate
by noticing if the function is even (symmetric with respect to the y-axis) or odd
(symmetric with respect to the origin). Recall that a function is even if f x f x
and a function is odd if f x f x.
Fourier Series for Even and Odd Functions
A Fourier series for an even function has cosine terms and may have a constant
term, but the series will not have any sine terms.
A Fourier series for an odd function has sine terms, but the series will not have
any cosine terms nor a constant term.
The function in Example 1, f x 2x, ≤ x < , is odd because the graph
of f is symmetric with respect to the origin. You also know f is odd because
f x f x. So, the Fourier series for f has only sine terms.
6
Fourier Series
EXAMPLE 4
Finding a Fourier Series for an Even Function
Find the Fourier series for f x x,
x,
≤ x < 0
.
0 ≤ x < Solution In Figure 5, you can see that the function f is symmetric with respect to
the y-axis, so f is an even function. Also, you know f is an even function because
f x f x. This means that the Fourier series for f will have cosine terms and
maybe a constant term, but no sine terms. So you do not have to find bn.
a0 an 0
1
2
1
x dx 1
2
0
0
x dx x cos nx dx 1
1 x2
2 2
0
1 x2
2 2
0
x cos nx dx
0
0
1
cos nx nx sin nx
2
n
1 cos n n sin n
1 cos n n sin n
2
n
n2
1
cos nx nx sin nx
n2x
2
2
For n 1, 2, 3, . . . , the Fourier series for f is
0
1 cos nn n sin n
Because sin n 0 for n 1, 2, 3, . . . , an 2
gx 4
4
2
1 ncos n.
2
4
4
4
cos x cos 3x cos 5x . . .
2
9
25
4
1
1
cos x cos 3x cos 5x . . . .
2
9
25
Figure 6 shows a graph of f compared to a curve made using the first several terms
of g.
y
y
f
3
−π
−
2
2
1
1
π
2
π
2
−1
The function f is even.
Figure 5
3
f
π
x
−π
−
π
2
π
2
π
x
−1
Graph of f compared to a curve made using
the first several terms of g.
Figure 6
7
Fourier Series
EXAMPLE 5
Finding a Fourier Series for an Odd Function
Find the Fourier series for f x 1,
1,
≤ x < 0
.
0 ≤ x < Solution
In Figure 7, you can see that the function f is symmetric with respect to
the origin, so f is an odd function. Also, you know f is an odd function because
f x f x. This means that the Fourier series for f will have sine terms, but will
not have a constant term nor any cosine terms. So you do not have to find a0 or an.
bn 1
0
2
1 sin nx dx 1
cos nx
n
0
1
1 sin nx dx
0
1
cos nx
n
0
1
1
1 cos n cos n 1
n
n
n
1 ncos
For n 1, 2, 3, . . . , the Fourier series for f is
gx 4
4
4
sin x 0sin 2x sin 3x 0sin 4x sin 5x . . .
3
5
4
1
1
sin x sin 3x sin 5x . . . .
3
5
Figure 8 shows a graph of f compared to a curve made using the first several terms of
g. The function f is often referred to as a square wave function.
y
y
2
2
f
f
1
−π
−
π
2
π
2
−2
The function f is odd.
Figure 7
1
π
x
−
π
2
π
2
π
x
−2
Graph of f compared to a curve made using
the first several terms of g.
Figure 8
8
Fourier Series
Fourier Series with Period 2p
You can also use a Fourier series for a function with a period other than 2. For a
function with period 2p, the coefficients are found as follows.
Definition of Fourier Series with Period 2p
A Fourier series is an infinite series of cosine and sine terms of the following form.
x
2 x
3x . . .
nx . . .
a2 cos
a3 cos
an cos
p
p
p
p
gx a0 a1 cos
b1 sin
x
2x
3x . . .
n x . . .
b2 sin
b3 sin
bn sin
p
p
p
p
The coefficients of a Fourier series with period 2p are
a0 1
2p
an 1
p
bn 1
p
p
f x dx
p
f x cos
nx
dx
p
f x sin
n x
dx
p
p
p
p
p
where n 1, 2, 3, . . . . The Fourier series is periodic with period 2p.
EXAMPLE 6
Finding a Fourier Series with Period 2p
0,5,
Find the Fourier series for f x Solution
a0 an 0 ≤ x < 4
.
4 ≤ x < 8
The period of f is 2p 8. So, p 4.
1
24
1
4
4
1
24
0 dx 0
4
0 cos
0
8
4
n x
1
dx 4
4
5
nx
sin
n
4
5
sin 2n sin n
n
5 dx 0 8
5 cos
4
5
x
8
8
4
5
2
nx
dx
4
8
4
Because sin 2n 0 and sin n 0 for n 1, 2, 3, . . . , an 0.
bn 1
4
4
0 sin
0
nx
1
dx 4
4
5
n x
cos
n
4
8
4
8
4
5
cos 2n cos n
n
5 sin
nx
dx
4
9
Fourier Series
For n 1, 2, 3, . . . , the Fourier series for f is
y
f
6
5
x
2x
3x
0 cos
0 cos
0 cos
. . .
2
4
4
4
gx 4
5 2sin 4x 250sin 24 x 352sin 34 x . . .
2
2
4
6
5 10
x 1
3 x . . .
sin
sin
.
2
4
3
4
x
8
Figure 9 shows a graph of f compared to a curve made using the first several terms
of g.
−2
Graph of f compared to a curve made using
the first several terms of g.
Figure 9
EXERCISES FOR FOURIER SERIES
In Exercises 1–4, (a) use a0 , an , and bn to write a Fourier series
for the function where n 1, 2, and 3. (b) Use a graphing utility to graph f x and the Fourier series in the same window. (c)
Show by graphing that the Fourier series approximation
improves as n increases.
1. f x x, ≤ x < 2. f x x 2, ≤ x < 2
3
4 cos n
an n2
a0 0
a0 an 0
2 cos n
bn n
6
6
−3
−6
x
3
−π
−3
π
2π
3π
x
x,1,
1 ≤ x < 0
0 ≤ x < 1
1
2
a0 1
4
an sin n
n
an 1 cos n
n 2 2
bn 1 cos n
n
bn 1 2 cos n
n
−2
−3
−4
3
3π
4. f x a0 −1
9
2π
2 ≤ x < 0
0 ≤ x < 2
y
4
3
2
1
bn 0
y
π
0,1,
y
y
−π
3. f x 2
1
x
1 2 3 4 5 6
x
−1
1
−1
−2
2
3
10
Fourier Series
In Exercises 5–14, write a Fourier series for the function. Let
n 1, 2, and 3. Use a graphing utility to verify your answer.
5. f x x , ≤ x < 6. f x x, ≤ x < y
In Exercises 15–18, decide whether the function is odd, even, or
neither. Explain your answer analytically and graphically.
15. f x x 3, 1 ≤ x < 1
y
y
1
6
6
y
16
9
9
16. f x x 4, 2 ≤ x < 2
12
3
3
−π
π
−3
2π
3π
−π
x
π
3π
x
−4
−2
−9
y
17. f x 6
0,x,
3 ≤ x < 0
0 ≤ x < 3
π
−3
2π
3π
6
3
−π
−3
−6
11. f x x
, ≤ x < ≤ x < 0
0 ≤ x <
12. f x x 1,
1,
13. f x 1,
1,
0,
≤ x < ≤ x <
2
2
≤ x < 2
0,
π
2π
3π
x
In Exercises 19–22, the function f x is either even or odd.
Write a Fourier series for the function. Let n 1, 2, and 3. Use
a graphing utility to verify your answer.
19. f x 3,
3,
≤ x <
2
2
≤ x < 2
≤ x < 0
0 ≤ x <
2
20. f x 1, ≤ x < 2
2
0,
≤ x < 2
≤ x < ≤ x < 2
≤ x <
2
2
cos x,
≤ x < 2
x
1, ≤ x < 0
22. f x x
1, 0 ≤ x < 14. f x cos x, 3
21. f x cos x,
2
≤ x < 2
1
−1
x
cos x,
≤ x < x
−1
1
0,
0,
,
1 ≤ x < 0
0 ≤ x < 1
−2
y
10. f x x,x,
1
2
−2 −1
≤ x < 0
0 ≤ x <
−4
4
3
1
sin x, ≤ x < 0
sin x,
0 ≤ x <
2
y
4
x
−6
2,
2,
18. f x x
y
3
−π
9. f x 4
1
−1
0, ≤ x < 0
7. f x x ,
0 ≤ x <
2
8. f x 8
x
−1
2
23. Describe how a Fourier series representation of a function is
different from a Taylor series representation of a function.
24. Describe the differences between Fourier series for functions
with periods of 2 and Fourier series for functions with periods
other than 2.
11
Fourier Series
In Exercises 25 – 32, function f is defined for one period. (a)
Identify the period and (b) write a Fourier series for the function. Let n 1, 2, and 3. Use a graphing utility to verify your
answer.
33. gx 1 x
25. f x 1, 4 ≤ x < 4
4
y
8
6
4
2
x
−2
In Exercises 33– 36, the graph of a function f is shown. Match
each Fourier series to the graph that it represents without
graphing. Explain your reasoning.
34. gx 4
4
4
cos x cos 3x cos 5x . . .
3
5
35. gx 4
4
4
sin x sin 3x sin 5x . . .
3
5
36. gx x
4
4
4
3 x
5 x . . .
sin
sin
sin
4
3
4
5
4
2 4 6 8 10 12
y
(a)
−4
−6
−8
4
4
4
sin x sin 3x sin 5x . . .
3
5
x
26. f x , 5 ≤ x < 5
2
−π
y
y
(b)
6
6
3
3
−3
π
2π
x
3π
3π
−3
−6
x
−6
10
y
(c)
5
8
6
4
2
x
−5
y
(d)
10
−5
6
3
− 10
x
27. f x 2,0,
3 ≤ x < 0
0 ≤ x < 3
28. f x y
0,x 2,
2 ≤ x < 0
0 ≤ x < 2
y
6
4
3
2
x
−3
3
6
−2
9
2
−2
−6
−4
x, 6 ≤ x < 0
29. f x 1, 0 ≤ x < 6
4
6
0,
2 ≤ x < 1
32. f x x 2 1, 1 ≤ x < 1
0,
1 ≤ x < 2
10
−3
2π
x
−6
37. The Fourier series for an odd function will consist only of sine
terms and possibly a constant term.
38. The graph of an even function is always symmetric to the
y-axis.
2x ,
5 ≤ x < 0
3
30. f x 2x ,
0 ≤ x < 5
3
2, 4 ≤ x < 2
31. f x 2,
2 ≤ x < 2
2, 2 ≤ x < 4
2
True or False? In Exercises 37– 40, decide whether the
statement is true or false. If it is false, explain why or give an
example that shows it is false.
x
−3
−2
−4
−6
−8
39. If g represents a Fourier series for a periodic function f, then
g also represents the Fourier series for f x 2.
40. If g is a Fourier series for a function f where a0 12, then it is
possible that f x 0,
1
2,
≤ x < 0
.
0 ≤ x <
41. Electrical Circuits A half-wave rectifier is an electrical
device that converts AC voltage to DC voltage. A model for the
output voltage V at time t is
Vt 120, sin t,
0 ≤ t < .
≤ t < 2
(a) Use a graphing utility to graph at least 3 periods of Vt.
(b) Write a Fourier series for Vt.
(c) Graph Vt and the Fourier series in the same window.
12
Fourier Series
42. Electrical Circuits A full-wave rectifier is an electrical device
that converts AC voltage into a pulsating DC voltage using both
half cycles of the AC voltage. A model for the output voltage V
at time t is
Vt 99sinsint, t,
0 ≤ t < .
≤ t < 2
(a) Use a graphing utility to graph at least 3 periods of Vt.
(b) Write a Fourier series for Vt.
(c) Graph Vt and the Fourier series in the same window.
43. Sound The loudness A, in decibels, of a pulsating alarm at
time t can be modeled by the function
At 100,
0,
45. Gibbs Phenomenon Gibbs phenomenon centers on the
behavior, primarily the overshoots, of a Fourier series approximation of a function near points of discontinuity. Consider the
function
f x 1,
1,
≤ x < 0
0 ≤ x <
and its corresponding Fourier series
gx 1
4
1
sin x sin 3x sin 5x . . . .
3
5
The overshoots for this function are shown below.
y
0 ≤ t < .
≤ t < 2
1
overshoot
(a) Use a graphing utility to graph at least 3 periods of At.
(b) Write a Fourier series for At.
(c) Graph At and the Fourier series in the same window.
−
3π
4
−
π
2
−
π
4
π
4
π
2
3π
4
π
x
44. Sound The loudness A, in decibels, of an alarm at time t can
be modeled by the function
75t,
At 75 t,
0,
0 ≤ t <
2
≤ t < .
2
≤ t < 2
(a) Use a graphing utility to graph at least 3 periods of At.
(b) Write a Fourier series for At.
(c) Graph At and the Fourier series in the same window.
(a) Use a graphing utility to graph f and the first three terms of
g in the same window.
(b) Estimate the height and width of the overshoots.
(c) What happens to the height and width of the overshoots as
the number of terms of g increase?