AE2 Mathematics Solutions to Example Sheet 2: Fourier Series f (x) = | sin x| on (−π, π) with L = π: f (x) is an even function so bn = 0. On [0, π] we have | sin x| = sin x. Z Z 2 π 2 π | sin x| dx = sin x dx a0 = π 0 π 0 = 4/π | sin x| 1) where cos nπ = (−1)n . x −π 0 π Z 2 an = π π sin x cos nx dx 0 We also know that 2 sin x cos nx = sin[(n + 1)x] − sin[(n − 1)x] so for n ≥ 2 (note: a1 = 0) Z Z 1 π 1 π sin[(n + 1)x] dx − sin[(n − 1)x] dx an = π 0 π 0 1 cos[(n + 1)x] π 1 cos[(n − 1)x] π = − + π n+1 π n−1 0 0 n+1 2 (−1) −1 1 1 1 n+1 = − = − (−1) −1 π n+1 n−1 π(n2 − 1) Therefore an = ( 0 − π(4m42 −1) and so | sin x| = n = 2m + 1 (odd) n = 2m (even) ∞ 2 4 X cos 2mx − π π (4m2 − 1) m=1 f (x) = f (x) 2) x(1 − x) 0 L = 1 & the function is neither odd nor even. Z 1 Z 1 f (x) dx = x(1 − x) dx = 1/6 a0 = −1 0 x −1 0 an = 1 Z 1 0 x(1 − x) cos nπx dx bn = By evaluating these integrals, one finds an = 0≤x≤1 −1≤x≤0 0 − 2m12 π2 n = 2m + 1 n = 2m (odd) (even) bn = 1 Z ( 1 0 x(1 − x) sin nπx dx 4 (2m+1)3 π 3 0 n = 2m + 1 n = 2m (odd) (even) thus giving the answer. The odd extension R 1of f (x) = x(1 − x), originally defined on 0 ≤ x ≤ 1, on the range −1 ≤ x ≤ 1, has bn = 2 0 x(1 − x) sin(nπx) dx. Thus the answer is an odd 8 sine-series with coefficient twice that above, namely (2m+1) 3 π3 . Rπ 3) x sin x is an even function over (−π, π) so bn = 0 and an = π2 0 x sin x cos nx dx . Using the fact that 2 sin x cos nx = sin[(n + 1)x] − sin[(n − 1)x], we have (except for n = 1) Z 2(−1)n+1 1 π x sin[(n + 1)x] − sin[(n − 1)x] dx = by parts an = n2 − 1 π 0 Thus a0 = 2 and a1 is ∴ a1 = 2 π Z π x sin x cos x dx = 0 1 π Z π ∞ X (−1)n+1 x sin x = 1 − cos x + 2 1 2 4) x sin 2x dx = − 12 0 n=2 n2 − 1 (by parts) cos nx f (x) f (x) = x −π/2 −π π/2 x π f (x) = x − π The figure shows that f (x) is even about x = 0; thus L = π and bn = 0 and ) (Z Z π π/2 2 x dx + (x − π) dx = 0 a0 = π 0 π/2 an = = 2 π 2 π (Z Z π/2 x cos nx dx + 0 π 0 x cos nx dx − 2 Z Z π π/2 (x − π) cos nx dx ) π cos nx dx π/2 By parts Z π x cos nx dx = 0 1 2 (−1)n − 1 π [nx sin nx + cos nx] = =− 0 2 2 n n (2m + 1)2 when n = 2m + 1 and zero when n is even. Moreover, Z π sin 12 nπ 1 (−1)m cos nx dx = [sin nx]ππ/2 = − =− 2m + 1 n n π/2 thus giving the answer as advertised. 2