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 quickly, given a decomposition of A with a right hand side vector Create a function this will be added to the final submitted source file
HWpy which is called solve LU that takes the following arguments as input in this order:
numpy array : the lower triangular matrix of an LU decomposition of A
numpy array : the upper triangular matrix of an LU decomposition of A
numpy array : the right hand side vector of the system
And returns the following output:
numpy array : the solution to the original system
Hints: This involves solving two simple systems, one with forward substitution then one with backward substitution. Do NOT use the built in solvers numpylinalg.solve
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
