<<

SCHOOL OF

MATHEMATICS FOR PART I ENGINEERING

Self Study Course

MODULE 23

Module Topics

1. Periodic 2. Whole-range Fourier series 3. Even and odd functions

A chapter on Fourier series appears in JAMES, but not in STROUD. Although some reference will be made here to that chapter, we will keep this module self-contained since we shall include a number of simpler examples and exercises.

Work Scheme

1. Fourier series are used in many areas of engineering and the basic ideas are developed in this module. Most of you will discuss the method again in your second year mathematics units. Fourier series expansions of periodic functions are developed in this module. Periodic functions have waveforms which repeat themselves exactly at regular intervals, and two examples are shown in Figures 1(a) and (b).

...... Figure 1(a)

...... t Figure 1(b) In both cases the behaviour of the wave repeats itself at regular intervals. Let us now be more precise. Df. A f is periodic of period T (T>0) if and only if f(t + T )=f(t) for all t. Therefore the period T is defined as the time interval required for one complete fluctuation. It follows that the function f(t)=cost is periodic with period 2π since

f(t +2π)=cos(t+2π)=cost=f(t) for all t.

You should note that if f is periodic with period T , then it is clear from the graphs, or from repeated use of the definition, that f is also periodic with periods 2T,3T,.... You should choose the minimum period of the function to be its period.

–1– Example 1 Determine in each case whether the following functions are periodic and, if so, determine the period:- √ (i) f(t) = sin(2t), (ii) f(t)=cos( 3t), (iii) f(t)=cost+ sin(2t).

(i) The function f(t) = sin(2t) is periodic with period π since

f(t + π)=sin2(t+π)=sin(2t+2π)=sin2t=f(t) for all t. √ √ (ii) The function f(t)=cos( 3t) is periodic with period 2π/ 3 since      2π √ 2π √ √ f t + √ =cos 3 t+√ =cos( 3t+2π)=cos( 3t)=f(t) for all t. 3 3

(iii) Determining the period of more complicated functions is less straightforward. When f(t)=cost+sin2t it follows from the above that cos t has periods 2π, 4π, 6π,... sin 2t has periods π, 2π, 3π,... Clearly the minimum period for the sum of these quantities is the smallest number that appears in both lists of periods. In this Example clearly T =2π. √ The function f(t)=cost+cos( 2t) is more difficult. Here

cos t has periods 2π, 4π, 6π,... √ 2π 4π 6π cos( 2 t) has periods √ , √ , √ ,... 2 2 2

Since the√ multiplicative factors of π in the periods√ for cos t are whole numbers but the corresponding factors for cos( 2 t) are irrational√ (always involving 2) there is no number that appears in both lists. Hence the function f(t)=cost+cos( 2t) is NOT periodic (it never repeats itself), despite its comparatively simple form. More generally, you can say that the sum of two or more cosine waves will be periodic only when the ratios of all pairs of frequencies√ (or all pairs of periods) form rational numbers (ratios of ). In the last example the ratio is 1/ 2, which is irrational.

***Do Exercise A: Determine in each case whether the following functions are periodic and, if so, determine the period:- √ (i) f(t)=cos(7t), (ii) f(t) = 1 + sin( 3 t), (iii) f(t)=cos2t.

2. Let us recall the definitions of the properties associated with a single wave (see Figure 2).

...... f ...... 0 ...... f sin φ...... − . 0 ...... t φ/ω ...... 2π/ω ...... Figure 2

–2– Consider the function f(t)=f0sin(ωt + φ)=f0sin(2πνt + φ), where

f0 is the amplitude, ω is the circular (or angular) frequency in radians/unit time, ν is the frequency in cycles/unit time (Hertz)and φis the phase angle with respect to the time origin in radians. The period of this is 1/ν =2π/ω seconds. A positive phase angle φ shifts the waveform to the left (a lead) and a negative phase angle to the right (a lag). When φ = π/2 the wave becomes a cosine wave.

3. The basis of the of periodic signals is the decomposition of a ‘complicated’ periodic wave shape into a sum of sine and cosine waves of appropriate amplitude and relative phases. Suppose that a f(t) can be represented by the trigonometric series:

∞      1 X 2πnt 2πnt f(t)= a0+ an cos + bn sin , (1) 2 n=1 T T where T is the period and a0,a1,a2 ..., b1,b2,... are constants.

