Question: This question is meant to be solved using Python. Please pay careful attention to the detailed instructions. Thank you!!! Question 1: Iterative methods (70 points)

This question is meant to be solved using Python. Please pay careful attention to the detailed instructions. Thank you!!!
Question 1: Iterative methods (70 points) (a) (40 points) Solve the following system of equations using Jacobi's method: 5x+y2z=2x4y+z=8x+10z=62 As the convergence condition, use the 2-norm x(k)x(k+1) to be less than 108. (Here, x(k) is the vector formed by [x,y,z] at the k 'th iteration. Print iteration number k,x,y, and z at each iteration step. Also generate a plot of x(k)x(k+1) vs. k. Use a red circle as the marker in your plot, and label your axes. (b) (10 points) You might realize that the plot you generated is not very useful since the norm difference becomes very small very quickly. Copy and paste your code to a new cell, and replot the same quantity as in part (a), but this time using a logarithmic y axis. (Hint: This is called a semilog plot. The only difference is that instead of pyplot.plot, you need to use pyplot.semilogy .) (c) (20 points) Repeat part (b) using Gauss-Seidel method instead of Jacobi. Comment on the speed of convergence
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
