<<

Fourier Series

Ching-Han Hsu

© 2012, Ching-Han Hsu, Ph.D. Periodic

• A function f(x) is called periodic, if it is defined for every x in the domain of f and if there is some positive number p such that f(x+p)= f(x) • The number p is called a period of f(x). • If a f has a smallest period p, this is often called the fundamental period of f(x).

© 2012, Ching-Han Hsu, Ph.D. Periodic Function f(x)

x p

© 2012, Ching-Han Hsu, Ph.D. Periodic Function

• For any n, f(x+np) = f(x), for all x • If f(x) and g(x) have period p, then so does h(x) = af(x) + bg(x), a and b are constants.

© 2012, Ching-Han Hsu, Ph.D.

• Consider the following periodic functions with period 2π: 1, sin x, cos x, sin2x, cos2x, …, sin nx, cos nx, …

© 2012, Ching-Han Hsu, Ph.D. Trigonometric Series • The trigonometric series is of the form a0 1 a1 cos x  b1 sin x  a2 cos 2x  b2 sin 2x   a0 1 an cos nx bn sin nx n1

a0, a1, a2, a3, …, b1, b2, b3, … are real constants and are called the coefficients of the series. • If the series converges, its sum will be a function of period 2π. © 2012, Ching-Han Hsu, Ph.D.

• Assume f(x) is a periodic function of period 2π that can be represented by the trigonometric series:  f x  a0 1 an cosnxbn sin nx n1 That is, we assume that the series converges and has f(x) as its sum. • Question: how to compute the coefficients?

© 2012, Ching-Han Hsu, Ph.D. Properties of Trigonometric Functions • Recall some basic properties of trigonometric functions   cos nxdx  1cos nxdx  0     sin nxdx  1sin nxdx  0  

 cos mx sin nxdx  1  1   sinn  mxdx sinn  mxdx  0 2  2  © 2012, Ching-Han Hsu, Ph.D. Properties of Trigonometric Functions

 sin mx sin nxdx  1  1   n  m  cosn  mxdx cosn  mxdx     2 2 0 n  m

 cos mx cos nxdx  1  1   n  m  cosn  mxdx cosn  mxdx     2 2 0 n  m

© 2012, Ching-Han Hsu, Ph.D. Determination of the Constant

Term a0 • Integrating both sides from – to :

   f xdx  a0  an cos nx bn sin nxdx    n1

 2a0

1  a0  f xdx 2 

© 2012, Ching-Han Hsu, Ph.D. Determination of the Coefficients an of the Cosine Term • Multiply by cosmx with fixed positive integer and then integrate both sides from – to :  f xcos mxdx       a0  an cos nx bn sin nx cos mxdx      n1 

 am 1  am  f xcosmxdx   © 2012, Ching-Han Hsu, Ph.D. Determination of the Coefficients bn of the Term • Multiply by sinmx with fixed positive integer and then integrate both sides from – to :  f xsin mxdx       a0  an cos nx bn sin nx sin mxdx      n1 

 bm 1  bm  f xsin mxdx   © 2012, Ching-Han Hsu, Ph.D. Summary  f x  a0  an cosnxbn sin nx n1 1  a0  f xdx 2  1  an  f xcosnxdx   1  bn  f xsin nxdx  

© 2012, Ching-Han Hsu, Ph.D. Fourier Series: Square

• Ex. Find the Fourier coefficients of the periodic function f(x)  k   x  0 f x   , f x  2   f x  k 0  x  

© 2012, Ching-Han Hsu, Ph.D. Fourier Series: 1  1  0   a0  f xdx   kdx kdx 2  2  0  1   k  k  0 2 Q: Is f(x) even or odd?! 1  an  f xcos nxdx   1 0     k cos nxdx k cos nxdx   0  1  k 0 k     sin nx  sin nx   0  n n   0  © 2012, Ching-Han Hsu, Ph.D. 1  bn  f xsin nxdx   1 0     k sin nxdx k sin nxdx   0  1 k 0 k     cos nx  cos nx   n  n 0  cos n   cosn  1 k k   1 cos n  cos n 1  n n  2k 2 n 1,3,  1 cos n  1 cos n   0 n  2,4,  n  © 2012, Ching-Han Hsu, Ph.D. Fourier Series: Square Wave 4k 4k 4k b  ,b  0,b  ,b  0,b  , 1  2 3 3 4 5 5  f (x)  a0  an cos nx bn sin nx n1  2k   1 cos n sin nx n1 n 4k  1 1   sin x  sin 3x  sin 5x    3 5 

