Sei sulla pagina 1di 42

Advanced Mathematics for Computer Engineering

Abdollah Jalilian

Engineering Abdollah Jalilian www.razi.ac.ir/jalilian/ Department of Statistics Razi University Jalilian

Department of Statistics Razi University

Jalilian (Department of Statistics)

Spring 2012

Advanced Mathematics for CE

Spring 2012

Statistics Razi University Jalilian (Department of Statistics) Spring 2012 Advanced Mathematics for CE Spring 2012 1

1 / 42

Course Outline

Fourier analysis

Fourier series Fourier transform

A quick review of basic probability concepts

Probability space and random variables Probability distributions

Stochastic processes

Poisson process Markov chains and Birth and Death process Renewal theory

Queuing theory

Queuing system Queuing models

Jalilian (Department of Statistics)

Advanced Mathematics for CE

Spring 2012

theory Queuing system Queuing models Jalilian (Department of Statistics) Advanced Mathematics for CE Spring 2012 2

2 / 42

Text Book and Evaluation

Text Books:

Kreyszig, Erwin (2011). Advanced Engineering Mathematics, Tenth Edition, Wiley.

Allen, A. O. (1990). Probability, Statistics and Queuing Theory with Computer Scince Applications, Second Edition, Academic Press.

Software: (R & Maple), MATLAB,

Evaluation:

Midterm Exam 40%

Final Exam 50%

Project 10%

Jalilian (Department of Statistics)

1391/01/29

Advanced Mathematics for CE

Spring 2012

Final Exam 50% Project 10% Jalilian (Department of Statistics) 1391/01/29 Advanced Mathematics for CE Spring 2012

3 / 42

Fourier Analysis

Periodic phenomena mathematical modeling by periodic functions (periodic signals) Fourier analysis : approximating complicated periodic functions with series of simple periodic functions (sines and cosines) Periodic function :

f

: R R is a periodic function if for some p > 0

f (x + p) = f (x)

x

p

is called a period of f

for any n = 1, 2,

., np is also a period of f ; i.e.

f (x + np) = f (x)

x

the smallest period of f is called its fundamental period

when f

af (x) + bg (x) has the period p

and g have period p, then for any a, b R,

p and g have period p , then for any a , b ∈ R ,

Jalilian (Department of Statistics)

Advanced Mathematics for CE

Spring 2012

4 / 42

Simple Periodic Functions

Simple periodic functions of period p = 2π:

1, cos(x), sin(x), cos(2x), sin(2x),

, cos(nx), sin(nx),

The fundamental period of these functions?

Theorem

The above functions are orthogonal on [−π, π]; i.e. π m = n −π cos(nx)
The above functions are orthogonal on [−π, π]; i.e.
π
m = n
−π cos(nx) cos(mx)dx = π
,
0
n
=
m
π
m = n
−π sin(nx) sin(mx)dx = π
,
0
n
=
m
π
cos(nx) sin(mx)dx = 0,
−π

Proof?

