Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write a program to solve a linear system Ax = b using Gaussian Elimination with scaled partial pivoting and backsubstitution. You can just type in
Write a program to solve a linear system Ax = b using Gaussian Elimination with scaled partial pivoting and backsubstitution. You can just type in the system matrices at the beginning of the file. Store the matrices as numpy arrays. Recall that scaled partial pivoting works like this. Suppose the matrix we're work on is an n times n matrix W. (Leaving b out of the question.) Suppose we're working on column i of W, so we want to zero out the elements below position W_ii. First, for each row j with i lessthanorequalto j lessthanorequalto n find the maximum absolute value of the element in or to the right of column i, call it d(j). In other words, d(j) = max{|W_jk|| k = i...n}. Then find j in the range j =i..., n that maximizes the quantity |W_jj|/d(j) Now switch rows i and j. Proceed to zero out the elements in the rows below the diagonal in column
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started