{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

pset2 - 18.085 Problem Set 2 Robert Yi Section 1.1 12 26...

Info icon This preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon
18.085 Problem Set 2 Robert Yi February 17, 2011 Section 1.1: 12, 26. Section 1.2: 14. Section 1.3: 8, 10. Section 1.4: 7, 8, 12. Section 1.5: 2, 13, 23, 29 Section 1.1 12. Carry out elimination on the 4 by 4 circulant matrix C 4 to reach an upper triangular U (or try [ L, U ] = lu ( C ) in MATLAB). Two points to notice: The last entry of U is because C is singular. The last column of U has new nonzeros. Explain why this “fill-in” happens. Entering in the code [ L, U ] = lu ( C ) in MATLAB gives C = [ 2 -1 0 -1 ; -1 2 -1 0 ; 0 -1 2 -1; -1 0 -1 2 ] C = 2 -1 0 -1 -1 2 -1 0 0 -1 2 -1 -1 0 -1 2 >> [L, U]=lu(C) L = 1.0000 0 0 0 -0.5000 1.0000 0 0 0 -0.6667 1.0000 0 -0.5000 -0.3333 -1.0000 1.0000 U = 2.0000 -1.0000 0 -1.0000 0 1.5000 -1.0000 -0.5000 0 0 1.3333 -1.3333 0 0 0 0.0000 U is our upper triangular matrix, achieved via row reduction. The last entry of U is 0 (and hence the entire row) because C is singular. To preserve singularity, the fill-in must occur to make the row still add to one. 1
Image of page 1

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
26. For which vectors v is toeplitz ( v ) a circulant matrx (cyclic diagonals)? Let’s write the form of a generic circulant n by n matrix. We get For an n by n matrix, we have n 1 n 2 n 3 . . . n n n n n 1 n n - 1 n n - 1 n n . . . n n - 2 . . . . . . n 2 n 3 . . . n 1 But for a toeplitz matrix, we need this to be symmetric. So our restriction is n 2 = n n , n 3 = n n - 1 , n 4 = n n - 2 , etc. Or in other words, aside from the first entry of vector v , which has no restriction, the rest of the vector must be symmetric about its middle term (or lack thereof). E.g. in the vector [2 - 10 - 1], the vector, aside from the first entry 2, is symmetric about 0, the center of the remaining vector. Section 1.2 14 Part (a). Solve - u 00 = 12 x 2 with free-fixed conditions u 0 (0) = 0 and u (1) = 0 . The complete solution involves integrating f ( x ) = 12 x 2 twice, plus Cx + D . Solving this without finite differences, but directly gives us - u 00 = 12 x 2 u 0 = - 4 x 3 + C, and u 0 (0) = 0 = C u = - x 4 + D, and u (1) = 0 = - 1 + D D = 1 u = - x 4 + 1 Part (b). With h = 1 n +1 and n = 3 , 7 , 15 , compute the discrete u 1 , ..., u n using T n : u i +1 - 2 u i + u i - 1 h 2 = 12( ih ) 2 with u 0 = 0 and u n +1 = 0 Compare u i with the exact answer at the center point x = ih = 1 / 2 . Is the error proportional to h or h 2 ? The MATLAB code for constructing matrix T and vector v , and solving for u is n=3; h=1/(n+1); Tn = toeplitz([2 -1 zeros(1,n-2)]); Tn(1,1) = 1; v=[1:n]; for i=1:n; v(i) = 12*(v(i)*h)^2; end u=(Tn/(h^2))\v’ 2
Image of page 2
For n = 3, the output from MATLAB is: u = 0.9375 0.8906 0.6563 For x = ih = 1 / 2, or i = 1 / 2 1 / 4 = 2, u 2 = 0 . 8906. The actual value at this point is 1 - (1 / 2) 4 = 0 . 9375, so the difference is 0 . 9375 - 0 . 8906 = 0 . 0469, while h = 0 . 25.
Image of page 3

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 4
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern