Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 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 methodStep 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