© 2012, Ching-Han Hsu, Ph.D. Fourier Series: Square Wave

• Consider the series expansion of finite sine terms: 4k S  sin x 1  4k  1  S2  sin x  sin 3x   3  4k  1 1  S3  sin x  sin 3x  sin 5x   3 5  © 2012, Ching-Han Hsu, Ph.D. © 2012, Ching-Han Hsu, Ph.D. Representation by Fourier Series

• Thm. If a periodic function f(x) with period 2 is peicewise continuous in the interval -≦x≦ and has a left-hand derivative and right-hand derivative at each point of that interval, then Fourier series of f(x) is convergent. Its sum is f(x), except at a

point of x0 at which f(x) is discontinuous and the sum of the series is the average of

the left- and right-hand limits of f(x) at x0.

© 2012, Ching-Han Hsu, Ph.D. Representation by Fourier Series 1  f 1 0 f 1 0 2

© 2012, Ching-Han Hsu, Ph.D. Functions of Any Period p=2L

• A function f(x) of period p=2L has a Fourier series   2 2  f x  a0  an cos nx bn sin nx n1  2L 2L    n n   a0  an cos x  bn sin x n1  L L  1 L a0  f xdx n 1,2,3, 2L L 1 L nx 1 L nx an  f xcos dx bn  f xsin dx L L L L L © 2012, Ching-HanL Hsu, Ph.D. Fourier Series: Periodic Square Wave • Ex. Find the Fourier series of the function 0  2  x  1  f x  k 1 x 1 , p  2L  4, L  2  0 1 x  2

© 2012, Ching-Han Hsu, Ph.D. Fourier Series: Periodic Square Wave

1 2 1 1 k a0  f xdx  kdx 4 2 4 1 2

1 2 nx 1 1 nx an  f xcos dx  k cos dx 2 2 2 2 1 2 k n 1 2k n  sin x  sin n 2 1 n 2

2k 2k a  , n 1,5,9, a   , n  3,7,11, n n n n

© 2012, Ching-Han Hsu, Ph.D. Fourier Series: Periodic Square Wave

1 2 nx 1 1 nx bn  f xsin dx  k sin dx 2 2 2 2 1 2  k n 1  k n k n  cos x  cos  cos n 2 1 n 2 n 2 k n k n  cos  cos  0 n 2 n 2

k 2k   1 3 1 5  f (x)   cos x  cos x  cos x  2   2 3 2 5 2 

© 2012, Ching-Han Hsu, Ph.D. Fourier Series: Periodic Square Wave

k=5

© 2012, Ching-Han Hsu, Ph.D. Fourier Series: Half-wave Rectifier • Ex. A sinusoidal voltage Esinwt, is passed through a half-wave rectifier that clips the negative portion of the wave. Find the Fourier series of the resulting periodic function:  0  L  t  0 2  ut   , p  2L  , L  E sin wt 0  t  L w w

