Docsity

Orthogonal Bases: Least Squares Approximation using Orthogonal Basis Vectors, Study notes of Calculus

Toggle sidebar
bg1
Orthogonal Bases
Adrian Down
March 14, 2006
1 Least squares polynomial interpolation
1.1 Basis polynomials
We would like to approximate a given function b(x) on the interval [−1,1]
by a polynomial function of the form,
a(x) = u1+u2x+. . . +unxn−1
In this case, the notion of squared deviation takes the form,
S=Z1
−1
(a(x)−b(x))2dx
Defining Sas |a−b|2, the polarization identity determines the form that
the inner product must take,
f·g=Z1
−1
f(x)g(x)
Recalling our previous notation for least squares approximation, the vec-
tor space Ain this case is the space of functions. We would like to construct
a basis of A. The elements of this basis will take the form of polynomials of
degree ≤n−1. We can choose,
a1(x) = 1 a2(x) = x . . . an(x) = xn−1
We can then write the interpolating polynomial as a linear combination
of these basis vectors,
a(x) =
n
X
j=1
ujaj(x)
1
pf3
pf4
pf5

Partial preview of the text

Download Orthogonal Bases: Least Squares Approximation using Orthogonal Basis Vectors and more Study notes Calculus in PDF only on Docsity!

Orthogonal Bases

Adrian Down

March 14, 2006

1 Least squares polynomial interpolation

1.1 Basis polynomials

We would like to approximate a given function b(x) on the interval [− 1 , 1] by a polynomial function of the form,

a(x) = u 1 + u 2 x +... + unxn−^1

In this case, the notion of squared deviation takes the form,

S =

− 1

(a(x) − b(x))^2 dx

Defining S as |a − b|^2 , the polarization identity determines the form that the inner product must take,

f · g =

− 1

f (x)g(x)

Recalling our previous notation for least squares approximation, the vec- tor space A in this case is the space of functions. We would like to construct a basis of A. The elements of this basis will take the form of polynomials of degree ≤ n − 1. We can choose,

a 1 (x) = 1 a 2 (x) = x... an(x) = xn−^1 We can then write the interpolating polynomial as a linear combination of these basis vectors,

a(x) =

∑^ n

j=

uj aj (x)

1.2 Normal equations

The matrix of normal equations is formed by taking the inner products be- tween all of the basis vectors,

ai · aj =

− 1

xi−^1 xj−^1 dx

If i + j is odd, the integrand is an odd function, and so the symetric intergral is 0. Otherwise, i + j is even, ∫ (^1)

− 1

xi+j−^2 dx =

i + j − 1

[

xi+j−^1

]− 1

1

Since i + j is even, i + j + 1 is odd, ∫ (^1)

− 1

xi+j−^2 dx =

i + j − 1

[1 − (−1)] =

i + j + 1 We also need the inner product of ai · b,

bi = ai · b =

− 1

b(x)xi−^1 dx

Forming the matrix of normal equations,         2 0 23... (^2) n (^0 )

2 3

2 n...^

2 2 n− 1

u 1 u 2 .. . un

b 1 b 2 .. . bn

From a numerical point of view, this matrix is problematic. It is ill- conditioned, has a small determinant, and is very sensitive to small changes in b. Hence ai(x) = xi−^1 is a poor choice of basis.

1.3 Improved basis

Consider an alternative basis for the case of n = 3,

a 1 (x) =

a 2 (x) = x a 3 (x) =

3 x^2 − 1

2

2 5

a∗(x) =

(3x^2 − 1)

2 Orthogonal basis vectors

2.1 Motivation

We saw in the example above that orthogonal basis vectors simplify the least sequares problem by reducing the coefficient matrix of the normal equations to the identity matrix. Hence, it is in our interest to determine how to construct an orthonormal basis in the general case.

2.2 Boundary value problem

Consider the functions

yn(x) = sin nx

We can construct a boundary value problem,

y′′ n = −n^2 yn ∈ [0, π] yn(0) = yn(π) = 0

Note. We can think of differentiation as an operation with eigenvalues. The differential equation above indicates that the yn functions are eigenfunctions of the second derivative operator with the eigenvalue λ = −n^2.

We would like to show that the yn functions form an orthonormal basis. In particular, ∫ (^) π

0

sin mx sin nxdx =

π 2

δmn

Consider the differential equation applied to two different values,

y m′′ = −m^2 ym y n′′ = −n^2 yn

Multiply the fist equation by yn and the second by ym,

yny m′′ = −m^2 ynym ymy n′′ = −n^2 ymyn

Take the difference of the two equations above and integrate both sides from 0 to π,

∫ (^) π

0

(yny′′ m − ymy′′ n)dx =

n^2 − m^2

) ∫^ π 0

ymyndx

Note that the first term is an exact differential,

(yny′′ m − ymy′′ n) = (yny m′ − ymy n′)′

The integral on the left is then easly done using the Fundamental Theorem of Calculus,

0 = [yny m′ − ymy n′]π 0 =

n^2 − m^2

) ∫^ π 0

ymyndx

By assumption yn(0) = ym(0) = yn(π) = ym(π) = 0. Hence the boundary term on the left is 0,

0 = (n^2 − m^2 )

∫ (^) π

0

ymyndx

If m 6 = n, it must be that the integral is 0,

m 6 = n ⇒

∫ (^) π

0

ymyndx = 0

In the case m = n, perform the integral directly,

∫ (^) π

0

y^2 ndx =

∫ (^) π

0

sin^2 nxdx =

π 2

Thus we have the desired result,

yn · ym =

∫ (^) π

0

sin nx sin mxdx =

π 2

δmn

2.3 Other bases

It is possible to consider other definitions of the yn functions to create other orthogonal bases.

Make the definitions,

Tn(x) = cos(n cos−^1 (x))

We have shown that these functions are orthogonal on the interval [− 1 , 1], and their inner product has a weight function,

f · g =

− 1

f g √ 1 − x^2

dx

These functions have tha advantage that they can be expressed as poly- nomial functions,

T 0 (x) = 1 T 1 (x) = x T 2 (x) = 2x^2 − 1

In general,

Tn(x) = cos(n cos−^1 x)

Is obtained from,

xn^ = cosn^ θ =

eıθ^ + e−ıθ 2

)n

2 n−^1

Tn(x) + previous T ’s

The zeros of Tn(x) occur where,

Tn(x) = 0 ⇔ n cos−^1 x = h

π 2

, h

cos−^1 x =

hπ 2 n

∈ (0, π)

Thus Tn has n zeros at h = 1, 3 ,... , 2 n − 1.