Chapter 4. Fourier Series At this poit we are ready to ow cosider the caoical equatios. Cosider, for eample the heat equatio u t = u, < <, t > (4.) subject to u(, ) = si, u(, t) = u(, t) =. (4.) Here, we will assume that the solutios are separable ad are of the form Substitutig ito the heat equatio (4.) gives from which we deduce that u(, t) = X()T(t). (4.3) XT = X T, T T = X X. (4.4) Sice each side is a fuctio of a differet variable, we ca deduce that T = λt, X = λx. (4.5) where λ is a costat. The boudary coditios i (4.) becomes, accordigly X() = X() =. (4.6) Itegratig the X equatio i (4.5) gives rise to three cases depedig o the sig of λ. These are c e + c e if λ =, X() = c + c if λ =, c si + c cos if λ =,
Chapter 4. Fourier Series where is a costat. Imposig the boudary coditios (4.6) shows that i the case of λ = ad λ =, the oly choice for c ad c are zero ad hece iadmissible as this leads to the zero solutio. Thus, we focus oly o the remaiig case, λ =. Usig the boudary coditios gives c si + c cos =, c si + c cos =, (4.7) which leads to c =, si = =,,,.... (4.8) From (4.5), we the deduce that T(t) = c 3 e t (4.9) thus, givig a solutio to the origial PDE as u = XT = ce t si (4.) where we have set c = c c 3. Fially, imposig the iitial coditio (4.) gives u(, ) = ce si = si (4.) show that c = ad =. Therefore the solutio to the PDE subject to the iitial ad boudary coditios is u(, t) = e t si. (4.) If the iitial coditio we to chage, say to 4 si 3, the we would have obtaied the solutio u(, t) = 4e 9t si 3. (4.3) However, if the iitial coditio were u(, ) = si + 4 si 3 there would be a problem as it would be impossible to choose ad c to satisfy both. However, if we were to solve the heat equatio with each fuctio separately, we ca simply just add the solutios together. It is what is call
3 the priciple of superpositio Theorem Priciple of Superpositio If u ad u are two solutio to the heat equatio, the u = c u + c u is also a solutio. Proof. Calculatig derivatives u t = c u t + c u t ad u = c u + c u ad substitutig ito the heat equatio show it is idetically satisfied if each of u ad u satisfy the heat equatio.q.e.d Therefore to solve the heat equatio subject to u(, ) = si + 4 si 3 we would obtai u(, t) = e t si + 4e 9t si 3. The priciple of superpositio easily eteds to more tha solutios. Thus, if u(, t) = (a cos + b si ) e t, are solutios to the heat equatio, the so is u(, t) = = (a cos + b si )e t. (4.4) If the iitial coditios were such that they ivolved trigoometric fuctios, we could choose the itegers ad costats a ad b accordig to match the terms i the iitial coditio. However, if the iitial coditio was u(, ) =, we would have a problem as i the geeral solutio (4.4), there are o terms. However, cosider the followig u = 8 e t si, u = 8 ( e t si + ) 7 e 9t si 3, (4.5) u 3 = 8 ( e t si + 7 e 9t si 3 + ) 5 e 5t si 5.
4 Chapter 4. Fourier Series 3 y 3 y u u 3 Figure. The solutios (4.5) with oe ad two terms. From figure, oe will otice that with each additioal term added i (4.5), the solutio is a better match to the iitial coditio. I fact, if we cosider u = 8 = ( ) 3 e ( )t si( ) (4.6) we get a perfect match to the iitial coditio. Thus, we are lead to ask How are the itegers ad costats a ad b chose as to match the iitial coditio? 3 4. Fourier Series It is well kow that ifiitely may fuctios ca be represeted by a power series f () = a ( ), i= where is the ceter of the series ad a, costats determied by a = f () ( ), i =,, 3,....! For fuctios that require differet properties, say for eample, fied poits at the edpoits of a iterval, a differet type of series is required. Eample of such a series is called Fourier series. For eample, suppose that f () = has a Fourier series = b si + b si + b 3 si 3 + b 4 si 4.... (4.7)
4.. Fourier Series o [,] 5 How do we choose b, b, b 3 etc such that the Fourier series looks like the fuctio? Notice that if multiply (4.7) by si ad itegrate from to ( ) si d = b si d + b si si d +.... the we obtai sice 4 = b. ( ) si d = 4, b = 8/, (4.8) si d =, si si d =, =, 3, 4,... Similarly, if multiply (4.7) by si ad itegrate from to ( ) si d = b si si d + b si d +.... the we obtai = b. b =. Multiply (4.7) by si 3 ad itegrate from to ( ) si 3 d = b si si 3 d + b si si 3 d +..., the we obtai 4 7 = b 3. Cotiuig i this fashio, we would obtai b 3 = 8 7. (4.9) b 4 =, b 5 = 8 5, b 6 =, b 7 = 8 7 3. (4.) Substitutio of (4.8), (4.9) ad (4.) ito (4.7) gives (4.5). 4. Fourier Series o [,] Cosider the series f () = a + (a cos + b si ) (4.) =
6 Chapter 4. Fourier Series where a, a ad b are costat coefficiets. The questio is: How do we choose the coefficiets as to give a accurate represetatio of f ()? Well, we use the followig properties of cos ad si cos d =, cos cos m d = si d =, (4.) { if m = if m = (4.3) si si m d = { if m = if m = (4.4) si cos m d =. (4.5) First, if we itegrate (4.) from to, the by the properties i (4.), we are left with from which we deduce f ()d = a = a d = a, f ()d. Net we multiply the series (4.) by cos m givig f () cos m = a cos m + (a cos cos m + b si cos m). = Agai, itegrate from to. From (4.), the itegratio of a cos m is zero, from (4.3), the itegratio of cos cos m is zero ecept whe = m ad further from (4.5) the itegratios of si cos m is zero for all m ad. This leaves or f () cos d = a a = cos d = a, f () cos d.
4.. Fourier Series o [,] 7 Similarly, if we multiply the series (4.) by si m the we obtai f () si m = a si m + (a cos si m + b si si m), = which we itegrate from to. From (4.), the itegratio of a si m is zero, from (4.5) the itegratio of si cos m is zero for all m ad ad further from (4.4) the itegratio of si si m is zero ecept whe = m. This leaves or f () si d = b b = si d = b, f () si d. Therefore, the Fourier series represetatio of a fuctio f () is give by f () = a + (a cos + b si ) = where the coefficiets a ad b are chose such that a = for =,,,.... f () cos d, b = f () si d. (4.6) Eample Cosider f () =, [, ]. (4.7) From (4.6) we have a = d = a = cos d = [ si + = 4( ) 3 3 cos = 3 ] si 3
8 Chapter 4. Fourier Series ad b = = = si d [ cos si + + ] cos 3 Thus, the Fourier series for f () = o [, ] is f k () = k 3 + 4 ( ) cos =. (4.8) Figure show cosecutive plots of the Fourier series (4.8) with 5 ad te o the iterval [,] ad [ 3,3]. 5 - Figure. The solutios (4.8) with five ad te terms o [,].
4.. Fourier Series o [,] 9 5-5 5 Figure 3. The solutios (4.8) with five ad te terms o [ 3,3]. Eample Cosider f () =, [, ] (4.9) From (4.6) we have ad a = d = a = cos d = [ si + = b = = si d [ cos = ( )+ + = ] cos ] si
Chapter 4. Fourier Series Thus, the Fourier series for f () = o [, ] is f k () = k = ( ) + si. (4.3) Figure 3 show cosecutive plots of the Fourier series (4.3) with 5 ad 5 terms o the iterval [,] ad [ 3,3]. - - Figure 4. The solutios (4.3) with five ad fifty terms o [,]. -5 5 - Figure 5. The solutios (4.3) with five ad fifty terms o [ 3,3].
4.. Fourier Series o [,] Eample 3 Cosider f () = { if < <, + if < <, From (4.6) we have a = a = = = si d + cos d + + ( ) + d = + ( + ) cos d [ si ( + ) + + ] cos = + ad b = = = si d + + cos ( ) = ( )+. + ( + ) si d [ ( + ) cos ( + )( ) + + Thus, the Fourier series for f () = o [, ] is + ] si f k () = k ( 4 + + ( ) ) = cos + ( )+ si. (4.3) Figure 6 shows a plot of the Fourier series (4.3) with terms o the iterval [,].
Chapter 4. Fourier Series 4 - Figure 6. The solutios (4.3) with terms. 4.3 Fourier Series o [,] Cosider the series f () = a + ( a cos = + b si ) (4.3) where is a positive umber ad a, a ad b costat coefficiets. The questio is: How do we choose the coefficiets as to give a accurate represetatio of f ()? Well, we use the followig properties of cos ad si cos d =, si d =, (4.33)
4.3. Fourier Series o [,] 3 cos { cos m d = if m = if m = (4.34) si { si m d = if m = if m = (4.35) si cos m d =. (4.36) First, if we itegrate (4.3) from to, the by the properties i (4.33), we are left with from which we deduce f ()d = a = Net we multiply the series (??) by cos m f () cos m a d = a, f ()d. givig = a cos m ( + a cos cos m + b si = Agai, itegrate from to. From (4.33), the itegratio of a cos m is zero, from (4.34), the itegratio of cos m cos is zero ecept whe = m ad further from (4.36) the itegratios of si for all m ad. This leaves or f () cos d = a a = cos d = a, f () cos d. Similarly, if we multiply the series (??) by si m f () si m m cos the we obtai = a si m ( + a cos si m + b si = cos m is zero si m which we itegrate from to. From (4.33), the itegratio of a si m is zero, from (4.36) the itegratio of si m cos is zero for all m ad ). ),
4 Chapter 4. Fourier Series ad further from (4.35) the itegratio of si whe = m. This leaves or f () si d = b b = m si si d = a, f () si d. is zero ecept Therefore, the Fourier series represetatio of a fuctio f () is give by f () = a + ( a cos = + b si ) where the coefficiets a ad b are chose such that a = for =,,,.... f () cos d, b = f () si d. (4.37) Eample 4 Cosider f () = 9, [ 3, 3] (4.38) I this case = 3 so from (4.37) we have a = 3 9 d = ] [9 3 3 3 3 3 3 ad 3 3 = a = (9 ) cos 3 3 3 d = [( 7 3 3 + 54 ) 3 3 si 3 8 ] 3 cos 3 b = 3 = 36( )+ = 3 = 3 3 [ (9 ) cos 3 d ( 7 3 + 54 3 3 ) cos 3 3 8 ] 3 si 3 3
4.3. Fourier Series o [,] 5 Thus, the Fourier series for (4.38) o [ 3, 3] is f k () = 6 + k ( ) + = cos 3. (4.39) Figure 6 show the graph of this Fourier series (4.39) with terms. 5-5 5 Figure 6. The solutios (4.39) with terms. Eample 5 Cosider if < <, f () = if < <, if < <, (4.4)
6 Chapter 4. Fourier Series I this case = so from (4.37) we have { a = } ( ) d + d + ( ) d { [ = ] + ] } + [ = { a = ( ) cos d + cos d + [ ( + ) = si ] cos [ + si + ] cos [ ( ) + si ] cos = ad { b = [ ( + ) = [ + [ ( ) + = 6 si = ( ) si d + cos cos + si cos si { 6 if =, 5, 9..., 6 if = 3, 7,..., si d + ] si ] ] Thus, the Fourier series for (4.4) o [, ] is f k () = 6 = 6 { si 3 si 3 + 5 si 5 +... k = ( ) + ( ) si ( ) } ( ) cos d } ( ) si d } (4.4)
4.3. Fourier Series o [,] 7 Figure 7 show the graph of this Fourier series (4.4) with 5 terms. - - Eample 6 Cosider Figure 7. The solutios (4.4) with 5 terms. f () = I this case = so from (4.37) we have ad b = a = a = d = { if < <, if < <, cos d = si d cos{ Thus, the Fourier series for (4.3) o [, ] is si = = ( ) f k () = + k ( ) si = = + k si( ) = (4.4)
8 Chapter 4. Fourier Series Figure 8 ad 9 show the graph of this Fourier series (4.4) with 5 ad 5 terms..5 - Figure 8. The solutios (4.4) with 5 terms..5 - Figure 9. The solutios (4.4) with 5 terms. It is iterestig to ote that regardless of the umber of terms we have i the Fourier series, we caot elimiate the spikes at =,, etc. This pheomea is kow as Gibb s pheomea.
4.4. Odd ad Eve Etesios 9 4.4 Odd ad Eve Etesios Cosider f () = o [,]. Here the iterval is half the iterval [,]. Ca we still costruct a Fourier series for this? Well, it really depeds o what f () looks like o the iterval [,]. For eample, if f () = o [,], the yes. If f () = o [,], the also yes. I either case, as log a we are give f () o [,], the the aswer is yes. If we are just give f () o [,], the it is atural to eted f () to [,] as either a odd etesio or eve etesio. Recall that a fuctio is eve it f ( ) = f () ad odd if f ( ) = f (). For eample, if f () =, the f ( ) = = f () so f () = is odd. Similarly, if f () =, the f ( ) = ( ) = = f () so f () = is eve. For each etesio, the Fourier series costructed will cotai oly sie terms or cosie terms. These series respectively are called Sie series ad Cosie series. Before we cosider each series separately, it is ecessary to establish the followig lemma s. EMMA If f () is a odd fuctio the l f () d = ad if f () is a eve fuctio, the l f () d = f () d. Proof Cosider l f () d = l f () d + f () d.
Chapter 4. Fourier Series Uder a chage of variables = y, the secod itegral chages ad we obtai f () d = f ( y) dy + l l If f () is odd, the f ( y) = f (y) the l f () d = = =. l If f (y) is eve, the f ( y) = f (y) the l f () d = = = l f (y) dy + f (y) dy + f (y) dy + f (y) dy + f () d, f () d. f () d f () d f () d f () d establishig the result. At this poit we a ready to cosider each series separately. 4.4. Sie Series If f () is give o [,] we assume that f () is a odd fuctio which gives us f () o the iterval [,]. We ow cosider the Fourier coefficiets a ad b a = f () cos d, b = f () si d. (4.43) Sice f () is odd ad cos is eve, the their product is odd ad by lemma a =, Similarly, sice f () is odd ad si ad by lemma b =. is odd, the their product is eve f () si d. (4.44)
4.4. Odd ad Eve Etesios The Fourier series is therefore where b is give i (4.44). f k () = k b si = (4.45) Eample Fid a Fourier sie series for The coefficiet b is give by b = = f () =, [, ]. (4.46) si d [ cos si + + = ( ) 3 3 givig the Fourier Sie series as f = k = ( ) ( ( ) 3 3 ( ) ] cos 3 3 ) si. (4.47) y - - Figure. The fuctio (4.46) with its odd etesio ad its Fourier sie series (4.47) with terms.
Chapter 4. Fourier Series Eample Fid a Fourier sie series for f () = cos, [, ] (4.48) Two cases eed to be cosidered here. The case where = ad the case where =. The coefficiet b is give by b = cos si d = ad the coefficiet b is give by b = = [ cos si d cos( ) = ( + ( ) ). The Fourier Sie series is the give by f = = 8 cos( + ) + k ( + ( ) ) = si k = 4 ] si. (4.49) y - - Figure. The fuctio (4.48) with its odd etesio ad its Fourier sie series (4.49) with terms.
4.4. Cosie Series 4.4. Odd ad Eve Etesios 3 If f () is give o [,] we assume that f () is a eve fuctio which gives us f () o the iterval [,]. We ow cosider the Fourier coefficiets a ad b. a = Sice f () is eve ad cos lemma Similarly a = b = Sice f () is eve ad si lemma The Fourier series is therefore f () cos d (4.5) is eve, the their product is eve ad by f () cos f () si d. (4.5) d (4.5) is odd, the their product is odd ad by b =,. (4.53) f k () = a + k a cos = (4.54) where a is give i (4.53). Eample 3 Fid a Fourier cosie series for f () =, [, ]. (4.55) The coefficiet a is give by a = d = =
4 Chapter 4. Fourier Series The coefficiet is give by a = = = cos d [ si + 4 ] cos 4 (( ) ) givig the Fourier Cosie series as f = + 4 k ( ) = cos. (4.56) y - Figure. The fuctio (4.55) with its eve etesio ad its Fourier sie series (4.56) with 3 terms. Eample 4 Fid a Fourier cosie series for f () = si, [, ]. (4.57)
4.4. Odd ad Eve Etesios 5 The coefficiet a is give by a = = [ cos ] si d (4.58) = 4 For the remaiig coefficiets a, the case a agai eeds to be cosidered separately. For a a = si cos d = ad the coefficiet a, is give by a = = [ si cos d cos( ) = ( + ( ) ). cos( + ) + ] Thus, the Fourier series is f = = 8 k ( + ( ) ) = si k = 4 si. (4.59)
6 Chapter 4. Fourier Series y.5 - Figure 3. The fuctio (4.57) with its eve etesio ad its Fourier sie series (4.59) with 5 terms. Eample 5 Fid a Fourier sie ad cosie series for { 4 for f () = 8 for < < 4 (4.6) For the Fourier sie series a = ad b are obtaied by b = (4 ) si 4 4 d + (8 ) si 4 4 d [( ) 3 6 = si ( 4 + 8 64 ) 3 3 cos ] 4 [ 6 4 6 + si 4 cos ] 4 4 4 = 6 si + 64 3 3 ( cos Thus, the Fourier sie series is give by ). f = 6 k ( = si + 4 ( 3 cos ) ) si 4. (4.6)
4.4. Odd ad Eve Etesios 7 For the Fourier cosie series b = ad a ad a are give by ad 4 a = 4 d + 8 d 4 4 = ] [ 3 + [8 ] 4 3 = 8 3 + = 4 3, a = (4 ) cos 4 4 d + (8 ) cos 4 4 d [( ) 3 6 = cos ( 4 8 64 ) 3 3 si ] 4 [ + 6 4 6 cos + 4 si ] 4 4 = 6 ( cos ) cos + 64 3 3 si. Thus, the Fourier cosie series is give by f = 4 3 + 6 k = 4 ( ( cos cos ) + 4 3 si ) cos 4, (4.6) 4 y -4 4-4 Figure 4. The fuctio (4.6) with its odd etesio ad its Fourier sie series (4.6) with 3 terms.
8 Chapter 4. Fourier Series 4 y -4 4 Figure 5. The fuctio (4.6) with its eve etesio ad its Fourier cosie series (4.6) with 3 terms. As show i the eamples i this chapter, ofte oly a few terms are eeded to obtai a fairly good represetatio of the fuctio. It is iterestig to ote that if discotiuity is ecoutered o the etesio, Gibb s pheomea occurs. I the et chapter, we retur to solvig the heat equatio, aplace s equatio ad the wave equatio usig separatio of variables as itroduced at the begiig of this chapter. Eercises. Fid Fourier series for the followig (i) f () = e o [, ] (ii) f () = o [, ] (iii) f () = { if < <, if < <, (iv) f () = e o [ 5, 5].
4.4. Odd ad Eve Etesios 9. Fid Fourier sie ad cosie series for the followig ad illustrate the fuctio ad its correspodig series o [, ] ad [, ] if < <, (i) f () = if < <, 3 if < < 3, (ii) f () = o [, ] (iii) f () = (iv) f () = { + if < <, 4 if < <,, { if < <, if < <,, 3. Fid the first terms umerically of the Fourier series of the followig (i) f () = e, o [ 5, 5] (ii) f () =, o [, 4] (iii) f () = l o [, ].