Archives

Current Announcements

Mar 26 For problem 2, if A = D + E is complex and E is small in norm and D is diagonal, then   diag(abs(D)) are reasonable approximate singular values.

Mar 26. Some students are telling me that Z1 and Z2 converge to the same point in script P3. If you find this to be the case feel free to change their values so that the converge to different roots. I'll have nop trouble grading your submission as long as your chosen values are clear.

Mar 24 The script P1 has been corrected.

Mar 12. Assignment 4 is available. Regarding P3,  take a look at this subset of the complex plane. Each x+iy is colored (red, green, blue,orrange) according to whether the Newton iteration  zNext = zCurrent - f(zCurrent)/f'(zCurrent) converges to 1, i, -1, or -i where f(z) = z^4 - 1. You can see that if you draw a small enough circle around one of these roots, then the iteration converges to that root. Part of P3 is to figure out (approximately) the largest radius of these neighborhoods.

Mar 9 Prelim I solutions. Median = 68.

Mar 5. A3 solutions online. Graded A3 pick-up today 1:15-2, 2:30-4  and Friday 11-12.

Feb 28: In-class prelim March 7. Syllabus = A1, A2, A3, all lectures through 2/26, and all problems-of-the-day through 2/26

Feb 28 In Problem 1, generate the first ellipse from x(1:5) and y(1:5) to avoid issues associated with underdetermined systems.Also, usual strategy of getting >> a solution first<< and thgen go about making it efficient. In this problem 'making it efficient" means updating an LS solution when a new equation is added to the "current" overdetermined system.

Feb 27  Assignment 3 tests scripts A3P2, A3P3, and A3 P4 are available. For these problems check out Matlab's qr and svd  functions via help. Note: in Problem 2, N is  n-by(n-m) not m-by-(n-m). In Problem 1, add the condition A=1. This paves the way to a linear least square problem of the kind we can solve via QR. The test script A3P1 will be up by tomorrow.

 

 

 

 

Feb 12 Assignment 2 hints:

Problem 1. Your final algorithm should be O(n) and require O(n) storage. Think about 2-by-2 Gaussian elimination with partial pivoting and vectorize. Suppose A11 is an n-vector with all the (1,1) entries and A21 is an n-vector with all the (2,1) entries. It follows that m = A21./A21 is the vector of multipliers. Use Matlab's find function to find the indices of those systems that require a row swap.

Problem 2. Let C = C(f,g). Show that if

                Ctilde = C(f + alfa*e1,g + beta*e1)

then

                Ctilde = C + W*Z' 

where W and Z are n-by-2. The Sherman-Morrison-Woodbury formula says

             inv(Ctilde) = inv(C) - inv(C)*W*inv(M)*Z' *inv(C)

where

                          M = I + Z'*inv(C)*W

Note that if  d = C*ones(n,1) then D = diag(d). How does D change if we modify f and g?

Problem 3. The Matlab function ldl does not quite perform the pivoting I thought, so a slight modification. Define r to be the smallest index so that |D(r+1,r+1)| <= tol*norm(A,1) where D is the block diagonal matrix from ldl(A). Use the ldl function from the website, not Matlab's ldl. (Reason; Student Matlab does not include ldl.)

Problem 4. There is a large opportunity for "off-by-one" mistakes. So it is best to write a subfunction of TwoPtBVP for general tridiagonal system solving, e.g., x = TriDiagSol(a,c,g,b) where a is the diagonal, c is the subdiagonal, g is the superdiagonal, and b is the rhs. It should compute L and U and then backsolve to get the solution. All O(n). Your implementation of TwoPtBVP will then start by setting up tridiagonal system and then solve it using TriDiagSol. Note that the system to solve is (n-2)-by-(n-2).

 

 

 

Feb 2 Extra Office hours Tuesday, Feb 3: 2:30-3:30

Jan 23 The Assignment 1 due date is Wednesday, February 4, 2009. (Not Feb 6 , 2008!)

Jan 23  Assignment 1 test scripts will be available next week.