• 沒有找到結果。

Fourier Series Methods† National Chiao Tung University Chun-Jen Tsai 12/9/2019 † Chapter 11.1 ~ 11.3 in the textbook.

N/A
N/A
Protected

Academic year: 2022

Share "Fourier Series Methods† National Chiao Tung University Chun-Jen Tsai 12/9/2019 † Chapter 11.1 ~ 11.3 in the textbook."

Copied!
29
0
0

加載中.... (立即查看全文)

全文

(1)

Fourier Series Methods

National Chiao Tung University Chun-Jen Tsai 12/9/2019

† Chapter 11.1 ~ 11.3 in the textbook.

(2)

Orthogonal Functions & Inner Product

Vectors in linear algebra are not just n-tuples

If u and v are two n-tuple vectors in 3D-space, then the inner product (u, v) possesses the following properties:

(u, v) = (v, u) (inner product is commutable)

(ku, v) = k(u, v) (k is a scalar)

(u, u) = 0, if u = 0 and (u, u) > 0, if u  0

(u+v, w) = (u, w) + (v, w) (inner product is distributable)

The definite integral of two functions, f1 and f2, over an interval [a, b] possesses the same properties as well  we can define “inner product” for functions

(3)

Inner Product of Functions

The inner product of two functions f1 and f2 on an interval [a, b] is the number

Two vectors are “orthogonal” if the inner product is zero

 function inner product should be defined similarly:

two functions f1 and f2 are orthogonal on an interval [a, b] if

b

a f x f x dx

f

f , ) ( ) ( )

( 1 2 1 2

0 )

( ) ( )

,

( f1 f2

ab f1 x f2 x dx 

(4)

Orthonormal Set of Functions

A set of real-valued functions {

f

0,

f

1,

f

2, …} is said to be orthogonal on an interval [a, b] if

The norm of a function

f

is defined as ||

f

|| = (

f

,

f

)1/2. That is,

If {

f

n} is an orthogonal set on [a, b] and ||

f

n|| = 1, n, then {

f

n} is an orthonormal set of functions on [a, b].

. ,

0 )

( ) ( )

,

( b x x dx m n

a m n

n

m

f

f f

 

f

. ) ( )