© 2012, Ching-Han Hsu, Ph.D. Fourier Series: Half-wave Rectifier

  w w w w bn   utsin nwtdt  E sin wt sin nwtdt  0  w  Ew   w cos1 nwt  cos1 nwtdt 2 0  Ew sin1 nwt sin1 nwt  w   2  1 n w 1 n w        0 E sin1 n sin1 n      2  1 n 1 n  E  n 1 sin1 n  cos1 n   lim  lim   2 n1 1 n n1 1  0 n  2,3,4, d sin1 n   cos1 n dn © 2012, Ching-Han Hsu, Ph.D. Fourier Series: Half -wave Rectifier w w w w a0   utdt  E sin wtdt  0 2 w 2   E w  E E  coswt  cos  cos0  2 0 2    w w w w an   utcos nwtdt  E sin wt cos nwtdt  0  w  Ew   w sin1 nwt  sin1 nwtdt 2 0  Ew  cos1 nwt cos1 nwt  w     2  1 nw 1 nw  0 © 2012, Ching-Han Hsu, Ph.D. Fourier Series: Half-wave Rectifier E 1 cos1 n 1 cos1 n  an     2  1 n 1 n   0 n 1,3,5,    E  2 2     n  2,4,6, 2 1 n 1 n  0 n 1,3,5,    2E  n  2,4,6, n 1n 1 E E 2E  1 1  ut   sin wt   cos2wt  cos4wt  2  13 35  © 2012, Ching-Han Hsu, Ph.D. Fourier Series: Half-wave Rectifier k=5  =1

© 2012, Ching-Han Hsu, Ph.D.

• A function e(x) is even, if e(-x)=e(x). • A function o(x) is odd, if o(-x)=-o(x).

ex ox

© 2012, Ching-Han Hsu, Ph.D. Even and Odd Functions: Facts • If e(x) is an even function, then

L L exdx  2 exdx L 0 • If o(x) is an odd function, then L oxdx  0 L

• The product of an even and an odd function is odd e xo x  exox

© 2012, Ching-Han Hsu, Ph.D. Fourier Cosine Series

• Thm. The Fourier series of an even function of period 2L is a Fourier cosine series  n f x  a0  an cos x n1 L with coefficients 1 L 1 L a0  f xdx  f xdx 2L L L 0 1 L nx 2 L nx an  f xcos dx  f xcos dx L L L L 0 L © 2012, Ching-Han Hsu, Ph.D. Fourier Sine Series

• Thm. The Fourier series of an odd function of period 2L is a Fourier sine series  n f x  bn sin x n1 L with coefficients

1 L nx 2 L nx bn  f xsin dx  f xsin dx L L L L 0 L

© 2012, Ching-Han Hsu, Ph.D. Fourier Series: Sum of Functions

• Thm. The Fourier coefficients of a sum

f1+f2 are the sums of the corresponding Fourier coefficients of f1 and f2.

© 2012, Ching-Han Hsu, Ph.D. 4k  1 1  f (x)  sin x  sin 3x  sin 5x    3 5  4k  1 1  f * (x)  k  sin x  sin 3x  sin 5x    3 5 

© 2012, Ching-Han Hsu, Ph.D. • Ex. Find the Fourier series of the function f x  x ,   x  , f x  2   f x

f  f1  f2  f1x  x, f2 x   © 2012, Ching-Han Hsu, Ph.D. Sawtooth Wave

• Since f1 is odd, an=0 for n=1,2,3,… and 2 L nx bn  f1xsin dx L 0 L 2  2   xsin nxdx  xd cos nx  0 n 0  2 2   x cos nx   cos nxdx 0 n 0 n  2 2  2   cos n  2 sin nx   cos n n n  0 n   2 f1x  bn sin nx   cosn sin nx n1 n1 n © 2012, Ching-Han Hsu, Ph.D. Sawtooth Wave  1 1  f x    2sin x  sin 2x  sin 3x    2 3 

 f1x f2 x

© 2012, Ching-Han Hsu, Ph.D. Half-Range Expansion • In some applications, we often need to employ a Fourier series for a function f(x) that is given only on some interval, say 0≦x≦L.

Suppose that we have a choice!! We can use even or odd periodic expansion.

© 2012, Ching-Han Hsu, Ph.D. Half-Range Expansion • If we apply even periodic extension, we obtain a Fourier cosine series:

• If we apply odd periodic extension, we obtain a Fourier sine series:

© 2012, Ching-Han Hsu, Ph.D. Triangle Function: Half-Range Expansion • Ex. Find the two half-range expansion of the triangle function  2k L  x 0  x  f x  L 2 2k L  L  x  x  L  L 2

© 2012, Ching-Han Hsu, Ph.D. Triangle Function: Half-Range Expansion

Even Expansion

Odd Expansion

© 2012, Ching-Han Hsu, Ph.D. Triangle Function: Even Periodic Expansion

