

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
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
1 / 2
This page cannot be seen from the preview
Don't miss anything!


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]
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 :
i=
j=
Aij Bij ,
and corresponding norm
i=
j=
A^2 ij.
Starting with matrices
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 =
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 =
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)