It will be shown in section 7 that an and bn,theFourier coefficients of f(t), are given by

Z +T/2   2 2πnt an = f(t)cos dt , n =0,1,2... , (2) T −T/2 T Z   2 +T/2 2πnt bn = f(t)sin dt , n =1,2,3... . (3) T −T/2 T

Equations (1), (2) and (3) appear on the Formula Sheet. Equations (2 ) and (3) follow immediately from the more general ones stated in J. (as equations 12.11 and 12.12 on p.817) on choosing d = −T/2 and introducing ω =2π/T. Equations (1)–(3) also appear in the Data Book but in a slightly different form, because there the functions are assumed to have period 2L. You must get familiar with using the equations in the form appropriate for your department.

Let us now look at the situation for the general Fourier series in a slightly different way. Given a periodic function f(t) suppose that we formally calculate its Fourier coefficients using the (2) and (3). Then you can write ∞      1 X 2πnt 2πnt f(t) ∼ a0 + an cos + bn sin . (4) 2 n=1 T T The series on the right-hand side of (4) is called the whole-range Fourier series of f(t). The symbol ∼ is used to show that f(t) is not necessarily equal to the series on the right. Indeed, it could be that the series on the right is divergent, or that if it is convergent it could converge to a sum other than f(t). It can be proved that the series on the right of equation (4) does converge, under certain conditions, for a wide variety of functions. Sufficient conditions, known as the Dirichlet conditions, are stated below (you can also find a discussion of convergence in section 12.2.8 starting on p.831 of J.):

If f(t) is a periodic function with period T and (i) is piecewise continuous in the interval −T/2

–3– " # 1 then the Fourier series converges at a point t0 to the value lim f(t) + lim f(t) . + − 2 t→t0 t→t0

The value written above represents the average of the left and right hand limits of f at t0 (see Figure 3). At all points t at which the function f(t) is continuous, the left and right-hand limits of f are the same, so the Fourier series converges to f(t).

. .... f ...... value of Fourier series at t0 ...... ×...... 0 ...... 0 t ...... t ...... Figure 3

4. Let us illustrate the calculation of a Fourier series with the following simple example. Example 2 Find the Fourier series of the function defined by  1 −1, −2T ≤t<0 f(t)= 1 +1 , 0 ≤ t< 2T f(t+T)=f(t).

For this function (which is shown in Figure 4) the Fourier coefficients are obtained below. (N.B. a0 and an (n>0) are defined by the same (2), but a0 must always be calculated separately since the form of the integral changes when n = 0). (If you are using the Data Book the period 2L = T ). Z Z (Z Z ) 2 +T/2 2 +T/2 2 0 +T/2 a0 = f(t)cos(0)dt = f(t)dt = (−1) dt + (+1) dt T −T/2 T −T/2 T −T/2 0      T 2 0 2 2 2 T 2 T = [−t]− T + [t]0 = 0 − + − 0 =0; T 2 T T 2 T 2

Z   (Z   Z   ) 2 +T/2 2πnt 2 0 2πnt T/2 2πnt an = f(t)cos dt = (−1) cos dt + (+1) cos dt T −T/2 T T −T/2 T 0 T ( )  0   T 2 sin(2πnt/T ) sin(2πnt/T ) 2 = − + T (2πn/T) T (2πn/T) − 2 0 1 1 = {− sin 0 − (− sin(−πn)) + sin(πn) − sin 0} = (− sin(πn) + sin(πn)) = 0 ; πn πn

Z   (Z   Z   ) 2 +T/2 2πnt 2 0 2πnt T/2 2πnt bn = f(t)sin dt = (−1) sin dt + (+1) sin dt T −T/2 T T −T/2 T 0 T ( )  0   T 2 cos(2πnt/T ) cos(2πnt/T ) 2 = + − T (2πn/T) T (2πn/T) − 2 0 1 2 2 = {cos 0 − cos(−πn) − cos(πn)+cos0}= {1 − cos(πn)} = {1 − (−1)n} . πn πn πn

–4– ...... f ...... 1...... T . .T . − . 0 ... .. t ..2 . .2 ...... − . 1 . . . . Figure 4 n In the calculation of bn the result cos(nπ)=(−1) has been used. The latter result follows from the values of cos(nπ), which alternate between −1 and +1 for all n. n When n is even, (−1) = +1 and it follows that bn =0.

