Docsity

Sample Midterm Exam 1 Problems - Numerical Analysis | MATH 128A, Exams of Mathematical Methods for Numerical Analysis and Optimization

Toggle sidebar
bg1
Sample Midterm 1 Problems, Math 128A
Prof. John A. Strain
1. (a) Define the (normwise) condition number κffor the problem of evalu-
ating a function f:Rm→Rnat input x.
(b) Give a general formula for κf.
(c) Define forward and backward stability of an algorithm ˜
f(x) for evaluating
fat x.
(d) Evaluate κffor
f(x) = (x2
1−x2
2,2x1x2)T= (f1(x), f2(x))T
at x= (1,1)T. Is this problem well-conditioned?
(e) Consider the evaluation of f(from part (d)) by multiplication and sub-
traction (in that order). Show that each component, ˜
f1and ˜
f2, is backward
stable. Explain why we do not expect ˜
fas a whole to be backward stable at
x.
(f) Use (e) to show that fis forward stable at x.
2. (a) Use Gaussian elimination to find a permutation matrix P, a unit lower
triangular matrix L, and an upper triangular matrix Rsuch that P A =LR
where
A=0 1
2 3 .
(b) Repeat with
A=1 2
300 4 .
(c) Find vectors uand vsuch that
L=1 0
300 1 =I+uvT.
Express L−1in terms of uand v.
(d) Compute the 1-norm condition number of applying Lto the vector x=
(−2,604)T.
3. Let Ebe the plane in R3defined by
E={z∈R3|uTz= 0}
where u= (1,2,3)T.
(a) Find the orthogonal projection matrix Ponto E.
(b) Find the closest point zin Eto b= (3,2,1)T. Note zis a 3-vector!
(c) Let
A=
−2 0
1−3
0 2
.
Find x∈R2minimizing kAx −bk2. Note xis a 2-vector!
(d) Compute the 2-norm condition number for the problem of applying P
to any vector b∈R3, in terms of the angle θbetween band E.
1

Partial preview of the text

Download Sample Midterm Exam 1 Problems - Numerical Analysis | MATH 128A and more Exams Mathematical Methods for Numerical Analysis and Optimization in PDF only on Docsity!

Sample Midterm 1 Problems, Math 128A

Prof. John A. Strain

  1. (a) Define the (normwise) condition number κf for the problem of evalu- ating a function f : Rm^ → Rn^ at input x. (b) Give a general formula for κf. (c) Define forward and backward stability of an algorithm f˜ (x) for evaluating f at x. (d) Evaluate κf for

f (x) = (x^21 − x^22 , 2 x 1 x 2 )T^ = (f 1 (x), f 2 (x))T

at x = (1, 1)T^. Is this problem well-conditioned? (e) Consider the evaluation of f (from part (d)) by multiplication and sub- traction (in that order). Show that each component, f˜ 1 and f˜ 2 , is backward stable. Explain why we do not expect f˜ as a whole to be backward stable at x. (f) Use (e) to show that f is forward stable at x.

  1. (a) Use Gaussian elimination to find a permutation matrix P , a unit lower triangular matrix L, and an upper triangular matrix R such that P A = LR where

A =

[

]

(b) Repeat with

A =

[

]

(c) Find vectors u and v such that

L =

[

]

= I + uvT^.

Express L−^1 in terms of u and v. (d) Compute the 1-norm condition number of applying L to the vector x = (− 2 , 604)T^.

  1. Let E be the plane in R^3 defined by

E = {z ∈ R^3 |uT^ z = 0}

where u = (1, 2 , 3)T^. (a) Find the orthogonal projection matrix P onto E. (b) Find the closest point z in E to b = (3, 2 , 1)T^. Note z is a 3-vector! (c) Let

A =

Find x ∈ R^2 minimizing ‖Ax − b‖ 2. Note x is a 2-vector! (d) Compute the 2-norm condition number for the problem of applying P to any vector b ∈ R^3 , in terms of the angle θ between b and E.