Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Modern Database Management

Authors: Jeff Hoffer, Ramesh Venkataraman, Heikki Topi

12th edition

133544613, 978-0133544619

More Books

Students also viewed these Databases questions

Question

How many multiples of 4 are there between 10 and 250?

Answered: 1 week ago

Question

How many three-digit numbers are divisible by 7?

Answered: 1 week ago

Question

What is Indian Polity and Governance ?

Answered: 1 week ago