{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Fall2011-HW8

# Fall2011-HW8 - Ax = b where A is the same matrix as in the...

This preview shows page 1. Sign up to view the full content.

Homework 8 Math 371, Fall 2011 Assigned: Thursday, November 3, 2011 Due: Thursday, November 10, 2011 Clearly label all plots using title , xlabel , ylabel , legend Use the subplot command to compare multiple plots Include printouts of all Matlab code, labeled with your name, date, and section. Add 12 for page numbers in the international edition. (1) Which of the following matrices is symmetric positive definite? Explain your answer. (a) 2 1 1 4 (b) 2 - 1 - 1 4 (c) 1 / 2 - 1 - 1 1 / 2 (d) 10 1 1 1 10 1 1 1 - 1 (2) The m-file jacobicvg.m is included as a CTools resource. Use it to deduce the convergence factor ρ D - 1 ( L + U ) = 1 - c/N 2 where D - L - U is a splitting of the tridiagonal N × N matrix A we used as an example in class and in earlier homework. Determine the value of c . (3) The m-file jacobi.m is included. If the Jacobi iteration is applied to the linear system
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Ax = b , where A is the same matrix as in the previous problem, the error after n iterations is approximately (1-c/N 2 ) n where c is a numerical value determined in the previous problem. Take b to be a random vector and use x exact = A \ b in Matlab to calculate the error. Now run x=jacobi(A,b,n) with n = 10 , 100 , 2000 and N = 50. Compare the errors to the errors estimated using the convergence factor by making a table. (4) As in problem 2, write a matlab function such that l = gseidelcvg(N) returns the con-vergence factor for Gauss-Seidel applied to the N × N matrix A (same as in problem 2). If the convergence factor is expressed in the form 1-c/N 2 determine the value of c . Which converges faster Jacobi or Gauss-Seidel? 1...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online