Answered step by step
Verified Expert Solution
Link Copied!

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)

image text in transcribed

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

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

Database Security

Authors: Alfred Basta, Melissa Zgola

1st Edition

1435453905, 978-1435453906

More Books

Students also viewed these Databases questions

Question

How many Tables Will Base HCMSs typically have? Why?

Answered: 1 week ago

Question

What is the process of normalization?

Answered: 1 week ago