n 2 4 On the other hand when n is odd then (−1) = −1, and bn = (1 − (−1)) = . nπ nπ Thus 4 4 b1 = ,b2=0,b3= ,b4=0,... π 3π and introducing ω0 =2π/T it follows that   4 1 1 f(t) ∼ sin(ω0t)+ sin(3ω0t)+ sin(5ω0t)+··· . π 3 5

5. The mth partial sum Sm(t) is defined to be the sum of a Fourier series up to the terms in sin(2πmt/T ) Xm and cos(2πmt/T ). For the Fourier series in Example 2 it follows that Sm(t)= bn sin(nω0t)sothat n=1

4 S1(t)= sin ω0t π  4 1 S3(t)= sin ω0t + sin 3ω0t π 3   4 1 1 S5(t)= sin ω0t + sin 3ω0t + sin 5ω0t π 3 5

Notice that at t = 0, a point of discontinuity, all terms in the Fourier series are zero so that the total sum is also zero. This illustrates the result that the Fourier series is convergent at t =0to   1 1 lim f(t) + lim f(t) = [1 + (−1)] = 0 . 2 t→0+ t→0− 2

6. In Example 2 the Fourier coefficients were calculated directly from the integral definitions. It is often possible to simplify these calculations by using properties of the function f(t). Definitions of odd and even functions were introduced in module 7 on Functions and, if necessary, you should refresh your memory by looking in that module at section 5 of the Work Scheme based on JAMES. The important definitions are that:

–5– a function f(t)iseven if f(−t)=f(t); a function f(t)isodd if f(−t)=−f(t). For example, f(t)=costis even since f(−t)=cos(−t)=cost=f(t), f(t)=sintis odd since f(−t) = sin(−t)=−sin t = −f(t).

Note that the product of two even functions f and g is even, since f(−t) g(−t)=f(t)g(t); the product of two odd functions f and g is even, since f(−t) g(−t)=(−f(t)) (−g(t)) = f(t) g(t) but the product of an odd function f with an even function g is odd , since

f(−t) g(−t)=(−f(t)) g(t)=−f(t)g(t).

The crucial results concern the integrals of odd and even functions. From the definitions of these functions, or from their graphs, it is easily seen that Z a if f(t)isodd then f(t) dt =0; −a Z a Z a if f(t)iseven then f(t) dt =2 f(t)dt . −a 0 These integral results are illustrated for particular cases in Figures 5(a) and 5(b).

...... f ...... A ...... − ...... a...... 0 a ...... t ...... − ...... A ...... Figure 5(a)

...... f ...... A ...... A ...... − . a a . 0 t . . . Figure 5(b)

It is appropriate to point out at this stage that the function defined in Example 2 is odd, as can be seen from Figure 4. Using this fact and the integral results stated above, it is then easy to deduce directly from their definitions (without performing any integration) that a0 = an = 0. It is also possible to simplify the calculation of bn by using the result for the integration of an even function.

–6– Let us consider another Example to illustrate the simplifications introduced through using the integral results for even and odd functions.

Example 3 Find the whole-range Fourier series for the function defined by

f(t)=t, −π

The graph of the function is shown in Figure 6. Clearly T =2π(or 2L =2πif you are using the Data Book).

...... f ...... − ..... − −π ...... 3π ..... 2π ...... 0 . π ..... 2π . 3π t ...... Figure 6

The first point to notice is that the function is odd since f(−t)=−f(t), for all t . Let us now calculate the Fourier coefficients. First we find that Z Z 2 π 1 π a0 = f(t)cos(0)dt = f(t) dt . 2π −π π −π

Since the function f(t) is odd it follows immediately from the integral result for odd functions that a0 =0.

The general formula for an is Z 2 π an = f(t)cosnt dt . 2π −π Here the functions f(t)andcosnt are odd and even respectively, so the product is odd. Again the general integral result implies an =0. For the remaining coefficient Z π Z π 2 1 bn = f(t)sinnt dt = f(t)sinnt dt . 2π −π π −π

Both f(t)andsinnt are odd functions so the product is even. Hence using the general result Z π Z π 2 2 bn = f(t)sinnt dt = t sin nt dt π 0 π 0   π Z    2 − cos nt π − cos nt = t − (1) dt , using integration by parts, π n n   0 0   − π 2 π − sin nt = cos nπ 0+ 2 π n n 0 2 = − (−1)n , since sin nπ =0, cos nπ =(−1)n, n 2 = (−1)n+1 . n

