Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribedimage text in transcribedPCODING 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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Seven Databases In Seven Weeks A Guide To Modern Databases And The NoSQL Movement

Authors: Eric Redmond ,Jim Wilson

1st Edition

1934356921, 978-1934356920

More Books

Students also viewed these Databases questions

Question

Explain undercosting and overcosting of products.

Answered: 1 week ago

Question

1. Traditional and modern methods of preserving food Articles ?

Answered: 1 week ago

Question

What is sociology and its nature ?

Answered: 1 week ago

Question

What is liquidation ?

Answered: 1 week ago

Question

Explain the different types of Mergers.

Answered: 1 week ago

Question

3. Define the attributions we use to explain behavior

Answered: 1 week ago