Fourier series and transforms: a summary by Dr Colton Physics 471 Fourier Series Fourier series summary: Any periodic function (period = T) can be written as a sum of sines and cosines, as: f (t ) a0 2 nt 2 nt an cos bn sin T n 1 T n 1 The an and bn numbers are called the “Fourier coefficients”. 1 a0 represents the average value of the function, and is calculated by: a0 T 2 The an coefficients can be calculated by the formula: an T 2 The bn coefficients can be calculated by the formula: bn T T T f (t )dt 0 2 nt dt T f (t ) cos 0 T 2 nt dt T f (t )sin 0 Symmetry Notes: If the function f(t) is even, only the cosine terms will be present. I.e., the bn coefficients will all be zero. If the function f(t) is odd, only the sine terms will be present. I.e., the an coefficients will all be zero. All integrals can be done from –T/2 to T/2 (for example) instead of from 0 to T, if it makes things easier. Notation Notes: Often the constant term is written as “a0/2” instead of just “a0”. That makes a0 be twice as big as in my definition above. Some people do that so that the an formula given in the third bullet point will also work for a0. The equations are often written in terms of 0 instead of in terms of T, with 0 = 2/T. That is done so that the arguments of the sines and cosines are simpler: n0t. Thus all terms are multiples of the lowest frequency, 0. P&W write the fundamental frequency as instead of 0. Sometimes people write the expansion in terms of exponentials instead of sines and cosines, using Euler’s identity eix = cosx + isinx to combine the an and bn coefficients into a single (complex) coefficient, typically called cn. P&W shows on page 14 that if you write the series as f (t ) c e n in0t n then cn is related to an and bn through these formulas: cn0 a n ib n a ibn ; cn 0 n ; cn0 an 2 2 1 The three equations for a0, an, and bn can thus be summarized very compactly as: cn T T f (t )e i 2 nt T dt 0 In an exponential series like that, sometimes f (t ) is expanded in terms of ein0t instead of ein0t . In that case, the equations for cn would need to be modified. The same procedure can be done with functions of x instead of functions of t. In that case the spatial period L is used instead of the temporal period T and the symbol k is used in place of . Fourier summary – pg 1 Example 1: Square wave (infinite, repeating) 1 As an example, consider this function, plotted as shown: 1, for 0 t 12 f (t ) 1 1, for 2 t 1 (repeated with a period of 1) 1 –1 In this case, the period is 1, so the fundamental frequency is 0 = 2. All of the terms in the series will be multiples of 2. The average value of the function is 0, so a0 = 0. Additionally, the function is odd, so only sine terms will be present in the expansion. A formula for the coefficients of the sine terms for this specific case can be obtained by performing the bn integral: T 2 nt dx T f (t )sin 2 bn T 0 1 2 f (t )sin 2 nt dx 0 2 0 1 2 12 0 1 sin 2 nt dx 2 1 sin 2 nt dx 1 cos 2 nt 0 cos 2 nt 2 2 2 n 2 n 1 0 2 4 1 cos n 2 n 2 1 cos n n That expression is equal to 0 for even values of n, and 4/n for odd values, so written out the series is this: 4 4 f (t ) sin 2 t 3 4 sin 6 t 5 4 sin 10 t 7 sin 14 t ... In terms of the complex exponential representation, the series is: 2i f (t ) ... 5 i10 t 2i e 3 i 6 t 2i i 2 t 2i i 2 t 2i e e e 3 i 6 t 2i e 5 i10 t ... e It would be a good “exercise for the reader” to do the integral for the cn coefficients using the boxed equation on pg 1, to verify that this equation for f(t) is correct. One can also verify that this equation and the sin equation are identical using the identity that sin(x) = 1/(2i) (eix – e-ix). The set of Fourier coefficients can be thought of as a list like this: 2i ..., 5 2i , 0, 3 2i 2i 2i , 0, , 0, , 0, 3 2i , 0, 5 ... Fourier summary – pg 2 Or as a table of ordered pairs, like this:* n = n0 … –10 –8 –6 –4 –2 0 8 10 … cn … –2i/(5) 0 –2i/(3) 0 –2i/ 0 2i/ 0 2i/(3) 0 2i/(5) … Imaginary part of Fourier coefficient, Im(cn) Or even as a plot, like this: 1.5 1.0 0.5 0.0 -0.5 -1.0 -1.5 -40 -30 -20 -10 0 10 20 30 40 Frequency, n (rad/s) The values in the right hand column may initially seem to you to be the negative of what they should be. That’s because the definitions used on pg 1 mean that, for example, the ei10 t term of the f(t) expression on the previous page has n = –10, rather than n = 10 as would perhaps make more intuitive sense. * Fourier summary – pg 3 Fourier Transforms If the period of a function increases, then the spacing between frequency components that form the x-axis of the plot decreases. And in the limit of infinite period, where the function is not periodic at all, then an amazing thing happens: the spacing between frequencies goes to zero and instead of a set of discrete cn points we have a continuous function! That is called a Fourier transform. In place of n we now have simply as the x-axis. Similarly, in place of n0 in the exponential, we have just . And instead of a summation over n in the series expansion equation, we have an integral over . f (t ) 1 2 c( )e it d Here the factor of 1 2 has been arbitrarily added in to make the next equation look nicer. It has no physical significance, but causes c() to be a factor of 2 larger than it otherwise would be. Instead of the previous integrals for an and bn, it can be shown via the Fourier integral theorem (P&W pg 16) that the proper equation for c() is now: c( ) 1 2 f (t )e it dt c() is called the “Fourier Transform” of f(t). f(t) is called the “Inverse Fourier Transform” of c(). Symmetry Notes: In general, c() is a complex function. It’s perhaps unexpected to get complex numbers from the transform of a real function. However, notice that with the way things are defined, that happens with the cn coefficients of a Fourier series as well. If f(t) is purely real, then c(–) = the complex conjugate of c(). If f(t) is a purely real even function, then c() = a purely real even function. That’s the equivalent of an even periodic function giving rise to only cosine terms in the Fourier series. If f(t) is a purely real odd function, then c() = a purely imaginary odd function. That’s the equivalent of an odd periodic function giving rise to only sine terms in the Fourier series. Notation Notes: Unfortunately c() is not standard notation for the Fourier transform of f(t). The Fourier transform of f(t) is typically labeled F() or often even f(). The latter is particularly unfortunate, since the two functions both labeled “f”, meaning f(t) and f(), are not the same function at all! Other ways of labeling the Fourier transform of f(t) include FT{f(t)} and F{f(t)}. Factors of 2 are not always included this way. Two alternate methods are: o If 1 2 is not included in the f(t) equation, the c() equation will need to have 1/2 in it. o Sometimes 1/2 is included with the f(t) equation. In that case c() has no 1/2 or 1 2 . The equations to calculate the Fourier transform and the inverse Fourier transform differ only by the sign of the exponent of the complex exponential. Unfortunately there is not universal agreement on which one should have the negative sign and which the positive. Be careful. Fourier summary – pg 4 Example 2: Square wave pulse (finite, nonrepeating) 1 Consider this function, plotted as shown: –0.5 1, for t 0 f (t ) 1 1, for 0 t 2 1 2 0.5 –1 (non-repeating) Just as the cn coefficients of the Fourier series in Example 1 represent how “much” of each frequency component there is, the c() function in this example represents how “much” of this function there is at a given frequency . The only difference is that for the periodic function done above there are only certain discrete frequency components present, whereas here there are contributions from all frequencies. The Fourier transform function can be calculated using the c() formula above: c( ) 1 2 f (t )e it dt 0 0.5 1 1 e it dt 1 e it dt 2 0.5 0 1 e it 2 i 0 x 0.5 1 1 e i i 2 2 ei 2 ei 2 2 i 2 2 i 0.5 0 ei 2 1 i 1 e it i 2 1 1 cos 2 That can be plotted, like this: Im(c) 0.3 0.2 0.1 40 20 20 40 0.1 0.2 0.3 Many similarities with the plot of the Fourier series coefficients done in Example 1 are apparent. Fourier summary – pg 5