L L  2k L 1 2  x 0  x  f x  L 2 a0  e f xdx  e f xdx 2k L 2L L 2L 0  L  x  x  L  L 2 1 2k L / 2 2k L    xdx L  xdx L  L 0 L L / 2  2 2 1  k  L  k  L   k          L  L  2  L  2   2

1 L nx 2 L nx an  e f xcos dx  e f xcos dx L L L L 0 L 2 2k L/ 2 nx 2k L nx    xcos dx L  xcos dx L  L 0 L L L/ 2 L  © 2012, Ching-Han Hsu, Ph.D. Triangle Function: Even Periodic Expansion L/ 2 L/ 2 nx L nx L L/ 2 nx xcos dx  xsin  sin dx 0 0 L n L 0 n L L2 n L2  n   sin  cos 1 2n 2 n2 2  2  L nx L  xcos dx L / 2 L L L nx L L nx  L  xsin  sin dx L / 2 n L L / 2 n L  L2 n  L2  n    sin   cos n  cos   2 2    2n 2  n   2 

© 2012, Ching-Han Hsu, Ph.D. Triangle Function: Even Periodic Expansion

4k  n  an  2cos  cos n 1 n2 2  2  16k a  0, a  , a  0, a  0, a  0 1 2 22 2 3 4 5 16k 16k a  , a  , 6 62 2 10 10 2 2

an  0, n  2,6,10,14,

k 16k  1 2 1 6 1 10  f x    cos x  cos x  cos x  2  2  22 L 62 L 10 2 L  © 2012, Ching-Han Hsu, Ph.D. Triangle Function: Even Periodic Expansion

© 2012, Ching-Han Hsu, Ph.D. Triangle Function: Odd Periodic Expansion

1 L nx 2 L nx bn  o f xsin dx  o f xsin dx L L L L 0 L 8k n  sin n2 2 2

8k  1  1 3 1 5  f x   sin x  sin x  sin x    2 12 L 32 L 52 L 

© 2012, Ching-Han Hsu, Ph.D. Triangle Function: Odd Periodic Expansion

© 2012, Ching-Han Hsu, Ph.D. Forced • Consider the forced of a body of mass m on spring of modulus are governed by the myt cyt kyt  rt where y(t) is the displacement from rest, c the damping constant, and r(t) the external force depending on time t.

© 2012, Ching-Han Hsu, Ph.D. Forced Oscillations • The electric analog to the spring is RLC- circuit: 1 LIt RIt It  Et C

© 2012, Ching-Han Hsu, Ph.D. Forced Oscillations • Ex. Let m=1(g), c=0.02(g/s), k=25(g/s2), so that yt 0.02 yt 25 yt  rt where r(t) is measured in g‧㎝/s2. Let    t    t  0 rt  2 , rt  2   rt   t  0  t    2 Find the steady-state solution y(t). 0.01t 0.01t yh t  Ae cos5t  Be sin 5t

t    yh t  0 © 2012, Ching-Han Hsu, Ph.D. Forced Oscillations The Fourier series of r(t) is 4  1 1 1  rt   cost  cos3t  cos5t   12 32 52 

Now we the following linear differential equation yt 0.02 yt 25 yt  4  rt   2 cos2k 1t k1 2k 1  © 2012, Ching-Han Hsu, Ph.D. Forced Oscillations

The steady-state (particular) solution yn(t) corresponding to the sinusoidal input cos(2k-1)t=cosnt can be computed using the method of undetermined coefficients

yn t  An cos nt  Bn sin nt 425  n2  0.08 A  , B  n n2D n nD 2 D  25  n2   0.02n2

y p t  y1t y2 t y3 t

© 2012, Ching-Han Hsu, Ph.D. Forced Oscillations 2 2 Let us find the Cn  An  Bn

We have

C1  0.0530

C3  0.0088

C5  0.5100

C7  0.0011

C9  0.0003

© 2012, Ching-Han Hsu, Ph.D. Parseval’s Theorem

