

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
Prof. Greenbau Material Type: Exam; Class: NUMERICAL ANLYS I; Subject: Mathematics; University: University of Washington - Seattle; Term: Autumn 2006;
Typology: Exams
1 / 3
This page cannot be seen from the preview
Don't miss anything!


Math 464, Autumn 2006
Final will cover chapters 1 through 6.4, with special emphasis on material since the midterm (i.e., chs. 5 and sections 1 through 4 of chapter 6). This sheet contains practice problems only for chs. 5 and 6 (except the first problem, which is a followup from the midterm). Refer to earlier practice sheet for problems from chs. 1–4.
1 − x and showed that while the problem was well-conditioned for x near 0, one would get an inaccurate result by applying this formula in a straightforward way. For example, if |x| < 10 −^16 , then 1 − x would be rounded to 1, taking
1 would give 1, and then subtracting this from 1 would give an answer of 0, which does not have high relative accuracy. Write down an algorithm that will give high relative accuracy. [Hint: One possible approach: You can evaluate 1 +
1 − x to high relative accuracy. We have the product formula (1 −
1 − x)(1 +
1 − x) = x.] (b) Suppose we wish to solve the quadratic equation
x^2 + bx + c = 0
for x, where b > 0 and |c| << b^2. The formulas for the two roots are
x+ =
−b +
b^2 − 4 c 2
, x− =
−b −
b^2 − 4 c 2 Write down an algorithm that can be used to evaluate both x+ and x− to high relative accuracy.
for k=1:n-1, % Use row k to eliminate entries in column k % of rows k+1 through n. % % Here you should build in partial pivoting % for i=k+1:n, mult = A(i,k)/A(k,k); % Subtract mult times row k from row i for j=k:n, % in order to zero out A(i,k) A(i,j) = A(i,j) - mult*A(k,j); end; end; end;
(a) Write down the code you would insert to implement partial pivoting. (If you are not sure about the MATLAB commands, you may write your code in C or in some pseudo-MATLAB form, as long as it is clear exactly what you are doing.) (b) Suppose A is tridiagonal and pivoting is not required. Show how you could mod- ify the above code to solve this problem efficiently, and count the number of operations performed in your modified code.
) .
(b) What is the ∞-norm (max‖v‖∞ =1 ‖Av‖∞) of the matrix
( 1 2 3 6. 1
) ?
(c) Determine the condition number of A in the ∞-norm?
.
Use your QR factorization to solve the least squares problem Ax ≈ b, where
b =
.
x y 1 1 2 2 3 4