Fourier Anaysis The Fourier series First some terminoogy: a function f(x) is periodic if f(x ) = f(x) for a x for some, if is the smaest such number, it is caed the period of f(x). It is even if f( x) = f(x), for a x and odd if f( x) = f(x), again, for a x. sin x, cos x, sin 2x, sin 3x and so on are exampes of periodic functions: sin nx has period 2π/n Now, consider sin 3 x, this is ceary periodic with periodic with period 2π: sin 3 (x 2π) = sin 3 x. Using the usua trigonometric identities, or otherwise, it can be shown that sin 3 x = 4 sin 3x 3 sin x () 4 In short, sin 3 x can be re-expressed in terms of sines. In fact, this is a much more common property than you might expect, the theory of Fourier series tes us that if f(x) is odd and periodic with period 2π then there are b n s such that f(x) = b n sin nx (2) If it is even it has a cosine series instead f(x) = 2 a 0 a n cos nx (3) where the haf before a 0 is a standard convention, we wi see soon why it is convenient. Anyway, these are Fourier series. More generay, a periodic function f(x) with period has Fourier series f(x) = 2 a 0 a n cos 2πnx b n sin 2πnx Leaving aside, for now, issues of convergence, it is easy to cacuate what vaues the a n and b n must have. First, integrating both sides gives dxf(x) = 2 a 0 a n dx cos 2πnx b n dx sin 2πnx (4) = 2 a 0 (5) where I have assumed I can bring the integras into the sum signs, the sines and cosines both integrate to zero: sine and cosine integrate to zero if integrated over a whoe number of periods and cos 2nπ/ and sin 2nπ/ have period /n. This means that a 0 = 2 f(x)dx (6) Based on notes by Conor Houghton
In fact, the method for cacuating the other coefficients is not too different; we mutipy across by a sine or cosine and then integrate using the formuae dx sin 2πmx dx cos 2πmx dx sin 2πmx sin 2πnx cos 2πnx cos 2πnx = 2 δ mn = 2 δ mn = 0 (7) which can be proved, for exampe, by writing the trigonometric functions in terms of compex exponentias. Hence, mutipying across by cos 2πmx/ and integrating, we get dxf(x) cos 2πmx = 2 dxa 0 cos 2πmx a n b n dx cos 2πnx dx sin 2πnx cos 2πmx cos 2πmx = 2 a m (8) so, using this and a simiar cacuation for sine, we get a n = 2 b n = 2 dxf(x) cos 2πmx dxf(x) sin 2πmx (9) where the first equation hods for n 0 and the second for n > 0. It is to have a the a n obey the same genera expression that there is the convention to put the haf is put in front of the a 0. As a point of terminoogy, the a n and b n are caed Fourier coefficients and the sines and cosines, or sometimes the sines and cosine aong with their coefficient, are caed Fourier modes. Exampe: Consider the bock wave with period = 2π (Picture II..) f(x) = { 0 < x < π π < x < 0 (0) with f(x 2π) = f(x). 2
2π π π 2π - So a n = π because the integrand is odd, and b n = π dxf(x) sin nx = 2 π π 0 where we have used cos nπ = ( ) n. Hence f(x) = 4 π dxf(x) cos nx = 0 () dx sin nx = n odd 2 cos nx nπ π 0 = 2 πn [ ( )n ] (2) sin nx (3) n This series is not obviousy convergent; the point of Fourier series is that there are theorems to te us it is. However, there are particuar vaues of x where we can see that the answer is correct, for exampe, at x = π/2, we have sin (2m )π/2 = ( ) m where m is an integer so 2m is odd. Putting this back into the series gives = 4 ( 3 π 5 7 9 )... (4) and the right hand side can be derived by Tayor expanding tan x. It is interesting to note that the series as written, up to /9 gives.06; the Fourier series gives workabe but not efficient approximations and its importance is not in its abiity to approximate functions with high numerica accuracy, rather, it quicky captures features of the function, preserving its periodicity and encoding its behaviour at engths scaes bigger than /n, where n is where the series is truncated. Another interesting thing to ook at is the behaviour at x = 0 where the function is discontinuous. Since a the sines are zero, the Fourier series gives zero at x = 0. This interpoates the discontinuity. This is a feature of the Fourier series, the series does not see what happens at individua points and interpoates over any finite discontinuities. A graph of the Fourier series is given in Note 3. There are ots of versions of the theorem which tes us the Fourier series exists, different versions impose different conditions on the function and have convergence properties for 3
the series; the version we quote is actuay quite vague about the convergence and pretty restrictive on the function and we wi ca it Dirichet s Theorem: If f is periodic and has, in any period, a finite number of maxima and minima and a finite number of discontinuities and f(x) 2 dx is finite then the Fourier series converges and converges to f(x) at a points where f(x) is continuous. At a point a where f(x) is discontinuous it converges to 2 [ im f(x) im f(x) x a x a One annoying thing about Dirichet s theorem, as quoted, is that it appears to excude the bock wave used in the exampe, the bock wave doesn t have a finite number of maxima and minima, obviousy this isn t the sort of function the statement is trying to excude, it is aimed at functions that osciate infinitey fast. To fix it you coud extend Dirichet s theorem to functions f(x) such that there is a function g(x), satisfying the properties described by the theorem, such that g(f(x)) has the properties required by the theorem. Compex Fourier series As often happens, apart from the sight inconvenience of being compex, compex Fourier series are more straightforward than rea ones, there is ony once type of Fourier coefficient, c n, instead of three, a 0, a n and b n for the rea series. It is easy to see the existence of a compex exponentia series foows from the existence of the sine and cosine series, just repace to get a series of the form cos x = eix e ix 2 sin x = e ix e ix 2i f(x) = ] (5) (6) c n e 2πinx/. (7) Rather than try to work out the formua for the c n from the formuas for the a n and b n, we can just take this as a series for f(x) and cacuate the c n by a simiar trick to the one we used before, we mutipy across by exp( 2πimx/) and integrate dxe 2πimx/ f(x) = c n e 2πi(n m)x/ (8) and use dxe 2πi(n m)x/ = δ nm (9) which is cear if you note the integrand is one for n = m and otherwise, it is easy to see from e iθ = cos θ i sin θ (20) 4
that it integrates to zero. This means that c n = dxf(x)e 2πinx/ (2) It is interesting to ask what the consequence of f(x) being rea is on the c n, using a star to mean the compex conjugate ets take the compex conjugate of this equation, using f (x) = f(x): c n = dxf(x)e 2πinx/ = dxf(x)e 2πi( n)x/ = c n (22) Exampe: It is easy to redo the ast by integrating; since we have aready done the integrations when working out the b n s, we wi use the previous rea series to work out the Fourier coefficients for the compex series, so, so f(x) = 4 π n>0 and odd n sin nx = 2 π c n = n>0 and odd { 2/(πin) n odd 0 otherwise ( e inx e inx) = 2 n π n einx = (23) n odd Exampe: Consider f(x) = e x for π < x < π and f(x 2π) = f(x). So, and so c n = 2π π π dxe inx e x = 2π = eπ e inπ e π e inπ 2π( in) = sinh π ( ) n π in f(x) = sinh π π π dxe ( in)x π = ( ) n eπ e π 2π( in) At x = 0 this gives the amusing formua ( = sinh π ( ) n ) π in ( ) n = sinh π in π where the n = terms cance the one. (24) (25) ( ) n in einx (26) n=2 ( ) n n 2 (27) 5
Parseva s Theorem Parseva s theorem is a reation between the L 2 size of f(x) and the Fourier coefficients: or for the compex series /2 f(x) 2 dx = 4 a2 0 2 /2 f(x) 2 dx = (a 2 n b 2 n) (28) c n 2 (29) This theorem is very impressive, it reates a natura measure for the size of the function on the space of periodic functions to the natura measure for the size of an infinite vector on the space of coefficients. It is easy to prove and convenient too for the compex series dxf(x)f (x) = c n c m dxe 2πi(n m)x/ = c n c mδ nm = m,n m,n n c n 2. (30) Exampe: So, going back to the bock wave exampe, it is easy to check that /2 dx f(x) 2 = (3) 2π so = 8 π 2 ( 9 25 49... ). (32) 6