Question

Problem 2. In this problem we consider the question of whether a small value of the...

Problem 2. In this problem we consider the question of whether a small value of the residual kAz − bk means that z is a good approximation to the solution x of the linear system Ax = b. We showed in class that, kx − zk kxk ≤ kAkkA −1 k kAz − bk kbk . which implies that if the condition number kAkkA−1k of A is small, a small relative residual implies a small relative error in the solution. We now show computationally what can happen if the condition number is large. A standard example of a matrix that is ill-conditioned is the Hilbert matrix H, with entries (Hij ) = 1/(i+j−1). For n = 8, 12, 16 (where H is of dimension n×n), use Matlab to solve the linear system of equations Hx = b, where b is the vector Hy and y is the vector with yi = 1/ √ n, i = 1 . . . n. Clearly, the true solution is given by x = y, and we let z denote the approximation obtained by Matlab. Then calculate for each value of n the following quantities: (i) the relative error kx − zk/kxk, (ii) the relative residual kHz − bk2/kbk, (iii) the condition number kHkkH−1k, and (iv) the product of the quantities in (ii) and (iii). Arrange all these numbers in a table. The Matlab commands 1 norm and cond can be used to compute the norm and condition numbers, respectively. When vectors are input, Matlab writes them as row vectors. To convert y to a column vector, write it as y 0 . To solve the linear system Hz = b in Matlab, type z = H \ b. An example of a Matlab loop is given below; the semicolon keeps Matlab from writing unwanted output to the screen. To avoid potential problems, type clear before running a new value of n. Example of a Matlab Loop: for i=1:10 y(i) = 1/sqrt(10); end

0 0
Add a comment Improve this question Transcribed image text
Know the answer?
Add Answer to:
Problem 2. In this problem we consider the question of whether a small value of the...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT