Lecture 5: Fourier Series

Lecture 5: Fourier Series

Matthew Schwartz Lecture 5: Fourier series 1 Fourier series When N oscillators are strung together in a series, the amplitude of that string can be described by a function A(x,t) which satisfies the wave equation: ∂2 ∂2 − v2 A(x,t)=0 (1) ∂t2 ∂x2 We saw that electromagnetic fields satisfy this same equation with v = c the speed of light. We found normal mode solutions of the form ω A(x,t)= A cos (x ± vt)+ φ (2) 0 v for any ω which are traveling waves. Solutions of the form A(x,t)= A0cos(kx)cos(ωt) (3) with ω2 = v2k2 are called standing waves. Whether traveling waves or standing waves are rele- vant depends on the boundary condition. More generally, we found traveling wave solutions could come from any function f(x + vt): ∂2 ∂2 − v2 f(x + vt)=0 (4) ∂t2 ∂x2 Similarly f(x − vt) is a solution. Functions f(x − vt) are right-moving traveling waves and func- tions f(x + vt) are left-moving traveling waves. Now, since any vector can be written as a sum of eigenvectors, any solution can be written as a sum of normal modes. This is true both in the discrete case and in the continuum case. Thus we must be able to write f(x + vt)= akcos( kx )cos(ωt)+ bksin(kx)cos(ωt)+ ckcos(kx )sin(ωt)+ dksin(kx)sin(ωt) (5) k X where the sum is over wavenumbers k. In particular, at t =0 any function can be written as f(x)= akcos(kx )+ bksin(kx) (6) k X We have just proved Fourier’s theorem! (Ok, we haven’t really proven it, we just assumed the result from linear algebra about a finite system applies also in the continuum limit. The actual proof requires certain properties about the smoothness of f(x) to hold. But we are physicists not mathematicians, so let’s just say we proved it.) 2 Fourier’s theorem Fourier’s theorem states that any square-integrable function1 f(x) which is periodic on the interval 0 <x 6 L (meaning f(x + L)= f(x)) can be written as ∞ ∞ 2πn 2πn f(x)= a + a cos x + b sin x (7) 0 n L n L n=1 n=1 X X L 2 1. A function is square-integrable if 0 dxf(x) exists. R 1 2 Section 2 with 1 L a = dxf(x) (8) 0 L Z0 2 L 2πn a = dxf(x) cos x (9) n L L Z0 2 L 2πn b = dxf(x) sin x (10) n L L Z0 This decomposition is known as a Fourier series. Fourier series are useful for periodic func- tions or functions on a fixed interval L (like a string). One can do a similar analysis for non- periodic functions or functions on an infinite interval (L → ∞) in which case the decomposition is known as a Fourier transform. We will study Fourier series first. It is easy to verify these formulas for an and bn. For a0, we just integrate f(x). Since 2π nx n x L cos L goes through cycles of the complete cosine curve as goes from 0 to , we have L 2πn dx cos x =0, n> 0 (11) L Similarly, Z0 L 2πn dx sin x =0, n> 0 (12) L Thus, Z0 ∞ ∞ L L L 2πn L 2πn dxf(x)=a dx+ a dx cos x + b dx sin x (13) 0 n L n L 0 0 n=1 0 n=1 0 Z Z X Z X Z =a0L (14) in agreement with Eq. (8). For an we can use the cosine sum formula to write L 2πm 2πn L 1 n + m 1 n − m dx cos x cos x = dx cos 2πx + cos 2πx (15) 0 L L 0 2 L 2 L Z Z Now again we have that these integrals all vanish over an integer number of periods of the cosine curve. The only way this wouldn’t vanish is if n − m =0. So we have for n> 0 L 2πm 2πn 1 L L dx cos x cos x = δ dx = δ (16) L L 2 mn 2 mn Z0 Z0 where δmn is the Kronecker δ-function 0, m =/ n δ = (17) mn 1 m = n Similarly, L 2πm 2πn dx cos x sin x =0 (18) L L Z0 L 2πm 2πn L dx sin x sin x = δ (19) L L 2 mn Thus, for n> 0 Z0 L 2πn dxf(x) cos x (20) L Z0 ∞ ∞ L 2πm 2πm 2πn = dx a + a cos x + b sin x cos x (21) 0 m L m L L Z0 " m=1 m=1 # ∞ X X L = a δ (22) 2 m mn m=1 X L = a (23) 2 n Example 3 as in Eq. (9). In the same way you can check the formula for bn. We use • Fourier cosine series for functions which are even on the interval (f(x)= f(L − x)) • Fourier sine series for functions which are odd on the interval (f(x)= −f(L − x)) • For functions that are neither even nor odd on the interval, we need both sines and cosines 3 Example Find the Fourier series for the sawtooth function: 2.0 1.5 1.0 0.5 0.0 -0.5 -1.0 0 1 2 3 4 5 Figure 1. Sawtooth function This function is clearly periodic. It is equal to f(x)= x on the interval 0 <x 6 1. Thus we can compute the Fourier series with L =1. We get 1 L 1 1 a0 = f(x)= dxx = (24) L 0 0 2 Next, Z Z 2 L 2πn 1 a = dxf(x) cos x =2 dxx cos(2πnx) (25) n L L Z0 Z0 This can be done by integration by parts x L 1 an =2 sin(2πnx) − 2 dx sin(2πnx)=0 (26) 2πn 0 0 Finally, Z 1 bn =2 dxx sin(2πnx) (27) Z0 x L 1 =−2 cos(2πnx) +2 dx cos(2πnx) (28) 2πn 0 0 Z 1 =− (29) πn Thus we have ∞ 1 1 2πnx f(x)= + − sin (30) 2 πn L n=1 X Let’s look at how well the series approximates the function when including various terms. Taking 0, 1 and 2 terms in the sum gives 4 Section 4 2.0 2.0 2.0 1.5 1.5 1.5 1.0 1.0 1.0 0.5 0.5 0.5 0.0 0.0 0.0 -0.5 -0.5 -0.5 -1.0 -1.0 -1.0 0 1 2 3 4 0 1 2 3 4 0 1 2 3 4 1mode 2modes 3modes f 1 f 1 1 sin πx f 1 1 sin πx 1 sin πx = 2 = 2 − π (2 ) = 2 − π (2 ) − 2π (4 ) Figure 2. Approximations to the sawtooth function Already at 3 modes, it’s looking reasonable. For 5, 10 and 100 modes we find 2.0 2.0 2.0 1.5 1.5 1.5 1.0 1.0 1.0 0.5 0.5 0.5 0.0 0.0 0.0 -0.5 -0.5 -0.5 -1.0 -1.0 -1.0 0 1 2 3 4 0 1 2 3 4 0 1 2 3 4 5 mode 10 modes 100 modes Figure 3. More approximations to the sawtooth function For 10 modes we find excellent agreement. 4 Plucking a string Let’s apply the Fourier decomposition we worked out to plucking a string. Suppose we pluck a string by pulling up one end: What happens to the string? To find out, let us do a Fourier decomposition of the x-dependence of the pluck. We start by writing ∞ 2nπ 2nπ 2nπ A(x,t)= a cos x cos(ω t)+ b sin x cos(ω t) , ω = v (31) n L n n L n n L n=0 X v k 2nπ Here is the speed of sound in the string. For a given wavenumber, n = L , we know that ωn = knv to satisfy the wave equation. We could also have included components with sin(ωnt); however since the string starts off at rest (so that ∂tA(x, t)=0), then the coefficients of the sin(ωnt) functions must all vanish. At time t =0, the amplitude is ∞ 2nπ 2nπ A(x, 0)= a cos x + b sin x (32) n L n L n=0 X This is just the Fourier decomposition of the function described by our pluck shape. If we approximate the pluck as the sawtooth function from the previous section, then we already know that 1 a =0, b = − (33) n n πn Exponentials 5 So that, setting L =1 ∞ 1 A(x,t)= − sin(2πx)cos(2πvt) (34) πn n=1 X This gives the motion of the string for all time. The relative amplitudes of each mode are Figure 4. Amplitudes of the relative harmonics of a string plucked with a sawtooth plucking. The n = 1 mode is the largest. This the fundamental frequency of the string. Thus the ω 2π v n> sound that comes out of the string will be mostly this frequency: 1 = L . The modes with 1 are the harmonics. Harmonics have frequencies which are integer multiples of the funda- mental. 5 Exponentials Fourier series decompositions are even easier with complex numbers. There we can replace the sines and cosines by exponentials. The series is ∞ 2π inx L f(x)= cne (35) n=−∞ where X L 2π 1 −inx c = dxf(x)e L (36) n L Z0 To check this, we substitute in ∞ ∞ L 2π L 2π 2π L 2π − − − inx L imx L inx L i (m n) x L dxf(x)e = cm dxe e = cm dxe (37) 0 m=−∞ 0 m=∞ 0 Z X Z X Z If n =/ m then, L 2π 2π i (m−n) x L 1 i (m−n) x L dxe L = e L (38) 2π m − n 0 Z0 L 1 − = ei2π(m n) − 1 =0 (39) 2π m − n If m = n, then the integral is just L dx = L (40) 0 Thus, Z L 2π − i (m n) x L dxe = Lδmn (41) 0 and so Z L 2π − inx L dxf(x)e = Lcn (42) Z0 6 Section 6 If f(x) is real, then ∞ 2πnx 2πnx f(x)= Re(c + c− )cos + Im(c− + c )sin (43) n n L n n L n=−∞ X So an = Re(cn + c−n) and bn = Im(c−n + cn).

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    7 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us