Odd and Even Functions and Their Fourier Series 1 Objectives
Total Page:16
File Type:pdf, Size:1020Kb
Lecture notes written by Dr. Lea Jenkins, Clemson University Text Reference: Advanced Engineering Mathematics, Dr. Robert Lopez Section 10.3: Odd and Even Functions and Their Fourier Series 1 Objectives 1. Recall definitions of even and odd functions. 2. Compute Fourier series of even and odd functions. 2 Assignments 1. Read Section 10.3 2. Problems: A1,A2,A3,B4,B8 3. Read Section 10.4 3 Lecture Notes 3.1 Motivation Even and odd functions occur often enough that it’s worth our time to examine their associated Fourier series. Also, we’ll consider half-range expansions of functions in the next section of the text. 3.2 Recall 1. even functions 2. odd functions Class Exercises: 1. Assume that f(x) is an even function. If g(x) is an even function, what is f(x)g(x)? If g(x) is odd, what is f(x)g(x)? R L 2. If f(x) is an even function, what is −L f(x) dx? 3. Assume that f(x) is an odd function. If g(x) is an odd function, what is f(x)g(x)? If g(x) is even, what is f(x)g(x)? R L 4. If f(x) is an odd function, what is −L f(x) dx? 5. Give simple examples of even and odd functions. Is cos(x) even or odd? sin(x)? 1 3.3 Fourier series for even functions Let f(x) be defined on the interval [−L, L]. The Fourier series expansion of f(x) is given by 1 fˆ(x) = [f(x+) + f(x−)] 2 ∞ a0 X nπ nπ = + a cos x + b sin x . 2 n L n L n=1 The coefficients are defined as 1 Z L a0 = f(x) dx L −L 1 Z L nπ an = f(x) cos x dx L −L L 1 Z L nπ bn = f(x) sin x dx. L −L L R L If f(x) is an even function, then f(x) sin(x) is an odd function. Since −L g(x) dx = 0 when g(x) is odd, then bn = 0 for all n when f(x) is an even function. Also, we know that Z L Z L g(x) dx = 2 g(x) dx −L 0 when g(x) is an even function. Therefore, the coefficients a0 and an reduce to 2 Z L a0 = f(x) dx L 0 2 Z L nπ an = f(x) cos x dx. L 0 L Therefore, if you know that f(x) is even, you can eliminate alot of work when asked to compute the Fourier series expansion of the function. A similar result holds when f(x) is odd; you probably know the result already, based on the discussion above. 3.4 Example 1: Problem 10.4.B2 I’ll work an easy problem this time. Let f(x) = 1 − x2, where x ∈ [−1, 1]. f(x) is an even function, which you can easily verify by examining the plot. We can also verify that f(x) is even by considering the definition of even functions. Indeed, f(−x) = 1−(−x)2 = 1−x2 = f(x), so f(x) is even by the definition of even functions. Therefore, the Fourier series expansion will only contain cos terms, and we only need to compute a0 and an. In addition, we only need to evaluate the interval from 2 [0, 1], and double the result. Notice that L = 1, even if we evaluate only over half of the interval range. Knowing that f(x) is even does not change the domain of our function; it only makes the determination of the coefficients easier. Z 1 2 2 a0 = (1 − x ) dx 1 0 3 1! x = (2) x − 3 0 4 = . 3 Also, Z 1 2 2 nπ an = (1 − x ) cos x dx 1 0 1 Z 1 1 1 2 1 2 = (2) sin (nπx)|0 − x sin (nπx) 0 − x sin(nπx) dx nπ nπ 0 4 Z 1 = x sin(nπx) dx nπ 0 ... another integration by parts 4(−1)n = − . n2π2 Therefore, the Fourier series expansion of f(x) is ∞ 2 X 4(−1)n fˆ(x) = + − cos (nπx) . 3 n2π2 n=1 Class Exercises: 1. Ensure that bn = 0 for this given f(x). 3.5 Fourier series for odd functions If f(x) is an odd function on [−L, L], then f(x) sin(nπx) is an even function and f(x) cos(nπx) is an odd function. Therefore, a0 = 0 and an = 0, and 2 Z L bn = f(x) sin(nπx) dx. L 0 3.6 Example 2: Problem 10.3.B8 The function we consider in this case is −2 − x, −2 ≤ x < −1 −1, −1 ≤ x < 0 f(x) = . 1, 0 ≤ x < 1 2 − x, 1 ≤ x ≤ 2 Class Exercises: 3 1. Sketch f(x). Is this function even or odd? 2. Verify your conclusion above using the definition of even and odd functions. If you did the exercise above, you realize that f(x) is odd. Therefore, a0 = an = 0, and we have 2 Z 2 nπ bn = f(x) sin x dx 2 0 2 Z 1 nπ Z 2 nπ = sin x dx + (2 − x) sin x dx 0 2 1 2 2 nπ 1 4 nπ 2 Z 2 nπ = − cos x − cos x − x sin x dx nπ 2 0 nπ 2 1 1 2 2 h nπ i 4 h nπ i 2 nπ 2 Z 2 nπ = − cos − 1 − cos(nπ) − cos − − x cos x + x sin x dx nπ 2 nπ 2 nπ 2 1 1 2 ... after integrations and cancellations 2 4 nπ = + sin . nπ n2π2 2 Class Exercises: nπ 1. Why isn’t sin = (−1)n? 2 2. Verify that a0 = an = 0 for this f(x). 3. Write the Fourier series expansion for f(x). 4. Plot the function that the Fourier series expansion for f(x) converges to. 4.