MATH 609-602: Numerical Methods - Homework Assignment 8, Assignments of Mathematical Methods for Numerical Analysis and Optimization

Information about homework assignment 8 for the numerical methods course (math 609-602) taught by prof. Wolfgang bangerth. The assignment includes problems on best polynomial approximation, gram-schmidt orthogonalization, and least-squares approximation with various norms. Students are required to compute analytical solutions and plot the results.

Typology: Assignments

Pre 2010

Uploaded on 02/10/2009

koofers-user-8z5
koofers-user-8z5 🇺🇸

9 documents

1 / 2

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
MATH 609-602: Numerical Methods
Lecturer: Prof. Wolfgang Bangerth
Blocker Bldg., Room 507D
(979) 845 6393
Teaching Assistant: Seungil Kim
Blocker Bldg., Room 507A
(979) 862 3259
Homework assignment 8 due Tuesday 11/1/2005
Problem 1 (Best polynomial approximation). Compute, analytically
(i.e. with exact values, not numerical floating point values), the best polynomial
approximation of degree 4 on the interval [1,1] to the following functions:
a) f(x) = 1
x;
a) f(x) = ex.
Plot your best approximation p4(x) together with f(x). (5 points)
Problem 2 (Gram-Schmidt orthogonalization). Define the following scalar
product between matrices A, B R2×2:
hA, Bi=
2
X
i=1
2
X
j=1
AijBij ,
and corresponding norm
kAk2=hA, Ai=
2
X
i=1
2
X
j=1
A2
ij.
Starting with matrices
A1=1 1
1 1, A2=1 1
1 0, A3=1 1
0 1, A4=1 0
1 1,
compute four matrices Bi,1i4 that are orthonormal onto each other,
i.e. for which hBi, Bji=δij holds. Write the identity matrix I=1 0
0 1as
I=P4
i=1 βiBiand give the coefficients βi.(4 points)
1
pf2

Partial preview of the text

Download MATH 609-602: Numerical Methods - Homework Assignment 8 and more Assignments Mathematical Methods for Numerical Analysis and Optimization in PDF only on Docsity!

MATH 609-602: Numerical Methods

Lecturer: Prof. Wolfgang Bangerth Blocker Bldg., Room 507D (979) 845 6393 [email protected] Teaching Assistant: Seungil Kim Blocker Bldg., Room 507A (979) 862 3259 [email protected]

Homework assignment 8 – due Tuesday 11/1/

Problem 1 (Best polynomial approximation). Compute, analytically (i.e. with exact values, not numerical floating point values), the best polynomial approximation of degree 4 on the interval [− 1 , 1] to the following functions:

a) f (x) = (^1) x ;

a) f (x) = ex.

Plot your best approximation p 4 (x) together with f (x). (5 points)

Problem 2 (Gram-Schmidt orthogonalization). Define the following scalar product between matrices A, B ∈ R^2 ×^2 :

〈A, B〉 =

∑^2

i=

∑^2

j=

Aij Bij ,

and corresponding norm

‖A‖^2 = 〈A, A〉 =

∑^2

i=

∑^2

j=

A^2 ij.

Starting with matrices

A 1 =

, A 2 =

, A 3 =

, A 4 =

compute four matrices Bi, 1 ≤ i ≤ 4 that are orthonormal onto each other,

i.e. for which 〈Bi, Bj 〉 = δij holds. Write the identity matrix I =

as

I =

i=1 βiBi^ and give the coefficients^ βi.^ (4 points)

Problem 3 (Least-squares approximation and other norms). In class, we defined the least-square approximating polynomial pn(x) as that polynomial that minimized the error

e 2 =

∑^ N

i=

|pn(xi) − yi|^2 ,

where we used the l 2 norm of the difference between pn(xi) and yi (i.e. we squared the difference, and summed over it). It was shown that this then leads to a linear problem for finding the expansion coefficients. On the other hand, if we had chosen any other exponent, the problem would have been nonlinear. Take the same points from last week again: xi 1 2 3 4 5 6 7 8 9 10 yi 1.51 2.01 2.49 2.98 3.51 4.01 4.49 5.02 5.52 5.

Find the polynomials pq 1 (x) = c 0 + c 1 x that minimize the lq -norms

eq =

∑^ N

i=

|pn(xi) − yi|q^ ,

for q = 1, q = 2, q = 4. (For q = 2, this is the solution of Problem 4 of last week’s homework.) In addition, compute p∞ 1 (x) = c 0 + c 1 x that minimizes the infinity norm

eq = max i≤i≤N

|pn(xi) − yi|.

Plot the pq 1 (x) together in one plot in which you also show the 10 data points. Repeat these computations for the following data set (the third to last data point has been changed: some large measurement error has occured, or someone made a mistake transfering the device reading to the data sheet; or maybe this was what the experiment really gave):

xi 1 2 3 4 5 6 7 8 9 10 yi 1.51 2.01 2.49 2.98 3.51 4.01 4.49 5.82 5.52 5. Comment on the suitability of the solutions you’ve found for approximating the two data sets. Note: To compute each of these polynomials, you have to find the coeffi- cients c 0 , c 1 that minimize the respective error eq that can be expressed as a function of ci by substituting pq 1 (x) = c 0 + c 1 x. In general, you will not be able to find these coefficients exactly except for the case q = 2. In particular, for q = 1, ∞ you can’t even find them by looking for points at which ∂e ∂cq 0 = ∂e ∂cq 1 = 0, since eq is not differentiable. In this case, feel free to get approximate values of the coefficients by plotting eq as a function of ci and visually determining values for which it is minimal. For q = 4, one ends up with an error function eq that is quartic in ci, i.e. nonlinear but differentiable. Determine its minimum either visually, or by letting your favorite math program find it using a minimum/root finder such as Newton’s method. (7 points)