© 2012, Ching-Han Hsu, Ph.D. Fourier Series Formulae   n n  f x a0  an cos x  bn sin x n1  L L  1 L a0  f xdx 2L L 1 L , nx an  f xcos dx L L L 1 L nx bn  f xsin dx L L L

© 2012, Ching-Han Hsu, Ph.D. Parseval’s Theorem

• Show that:

L  1 2 2 2 2 f x dx  2a0  an bn  L  L n1

 2   m m  f x  a0  am cos x  bm sin x  m1  L L     n n   a0  an cos x  bn sin x  n1  L L  © 2012, Ching-Han Hsu, Ph.D. L  m   n  ambn cos xsin xdx L  L   L   1  L  n  m n  m    ambn  sin x  sin xdx  2 L  L L   0, m,n

L 2 a0a0dx  2La0 L

© 2012, Ching-Han Hsu, Ph.D. m 1, n 1

L  m   n  aman cos xcos xdx  0, m  n L  L   L  L  n   n  anan cos xcos xdx L  L   L 

L L 2 2  n  2 1   2n   an cos  xdx  an 1 cos x dx L L    L  2   L  2  Lan , m  n

© 2012, Ching-Han Hsu, Ph.D. m 1, n 1

L  m   n  bmbn sin xsin xdx  0, m  n L  L   L  L  n   n  bnbn sin xsin xdx L  L   L 

L L 2 2  n  2 1   2n   bn sin  xdx  bn 1 cos x dx L L    L  2   L  2  Lbn , m  n

© 2012, Ching-Han Hsu, Ph.D.  2   m m  f x  a0  am cos x  bm sin x  n1  L L     n n   a0  an cos x  bn sin x  n1  L L   2  2 2 n 2 2 n   a0  an cos x  bn sin x n1  L L   m   n   2am cos xbn sin x mn  L   L   m   n    am cos xan cos x mn,m1,n1 L   L   m   n    bm sin xbn sin x mn,m1,n1 L   © 2012,L Ching-Han Hsu, Ph.D. L L  2 2  2 2 n 2 2 n  f xdx  a0  an cos x  bn sin xdx L L  n1  L L    2 2 2   L2a0  an  bn   n1 

L  1 2 2 2 2 f xdx  2a0  an  bn  L  L n1

L  1 2 2 1 2 2 f xdx  a0  an bn  L  2L 2 n1

© 2012, Ching-Han Hsu, Ph.D. Complex Fourier Series

© 2012, Ching-Han Hsu, Ph.D. Functions of Any Period p=2L

• A function f(x) of period p=2L has a Fourier series   n n  f x  a0  an cos x bn sin x n1  L L  1 L a0  f xdx 2L L n 1,2,3, 1 L nx 1 L nx an  f xcos dx bn  f xsin dx L L L L L © 2012, Ching-HanL Hsu, Ph.D. Euler Formulae ei  cos  isin  1 1 cos  ei  ei , sin   ei  ei  2 2i nx nx a cos  b sin n L n L nx nx nx nx 1 i i 1 i i  a (e L  e L )  b (e L  e L ) 2 n 2i n nx nx 1 i 1 i  a  ib e L  a  ib e L 2 n n 2 n n

© 2012, Ching-Han Hsu, Ph.D. Complex Fourier Series

1 1 L  nx nx  an  ibn   f xcos  isin dx 2 2L L  L L  nx L i 1 L  f xe dx  cn 2L L 1 1 L  nx nx  an  ibn   f xcos  isin dx 2 2L L  L L  (n)x L i 1 L  f xe dx  cn 2L L (0)x L i 1 L a0  f xe dx  c0 2L L © 2012, Ching-Han Hsu, Ph.D. Complex Fourier Series

 nx nx f x  a0   an cos  bn sin n1 L L nx nx  i  i 1 L 1 L  a0   an  ibn e   an  ibn e n1 2 n1 2 nx nx nx (n)x  i  i  i  i L L L L  c0  cne  cne  c0  cne  cne n1 n1 n1 n1 nx nx  i  i L L  c0  cne  cne n1 n1 nx  i L nx  cne 1 L i n L cn  f xe dx 2L L

