FOURIER SERIES Math 21b, Spring 08Smooth functions f(x) on [−π, π] form a linear space X. There is an inner product in X defined byhf, gi =1πRπ−πf(x)g(x) dxIt allows to define angles, length, projections in X as we did in finite dimensions.THE FOURIER BASIS.THEOREM. The functions {cos(nx), sin(nx), 1/√2 } form an orthonormal set in X.Proof. To check linear independence a few integrals need to be computed. For all n, m ≥ 1 , with n 6= m youhave to show:h1√2,1√2i = 1hcos(nx), cos(nx)i = 1, hcos(nx), cos(mx)i = 0hsin(nx), sin(nx)i = 1, hsin(nx), sin(mx)i = 0hsin(nx), cos(mx)i = 0hsin(nx), 1/√2i = 0hcos(nx), 1/√2i = 0To verify the above integrals in the ho mework, the following trigonometric identities are useful:2 cos(nx) cos(my) = cos(nx − my) + cos(nx + my)2 sin(nx) sin(my) = cos(nx −my) − cos(nx + my)2 sin(nx) cos(my) = sin(nx + my) + sin(nx − m y)FOURIER COEFFICIENTS. The Fourier coefficients of a function f in X are defined asa0= hf, 1 /√2i =1πRπ−πf(x)/√2 dxan= hf, cos(nt)i =1πRπ−πf(x) cos(nx) dxbn= hf, sin(nt)i =1πRπ−πf(x) sin(nx) dxFOURIER SERIES. The Fourier representation o f a smooth function f is the identityf(x) =a0√2+P∞k=1akcos(kx) +P∞k=1bksin(kx)We take it for granted that the series converges and that the identity holds for all x where f is continuous.ODD AND EVEN FUNCTIONS. Here is some advise which can save time when c omputing Fourier series:If f is odd: f(x) = −f(−x), then f has a sin series.If f is even: f (x) = f(−x), then f has a cos series.If you integrate an odd function over [−π, π] you get 0.The product of two odd functions is even, the product between an even and an odd function is odd.EXAMPLE 1. Let f (x) = x on [−π, π]. This is an odd function (f(−x)+f(x) = 0) so that it has a sin series: withbn=1πRπ−πx sin(nx) dx =−1π(x cos(nx)/n + sin(nx)/n2|π−π) = 2(−1)n+1/n, we get x =P∞n=12(−1)n+1nsin(nx).For exampleπ2= 2(11−13+15−17...)is a formula of Leibnitz.EXAMPLE 2. Let f(x) = co s(x) + 1/7 cos(5x). This trigonom etric polynomial is already the Fourier series.There is no need to compute the integrals. The nonzero coefficients are a1= 1, a5= 1/7.EXAMPLE 3. Let f (x) = 1 on [−π/2, π/2] and f (x) = 0 else. This is an even function f(−x) − f(x) = 0 sothat it has a cos series: with a0= 1/(√2), an=1πRπ/2−π/21 cos(nx) dx =sin(nx)πn|π/2−π/2=2(−1)mπ(2m+1)if n = 2m + 1 isodd and 0 else. So, the se ries isf(x) =12+2π(cos(x)1−cos(3x)3+cos(5x)5− ...)Remark. The function in Example 3 is not smooth, but Fourier theory still works. What happens at thediscontinuity point π/2? The Fourier series converges to 0. Diplomatically it has chosen the point in the middleof the limits from the right and the limit from the left.FOURIER APPROXIMATION. For a smooth function f, theFourier series of f c onverges to f. The Fourier coefficients arethe coordinates of f in the Fourier basis.The function fn(x) =a0√2+Pnk=1akcos(kx) +Pnk=1bksin(kx) iscalled a Fourier approximation of f. The picture to the rightplots a few approximations in the case of a piecewise continuouseven function given in example 3).-3 -2 -1 1 2 3-0.20.20.40.60.811.2THE PARSEVAL EQUALITY. When evaluating the s quare of the length of f with the squa re of the length o fthe series, we get||f||2= a20+P∞k=1a2k+ b2k.EXAMPLE. We have se e n in example 1 that f (x) = x = 2(sin(x) − sin(2x)/2 + sin(3x)/3 − sin(4x)/4 + ...Because the Fourier coefficients are bk= 2(−1)k+1/k, we have 4 (1 + 1/4 + 1/9 + ...) =1πRπ−πx2dx = 2π2/3 andso11+14+19+116+125+ ... =π26Isn’t it fantastic that we can sum up the reciprocal squares? This formula has been obta ined already byLeonard Euler.HOMEWORK: (this homework is due either Wednesday or Thursday. Remember that there is a Mathematicalab due on Thursday or Friday, the last day of class.)1. Verify that the functions cos(nx), sin(nx), 1/√2 for m an orthonormal family.2. Find the Fourier s eries of the function f (x) = |x|.3. Find the Fourier series of the function c os2(x) + 5 sin(7x) + 55. You may find the double angle formulacos2(x) =cos(2x)+12useful.4. Find the Fourier s eries of the function f (x) = |sin(x)|.5. In the previous problem 4) you should have gotten a seriesf(x) =2π−4πcos(2x)22− 1+cos(4x)42− 1+cos(6x)62− 1+ ...Use Parseval’s identity to find the value o f1(22− 1)2+1(42− 1)2+1(62− 1)2+ ···HEAT AND WAVE EQUATION Math 21b, Spring 08FUNCTIONS OF TWO VARIABLES. We consider functions f(x, t) which are for fixed t a piecewise smoothfunction in x. Analogously as we studied the motion of a vector ~v(t), we are now interested in the motio n of afunction f in time t. While the governing e quation for a vector was an ordinary differential equation ˙x = Ax(ODE), the describing eq uation is now b e a partial differential equation (PDE)˙f = T (f). The functionf(x, t) could denote the temperature of a stick at a pos itio n x at time t or the displacement of a stringat the position x at time t. The motion of these dynamica l systems will be easy to des cribe in the ortho normalFourier basis 1/√2, sin(nx), cos(nx) treated in an earlier lecture.PARTIAL DERIVATIVES. We write fx(x, t) and ft(x, t) for the partial derivatives with resp e ct to x or t.The notation fxx(x, t) means that we differentiate twice with respect to x.Example: for f (x, t) = cos(x + 4 t2), we have• fx(x, t) = −sin(x + 4t2)• ft(x, t) = −8t sin(x + 4t2).• fxx(x, t) = −cos(x + 4t2).One also uses the notation∂f (x,y)∂xfor the partial derivative with resp e c t to x. Tired of all the ”partial derivativesigns”, we always write fx(x, t) for the partial derivative w ith re sp e c t to x a nd ft(x, t) for the partial derivativewith respect to t.PARTIAL DIFFERENTIAL EQUATIONS. A partial differential equation is an equation for an unknownfunction f (x, t) in which different partial derivatives occur.• ft(x, t) + fx(x, t) = 0 with f (x, 0) = sin(x) has asolution f (x, t) = sin(x − t).• ftt(x, t) − fxx(x, t) = 0 with f(x, 0) = sin(x) andft(x, 0) = 0 has a solution f(x, t) = (sin(x − t) +sin(x + t))/2.THE HEAT EQUATION. The temperature distribution f(x, t) in a metal bar [0, π] satisfies the heat equationft(x, t) = µfxx(x, t)This partial differential equation tells that the rate of change of the temperature at x is proportional to thesecond space derivative of f(x, t) at x. The function f (x, t) is assumed to be zero at bo th ends of the bar
View Full Document