π , 0 n = m π cos(nx) sin(mx)dx = 0, −π Proof? Jalilian (Department of

Jalilian (Department of Statistics)

Advanced Mathematics for CE

Spring 2012

5 / 42

Fourier Series

Let f be a piecewise continuous function of period p = 2π, then

f (x) = a 0 +

n=1

a n cos(nx) + b n sin(nx)

where

a 0 =

a n =

b n =

π

2π

1

1

π

π

π

f

π

1

π

π

π

f

f (x)dx

(x) cos(nx)dx

n = 1, 2,

(x) sin(nx)dx

n = 1, 2,

The above series is called the Fourier series of f with Fourier coefficients a 0 , a 1 , b 1 , a 2 , b 2 ,

a 0 , a 1 , b 1 , a 2 , b 2 , Jalilian

Jalilian (Department of Statistics)

Advanced Mathematics for CE

Spring 2012

6 / 42

Fourier Series

Does the Fourier series converges for any x? Is the sum equal to f (x)? Partial sums of the Fourier series of a function

S n (x) = a 0 +

n

j=1

a j cos(jx) + b j sin(jx)

n = 1, 2,

Convergence means

a 0 +

n=1

a n cos(nx) + b n sin(nx) = lim

n S n (x)

x

Theorem

The Fourier series converges if f has a left-hand and a right-hand derivative at each point in [π, π]. Its sum is f (x) except at points x 0 where f is discontinuous. At x 0 , the sum of the series is the average of the left-hand and the right-hand limits of f at x 0 .

of the left-hand and the right-hand limits of f at x 0 . Jalilian (Department of

Jalilian (Department of Statistics)

Advanced Mathematics for CE

Spring 2012

7 / 42

Fourier Series

Example: Let k > 0 be a constant and

f (x) =

k 0 < x < π

k

π < x <

0 f (x + 2π) = f (x)

Find the Fourier coefficients of f ? The sum of the series at discontinuity points of f ?

f

a 0 = 0

a n = 0,

n = 1, 2,

b n = 4k

nπ

0

1, 3, 5,

n = 2, 4, 6,

n

=

(x) = 4k sin(x) + 3 sin(3x) + 5 sin(5x) + · · ·

π

1

1

S n (0) = S n (π) = S n (π) = 0

n = 1, 2,

Jalilian (Department of Statistics)

Advanced Mathematics for CE

Spring 2012

) = S n ( π ) = 0 n = 1 , 2 , Jalilian

8 / 42

Exercises

If f

function of period p/a. Assume f is a function of period 2π. Find the Fourier series of f , where

is a function of period p, show that g (x) = f (ax), a

= 0, is a

f (x)

f (x) = x 2

f (x) =

= |x|

x

π x

π < x < 0 0 < x < π

Write a program (MATLAB codes) to compute the first 2n + 1 Fourier coefficients of the given periodic function f . Plot the function f on [π, π] and partial sums of of its Fourier series for different n.

Jalilian (Department of Statistics)

Advanced Mathematics for CE

Spring 2012

its Fourier series for different n . Jalilian (Department of Statistics) Advanced Mathematics for CE Spring

9 / 42

Fourier Series of General Periodic Functions

Let f (x) be a function of period p and L = p/2. Then

g(x) = f ( π x) is a function of period 2π

the Fourier transform of f is given by

L

n=1

L

f (x) = a 0 +

a n cos( nπ x) + b n sin( nπ x)

L

L

with Fourier coefficients

2L L f (x)dx

1

a 0 =

a n =

b n =

1

L

1

L

L f (x) cos( nπ x)dx

L

L

L

L f (x) sin( nπ nx)dx

L

n = 1, 2,

n = 1, 2,

Jalilian (Department of Statistics)

Advanced Mathematics for CE

Spring 2012

nx ) d x L n = 1 , 2 , n = 1 , 2

10 / 42

Fourier Series of General Periodic Functions

Example: Let k > 0 be a constant and

f (x) =

0

k

0 2 < x

1 < x < 2

1 < x < 1

< 1

Find the Fourier cofficients of f ?

p = 4, L = 2

a 0 = k

2


a n =

  a n =

b n = 0

2k

nπ

2k

nπ

n = 1, 5, 9, n = 3, 7, 11,

0 n = 2, 4, 6,

n = 1, 2,

f (x) = k

2

+ 2k

π

Jalilian (Department of Statistics)

cos( π x) 1

3

2

cos( 3π x) + 1 5 cos( 5π x) + ···

2

2

Advanced Mathematics for CE

Spring 2012

1 3 2 cos( 3 π x ) + 1 5 cos( 5 π x )

11 / 42

Fourier Series of General Periodic Functions

Example: Let E > 0 be a constant and

u(t) = E sin(ωt)

0

Find the Fourier cofficients of u?

0 < t < L

L < t < 0

p = 2π , L = π

ω

ω

a 0 = E

π

a n =

b n =

E

2

0

0

2E

(n1)(n+1)π

n = 1

n = 2, 3, 4,

1, 3, 5,

n = 2, 4, 6,

