Question: We will now write a function that solves a linear system ) = ( b quickly, given a L U decomposition of A with a

We will now write a function that solves a linear system )=(b quickly, given a LU decomposition of A with a right hand side vector b. Create a function (this will be added to the final submitted source file
HW2.py) which is called solve LU() that takes the following arguments as input in this order:
numpy array L : the lower triangular matrix of an LU decomposition of A
numpy array U : the upper triangular matrix of an LU decomposition of A
numpy array b : the right hand side vector of the system Ax=b
And returns the following output:
numpy array x : the solution to the original system Ax=b
Hints: This involves solving two simple systems, one with forward substitution then one with backward substitution. Do NOT use the built in solvers (numpy.linalg.solve())
 We will now write a function that solves a linear system

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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!