Question: PCODING LANGUAGE IS PYTHON 4. Jacobi Iterative Method (20 pts) Produce a code to test the Jacobi iterative method to solve the system of linear

PCODING LANGUAGE IS PYTHON 4. Jacobi Iterative Method (20 pts) Produce acode to test the Jacobi iterative method to solve the system ofPCODING LANGUAGE IS PYTHON

4. Jacobi Iterative Method (20 pts) Produce a code to test the Jacobi iterative method to solve the system of linear equations, A* x = b. Use the values for A, b given in the prior problem: Start with the matrix, A, provided and then set the elements of the diagonal to be A*(i, i) = -1 || Ali, k)|| to ensure the matrix is diagonally dominant. We'll call this new matrix, A*. Note that this new system of equation is different to the one proposed initially. Compute the diagonal matrix (D), and the off-diagonal matrix (O) and set the iterative procedure, Ik+1 = D-16 (D-10) xk . Stop the iterations when the 2-norm of ||Xk+1 xk||/\|Xk+1|| is less than 10-6. (a) Print out the final values for Xk, the corresponding 2-norm of the error, and the number of iterations required. (This is for the system A*x = b) (b) Repeat this exercise with the original matrix, A, and report the number of itera- tions required. How has it changed? 6. Honors Problem (10 pts) Create a script reading the system generated in problem 4, using matrix A*, and use Gauss-Siedel to solve it. Stop the iterations when the 2-norm of ||x(k) x(k-1)|| /1|x(k)|| is less than 10-6. (a) Print out the final values for Xk, the corresponding 2-norm of the error, and the number of iterations required. (b) Compare the performance of the Gauss-Seidel method to the Jacobi method. 4. Jacobi Iterative Method (20 pts) Produce a code to test the Jacobi iterative method to solve the system of linear equations, A* x = b. Use the values for A, b given in the prior problem: Start with the matrix, A, provided and then set the elements of the diagonal to be A*(i, i) = -1 || Ali, k)|| to ensure the matrix is diagonally dominant. We'll call this new matrix, A*. Note that this new system of equation is different to the one proposed initially. Compute the diagonal matrix (D), and the off-diagonal matrix (O) and set the iterative procedure, Ik+1 = D-16 (D-10) xk . Stop the iterations when the 2-norm of ||Xk+1 xk||/\|Xk+1|| is less than 10-6. (a) Print out the final values for Xk, the corresponding 2-norm of the error, and the number of iterations required. (This is for the system A*x = b) (b) Repeat this exercise with the original matrix, A, and report the number of itera- tions required. How has it changed? 6. Honors Problem (10 pts) Create a script reading the system generated in problem 4, using matrix A*, and use Gauss-Siedel to solve it. Stop the iterations when the 2-norm of ||x(k) x(k-1)|| /1|x(k)|| is less than 10-6. (a) Print out the final values for Xk, the corresponding 2-norm of the error, and the number of iterations required. (b) Compare the performance of the Gauss-Seidel method to the Jacobi method

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!