–7– The final expression, therefore, is ∞ X (−1)n+1 f(t) ∼ 2 sin nt . n=1 n

Let us work through another Example. Example 4 Determine the Fourier series expansion of the function f(t) defined by:  −1if−π≤t<−π/2, − ≤ f(t)=+1 if π/2 t<π/2, and f(t +2π)=f(t) for all t. −1ifπ/2 ≤ t<π, The function f(t) is shown on Figure 7. Clearly the function is even with period T =2π(or 2L =2π).

. .... f ...... 1...... − − − . π 3π .2π .π .. 0 ..2π .3π t ...... − . . 1. . . . . Figure 7 Using the general form for the Fourier coefficients, with T =2π(or L = π), Z +π   Z +π 2 2nπt 1 bn = f(t)sin dt = f(t) sin(nt) dt. 2π −π 2π π −π Since f(t) is even and sin(nt) is odd, the product of these functions is odd and hence the integral is zero, i.e. bn =0. For the coefficient a0, Z Z 2 +π 1 +π a0 = f(t)cos(0)dt = f(t) dt, 2π −π π −π and since f(t) is even it is possible to rewrite the latter to give Z (Z Z ) 2 +π 2 +π/2 π a0 = f(t) dt = 1 dt + (−1) dt π 0 π 0 π/2 n o n   o 2 π/2 π 2 π π = [t] +[−t] = + −π − − =0. π 0 π/2 π 2 2 Turning to the coefficients an, Z   Z 2 +π 2nπt 1 +π an = f(t)cos dt = f(t)cos(nt) dt. 2π −π 2π π −π Both f(t)andcos(nt) are even, so the product is even and hence Z (Z Z ) 2 +π 2 +π/2 π an = f(t)cos(nt) dt = 1. cos(nt) dt + (−1) cos(nt) dt π 0 π 0 π/2 ( )  π/2  π 2 sin nt sin nt = − π n 0 n π/2 n    o   2 nπ nπ 4 nπ = sin − sin 0 − sin(nπ)+sin = sin . πn 2 2 πn 2 –8– Now (   0ifnis even, nπ sin = +1 if n =1,5,9..., 2 −1ifn=3,7,11 ..., so   0ifnis even, 4 an = πn if n =1,5,9...,  4 −πn if n =3,7,11 ..., and, combining together these results, gives the final solution

∞     X 2nπt 4 1 1 f(t) ∼ an cos = cos t − cos(3t)+ cos(5t) −··· . n=1 2π π 3 5

Graphs of the sums of various numbers of non-zero terms in this solution are shown on the figures on the next page. Note that the sum of the first n non-zero terms is the same as the partial sum S2n−1. Although it is clear from the figures that the series becomes closer to the given function f(t) as more terms are included, it is important to note the behaviour of the partial sums near the points of discontinuity. When a function is approximated by a partial sum of a Fourier series there will remain considerable error in the vicinity of a discontinuity no matter how many terms you use. It is obvious that the partial sum Sn of a Fourier series can never fit a finite discontinuity, since the sum of continuous terms cannot possibly have the infinite slope demanded by a discontinuity. It is found that in trying to achieve this infinite slope the partial sum actually overshoots the discontinuity. These additional peaks become of vanishingly small width as the number of terms increases (see the figures), but the overshoot itself does not reduce to zero. This result is known as Gibbs’ phenomenon. In the case of the wave just considered in Example 4 it turns out that the lower bound on the overshoot is about 9%. Figure 12.11 on p.833 of J. also illustrates this phenomenon.

***Do Exercise B Determine which of the following functions are even and which are odd:

(i) e|t|; (ii) cos (t2)+t3sin t; (iii) h(t)=cost if 0 ≤ t<π and h(t + π)=h(t) for all t.

***Do Exercise C A periodic function f(t) is defined by:  1if0≤t<π/2, f(t)= and f(t +2π)=f(t) for all t. 0ifπ/2 ≤ t<2π,

(i) Sketch the function over the range −2π

***Do Exercise D Determine the whole-range Fourier series expansion of the function f(t) defined by:  0if−π≤t<0, f(t)= and f(t +2π)=f(t) for all t. π − t if 0 ≤ t<π,

***Do Exercise E Determine the whole-range Fourier series expansion of the function f(t) defined by:  −sin t if −π ≤ t<0, f(t)= and f(t +2π)=f(t) for all t. +sint if 0 ≤ t<π,

–9– –10– 7. To complete this module we shall consider the ‘justification’ of the formulae for Fourier series (you can also read the discussion in section 12.2.3 of J.). The ‘proofs’ involve a number of orthogonality relations which will now be stated and proved: Z     T/2 2πmt 2πnt cos sin dt =0, for all m and n. (5) −T/2 T T     2πmt 2πnt Since cos is even and sin is odd, the product is odd and the above integral is zero. T T Z     T/2 2πmt 2πnt cos cos dt =0, for all m =6 n. (6) −T/2 T T For this case both cosine functions are even, so the product is even. The integral on the left-hand side can therefore be expressed Z     T/2 2πmt 2πnt 2 cos cos dt . 0 T T On using the trigonometric identities on the Formula sheet the above integral becomes Z     Z      T/2 2πmt 2πnt T/2 2π(m + n)t 2π(m−n)t 2 cos cos dt = cos +cos dt 0 T T 0 T T  T/2 sin(2π(m + n)t/T ) sin(2π(m − n)t/T ) = + 2π(m + n)/T 2π(m − n)/T 0 =0, since sin(m − n)π = sin(m + n)π =0.

Using a very similar method (which is not given here) it can be shown that Z     T/2 2πmt 2πnt sin sin dt =0, for all m =6 n. (7) −T/2 T T

The case m = n needs to be treated separately. In this situation Z   T/2 2πmt T cos2 dt = ,m=06. (8) −T/2 T 2

The latter result can be proved as follows:

Z T/2   Z T/2   2πmt 2πmt cos2 dt =2 cos2 dt −T/2 T 0 T Z    T/2 4πmt = 1+cos dt 0 T  T/2 sin (4πmt/T ) = t + dt 4πm/T 0 T = , since sin 2πm =sin0=0. 2 Using an analogous argument it can be shown that Z   T/2 2πmt T sin2 dt = ,m=06. (9) −T/2 T 2

–11– The relations (5) to (9) can be used to justify the expressions for the Fourier coefficients as follows. The general formulae for Fourier series were stated in section 5, equations (1) to (4). Multiply both sides of 2 (1) by the quantity T cos(2πmt/T ) and integrate from −T/2to T/2togive

Z T/2   Z T/2   2 2πmt 2 a0 2πmt f(t)cos dt = cos dt T T T 2 T −T/2 −T/2" ( )# ∞ Z     X 2 T/2 2πmt 2πnt + an cos cos dt (10) T −T/2 T T n=1 " ( )# ∞ Z     X 2 T/2 2πmt 2πnt + bn cos sin dt . n=1 T −T/2 T T

The orthogonality relation (5) implies that the third integral on the right-hand side of (10) is always zero. When m = 0 then it is easy to show that the first integral on the right of (10) is non-zero but that the second integral is zero. Hence it follows that

Z T/2 2 a0 = f(t)dt . T −T/2

When m =6 0, the first integral on the right-hand side of (10) is zero but, using relations (6) and (8), the second integral is non-zero only when m = n. In this situation it then follows that

Z T/2   2 2πmt am = f(t)cos dt . T −T/2 T

2 In a similar way, on multiplying (1) by T sin(2πmt/T ) and integrating, you can show Z   2 T/2 2πmt bm = f(t)sin dt . T −T/2 T

Note that the Dirichlet conditions are needed to ensure the convergence of the various integrals, and the legitimacy of interchanging the orders of integration and summation which has been used in writing down equation (10).

–12– Specimen Test 23

1. Determine whether the following functions are periodic and, if so, find the period: (i) f(t) = sin(3t), √ (ii) f(t)=cos( 2t), √ (iii) f(t)=1+cos( 2t).

2. Determine whether the following functions are even, odd or neither odd nor even: (i) f(t)=sin2t, (ii) f(t)=1−sin t.

3. Using the formula sheet write down (but do not evaluate) expressions for (i) the whole-range Fourier series of a periodic function f(t)ofperiodπ, (ii) the coefficients in the above series.

4. State the value of the Fourier series at a point of discontinuity t = a forafunctionf(t) satisfying the Dirichlet conditions.

5. A periodic function f(t)ofperiod2πis defined by  1, 0≤t<π f(t)= 0,π≤t<2π f(t+2π)=f(t), for all t.

(i) Sketch the function over the range −2π

–13–