18.03 HOMEWORK #7, DUE APRIL 23, 2014 BJORN POONEN H7.1) (Apr. 9, 45 pts. = 5 + 5 + 5 + 5 + 5 + 10 + 10) The complex form of Fourier’s theorem states that “every” complex-valued periodic function f (t) of period 2π can be expressed as a series X f (t) = cn eint n∈Z = · · · + c−2 e−2it + c−1 e−it + c0 + c1 eit + c2 e2it + · · · . for some complex constants cn that are uniquely determined by f . (In the above, the set of integers is denoted by Z = {. . . , −2, −1, 0, 1, 2, . . .}, so there is one term cn eint for each integer n.) To understand such series, we extend the definition of the inner product to complex-valued periodic functions f, g of period 2π: define Z π hf, gi := f (t)g(t) dt. −π (The reason for taking the complex conjugate of g(t) in the definition is so that hf, f i is always a nonnegative realRnumber, so that it can be thought of as the square of a length.) π (a) Evaluate −π eint dt for every integer n ∈ Z. (If you prefer, you can integrate from 0 to 2π instead, since for a periodic function of period 2π the integral over any interval of width 2π will be the same.) Be careful not to divide by zero! (b) Show that the infinitely many functions eint for n ∈ Z are orthogonal to each other. (c) Evaluate heint , eint i for every integer n. (d) Find two different formulas for hf, eint i, one P from the definition of the inner product, and one from substituting f (t) = m∈Z cm eimt to get X hf, eint i = cm heimt , eint i m∈Z and then evaluating the right hand side. Simplify the first formula so that it does not involve a complex conjugate. (e) Equate the two formulas above to find the formula for the Fourier coefficient cn in terms of f , analogous to the formulas for an and bn when using cosines and sines. (The nice thing about this complex formulation is that there is just one formula for cn that works for all n ∈ Z.) (f) Show that if f is real-valued, then c−n = cn for all n ∈ Z. (g) Let Sq(t) be the square wave function defined in lecture. Find all the cn for this function in two ways: first, convert each sine in the usual Fourier series to a linear combination of complex exponential functions; second, use the formula for cn you derived in part (e). Do the two results match? 1 Solution. Rπ Rπ (a) If n = 0, then eint = 1, so −π eint dt = −π 1 dt = 2π. If n 6= 0, then Z π π eint einπ − e−inπ int e dt = = =0 in −π in −π since the difference between nπ and −nπ is an integer times 2π. R 2π Alternative solution: As suggested, the answer is the same as 0 eint dt. If n = 0, R 2π R 2π then 0 eint dt = 0 1 dt = 2π. If n 6= 0, then Z 2π 2π eint ein(2π) − e0 1−1 eint dt = = = = 0. in 0 in in 0 Conclusion: ( 2π, eint dt = 0, −π Z π if n = 0; if n = 6 0. (b) If m and n are distinct integers, then Z π imt int he , e i = eimt eint dt Z−π π eimt e−int dt = Z−π π = eimt−int dt Z−π π = ei(m−n)t dt −π = 0, by part (a) since m − n 6= 0. (c) For any integer n, int Z int π eint eint dt he , e i = Z−π π = eint e−int dt Z−π π = 1 dt −π = 2π. (d) First formula: Z int π f (t)eint dt hf, e i = Z−π π = −π 2 f (t)e−int dt. Second formula: hf, eint i = h X cm eimt , eint i m∈Z = X cm heimt , eint i m∈Z = cn heint , eint i = 2πcn (because of (b)) (by (c)). (e) Equating the two formulas in (d) gives Z π f (t)e−int dt 2πcn = −π Z π 1 cn = f (t)e−int dt. 2π −π (f) Solution 1: Use the complex Fourier coefficient formula Z π 1 f (t)e−int dt cn = 2π −π and apply complex conjugation to the whole universe: Z π 1 1 cn = f (t)e−int dt 2π 2π −π Z π 1 = f (t)eint dt (since f is real-valued) 2π −π while c−n Z π 1 1 = f (t)e−i(−n)t dt 2π 2π −π Z π 1 = f (t)eint dt. 2π −π Thus c−n = cn . Solution 2: Start with the Fourier series in terms of cosines and sines, and convert to complex exponentials: X a0 X f (t) = + an cos nt + bn sin nt 2 n≥1 n≥1 int X int X a0 e + e−int e − e−int = + an + bn 2 2 2i n≥1 n≥1 a0 X an − bn i int an + bn i −int = + e + e . 2 2 2 n≥1 3 Thus the coefficients of eint and e−int are complex conjugates of each other (and this holds even when n = 0, since then the coefficient is a0 /2, which, as a real number, is its own complex conjugate). Solution 3: Use that the Fourier coefficients are uniquely determined. Write f (t) as f (t) = · · · + c−2 e−2it + c−1 e−it + c0 + c1 eit + c2 e2it + · · · . Taking complex conjugates gives f (t) = · · · + c−2 e2it + c−1 eit + c0 + c1 e−it + c2 e−2it + · · · , since f (t), being real, is its own complex conjugate. But there can be only one Fourier series for f , so the coefficient of e−int in each must match. This coefficient is c−n in the first series, and cn in the second series, so c−n = cn . (g) First way: Use the identity sin t = eit − e−it 2i with t replaced by nt to get Sq(t) = 4 π sin nt n n≥1, odd = 4 π eint − e−int 2in n≥1, odd X X If n is a positive odd integer, then cn is the coefficient of eint , which is cn = 4 1 2i · =− . π 2in πn If m is a negative odd integer, say m = −n, then cm is the coefficient of e−int , which is cm = − 4 1 2i · =− . π 2in πm Thus ( 2i − πn , cn = 0, if n is any odd integer; if n is even. 4 Second way: 1 cn = 2π 1 = 2π Z π Sq(t)eint dt −π Z 0 Sq(t)e int Z int Sq(t)e Z 1 int int e dt = (−e ) dt + 2π 0 −π ! 0 π 1 eint eint = + − 2π in −π in 0 1 = −1 + e−inπ + einπ − 1 . 2πin −π Z 0 dt + π dt 0 π The expression in parentheses is 0 if n is even, and −4 if n is odd, so ( 2i , if n is odd; − πn cn = 0, if n is even. The two formulas for cn match (as they should, since the Fourier coefficients are uniquely determined by the function). H7.2) (Apr. 9, 20 pts. = 5 + 5 + 10) The root mean square fRMS of a periodic real-valued function f is defined as the square root of the average value of f (t)2 , where the average is computed over one period. For example, if f has period 2L, then s Z L 1 fRMS = f (t)2 dt. 2L −L (In electrical engineering, if V (t) represents a periodic voltage function, then the root mean square voltage VRMS is the DC voltage (constant voltage) that supplies the same power to a resistor that V (t) does on average. This is because power is V 2 /R.) (a) What is the root mean square of the square wave function Sq(t) defined in lecture? (b) If A and ω are positive real numbers, what is the root mean square of the sinusoidal function f (t) = A sin(ωt)? (c) Suppose that ∞ ∞ X a0 X f (t) = + an cos nt + bn sin nt 2 n=1 n=1 for some real numbers an and bn . What is the root mean square of f (t) in terms of the an and bn ? Solution. (a) Solution A: The value of Sq(t)2 is 1 at every t (except at isolated points, which don’t affect the integral). Also, the period of Sq(t) is 2π, so L = π, and the root 5 mean square is s 1 2π Z s π Sq(t)2 dt = −π 1 2π Z π 1 dt −π r 1 (2π) 2π √ = 1 = 1. = Solution B: The value of Sq(t)2 is 1 at every t (except at isolated points), so the average value of Sq(t)2 is 1. The root mean square is the square root of this average value, so it too is 1. (b) Solution A: As explained in lecture, the average value of sin2 t on [−π, π] is 1/2. Stretching horizontally shows that the average value of sin2 (ωt) over one 2 2 complete period is 1/2. Thepaverage value of √ (A sin ωt) is A (1/2), so the root 2 mean √ square of A sin ωt is A (1/2) = A/ 2, which could also be written as A 2/2. Solution B: The smallest period of f (t) is 2π/ω, so take L = π/ω. Then the root mean square is s s Z L Z L 1 1 2 (A sin ωt) dt = A sin2 (ωt) dt 2L −L 2L −L s Z L 1 − cos 2ωt 1 =A dt 2L −L 2 s L 1 sin 2ωt =A t− 4L 2ω −L s sin(2ωL) − sin(−2ωL) 1 2L − =A 4L 2ω s sin(2π) − sin(−2π) 1 =A 2L − 4L 2ω r 1 =A (2L − 0) 4L r 1 =A 2 √ 2 . =A 2 (c) The root mean square is s Z r π 1 1 fRMS = f (t)2 dt = hf, f i, 2π −π 2π 6 and + ∞ ∞ ∞ ∞ X X a0 X a0 X + an cos nt + bn sin nt, + an cos nt + bn sin nt hf, f i = 2 2 n=1 n=1 n=1 n=1 ∞ ∞ Da a E X X 0 0 = , + a2n hcos nt, cos nti + b2n hsin nt, sin nti 2 2 n=1 n=1 * ∞ ∞ X X a20 2 an π + b2n π = (2π) + 4 n=1 n=1 ! ∞ 2 X a0 (a2n + b2n ) , + =π 2 n=1 so fRMS v ! u ∞ 2 X u1 a 0 =t π + (a2n + b2n ) 2π 2 n=1 v u 2 ∞ X ua a2n + b2n =t 0 + . 4 2 n=1 (As a check, note that for f (t) = A sin mt, which has all the an and bn equal to 0 except for p √ bm = A, this formula gives A2 /2 = A/ 2, which agrees with part (b).) H7.3) (Apr. 18, 35 pts. = 10 + 10 + 15) Let s(t) be the sawtooth wave of period 2π such that s(t) = t for t ∈ (−π, π). Let S(t) be the sawtooth wave of period 22 such that S(t) = t for t ∈ (−11, 11). (a) What is the Fourier series of s(t)? (b) What is the Fourier series of S(t)? (c) Let x(t) be the periodic solution to ẍ + 4x = S(t). What two Fourier components of x(t) have the largest amplitude? (You may want a calculator or computer for this one.) Solution. P (a) The function s(t) is odd, so its Fourier series has the shape n≥1 bn sin nt, where 1 bn = π Z π t sin nt dt. −π 7 Use integration by parts with u = t and dv = sin nt dt, so v = − leads to Z π cos nt 1 cos nt − bn = −t − dt π n n −π π 1 (−1)n (−1)n sin nt = −π − −(−pi) + π n n n2 −π (−1)n 1 −2π + (0 − 0) = π n 2 = − (−1)n , n X 2 s(t) = − (−1)n sin nt, n n≥1 cos nt . This n which could also be written as 2 2 2 sin t − sin 2t + sin 3t − · · · . 1 2 3 (b) To get from the graph of s(t) to the graph of S(t), stretch by a factor of 11/π in both the horizontal directions. This means that 11 π S(t) = s t π 11 X 22 nπt , = − (−1)n sin nπ 11 n≥1 which could also be written as 22 πt 22 2πt 22 3πt sin − sin + sin − ··· . π 11 2π 11 3π 11 (c) The characteristic polynomial is r2 + 4, whose roots are ±2i. Thus, for any 1 1 iωt ω 6= ±2, the (periodic) system response to eiωt is p(iω) eiωt = 4−ω . Taking 2e 1 imaginary parts shows that the (periodic) system response to sin ωt is 4−ω2 sin ωt. Superposition shows that the (periodic) system response to S(t) is X nπt x(t) = Bn sin , 11 n≥1 where Bn := − 1 22 (−1)n 2 nπ 4 − nπ 11 n = 2662 (−1) . 2 π n(n π 2 − 222 ) 8 Using a calculator or computer, we find B1 B2 B3 B4 B5 B6 B7 B8 = 1.79 = −0.95 = 0.71 = −0.65 = 0.71 = −1.10 = 310.87 = 0.72 and from then on the absolute values of the Fourier coefficients are only smaller, since the factors n and n2 π 2 − 222 in the denominator are positive and increasing for n ≥ 8. Therefore the Fourier component with the largest amplitude is 7πt 7πt B7 sin ≈ 310.87 sin 11 11 and the Fourier component with the second largest amplitude is πt πt B1 sin ≈ 1.79 sin . 11 11 (What made B7 so large is the fact that π ≈ 22/7.) Reminder: Please write “Sources consulted: none” at the top of your homework, or list your (animate and inanimate) sources. See the Information pages for details. 9