12.3 Fourier Cosine and Sine Series
INTRODUCTION
The effort expended in the evaluation of coefficients a0, an , and bn in expanding a function f in a Fourier series is reduced significantly when f is either an even or an odd function. A function f is said to be
even if f(–x) = f(x) and odd if f(–x) = –f(x).
On a symmetric interval such as (–p, p), the graph of an even function possesses symmetry with respect to the y-axis, whereas the graph of an odd function possesses symmetry with respect to the origin.
Even and Odd Functions
It is likely the origin of the words even and odd derives from the fact that the graphs of polynomial functions that consist of all even powers of x are symmetric with respect to the y-axis, whereas graphs of polynomials that consist of all odd powers of x are symmetric with respect to the origin. For example,
See FIGURE 12.3.1 and 12.3.2. The trigonometric cosine and sine functions are even and odd functions, respectively, since cos (–x) = cos x and sin (–x) = –sin x. The exponential functions f(x) = ex and f(x) = e–x are neither even nor odd.
Properties
The following theorem lists some properties of even and odd functions.
THEOREM 12.3.1 Properties of Even/Odd Functions
- The product of two even functions is even.
- The product of two odd functions is even.
- The product of an even function and an odd function is odd.
- The sum (difference) of two even functions is even.
- The sum (difference) of two odd functions is odd.
- If f is even, then f(x) dx = 2 f(x) dx.
- If f is odd, then f(x) dx = 0.
PROOF OF (b):
Let us suppose that f and g are odd functions. Then we have f(–x) = –f(x) and g(–x) = –g(x). If we define the product of f and g as F(x) = f(x)g(x), then
F(–x) = f(–x)g(–x) = (–f(x))(–g(x)) = f(x)g(x) = F(x).
This shows that the product F of two odd functions is an even function. The proofs of the remaining properties are left as exercises. See Problem 56 in Exercises 12.3.≡
Cosine and Sine Series
If f is an even function on the interval (–p, p), then in view of the foregoing properties, the coefficients (9), (10), and (11) of Section 12.2 become
Similarly, when f is odd on the interval (–p, p),
an = 0, n = 0, 1, 2, …, bn = f(x) sin x dx.
We summarize the results in the following definition.
DEFINITION 12.3.1 Fourier Cosine and Sine Series
(i) The Fourier series of an even function on the interval (–p, p) is the cosine series
(1)
where (2)
(3)
(ii) The Fourier series of an odd function on the interval (–p, p) is the sine series
(4)
where (5)
EXAMPLE 1 Expansion in a Sine Series
Expand f(x) = x, –2 < x < 2, in a Fourier series.
SOLUTION
Inspection of FIGURE 12.3.3 shows that the given function is odd on the interval (–2, 2), and so we expand f in a sine series. With the identification 2p = 4, we have p = 2. Thus (5), after integration by parts, is
Therefore (6)≡
The function in Example 1 satisfies the conditions of Theorem 12.2.1. Hence the series (6) converges to the function on (–2, 2) and the periodic extension (of period 4) given in FIGURE 12.3.4.
EXAMPLE 2 Expansion in a Sine Series
The function f(x) = shown in FIGURE 12.3.5 is odd on the interval (–π, π). With p = π we have from (5)
and so (7)≡
Gibbs Phenomenon
With the aid of a CAS we have plotted in FIGURE 12.3.6 the graphs S1(x), S2(x), S3(x), S15(x) of the partial sums of nonzero terms of (7). As seen in Figure 12.3.6(d), the graph of S15(x) has pronounced spikes near the discontinuities at x = 0, x = π, x = –π, and so on. This “overshooting” by the partial sums SN from the function values near a point of discontinuity does not smooth out but remains fairly constant, even when the value N is taken to be large. This behavior of a Fourier series near a point at which f is discontinuous is called the Gibbs phenomenon after the American mathematician/scientist Josiah Willard Gibbs (1839–1903). Gibbs was the co-inventor of modern vector analysis.
The periodic extension of f in Example 2 onto the entire x-axis is a meander function (see page 255).
Half-Range Expansions
Throughout the preceding discussion it was understood that a function f was defined on an interval with the origin as midpoint, that is, (–p, p). However, in many instances we are interested in representing a function that is defined on an interval (0, L) by a trigonometric series. This can be done in many different ways by supplying an arbitrary definition of the function on the interval (–L, 0). For brevity we consider the three most important cases. If y = f(x) is defined on the interval (0, L), then:
- reflect the graph of the function about the y-axis onto (–L, 0); the function is now even on the interval (–L, L) (see FIGURE 12.3.7); or
- reflect the graph of the function through the origin onto (–L, 0); the function is now odd on the interval (–L, L) (see FIGURE 12.3.8); or
- define f on (–L, 0) by f(x) = f(x + L) (see FIGURE 12.3.9).
Note that the coefficients of the series (1) and (4) utilize only the definition of the function on (0, p), that is, for half of the interval (–p, p). Hence in practice there is no actual need to make the reflections described in (i) and (ii). If f is defined on (0, L), we simply identify the half-period as the length of the interval p = L . The coefficient formulas (2), (3), and (5) and the corresponding series yield either an even or an odd periodic extension of period 2L of the original function. The cosine and sine series obtained in this manner are known as half-range expansions. Last, in case (iii) we are defining the function values on the interval (–L, 0) to be the same as the values on (0, L). As in the previous two cases, there is no real need to do this. It can be shown that the set of functions in (1) of Section 12.2 is orthogonal on [a, a + 2p] for any real number a. Choosing a = –p, we obtain the limits of integration in (9), (10), and (11) of that section. But for a = 0 the limits of integration are from x = 0 to x = 2p. Thus if f is defined over the interval (0, L), we identify 2p = L or p = L/2. The resulting Fourier series will give the periodic extension of f with period L. In this manner the values to which the series converges will be the same on (–L, 0) as on (0, L).
EXAMPLE 3 Expansion in Three Series
Expand f(x) = x2, 0 < x < L, (a) in a cosine series, (b) in a sine series, (c) in a Fourier series.
SOLUTION
The graph of the function is given in FIGURE 12.3.10.
(a) We have
where integration by parts was used twice in the evaluation of an . Thus
(8)
(b) In this case we must again integrate by parts twice:
Hence (9)
(c) With p = L/2, 1/p = 2/L, and nπ/p = 2nπ/L, we have
and
Therefore (10)≡
The series (8), (9), and (10) converge to the 2L-periodic even extension of f, the 2L-periodic odd extension of f, and the L-periodic extension of f, respectively. The graphs of these periodic extensions are shown in FIGURE 12.3.11.
Periodic Driving Force
Fourier series are sometimes useful in determining a particular solution of a differential equation describing a physical system in which the input or driving force f(t) is periodic. In the next example we find a particular solution of the differential equation
(11)
by first representing f by a half-range sine expansion and then assuming a particular solution of the form
(12)
EXAMPLE 4 Particular Solution of a DE
An undamped spring/mass system, in which the mass m = slug and the spring constant k = 4 lb/ft, is driven by the 2-periodic external force f(t) shown in FIGURE 12.3.12. Although the force f(t) acts on the system for t > 0, note that if we extend the graph of the function in a 2-periodic manner to the negative t-axis, we obtain an odd function. In practical terms this means that we need only find the half-range sine expansion of f(t) = πt, 0 < t < 1. With p = 1 it follows from (5) and integration by parts that
From (11) the differential equation of motion is seen to be
(13)
To find a particular solution xp(t) of (13), we substitute the series (12) into the differential equation and equate coefficients of sin nπt. This yields
Thus (14)≡
Observe in the solution (14) that there is no integer n ≥ 1 for which the denominator 64 – n2π2 of Bn is zero. In general, if there is a value of n, say, N, for which Nπ/p = ω, where ω = , then the system described by (11) is in a state of pure resonance. In other words, we have pure resonance if the Fourier series expansion of the driving force f(t) contains a term sin(Nπ/L)t (or cos(Nπ/L)t) that has the same frequency as the free vibrations.
Of course, if the 2p-periodic extension of the driving force f onto the negative t-axis yields an even function, then we expand f in a cosine series.
12.3 Exercises Answers to selected odd-numbered problems begin on page ANS-32.
In Problems 1–10, determine whether the given function is even, odd, or neither.
- f(x) = sin 3x
- f(x) = x cos x
- f(x) = x2 + x
- f(x) = x3 – 4x
- f(x) = e|x|
- f(x) = ex – e–x
- f(x) = x3, 0 ≤ x ≤ 2
- f(x) = |x5|
In Problems 11–24, expand the given function in an appropriate cosine or sine series.
- f(x) = |x|, –π < x < π
- f(x) = x, –π < x < π
- f(x) = x2, –1 < x < 1
- f(x) = x|x|, –1 < x < 1
- f(x) = π2 – x2, –π < x < π
- f(x) = x3, –π < x < π
- f(x) = |sin x|, –π < x < π
- f(x) = cos x, –π/2 < x < π/2
In Problems 25–34, find the half-range cosine and sine expansions of the given function.
- f(x) = cos x, 0 < x < π/2
- f(x) = sin x, 0 < x < π
- f(x) = x2 + x, 0 < x < 1
- f(x) = x(2 – x), 0 < x < 2
In Problems 35–38, expand the given function in a Fourier series.
- f(x) = x2, 0 < x < 2π
- f(x) = x, 0 < x < π
- f(x) = x + 1, 0 < x < 1
- f(x) = 2 – x, 0 < x < 2
In Problems 39–42, suppose the function y = f(x), 0 < x < L, given in the figure is expanded in a cosine series, in a sine series, and in a Fourier series. Sketch the periodic extension to which each series converges.
In Problems 43 and 44, proceed as in Example 4 to find a particular solution xp(t) of equation (11) when m = 1, k = 10, and the driving force f(t) is as given. Assume that when f(t) is extended to the negative t-axis in a periodic manner, the resulting function is odd.
- f(t) = 1 – t, 0 < t < 2; f(t + 2) = f(t)
In Problems 45 and 46, proceed as in Example 4 to find a particular solution xp(t) of equation (11) when m = , k = 12, and the driving force f(t) is as given. Assume that when f(t) is extended to the negative t-axis in a periodic manner, the resulting function is even.
- f(t) = 2πt – t2, 0 < t < 2π; f(t + 2π) = f(t)
-
- Solve the differential equation in Problem 43, x″ + 10x = f(t), subject to the initial conditions x(0) = 0, x′(0) = 0.
- Use a CAS to plot the graph of the solution x(t) in part (a).
-
- Solve the differential equation in Problem 45, x″ + 12x = f(t), subject to the initial conditions x(0) = 1, x′(0) = 0.
- Use a CAS to plot the graph of the solution x(t) in part (a).
- Suppose a uniform beam of length L is simply supported at x = 0 and at x = L. If the load per unit length is given by w(x) = w0 x/L, 0 < x < L, then the differential equation for the deflection y(x) is
where E, I, and w0 are constants. See (4) in Section 3.9.
- Expand w(x) in a half-range sine series.
- Use the method of Example 4 to find a particular solution y(x) of the differential equation.
- Proceed as in Problem 49 to find a particular solution y(x) when the load per unit length is as given in FIGURE 12.3.17.
Computer Lab Assignments
In Problems 51 and 52, use a CAS to graph the partial sums {SN (x)} of the given trigonometric series. Experiment with different values of N and graphs on different intervals of the x-axis. Use your graphs to conjecture a closed-form expression for a function f defined for 0 < x < L that is represented by the series.
Discussion Problems
- Is your answer in Problem 51 or in Problem 52 unique? Give a function f defined on a symmetric interval about the origin (–a, a) that has the same trigonometric series as in Problem 51; as in Problem 52.
- Discuss why the Fourier cosine series expansion of f(x) = ex, 0 < x < π converges to e–x on the interval (–π, 0).
- Suppose f(x) = ex, 0 < x < π is expanded in a cosine series, and then f(x) = ex, 0 < x < π is expanded in a sine series. If the two series are added and then divided by 2 (that is, the average of the two series) we get a series with cosines and sines that also represents f(x) = ex on the interval (0, π). Is this a full Fourier series of f ? [Hint: What does the averaging of the cosine and sine series represent on the interval (–π, 0)?]
- Prove properties (a), (c), (d), (e), (f), and (g) in Theorem 12.3.1.