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