{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

ASE 211 - Homework 5 Due Feb. 20

# ASE 211 - Homework 5 Due Feb. 20 - i = 1 999 Take the...

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

ASE 211 Homework 5 Due: In class, Wednesday, February 20th. 1. By hand, compute the LU factorization, without row pivoting, of the following matrix: A = 6 3 1 3 1 0 2 2 4 . Check your result using the matlab lu function. 2. Write matlab routines forsolve.m and backsolve.m which solve L y = b and U x = y once the LU factorization of A is computed. Test your routines on the matrix above with right hand side b = (22 , 8 , 32). Remember you have to permute the rows of b before the forward solve. 3. In engineering applications, we often have to solve differential equations numerically. Depending on the differential equation, this can lead to a linear algebra problem. For example, take A to be a 1000 by 1000 matrix, with a ii = 2, i = 1 , . . . , 1000 and a i,i +1 = a i +1 ,i = - 1, i = 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: i = 1 , . . . , 999. Take the vector b such that b i = 2 * ( . 001) 2 . Use LU factorization and forward and back substitution to solve A x = b and plot the vector x using the matlab command plot(x) . This linear system arises when approximating the diﬀerential equation-x 00 ( t ) = 2 , < t < 1 , x (0) = x (1) = 0 using a ﬁnite diﬀerence method (which we’ll discuss later in the semester). This problem is called a two point boundary value problem. The exact solution is x ( t ) = t (1-t ). Hint : Use ’for’ loops to assign the matrix values. For example, n=1000; a=zeros(n,n); for i=1:n-1 a(i,i) = 2; a(i,i+1) = -1; a(i+1,i) = -1; end a(n,n) = 2;...
View Full Document

{[ snackBarMessage ]}

### What students are saying

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

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

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

Dana University of Pennsylvania ‘17, Course Hero Intern

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

Jill Tulane University ‘16, Course Hero Intern