University of Toronto ScarboroughDepartment of Computer & Mathematical Sciences MAT B42H 2014/2015 Solutions #1 1 1. Recalling that sin A sin B = cos(A − B) − cos(A + B) we have Z π Z2 π 1 sin(k x) sin(n x) dx = cos (k − n) x − cos (k + n) x dx = 2 Z−π −π Z π 1 1 π cos (k − n) x dx − cos (k + n) x dx = 2 −π 2 −π π π sin (k − n)x sin (k + n)x 1 1 , k − n 6= 0 , k + n 6= 0 2 2 k−n k+n −π −π − π π 1 1 , k−n=0 , k+n=0 x x 2 2 −π −π 0 , k 6= ±n π , k = n 6= 0 = −π , k = −n 6= 0 0 ,k=n=0 2. (a) f (x) = −3 x, π ≤ x < π. Since f (x) is an odd Zfunction, ak = 0, 1 π k = 0, 1, 2, · · · . bk = −3x sin kx dx even = π −π Z π 6 1 6 x sin kx dx parts − − x cos kx + − = π 0 π k π 1 6 k 6 sin kx cos kπ = − 1 . The = k2 k k 0 N th Fourier polynomial is FN (x) = 0 − 3 6 sin x + 3 sin 2x − 2 sin 3x + sin 4x + · · · + 2 N X N 6 (−1)k sin Nx = 6 sin kx. −1 N k k=1 2Π Π F0 F2 -Π Π F1 -Π -2 Π F3 fHxL = -3x Z 0 Z 1 π 1 a0 = f (x) dx = 2x dx + π −π π −π . 0 < x ≤ π .MATB42H Solutions # 1 page 2 2 x . −π < x ≤ 0 −1 . . Z π . π . 0 1 2 . = x . − x . . · · · π k2 Z 0 Z Z π 1 π 1 bk = f (x) sin kx dx = (2 x) sin kx dx + (−1) sin kx dx = π −π π −π 0 π * = 00 1 −x 2 cos kπ 1 1 1 kx cos kx+ 2sin cos kx = − + ((−1)k −1) = 2 + π k k k k k π 0 −π −2 . −2 sin Nx . (−1) dx = π 0 0 −π 1 -Π Π − π 2 − π = −π − 1. -1 π Z π 1 F0 f (x) cos kx dx = ak = π −π Z 0 Z π 1 -Π F1 (2 x) cos kx dx+ (−1) cos kx dx = π −π 0 0 =0 * x 1 1 kx 2 sin + cos kx − π k k2 −π F2 =0 * π fHxL 2 1 1 -2 Π = 1 − cos kx = sinkx 2 π k πk 0 0 . 3. N even N (b) f (x) = . N odd π N2 N π . 4. k = 1. 4 . k = 2. k odd k π 1 1+π 4 + cos x + 2 1 − Hence the Fourier polynomial is FN (x) = − sin x − 2 π π 4 2 1 1 sin 2x + cos 3x + 1 − sin 3x − sin 4x + ··· + 9π 3 π 2 4 cos Nx + 2 1 − 1 sin Nx . · · · . k even k . 1 2 1− . x ∈ [π. 2kπ 2kπ kπ 1 sin x Hence the Fourier series is π ∞ 1 X sin kx 1 sin 2x + · · · = . · · · 1 2π 1 . 2π) π 0 π 0 π 2 π 2π Z π Z 1 1 2π x 1 π f (x) cos kx dx = x cos kx dx + + 2x = + 2. ak = π 2 0 2 π 0 π 0 π 2π π Z 2π 1 1 x sin kx cos kx 2 sin kx = 2 cos kx dx = + + cos kπ − 1 = π k k2 0 π k πk 2 π π Z π Z 0 . f (x) = . k = 2. k 0. 1 − .MATB42H page 3 Solutions # 1 1 x . 6. −π ≤ x < 0 − − 2 2π 3. 2. 4. 0≤x<π 2 2π Since f (x) is an odd function. · · · k π . · · · − − =− − = πk 0 . bk = f (x) sin kx dx = x sin kx dx 2 − π 0 π 0 . k = 1. 1− x . · · · . · · · 2 2π π Zπk 2π 1 x cos kx sin kx 2 cos kx sin kx dx = = +2 − + − π k k2 kπ π π 0 4 cos kπ 2 cos 2kπ − cos kπ) (−1)k . 2 + k=1 Z π Z 2π Z 1 2π 1 x . 6. k = 2. 3. x ∈ [0. · · · k . 6. · · · k kπ k 4 1 1− . k = 1.Z Z 0 1 1 π f (x) sin kx dx = − 1 bk = π 2π −π −π Z π x x 1 1 − sin kx dx + sin kx dx π 2π 0 π = 00 > 1 −(π + x) cos kx sin kx − 2 + 2π k k2 −π = 0π > sin kx 1 (x − π) cos kx − 2π 2 k k2 0 1 1 1 + = . 2π π k = + = 1 2 + F4 -Π fHxL Π = 1 . 4. 1. π) . 3. k = 1. 5. ak = 0. 3. 4. k = 2. a0 = x dx + 2 4. 5. f (x) = dx = f (x) dx = 2 . 5. MATB42H page 4 Solutions # 1 ∞ a0 X π 2 Hence the Fourier series is F (x) = + ak cos kx+ bk sin kx = 1 + − cos x+ 2 4 π k=1 1 4 1 2 1 2 4 sin x − sin 2x − 1− sin 3x − sin 4x − cos 3x + cos 5x + 1− 2 9π 3 π 4 25π π 4 1 1− sin 5x − · · · . 5 π . π/2 Z Z 1 π/2 1 . . 1 2π 1 π 2 (f (x)) dx = dx = (x). so the energy of the constant term is Now a0 = π −π π −π/2 1 1 1 2 A2 1 1 2 A0 = a0 = (1) = . Now 0 9π E 0.5 + 0. giving 0 = 2 = . n X 1 th (ak cos kx + bk sin kx) = (c) The n Fourier polynomial is Fn (x) = a0 + 2 k=1 n kπ 1 2 cos 3x cos 5x cos 7x 1 X 2 + sin cos kx = + cos x − + − + ··· + 2 k=1 kπ 2 2 π 3 5 7 nπ cos nx i sin .405285.045032. 1 F4 -3 Π -Π fHxL Π 3Π . k ≥ 1. since f (x) is an even function. bk = f (x) sin kx dx = 0. The constant term contains 50 % 2 2 2 E 1 2 of the energy. (a) The energy of f is E = π −π π −π/2 π π 2 −π/2 Z Z 1 π/2 1 π f (x)dx = dx = 1.045032 ≈ 0. The k2 π2 4 energy of the 1st harmonic is 2 ≈ 0. the energy of the 2nd harmonic is 0 π A2 + A21 + A22 + A23 4 ≈ and the energy of the 3rd harmonic is 2 ≈ 0. π −π 4 sin 2 kπ 2 The energy of the k th harmonic is given by A2k = a2k + b2k = .950317. 5.405285 + 0 + 0. = = 1. π/2 Z Z 1 π 1 π/2 2 1 kπ (b) ak = f (x) cos kx dx = cos kx dx = = sin kx sin . π −π π −π/2 kπ kπ 2 −π/2 Z 1 π k ≥ 1 and. k > 0. 2 n Please note that F4 (x) is the same as F3 (x). About 95 % of the total energy is 1 contained in the constant term and the first 3 harmonics. Since f has period 2π. 3 π k=1 k2 4 y = 16 . bk = 0. Since g(x) = f (x + a). k = 1. periodicity implies that integrals Z Z of f over any interval of length 2π have the π π+a 2 same value giving (f (x))2 dx. we have (g(x))2 = (f (x + a))2 . so g 2 is f 2 shifted horizontally by a. -4 4 Since the periodic extension of f (x) is even. Thinking of the definite integral as 2 area. 4 Z Z 2 4 1 4 1 x3 64 1 even 2 2 Now a0 = = (16 −x ) dx = (16 −x ) dx = 16 x− = 64 − 8 −4 2 0 2 3 0 2 3 64 .MATB42H page 5 Solutions # 1 6. 4] and extended to all of R with period 8. · · · . f (x) = 16 − x2 restricted to [−4. 2.x2 F2 -4 4 . (f (x)) dx = −π −π+a Z 1 π 1 2 (g(x)) dx = (f (x + a))2 dx The energy of g is π π −π −π Z 1 π f rom = (f (t))2 dt = the energy of f . so does f 2 and g 2 . · · · . 3 Z Z 1 4 2πkx kπx 2 4 even 2 2 dx = dx = (16 − x ) cos (16 − x ) cos ak = 8 −4 8 2 0 4 4 4 Z 4 2(16 − x2 ) sin kπx 4 kπx 16 kπx 4 + + x sin dx = 0 − 2 2 x cos kπ kπ 0 4 k π 4 0 0 Z 4 : =0 16 kπx k+1 64 cos dx = (−1) . above π −π Z π substitute = t = x+a 1 π Z π+a (f (t))2 dt −π+a 7. 2 k 2 π 4 k2 π2 0 ∞ kπx 32 64 X (−1)k+1 The Fourier series is + 2 cos . k = 1. 2. To do this question we need to regard sin x. as the restriction of an even function and as the restriction of an odd function. x ∈ [0. π].MATB42H Solutions # 1 page 6 8. To obtain an even function we simply extend sin x over . π bk = 0. Thus . Z R with period π. 2 4 2 π 1 sin x dx = − cos x. . = and a0 = πZ 0 π π 0 2 π ak = sin x cos(2kx) dx = Z ππ 0 1 -Π Π 2Π (sin((2k + 1)x) + sin((1 − 2k)x)) dx = π 0 π 1 cos((2k + 1)x) cos((1 − 2k)x) = − − π 2k + 1 1 − 2k 0 1 1 1 1 1 1 = + + + π 2k + 1 1 − 2k 2k + 1 1 − 2k 1 4 2 1 = − + . The 2 π 2k + 1 2k − 1 (4k − 1) π -Π Π 2Π ∞ 2 4 X cos 2kx Fourier series is F (x) = − . The Fourier series is F (x) = sin x. . π π 4k 2 − 1 k=1 -1 To obtain an odd function we need only use sin x itself with period 2π.