Docsity

Homework 7 Problems for Numerical Analysis | MATH 433, Assignments of Mathematical Methods for Numerical Analysis and Optimization

Toggle sidebar
bg1
Math 433 - Numerical Analysis - Spring 2008
Homework 7
Assigned: Friday, March 7, 2008.
Due: Friday, March 21, 2008.
1. (Vector and Matrix Norms)
Show that the l1vector norm satisfies the three properties
(a) ||x||1≥0 for x∈Rnand ||x|| = 0 if and only if x= 0
(b) ||λx||1=|λ| ||x||1for λ∈Rand x∈Rn
(c) ||x+y||1≤ ||x||1+||y||1for x, y ∈Rn
2. (a) Consider the matrix
A=
2−3 1
−4 1 2
5 0 1
.
Compute kAk∞and find a vector xsuch that kAk∞=kAxk∞/kxk∞.
(b) Find an example of a 2 ×2 matrix Asuch that kAk∞= 1 but ρ(A) = 0.
This shows that the spectral radius ρ(A) = {max |λ|:λis an eigenvalue of A}
does not define a matrix norm.
3. Consider the matrix, right side vector, and two approximate solutions
A=1.2969 0.8648
0.2161 0.1441, b =0.8642
0.1440, x1=0
1, x2=0.9911
−0.4870.
(a) Show that x= (2,−2)Tis the exact solution of Ax =b.
(b) Compute the error and residual vectors for x1and x2.
(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 x1and x2.
4. (from Mathews–Fink 2004)
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
34x+ 55y−21 = 0
55x+ 89y−34 = 0
1
pf2

Partial preview of the text

Download Homework 7 Problems for Numerical Analysis | MATH 433 and more Assignments Mathematical Methods for Numerical Analysis and Optimization in PDF only on Docsity!

Math 433 - Numerical Analysis - Spring 2008 Homework 7 Assigned: Friday, March 7, 2008. Due: Friday, March 21, 2008.

  1. (Vector and Matrix Norms)

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

  1. (a) Consider the matrix

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.

  1. Consider the matrix, right side vector, and two approximate solutions

A =

, 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.

  1. (from Mathews–Fink 2004)

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?

  1. (LU factorization)

(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.