n

=

u(t) = E + E sin(ωt) 2E

π

2

π

1.3 cos(2ωt) + 3.5 cos(4ωt) + · · ·

1

1

Jalilian (Department of Statistics)

Advanced Mathematics for CE

Spring 2012

. 5 cos(4 ω t ) + · · · 1 1 Jalilian (Department of Statistics)

12 / 42

Fourier Series of Even and Odd Functions

Even function f (x) = f (x): a Fourier cosine series

a 0 = 1

L L

0

f (x) = a 0 +

n=1

f (x)dx

a n = 2

L L

0

a n cos( nπ x)

L

f (x) cos( nπ x)dx

L

n = 1, 2,

Odd function f (x) = f (x): a Fourier sine series

Jalilian (Department of Statistics)

f (x) =

n=1

b n sin( nπ x)

L

b n = 2

L L

0

f (x) sin( nπ x)dx

L

n = 1, 2,

Advanced Mathematics for CE

Spring 2012

) L b n = 2 L L 0 f ( x ) sin( n π

13 / 42

Properties Fourier Series

Theorem

Let f and g be functions of period p = 2L. The Fourier coefficients of c 1 f + c 2 g are

c 1 a 1n + c 2 a 2n

n = 0, 1, 2,

,

c 1 b 1n + c 2 b 2n

n = 1, 2,

where a 1n and b 1n are Fourier coefficients of f and a 2n and b 2n are Fourier coefficients of g.

Jalilian (Department of Statistics)

Advanced Mathematics for CE

Spring 2012

2 n are Fourier coefficients of g. Jalilian (Department of Statistics) Advanced Mathematics for CE Spring

14 / 42

Properties Fourier Series

Theorem

Let f : [π, π] R be a periodic function that can be represented by a Fourier series and

F(x) = A 0 +

N

i=1

A n cos(nx) + B n sin(nx)

be an approximating function for f (x). Then

π

π

f (x) F(x) 2 dx

is minimized if and only if the coefficients of F (x) are the Fourier coefficients of f .

of F ( x ) are the Fourier coefficients of f . Jalilian (Department of Statistics)

Jalilian (Department of Statistics)

Advanced Mathematics for CE

Spring 2012

15 / 42

Vector Space of Functions

The set of all functions on some interval [a, b] is an infinite dimensional vector space.

vector addition scalar multiplication

h = f + g

h = af ,

a R

h(x) = f (x) + f (x) h(x) = af (x)

Subspace: any subset of a vector space that is closed under addition and scalar multiplication is also a vector space.

subspace of all continuous functions on [a, b]

subspace of all polynomial functions on [a, b]

subspace of all functions of period p = 2L on [a, b]

A basis of an infinite dimensional space? Linear combinations of elements of a basis?

Jalilian (Department of Statistics)

Advanced Mathematics for CE

Spring 2012

combinations of elements of a basis? Jalilian (Department of Statistics) Advanced Mathematics for CE Spring 2012

16 / 42

Inner Product and Norm for Functions

Let f and g be two functions on [a, b], then

the inner product of f and g with respect to the weight function r (x ) 0 is defined by

f , g = b f (x)g(x)r(x)dx

a

the norm of f is defined by

f = f , f = b f 2 (x)r(x)dx 0

a

Orthogonality: f , g = 0 Triangle inequality: f + g ( f g 2 = f 2 + g 2

Convergence: f n f

f + g 2 f , g )

means f n f 0 as n → ∞

Jalilian (Department of Statistics)

Advanced Mathematics for CE

Spring 2012

n − f → 0 as n → ∞ Jalilian (Department of Statistics) Advanced Mathematics for

17 / 42

Sequence of Orthogonal Functions

y 0 (x), y 1 (x), y 2 (x), orthogonal sequence

a sequence of functions in a subspace S of functions

y m , y n = b y m (x)y n (x)r(x)dx = 0

a

m

= n.

orthonormal sequence

y m , y n = b y m (x)y n (x)r(x)dx

a

= δ mn =

1

0

m = n m

= n

complete orthonormal sequence every f ∈ S can be approximated by a

linear combination of y 0 , y 1 , y 2 ,

n f S n =

lim

n→∞ b

lim

a

.; i.e.

f (x) S n (x) 2 r(x)dx = 0

where

S n (x) =

n

m=0

a m y m (x)

d x = 0 where S n ( x ) = n m =0 a m

Jalilian (Department of Statistics)

Advanced Mathematics for CE

Spring 2012

18 / 42

Complete Orthonormal Sequence

A complete orthonormal sequence in subspace S is a basis for S

Every function in S can be expressed in terms of a linear combination of elements of the basis

Theorem

Let {y 0 , y 1 , y 2 ,

a subspace S. If there is a f

m = 0, 1, 2,

.} be a complete orthonormal set of functions on [a, b] in

∈ S where f , y m = 0 for every

then f = 0.

Jalilian (Department of Statistics)

Advanced Mathematics for CE

Spring 2012

= 0 for every then f = 0 . Jalilian (Department of Statistics) Advanced Mathematics for

19 / 42

Sinusoidal Functions as a Basis

Example: Let S set of all piecewise continuous functions of period 2π and

y m (x) =

1 m = 0

m

cos( m+1 x)

2

sin( m x)

2

1, 3, 5,

m = 2, 4, 6,

=

Then y 0 , y 1 , y 2 ,

are orthogonal: y m , y n = 0

m

= n

and y 0 = 2π,

y m =

π

m = 1, 2, 3,

Thus y˜ 0 (x) = 1/ 2π, y˜ 1 (x) = y 1 (x)/ π, y˜ 2 (x) = y 2 (x)/ π,

complete orthonormal sequence in S and every f ∈ S can be expressed by a linear combination

is a

f (x) =

m=0

a m y m (x) = a 0 +

m=1

a m cos(mx) + b m sin(mx)

Jalilian (Department of Statistics)

Advanced Mathematics for CE

Spring 2012

a m cos( mx ) + b m sin( mx ) Jalilian (Department of Statistics) Advanced

20 / 42

Generalized Fourier Series

Let f be a function on [a, b] that can be represent by a convergent series

f (x) = a 0 y 0 (x) +

m=1

a m y m (x) = a 0 y 0 (x) + a 1 y 1 (x) + a 2 y 2 (x) + ···

where y 0 , y 1 , y 2 ,

orthogonal functions on [a, b].

orthogonal series or generalized Fourier series of f

a 0 , a 1 , a 2 ,

.: Fourier constants of f

a m = f , y m

y m 2

=

y m 2 b

1

a

y m (x)f (x)r(x)dx

Jalilian (Department of Statistics)

Advanced Mathematics for CE

Spring 2012

1 a y m ( x ) f ( x ) r ( x ) d

21 / 42

Generalized Fourier Series

Example: Legender polynomials

P n (x) =

1

d

n

2 n n! dx

n

(x 2 1) n =

1

2

n

n

2

j=0

(1) j

n 2n 2j

j

n

x n2j

are orthogonal on [1, 1] with respect to r (x) = 1 :

1

P m , P n = 1 P m (x)P n (x)dx =

2

2m

+ 1 δ mn

,

Fourier-Legendre series of f :

P m =

2

2m + 1

f (x) = a 0 P 0 (x) +

m=1

a m P m (x) = a 0 P 0 + a 1 P 1 (x) + a 2 P 2 (x) + ···

with

Jalilian (Department of Statistics)

a m = 2m + 1

2

1

1 f (x)P m (x)dx

Advanced Mathematics for CE

Spring 2012

of Statistics) a m = 2 m + 1 2 1 − 1 f ( x

22 / 42

Generalized Fourier Series

How good is the generalized Fourier series approximation? Since

k

k

a

2

m

S k 2 =

2

a m

f , S k =

,

m=0

m=0

hence

f S k 2 = f 2 +

S k 2 2 f , S k = f 2

The Bessel inequality: for any

k = 1, 2,

k

m=0

a m 2 f 2 = b f 2 (x)r(x)dx

a

Parseval equality: when {y 0 , y 1 , y 2 ,

.} is complete

m=0

a m 2 = f 2 = b f 2 (x)r(x)dx

a

Jalilian (Department of Statistics)

Advanced Mathematics for CE

k

m=0

a 2

m

Spring 2012

2 ( x ) r ( x ) d x a Jalilian (Department of Statistics) Advanced

23 / 42

Fourier Integral

A nonperiodic function on R = (−∞, ) is a function of period p =

Let f L be a function of period p = 2L and define w n = nπ

L

.

f L (x) =

2L

1

L f L (x)dx + 1

π

L

n=1

L f L (x) cos(w n x)dx cos(w n x)

L

L

+ L f L (x) sin(w n x)dx sin(w n x) w n

If

|f (x)|dx exists and f L f , then

L f L (x) =

lim

π

1

0

Jalilian (Department of Statistics)

−∞ f (x) cos(wx)dx cos(wx)

+ −∞ f (x) sin(wx)dx sin(wx) dw

Advanced Mathematics for CE

Spring 2012

x cos( wx ) + −∞ f ( x ) sin( wx ) d x sin(

24 / 42

Fourier Integral

Theorem

Let f be a pciewise continuous function on every finite interval and has a right- and a left-hand derivative at every point. If the integral

−∞

|f (x)|dx

exists, then

f (x) =

0

A(w ) cos(wx) + B(w ) sin(wx) dw

A(w) =

π

1

−∞

f

(v ) cos(wv )dv

B(w ) =

π

1

−∞

f

(v ) sin(wv )dv

If f is discontinuous at x 0 then the value of Fourier integral at x 0 equals the average of the left- and right-hand limits of f at x 0 .

average of the left- and right-hand limits of f at x 0 . Jalilian (Department of

Jalilian (Department of Statistics)

Advanced Mathematics for CE

Spring 2012

25 / 42

Fourier Integral of Even and Odd Functions

Even function f (x) = f (x): a Fourier cosine integral

f (x)

= A(w ) cos(wx)dw

0

A(w) =

2

π

0

f (x) cos(wx)dx

Odd function f (x) = f (x): a Fourier sine integral

Jalilian (Department of Statistics)

f

(x) = B(w ) sin(wx)dw

0

B(w) =

2

π

0

f (x) sin(wx)dx

Advanced Mathematics for CE

Spring 2012

B ( w ) sin( wx ) d w 0 B ( w ) = 2

26 / 42

Fourier Integral

Example: Find the Fourier integral representation of the function

f (x) =

1

0

|x| < 1 |x| > 1

2

π

2

cos(wv )

w

0

= 2

π

sin(w )

w

d w

dw

1

A(w) =

f

(v ) cos(wv )dv =

π

0

2

π

sin(w ) cos(wx)

f (x) =

dw

0

w

sin(w (1 + x)) + sin(w (1 x))

w

π

1

0

=

Jalilian (Department of Statistics)

Advanced Mathematics for CE

Spring 2012

w (1 − x )) w π ∞ 1 0 = Jalilian (Department of Statistics) Advanced

27 / 42

Fourier Integral

Example: Find the Fourier integral representation of the function

f (x) = e kx

k > 0, x > 0

A(w) =

2

π

0

f

(v ) cos(wv )dv

= 2

k

π

k 2 +

2k

w 2 e kv cos(wv ) w sin(wv )

k

0

=

f (x) = 2k

π

π(k 2 + w 2 )

0

cos(wx) k 2 + w

2 dw

0

cos(wx) k 2 + w

2 dw =

π

2k e kx

Jalilian (Department of Statistics)

Advanced Mathematics for CE

Spring 2012

+ w 2 d w = π 2 k e − kx Jalilian (Department of Statistics)

28 / 42

Fourier Transform

Transforming a function: to obtain a new function An integral transformation: transforming by integrating; e.g. Laplace transform Let f (x) be an even function. The Fourier cosine transform of f is

F c (f )(w ) = f ˆ c (w) =

2
π

0

f (x) cos(wx)dx

with the inverse Fourier cosine transform

1

F

c

( f ˆ c )(x) = f (x) =

2

π

0

ˆ

f c (w ) cos(wx)dw

Let f (x) be an odd function. The Fourier sine transform of f is

F s (f )(w ) = f ˆ s (w) =

2
π

0

f (x) sin(wx)dx

with the inverse Fourier cosine transform

1

F

s

( f ˆ s )(x) = f (x) =

2
π

0

ˆ

f s (w ) sin(wx)dw

Jalilian (Department of Statistics)

Advanced Mathematics for CE

Spring 2012

π 0 ˆ f s ( w ) sin( wx ) d w Jalilian (Department of

29 / 42

Fourier Cosine and Fourier Sine Transforms

Example: Find the Fourier cosine and Fourier sine transforms of

f (x) =

k

0

g(x) = e x

x

x

< a

> a

a > 0

F c (f )(w ) = f ˆ c (w)

=

2

k sin(aw )

π

w

F s (f )(w ) = f ˆ s (w) =

π

2

k 1 cos(aw )

w

F c (g )(w ) =

gˆ c (w)

=

2

1

π

1

+ w 2

F s (g )(w ) = gˆ s (w) =

π

1

2

w

+ w 2

Jalilian (Department of Statistics)

Advanced Mathematics for CE

Spring 2012

= g ˆ s ( w ) = π 1 2 w + w 2 Jalilian

30 / 42

Properties of Fourier Cosine and Fourier Sine Transforms

linearity if f and g have Fourier cosine and sine transforms, then for every a, b R,

F c (af + bg ) = aF c (f ) + bF c (g)

F s (af + bg ) = aF s (f ) + bF s (g)

transforms of derivatives when f (x) is continuous an absolutely integrable on R, f (x) is piecewise continuous on every finite interval and lim x f (x) = 0, then

Why?

Jalilian (Department of Statistics)

w F s (f )(w ) π f (0)

2

F c (f )(w ) =

F s (f )(w ) = w F c (f )(w )

Advanced Mathematics for CE

Spring 2012

( f )( w ) = F s ( f )( w ) = − w

31 / 42

Fourier Cosine and Fourier Sine Transforms

Example: Find the Fourier cosine and Fourier sine transforms of

but

f

f (x) = e ax

a > 0

(x) = a 2 f (x)

F c (f )(w ) = a 2 F c (f )(w )

F c (f )(w ) =

w F s (f )(w ) π f (0)

2

= w 2 F c (f )(w ) + a

2

π

w 2 F c (f )(w ) + a π = a 2 F c (f )(w )

2

Jalilian (Department of Statistics)

Advanced Mathematics for CE

F c (f )(w ) =

π

2

a

a 2 + w 2

(Department of Statistics) Advanced Mathematics for CE F c ( f )( w ) = π

Spring 2012

32 / 42

Complex Fourier Integral

f (x) =

0

A(w ) cos(wx) + B(w ) sin(wx) dw

=

π

1

0

−∞ cos(wv ) cos(wx) + sin(wv ) sin(wx) f (v)dv dw

=

=

=

π

1

0

−∞ cos(wx wv )f (v )dv dw

2π

1

−∞

−∞ cos(w (x v ))f (v )dv dw

2π

1

−∞ cos(w (x v )) + i sin(w (x v )) f (v)dv dw −∞

=

2π

1

−∞

−∞ e iw (xv ) f (v)dv dw

=

1

2π

−∞

1

2π

−∞ e iwv f (v)dv e iwx dw

e − i w v f ( v ) d v e i w x d

Jalilian (Department of Statistics)

Advanced Mathematics for CE

Spring 2012

33 / 42

Complex Fourier Integral

Fourier transform of f

F (f )(w ) = f ˆ (w) =

inverse Fourier transform of f ˆ

F 1 ( f ˆ )(x) = f (x) =

1

2π

−∞