(x

ab

f

2 x dx

f

(5)

Orthogonal Series Expansion

If {

f

n(x)} is an infinite orthogonal set of functions on the interval [a, b], is it possible to determine a set of

coefficients cn, n = 0, 1, 2, … such that

f(x) = c0

f

0(x) + c1

f

1(x) +  + cn

f

n(x) +  ? To find the coefficient of

f

n, we compute (f ,

f

n)

(f ,

f

n) = c0(

f

0,

f

n) + c1(

f

1,

f

n) +  + cn(

f

n,

f

n) +  Since {

f

n(x)} is an orthogonal set, (

f

m,

f

n) = 0,  m  n.

Therefore,

2 and ) , (

n n n

c f

f

f

( , ) ( .)

) (

0 2

n

n n

n x

x f

f

f

f

f

(6)

Completeness of an Orthogonal Set

In previous discussion, we have

if f(x) can be represented as a linear

combination of

f

0(x) ~

f

(x) in the vector space S.

However, not every functions in S can be represented as a linear combinations of the functions in {

f

n(x)}.

This is true only when {

f

n(x)} is a complete set of S, i.e., when {

f

n(x)} is a vector basis of S.

, ) ) (

, ) (

(

0 2

n

n n

n x

x f

f f

f f

(7)

Periodic External Forces

Recall that a linear 2nd-order DE:

where f(t) stands for the external force imposed on the (undamped) system. Often, f(t) is a periodic function (over an interval of interest).

Question: Is there a systematic way to represent a general periodic function?

Well, Taylor series may work, but can we do better?

),

2 (

2 0 2

t f dt x

x

d 

(8)

Properties of a Periodic Function

Definition: The function f(t) defined for all t is said to be periodic provided that there exists a positive number p such that f(t + p) = f(t) for all t. If p is the smallest

number with this property, then p is called the period of the function f.

Remarks:

Linear combinations of two (or more) periodic functions will still be a periodic function.

If we use a set of periodic functions as basis functions to represent other periodic functions, they should work better than if we use {1, x, x2, x3, …}, as in Taylor series.

(9)

Selection of Periodic Basis

In 1822, J. Fourier asserted that every function f(t) with period 2

can be represented as a linear combination of sin nt and cos nt, as follows:

Really? How about the function:

cos sin

,

2 1

0

n

n

n nt b nt

a a

f

t

1

- –1

2 3

(10)

Fourier Series

Note that the set of trigonometric functions:

{1, cos t, cos 2t, cos 3t, …, sin t, sin 2t, sin3t, …}

are orthogonal on the interval [–

,

].

The Fourier series of f(t) on [–

,

] is defined as :

where

cos sin

,

) 2 (

1

0

n

n

n nt b nt

a a t

f

-

f t dt

a 1 ( )

0

. sin

) 1 (

, cos

) 1 (

--

f t ntdt b f t ntdt

an n

),

f(t

an cos nt

|| cos nt ||2

The projection vector of f(t) onto cos nt is . Thus,

nt ), cos

(t

f cos nt

|| cos nt ||2

(11)

Fourier Series with Period 2p

Note that the set of trigonometric functions

is orthogonal on the interval [–p, p].

The Fourier Series of a function f(x) on (–p, p) is:

3 ,

sin 2 ,

sin , sin

, 3 ,

cos 2 ,

cos , cos

,

1 p

x p

x p

x p

x p

x p

x

1

0 ( cos sin )

) 2 (

n

n

n p

x b n

p x a n

x a

f

-

p

p f x dx a 1p ( )

0

- -

p

n p p

n p dx

p x x n

p f b

p dx x x n

p f

a

sin ) 1 (

, cos

) 1 (

(12)

Example: (1/2)

Since p =

, we have



 -

 -

x x

x x

f , 0

0 ,

) 0 (

2 2

1

) (

1 0

) 1 (

0 2

0 0

0

 

 

 

 

 -



  -

- -

x x

dx x dx

dx x f

a y

x

-

(13)

2

2 0

0 0

0 0

) 1 ( 1

1 cos

cos 1

1 sin )sin

1 (

cos ) (

1 0 cos

) 1 (

n

n n n

nx n

n nxdx n

x nx

nxdx x

dx nxdx

x f a

n n

-

-

- -

-



 -

- -

Example: (2/2)

f (x)

0,- x, -

0 xx

0

( Note that cos n = (–1)n )

nxdx n x

bn 1

sin ) 1 (

0 -

 

- -

1 2 1 sin

) cos 1 ( 1 4 n

n

n nx n nx

x

f

(14)

Fourier Convergence Theorem

Theorem: Let f and f  be piecewise continuous on the interval (–p, p); that is f and f  be continuous except at a finite number of points, then the Fourier series of f converges to f at a point of continuity.

At a point of discontinuity the Fourier series converges to the average:

where f(x+) and f(x–) denote the limit of f at x from the right and the left, respectively

2 ,

) (

)

(x  f x- f

(15)

Example: Converges at Discontinuity

The following function is discontinuous at x = 0:

The series converges to f at x  0. At x = 0, the series converges to:



 -

 -

x x

x x

f , 0

0 ,

) 0 (

2 2

0 2

) 0 ( )

0

(   f - 

f

(16)

Periodic Extension

Fourier series not only represents a function f on the interval (–p, p), but also gives the periodic extension of f outside the interval.

When f is piecewise continuous and the right- and left- hand derivatives exist at x = –p and x = p, respectively, then the series converges to the average

[f(–p–) + f(–p+)]/2 = [f(p–) + f(–p+)]/2 at the end points:

p –p –2 p

–3 p

–4 p 2p 3p 4p x

y

(17)

Sequence of Partial Sums (1/2)

It is interesting to see how the sequence of partial sums {SN(x)} of a Fourier series approximates a function. For example,

x 3

y

2 1 0

- 10 - 5 0 5 10

 

–2

–3

–4 2 3 4

x

y

, sin 2 cos

) 4 ( 4 , )

( 2

1 x S x x x

S

(18)

Sequence of Partial Sums (2/2)

x 3

y

2 1 0

- 3 - 2 - 1 0 1 2 3

x 3

y

2 1 0

- 3 - 2 - 1 0 1 2 3

x 3

y

2 1 0

- 3 - 2 - 1 0 1 2 3

x 3

y

2 1 0

- 3 - 2 - 1 0 1 2 3

(c) S8(x) on (-, ) (a) S3(x) on (-, )

(19)

Even and Odd Functions

A function is said to be “even” if f(–t) = f(t) and “odd” if f(–t) = –f(t).

Note that cos t is even while sin t is odd.

f

t t0

f(t) = t2

–t0 f(–t0)

f

t f(t) = t3

f(t0)

t0 –t0

f(–t0)

f(t0)

(20)

Properties of Even/Odd Functions

The product of two even functions is even

The product of two odd functions is even

The product of an even and an odd functions is odd

The sum (difference) of two even functions is even

The sum (difference) of two odd functions is odd

If f is even, then

If f is odd, then

. ) ( 2

)

(

0

-

a a

a f t dt f t dt

. 0 )

( 

- a

a f t dt

(21)

Cosine and Sine Series

If f is an even function on (–p, p), then

Similarly, if f is odd,

. 0 sin

) 1 (

, cos

) 2 (

cos )

1 (

, ) 2 (

) 1 (

0 0 0

- - -

p n p

p p

n p

p p

p

p xdx x n

p f b

p xdx x n

p f p xdx

x n p f

a

dx x p f

dx x p f

a

. sin

) 2 (

, , 2 , 1 , 0 ,

0

0

n p

n xdx

p x n

p f b

n

a

(22)

Fourier Cosine and Sine Series

Suppose that the function f(x) is piecewise continuous on the interval [0, p]. The Fourier cosine series of f is:

The Fourier sine series of f is:

(23)

Example:

Calculate bn as follows:

-

- -

x x

x x

f

0 ,

1

, , 0 ,

0

0 ,

1 )

(

1 ( 1)

.

cos 2 1 cos 1

1 1

sin ) 1 (

0 0

nx n nx n

n

nxdx x

f b

n n

-

-



-





-

-

. 5

5 sin 3 1

3sin sin 1

4 )

1 2

(

) 1 2

sin(

) 4 (

1

-

-

x x

n x

x x n

f

n

1 0.5

0 x

1 0.5

0 x

S1(x) S2(x)

–0.5 –0.5

1 0.5 0 .

x 1 0.5

0 x

S3(x) S15(x)

–0.5 –0.5

The partial sum tends to overshoot the limiting values of f(x)  Gibbs’s Phenomenon:

(24)

Half-Range Expansions

Sometimes, we only care about the Fourier series defined on (0, L). We can define the function f on (–L, 0) so that the expansion has a simpler form.

Three possible choices of extension:

The third one has period L, others have period 2L.

y

x

–L L

y

–L x

L x

- L L

y

(25)

Example: f(x) = 2x – x

2

, x  (0, 2)

We can expand f(x) to the range (–2, 2) and make it an even (feven(x)) or an odd (fodd(x)) function:

feven(x) = f(–x) = 2(–x) – (–x)2 = –2x – x2, for x < 0, or

fodd(x) = –f(–x) = –[2(–x) – (–x)2] = 2x + x2 , for x < 0.

The Fourier expansion of feven(x) has only cosine terms while fodd(x) has only sine terms.

(a) Even expansion of f(x)

feven(x)

–4 –2 2 4 x

(b) Odd expansion of f(x)

–4 –2 2 4 x

fodd(x)

f(x) f(x)

(26)

Example: f(x) = x

2

, 0 < x < L

Expand f(x) in a (a) cosine, (b) sine, (c) Fourier series

y

x

(a) Cosine series

- 4L - 3L - 2L - L L 2L 3L 4L

y

x

(b) Sine series

- 4L - 3L - 2L - L L 2L 3L 4L

y

- 4L - 3L - 2L - L L 2L 3L 4L x

(27)

Review: Periodic Driving Force

When the driving force f(t) of a DE is periodic and defined over [0, p], Half-range expansion of Fourier series are quite useful. For example, the particular solution of the DE:

can be solved by first representing f(t) by a half-range sine expansion and assume a particular solution of the form:

)

2 (

2

t f dt kx

x

m d  

1

sin )

(

n

n

p t

p B n

t

x

(28)

Example: x"+4x = 4t, x(0)=x(1)=0 (1/2)

Assume that 0 < t < 1 for f(t), we can use odd extension with p = 1 to get the Fourier sine series of f:

The solution x(t) should be in sine series form as well:

Note that x(t) satisfies the boundary conditions.

Substitute the solution into the DE, we have

. ) sin

1 ( 4 8

1

1

-

n

n

t n n

t

. sin

) (

1

n

n n t

b t

x

. ) sin

1 ( sin 8

) 4 (

1

1

1

2

2

-

-

n

n

n

n n t

t n n b

n

 

(29)

Example: x"+4x = 4t, x(0)=x(1)=0 (2/2)

The solution of the coefficients bn is then

The Fourier series solution can be expressed as:

which is equivalent to

in the interval (–1, 1).

). 4

(

) 1 ( 8

2 2

1

n

b n

n

n -

-

).

1 0

( ) ,

4 (

sin )

1 ( ) 8

(

1 2 2

1

-

-

n t n

t t n

x

n

n

2 sin

2 ) sin

( t

t t

x -

-0.5-1 0 1 2

0 0.5

參考文獻

相關文件

The notation T n (x) is used to represent the nth partial sum of this series and we can call it as it the nth-degree Taylor polynomial of f at a... In general, it can be shown

But we know that this improper integral is divergent. In other words, the area under the curve is infinite. So the sum of the series must be infinite, that is, the series is..

[This function is named after the electrical engineer Oliver Heaviside (1850–1925) and can be used to describe an electric current that is switched on at time t = 0.] Its graph

Then g is defined on [a, b], satifies (11), and is continuous on [a, b] by the Sequential Characterization of Limits.. Thus, f

Project 1.3 Use parametric bootstrap and nonparametric bootstrap to approximate the dis- tribution of median based on a data with sam- ple size 20 from a standard normal

The proof is based on Hida’s ideas in [Hid04a], where Hida provided a general strategy to study the problem of the non-vanishing of Hecke L-values modulo p via a study on the

Al atoms are larger than N atoms because as you trace the path between N and Al on the periodic table, you move down a column (atomic size increases) and then to the left across

Then, it is easy to see that there are 9 problems for which the iterative numbers of the algorithm using ψ α,θ,p in the case of θ = 1 and p = 3 are less than the one of the