Question: It is possible to estimate the solution to a linear system using an iterative process known as the GaussSeidel iteration method. Consider the linear system

It is possible to estimate the solution to a linear system using an iterative process known as the GaussSeidel iteration method. Consider the linear system below:
2x+3y=5
6x-2y=-7
This can be rewritten in the form below.
y=5-2x3
x=-7+2y6
Note that the largest coefficient in each row has been used as the divisor.
Once this has been done, suitable starting estimates are chosen for x and y, often 0. The current values of x and y are then repeatedly passed into these equations to generate new values of x and y. After many iterations this often leads to a good approximation to the system.
We wish to solve the following linear system using Gauss-Seidel iteration.
4x+2y+z=10
2x-8y+3z=4
x+2y+5z=6
(a) Rearrange the first equation to give an equation for x. Similarly rearrange the second to give you an equation for y, and the third to give an equation for z.
(b) Using an initial estimate of (0,0,0), iterate this set of equations 80 times, replacing the old values of x,y and z with the new values found by using the equations from (a). In other words, you should have x, say, appearing on both sides of your assignment statement. This will use the old values of y and z to calculate your new value of x, etc. Then you calculate y using the old values of y and z, but the new value of x. When calculating z you will use the old value of z, but the new values of x and y.
(c) Make sure you use the command format long before your loop, so that we get an approximation with a high level of accuracy. After your loop finishes, substitute the values found for x,y and z into the original LHS's, so we can compare them to the required RHS values.
How to write a matlab code for it?
 It is possible to estimate the solution to a linear system

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!