© 2012, Ching-Han Hsu, Ph.D. Let Us Play Fourier Series!!

© 2012, Ching-Han Hsu, Ph.D. Functions of Any Period p=2L

• A function f(x) of period p=2L has a Fourier series   n n  f x  a0  an cos x bn sin x n1  L L  1 L a0  f xdx 2L L n 1,2,3, 1 L nx 1 L nx an  f xcos dx bn  f xsin dx L L L L L © 2012, Ching-HanL Hsu, Ph.D. Periodic Square Wave (I)

• Ex. Find the Fourier series of the function  1 0  x  L f x   1  L  x  0 Since the function f(x) is odd, there are no constant and cosine terms in the Fourier's

series, i.e., a0=a1=a2=…=0!!

© 2012, Ching-Han Hsu, Ph.D. Periodic Square Wave (I)

1 L nx bn  f xsin dx L L L 1 0 nx 1 L nx  1sin dx 1sin dx L L L L 0 L L 2 L nx 2L  nx   1sin dx   cos  0 L L Ln  L  0 2  1 cos n  n  21cos n  n  f x   sin x n1  n L© 2012, Ching-Han Hsu, Ph.D. Periodic Square Wave (II)

• Ex. Find the Fourier series of the function 1 0  x  L gx   0  L  x  0 1 1  1cosn  n  gx  1 f x    sin x 2 2 n1  n L 

© 2012, Ching-Han Hsu, Ph.D. Periodic Square Wave (III)

• Ex. Find the Fourier series of the function 0 L / 2  x  L  hx  1  L / 2  x  L / 2  0  L  x  L / 2

© 2012, Ching-Han Hsu, Ph.D. Periodic Square Wave (III)

 L  hx  g x    2  1  1 cos n  n  L      sin  x   2 n1  n L  2  1  1 cos n   n nL n nL      sin x cos  cos xsin  2 n1  n  L 2L L 2L  1  1 cos n  n n      sin cos x 2 n1  n 2 L 

© 2012, Ching-Han Hsu, Ph.D. (I)

• Ex. Find the Fourier series of the function f x  x,  L  x  L Since the function f(x) is odd, there are no constant and cosine terms in the Fourier's

series, i.e., a0=a1=a2=…=0!!

© 2012, Ching-Han Hsu, Ph.D. 1 L nx 1 L nx bn  f xsin dx  xsin dx L L L L L L 2 L nx 2 L L nx  xsin dx     xd cos L 0 L L n 0 L L 2 nx 2 L nx   x cos  cos dx 0 n L 0 n L 2L 2 L nx L   cos n   sin n n n L 0 2L   cos n n   2L n  f x   cos n sin x n1  n L © 2012, Ching-Han Hsu, Ph.D. Triangle Wave (I)

© 2012, Ching-Han Hsu, Ph.D. Triangle Wave (II)

• Ex. Find the Fourier series of the function gx  f  x  x,  L  x  L Since the function f(x) is odd, there are no constant and cosine terms in the Fourier's

series, i.e., a0=a1=a2=…=0!!

 2L n  gx   cosn sin x n1 n L 

© 2012, Ching-Han Hsu, Ph.D. © 2012, Ching-Han Hsu, Ph.D. Triangle Wave (II)

© 2012, Ching-Han Hsu, Ph.D. Triangle Wave (III)

• Ex. Find the Fourier series of the function hx  f x L  x  L,  L  x  L   2L n  hx  L   cos n sin x n1  n L 

© 2012, Ching-Han Hsu, Ph.D. Triangle Wave (III)

© 2012, Ching-Han Hsu, Ph.D. Triangle Wave (IV)

• Ex. Find the Fourier series of the function px  hx  L  x,  L  x  L  L  0  x  2L

© 2012, Ching-Han Hsu, Ph.D. px  hx  L   2L n   L    cos n sin x  L n1  n L  n sin x  L L nx nL nL nx  sin cos sin cos L L L L nx  cos n sin L   2L n  px  L   sin x n1  n © 2012, Ching-HanL Hsu, Ph.D. Triangle Wave (IV)

© 2012, Ching-Han Hsu, Ph.D.