1 c Anthony Peirce. Introductory lecture notes on Partial Differential Equations - ° Not to be copied, used, or revised without explicit written permission from the copyright owner. Lecture 14: Half Range Fourier Series: even and odd functions (Compiled 3 March 2014) In this lecture we consider the Fourier Expansions for Even and Odd functions, which give rise to cosine and sine half range Fourier Expansions. If we are only given values of a function f (x) over half of the range [0, L], we can define two different extensions of f to the full range [−L, L], which yield distinct Fourier Expansions. The even extension gives rise to a half range cosine series, while the odd extension gives rise to a half range sine series. Key Concepts: Even and Odd Functions; Half Range Fourier Expansions; Even and Odd Extensions 14.1 Even and Odd Functions Even: f (−x) = f (x) Odd: f (−x) = −f (x) 14.1.1 Integrals of Even and Odd Functions ZL Z0 f (x) dx = −L ZL f (x) dx + −L ZL = f (x) dx (14.1) 0 £ ¤ f (−x) + f (x) dx (14.2) 0 = 2 RL f (x) dx f even 0 0 (14.3) f odd. Notes: Let E(x) represent an even function and O(x) an odd function. (1) If f (x) = E(x) · O(x) then f (−x) = E(−x)O(−x) = −E(x)O(x) = −f (x) ⇒ f is odd. (2) E1 (x) · E2 (x) → even. (3) O1 (x) · O2 (x) → even. (4) Any function can be expressed as a sum of an even part and an odd part: ¤ 1£ ¤ 1£ f (x) = f (x) + f (−x) + f (x) − f (−x) . 2| {z } 2| {z } even part odd part (14.4) 2 Check: Let E(x) = ¤ ¤ 1£ 1£ f (x) + f (−x) . Then E(−x) = f (−x) + f (x) = E(x) even. Similarly let 2 2 ¤ 1£ f (x) − f (−x) 2 ¤ 1£ O(−x) = f (−x) − f (x) = −O(x) odd. 2 O(x) = (14.5) (14.6) 14.2 Consequences of the Even/Odd Property for Fourier Series (I) Let f (x) be Even-Cosine Series: ZL 1 an = L −L bn = ZL 1 L −L f (x) cos | {z } even ³ nπx ´ L 2 dx = L ZL f (x) cos ³ nπx ´ L 0 dx ³ nπx ´ f (x) sin dx = 0. | {z L } odd (14.7) (14.8) Therefore ³ nπx ´ a0 X f (x) = + an cos ; 2 L n=1 ∞ 2 an = L ZL f (x) cos ³ nπx ´ L 0 dx. (14.9) (II) Let f (x) be Odd-Sine Series: 1 an = L ZL −L 1 bn = L ZL −L ³ nπx ´ f (x) cos dx = 0 | {z L } odd ³ nπx ´ 2 dx = f (x) sin L L | {z } even (14.10) ZL f (x) sin 0 ³ nπx ´ L dx Therefore f (x) = ∞ X n=1 bn sin ³ nπx ´ L ; 2 bn = L ZL f (x) sin −0 ³ nπx ´ L dx. (III) Since any function can be written as the sum of an even and odd part, we can interpret the cos and sin series as even/odd: even odd ¤ ¤ f (x) = 1 £ 1£ f (x) + f (−x) + f (x) − f (−x) 2 ) ( ) (2 ∞ ∞ ³ ³ nπx ´ X X a0 nπx ´ + an cos + = bn sin 2 L L n=1 n=1 (14.11) Fourier Series 3 where 2 an = L 2 bn = L ZL 0 ZL 0 ZL ³ nπx ´ ¤ 1£ 1 f (x) + f (−x) cos dx = 2 L L f (x) cos ³ nπx ´ L dx −L ³ nπx ´ ¤ 1 1£ f (x) − f (−x) sin dx = 2 L L ZL f (x) sin ³ nπx ´ L dx. −L 14.3 Half-Range Expansions If we are given a function f (x) on an interval [0, L] and we want to represent f by a Fourier Series we have two choices - a Cosine Series or a Sine Series. Cosine Series: ³ nπx ´ a0 X + an cos 2 L n=1 ∞ f (x) = 2 an = L ZL f (x) cos ³ nπx ´ L 0 (14.12) dx. (14.13) Sine Series: f (x) = ∞ X bn sin ³ nπx ´ n=1 2 bn = L (14.14) L ZL f (x) sin ³ nπx ´ L 0 dx. (14.15) Example 14.1 Expand f (x) = x, 0 < x < 2 in a half-range (a) Sine Series, (b) Cosine Series. (a) Sine Series: (L=2) 2 bn = L ZL f (t) sin 0 Z2 t sin = 0 nπ t dt ` (14.16) nπ t dt 2 (14.17) ¯2 Z2 t cos nπ t ¯¯ 2 nπ 2 = − ¡ nπ ¢ ¯ + cos t dt ¯ nπ 2 2 0 4 cos(nπ) + nπ 4 = − (−1)n nπ =− µ 0 2 nπ ¶2 sin ³ nπ ´¯2 ¯ t ¯ 2 0 (14.18) (14.19) (14.20) Therefore f (t) = ∞ ³ nπ ´ 4 X (−1)n+1 sin t . π n=1 n 2 (14.21) 4 f (1) = 1 = therefore ∞ ³ nπ ´ 4 X (−1)n+1 sin π n=1 n 2 π 1 1 1 = 1 − + − + ··· 4 3 5 7 (14.22) (14.23) (b) Cosine Series: (L=2) 2 a0 = 2 Z2 Z2 an = 0 0 ¯2 t2 ¯¯ t dt = ¯ = 2 2 0 nπ t cos t dt = 2 µ =+ 2 nπ ¶2 µ (14.24) 2 nπ ¶ µ ¶ Z2 nπ ¯¯2 2 nπ t sin % t¯ − sin t dt 2 0 nπ 2 ¯2 nπ ¯¯ 4 cos t¯ = 2 2 {cos nπ − 1} 2 ¯ n π 0 (14.25) 0 Therefore f (t) = 1 + =1− ¤ ∞ £ 4 X (−1)n − 1 nπ cos t π 2 n=1 n2 2 (14.26) ∞ 8 X (2n + 1) cos πt/(2n + 1)2 . π 2 n=0 2 (14.27) The cosine series converges faster than Sine Series. f (2) = 2 = 1 + ∞ 8 X 1 π 2 n=0 (2n + 1)2 π2 1 1 = 1 + 2 + 2 + ··· 8 3 5 Example 14.2 Periodic Extension: Assume that f (x) = x, 0 < x < 2 represents one full period of the function so that f (x + 2) = f (x). 2L = 2 ⇒ L = 1. 1 a0 = L ZL Z1 f (x) dx = −L Z2 f (x) dx = −1 0 ¯2 x2 ¯¯ x dx = =2 2 ¯0 since f (x + 2) = f (2). (14.28) (14.29) Fourier Series 5 n ≥ 1: ZL 1 an = L f (x) cos ³ nπx ´ L Z1 dx = f (x) cos(nπx) dx L=1 −1 −L Z2 = x cos(nπx) dx 0 ¯% µ ¶ Z2 ¯2 x sin(nπx) 1 ¯ − = sin(nπx) dx ¯ nπ nπ & 0 0 ¯2 ¯ ¤ 1 £ 1 = cos(nπx)¯¯ = cos(2nπ) − 1 = 0 2 2 (nπ) (nπ) 0 L Z Z1 ³ nπx ´ 1 bn = f (x) sin dx = f (x) sin(nπx) dx L L −L Z2 = 0 (14.30) −1 Z2 ¯ 2 cos(nπx) ¯ 1 cos(nπx) dx x sin(nπx) dx = −x ¯ + nπ (nπ) & 0 0 ¯% ¶ µ 2 −2 sin(nπx) ¯¯ −2 = + = nπ (nπ)2 ¯& nπ 0 (14.31) Therefore ∞ 2 2 X sin(nπx) f (x) = − 2 π n=1 n =1− (14.32) ∞ 2 X sin(nπx) π n=1 n 3 2 2 1 S(x)−1 S(x) (14.33) 1 0 −1 −4 0 −1 −2 0 x 2 4 −2 −4 Figure 1. Left figure: Full Range Expansion SN (x) = 1 − SN (x) − 1 = − π2 NP =20 n=1 −2 2 π NP =20 n=1 0 x sin(nπx) n sin(nπx) n 2 4 Right figure: An odd function