mat 4725 numerical analysis section 8.2 orthogonal polynomials and least squares approximations...

Post on 11-Jan-2016

223 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

MAT 4725Numerical Analysis

Section 8.2

Orthogonal Polynomials and Least Squares

Approximations (Part II)

http://myhome.spu.edu/lauw

Preview

Inner Product Spaces Gram-Schmidt Process

A Different Technique for Least Squares Approximation

Computationally Efficient Once Pn(x) is known, it is easy to

determine Pn+1(x)

Recall (Linear Algebra)

General Inner Product Spaces

Inner Product

Example 0

Let f,gC[a,b]. Show that

is an inner product on C[a,b]

,b

a

f g f x g x dx

Norm, Distance,…

Orthonormal Bases

A basis S for an inner product space V is orthonormal if

1. For u,v S, <u,v>=0.

2. For u S, u is a unit vector.

Gram-Schmidt Process

1 2

1 2

1 2

, , , Basis

, , , Orthogonal Basis

, , , Orthonormal Basis

n

n

n

v v v

w w w

u u u

Gram-Schmidt Process

Gram-Schmidt Process

The component in v2 that is “parallel” to w1 is removed to get w2.

So w1 is “perpendicular” to w2.

Simple Example

1 2v i

2v i j

Specific Inner Product Space

Definition 8.1

0 1

0

, , , is said to be linearly independent

on [ , ] if ,

whenever ( ) 0, [ , ],

we have 0 0,1,..., .

(Otherwse, linearly dependent.)

n

n

j jj

k

a b

c x x a b

c j n

Theorem 8.2

0 1

If ( ) is a polynomial of degree ,

then , , , is linearly independent

on any interval [ , ].

j

n

x j

a b

Idea

Definition

the set of polynomials of degree nn

Theorem 8.3

0 1 n

n

0

If ( ), ( ), , ( ) is linearly independent in

Then Q , unique such that

( ) ( )

n

j

n

j jj

x x x

c

Q x c x

Example 1

0

1

22

20 1 2

0 1 2

( ) 2

( ) 3

( ) 2 7

Express ( ) as a

linear combination of ( ), ( ), and ( ).

x

x x

x x x

Q x a a x a x

x x x

Definition (Skip it for the rest)

Weight function ( ) on an interval :

( ) integrable

( ) ( ) 0

( ) ( ) 0 on any subinterval of

w x I

a

b w x x

c w x I

Weight Functions

to assign varying degree of importance to certain portion of the interval

1

Modification of the Least Squares Approximation

Recall from part I

Least Squares Approximation of Functions

0

Given [ , ],

approximate ( ) by

( )n

n kk

k

f C a b

f x

P xx a

a b

( )f x

( )nP x

Least Squares Approximation of Functions

a b

( )f x

( )nP x

2

Find such that

( ) ( )

is minimized

k

b

n

a

a

E f x P x dx

Normal Equations

0

( ) , 0,1, ,

Solve for

b bnk j j

kk a a

k

a x dx f x x dx j n

a

Modification of the Least Squares Approximation

0

Given [ , ],

approximate ( ) by

( )n

kk

k

f C a b

f x

P x a x

0

Given [ , ],

approximate ( ) by

( )n

n kk

k

f C a b

f x

P xx a

Modification of the Least Squares Approximation

2

Find such that

( ) ( )

is minimized

k

b

n

a

a

E f x P x dx 2

Find such that

( ) ( )

is minimized

k

b

a

a

E f x P x dx

Modification of the Least Squares Approximation

0

0

For 0,1, , , solve for

( )

( ) ( ) ( ) ( )

k

b bnk j j

kk a a

b bn

k k j jk a a

j n a

a x dx f x x dx

a x x dx f x x dx

Where are the Improvements?

0

( ) ( ) ( ) ( )b bn

k k j jk a a

a x x dx f x x dx

Where are the Improvements?

Find such that

0( ) ( )

0

Then......

k

b

k jja

j kx x dx

j k

0

( ) ( ) ( ) ( )b bn

k k j jk a a

a x x dx f x x dx

Definition 8.5

0 1, , , is said to be an orthogonal

set of functions on [ , ] with respect to if

0 ( ) ( )

0

(Orthonormal if all =1)

n

b

k jja

j

a b w

j kx x dx

j k

Theorem 8.6

2

( ) ( )

( )

1( ) ( )

b

k

ak b

k

a

b

kk a

f x x dx

a

x dx

f x x dx

ak are easier to solve

ak are “reusable”

0

( ) ( )n

k kk

P x a x

Where to find Orthogonal Poly.?

the Gram-Schmidt Process

Gram-Schmidt Process

0

2

0

1 1 12

0

1 2

2

1 1 2

2 2

1 2

( ) 1

( )

( ) where

( )

For 2, ( ) ( ) ( )

( ) ( ) ( )

where and

( ) ( )

b

ab

a

k k k k k

b b

k k k

a ak kb b

k k

a a

x

x x dx

x x B B

x dx

k x x B x C x

x x dx x x x dx

B C

x dx x dx

( ) 1w x

Legendre Polynomials

0

12

0

11 1 1 1

2

0

1

22 2 1 2 0

1 12

1 1 0

1 12 21 1

2 2

1 0

1 1

( ) 1

( )

( ) where 0

( )

1( ) ( ) ( )

3

( ) ( ) ( )1

where 0 and 3

( ) ( )

P x

x P x dx

P x x B x B

P x dx

P x x B P x C P x x

x P x dx xP x P x dx

B C

P x dx P x dx

[-1,1]

Legendre Polynomials

0

1

22

33

( ) 1

( )

1( )

3

3( )

5

P x

P x x

P x x

P x x x

( ) 1, [-1,1]w x

Example 2

Find the least squares approx. of

f(x)=sin(x)

on [-1,1] by the Legendre Polynomials.

Example 2

1 1

0

1 10 1 1

2 2

0

1 1

( ) ( ) sin 1

0

( ) 1

f x P x dx x dx

a

P x dx dx

2

( ) ( )

( )

b

k

ak b

k

a

f x x dx

a

x dx

Example 2

0

1 1

1

1 11 1 1

2 2

1

1 1

0

( ) ( ) sin( )3

( )

a

f x P x dx x xdx

a

P x dx x dx

2

( ) ( )

( )

b

k

ak b

k

a

f x x dx

a

x dx

Example 2

0 1

12

12 21

2

1

30,

1sin( )

30

13

a a

x x dx

a

x dx

2

( ) ( )

( )

b

k

ak b

k

a

f x x dx

a

x dx

Example 2

0 1 2

13

2

13 2 31

3

1

30, , 0

3sin( )

35 155

235

a a a

x x x dx

a

x x dx

2

( ) ( )

( )

b

k

ak b

k

a

f x x dx

a

x dx

Example 2

2

0 1 2 3 3

0 0 1 1 2 2 3 3

35 1530, , 0,

2( ) ( ) ( ) ( ) ( )

a a a a

P x a P x a P x a P x a P x

Example 2

Homework

Download Homework

top related