

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


Math 433 - Numerical Analysis - Spring 2008 Homework 7 Assigned: Friday, March 7, 2008. Due: Friday, March 21, 2008.
Show that the l 1 vector norm satisfies the three properties
(a) ||x|| 1 ≥ 0 for x ∈ Rn^ and ||x|| = 0 if and only if x = 0 (b) ||λx|| 1 = |λ| ||x|| 1 for λ ∈ R and x ∈ Rn (c) ||x + y|| 1 ≤ ||x|| 1 + ||y|| 1 for x, y ∈ Rn
A =
Compute ‖A‖∞ and find a vector x such that ‖A‖∞ = ‖Ax‖∞/‖x‖∞. (b) Find an example of a 2 × 2 matrix A such that ‖A‖∞ = 1 but ρ(A) = 0. This shows that the spectral radius ρ(A) = {max |λ| : λ is an eigenvalue of A} does not define a matrix norm.
, b =
, x 1 =
, x 2 =
(a) Show that x = (2, −2)T^ is the exact solution of Ax = b. (b) Compute the error and residual vectors for x 1 and x 2. (c) Find ||A||∞, ||A−^1 ||∞ and cond∞(A) (you may use MATLAB for this cal- culation). (d) In class we proved a theorem relating the condition number of A, the relative error, and the relative residual. Check this result for the two approximate solutions x 1 and x 2.
The Rockmore Corp. is the considering the purchase of a new computer and will choose either the DoGood 174 or the MightDo 11. They test both computers’ ability to solve the linear system
34 x + 55y − 21 = 0 55 x + 89y − 34 = 0
1
The DoGood 174 computer gives x = − 0 .11 and y = 0.45, and its check for accuracy is found by substitution:
34(− 0 .11) + 55(0.45) − 21 = 0. 01 55(− 0 .11) + 89(0.45) − 34 = 0. 00 The MightDo 11 computer gives x = − 0 .99 and y = 1.01, and its check for accuracy is found by substitution:
Which computer gave the better answer? Why?
(a) Write a program that takes the output A and p from your hw 6, along with a righthand side b, and computes the solution of Ax = b by performing the forward and backward substitution steps. If you are using MATLAB, name your m-file lusolve.m. The first line of your code lusolve.m should be as follows: function x=lusolve(a,p,b) (your code here!) Turn in a copy of your code. (b) The famous Hilbert matrices are given by Hij = 1/(i + j − 1). The n × n Hilbert matrix Hn is easily produced in MATLAB using hilb(n). Assume the true solution of Hnx = b for a given n is x = [1,... , 1]T^. Hence the righthand side b is simply the row sums of Hn, and b is easily computed in MATLAB using b=sum(hilb(n)’)’. Use your codes mylu.m and lusolve.m to solve the system Hnx = b for n = 5, 10 , 15 , 20. For each n, using the ∞− norm, compute the relative error and the relative residual. Discuss what is happening here. You may find it useful to look at the cond command in MATLAB.