Question: 3. Consider the linear system 21 2-1 -1 2 -1 -1 2 bi b2 b3 -1 13 -1 -1 In-1 bn-1 2 -1 2 br

 3. Consider the linear system 21 2-1 -1 2 -1 -1

3. Consider the linear system 21 2-1 -1 2 -1 -1 2 bi b2 b3 -1 13 -1 -1 In-1 bn-1 2 -1 2 br (a) Write a function x = trisolve1(b) which solves the system Tx = b, where T is the above tridiagonal matrix. Use the MATLAB backslash operator (x = T\b). Test your script for b (1,0,0,0,1) corresponding to the exact solution x = (1,1,1,1,1). (b) Show that an LU decomposition of T consists of two bi-diagonal matrices, u -1 1 12 u2 -1 13 1 u3 -1 L= U= In-1 un-1 -1 1 In 1 where li = -(i-1)/i and U; = (i+1)/i and no permutations are required. You may verify this by matrix mutiplication. Design an algorithm which takes advantage of zero elements to solve LUX = b, implement your algorithm as the function x = trisolve2(b). Test your script on the same example in (a). (c) Use both trisolvel or trisolve2 to solve for x when b = rand(n,1) for n = 200, 400, 800, 1600, 3200, 6400, 12800, and make a table with the solution times (use tic/toc). Also represent the data in your table graphically (one plot). Interpret the results

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

To solve the problem here are the detailed steps for each part a Implement trisolve1b This part involves solving the linear system Tx b using the MATL... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!