Question

In: Advanced Math

A) Use Jacobi or Gauss-Seidel iteration and perform three iterations by hand. B) Use Jacobi or...

A) Use Jacobi or Gauss-Seidel iteration and perform three iterations by hand.

B) Use Jacobi or Gauss-Siedel iteration for ten iterations with a MAT-LAB function.

* A= [5, -1,0;-1,5,-1;0,-1,5] , B=[9;4;-6]

Solutions

Expert Solution

Code

A=[5 -1 0;-1 5 -1;0 -1 5];
b=[9;4;-6];
x=[0;0;0];
format long

for k=1:10
   disp('iteration')
   disp(k)
for i=1:3
        sum=0;
        sum=sum+b(i);
    for j=1:3
        if i==j
            sum=sum;
        else
            sum=sum-A(i,j)*x(j);
        end
       
    end
    sum=(1/A(i,i))*sum;
    x(i)=sum;
  
    end
    x
end

Output


Related Solutions

A) Use Jacobi or Gauss-Seidel iteration and perform three iterations by hand. B) Use Jacobi or...
A) Use Jacobi or Gauss-Seidel iteration and perform three iterations by hand. B) Use Jacobi or Gauss-Siedel iteration for ten iterations with a MAT-LAB function. * A= [10 -2 1;-2 10 -2;-2 -5 10] , B=[9;12;18]
Find the solution to the given linear systems by Jacobi and Gauss Seidel iteration methods.          ...
Find the solution to the given linear systems by Jacobi and Gauss Seidel iteration methods.           2x + 5y = 16                      20x + y – 2z = 17            5x – y +2z = 12           3x + y = 11                        3x +20y – z = -18           3x +8y -2z = -25                                                       2x – 3y +20z = 25            x + y +4z = 6 2. Solve the equation Ax = b by using the LU decomposition method given the following...
The Gauss-Seidel method as an iterative technique often refers to an improved version of the Jacobi...
The Gauss-Seidel method as an iterative technique often refers to an improved version of the Jacobi method, since the Gauss-Seidel method generally achieves a faster convergence. Describe the difference between the Gauss-Seidel and Jacobi methods.
QUESTION: USING MATLAB, Carry out three iterations of the Gauss-Seidel method, starting from the initial vector...
QUESTION: USING MATLAB, Carry out three iterations of the Gauss-Seidel method, starting from the initial vector Use the  ,  and  norm to calculate the residual error after each iteration, until all errors are below 0.0001. [Use 5 decimal place accuracy in you calculations]
How do the Gauss-Seidel, Newton-Raphson, and Fast-Decoupled-Newton-Raphson iteration methods differ from task layout, iteration terminations, and...
How do the Gauss-Seidel, Newton-Raphson, and Fast-Decoupled-Newton-Raphson iteration methods differ from task layout, iteration terminations, and from the point of convergence? What does the Gauss-Seidel method acceleration factor means, how does it affect the calculation?
Use the Gauss-Seidel method (a) without relaxation and (b) with relaxation (l 5 0.95) to solve...
Use the Gauss-Seidel method (a) without relaxation and (b) with relaxation (l 5 0.95) to solve the following system to a tolerance of es 5 5%. If necessary, rearrange the equations to achieve convergence. 23x1 1 x2 1 12x3 5 50 6x1 2 x2 2 x3 5 3 6x1 1 9x2 1 x3 5 40
Use ten iterations of the appropriate MATLAB function, with x^(0)=[0,...,0]', to solve Ax=b (approximately). A)use Jacobi...
Use ten iterations of the appropriate MATLAB function, with x^(0)=[0,...,0]', to solve Ax=b (approximately). A)use Jacobi iteration. B) use Gauss-siedel iteration. 1) make sure to use SOR with w=1.25, w=1.5, w=1.75,w=1.9, and optimal value if given. * A=[1,-2,0,0;-2,5,-1,0;0,-1,2,-0.5;0,0,-0.5,1.25]] , B=[-3;5;2;3.5]. , (optimal w is 1.5431.)
design a program that solves matrices by the method of gauss-seidel use the object-oriented language c...
design a program that solves matrices by the method of gauss-seidel use the object-oriented language c ++
% Solves Ax = b by Gauss-Seidel method with relaxation. % USAGE: [x,numIter,omega] = gaussSeidel(func,x,maxIter,epsilon) %...
% Solves Ax = b by Gauss-Seidel method with relaxation. % USAGE: [x,numIter,omega] = gaussSeidel(func,x,maxIter,epsilon) % INPUT: % func = handle of function that returns improved x using % x = starting solution vector % maxIter = allowable number of iterations (default is 500) % epsilon = error tolerance (default is 1.0e-9) % OUTPUT: % x = solution vector % numIter = number of iterations carried out % omega = computed relaxation factor if nargin < 4; epsilon = 1.0e-9;...
Use ten iterations of the appropriate MATLAB function, with x^(0)=[0,...,0]', to solve Ax=b (approximately). B) use...
Use ten iterations of the appropriate MATLAB function, with x^(0)=[0,...,0]', to solve Ax=b (approximately). B) use Gauss-siedel iteration. C)use SOR with w=1.25, w=1.5, w=1.75,w=1.9, and optimal value if given. * A=[4,8,0,0;8,18,2,0;0,2,5,1.5;0,0,1.5,1.75] , B=[8;18;0.5;-1.75]. , (optimal w is 1.634.)
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT