Question

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

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]

0 0
Add a comment Improve this question Transcribed image text
Answer #1

unalim 6+116 ly 1.LG -0.96&

- 96 1. 12 6 + 5 6 50

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

>gaussseiedel iteration 1.800000000000000 1.160000000000000 0.968000000000000 iteration 2 2.032000000000000 1.012800000000000

iteration 2.000001310720000 1.000000524288000 0.999999895142400 iteration 2.000000104857600 1.000000041943040 0.9999999916113

Add a comment
Know the answer?
Add Answer to:
A) Use Jacobi or Gauss-Seidel iteration and perform three iterations by hand. B) Use Jacobi or Ga...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • 2. 3x 25」LX2 (a) Perform three iterations for the following iterative methods using initial guess x0. Compute relative residual for each iteration. (You can use a calculator) · Jacobi method » Gauss...

    2. 3x 25」LX2 (a) Perform three iterations for the following iterative methods using initial guess x0. Compute relative residual for each iteration. (You can use a calculator) · Jacobi method » Gauss-Seidel method · SOR method with ω 1.2 (b) For each iterative method, express its iteration procedure in the following matrix form: In other words, determine B and c for (2). 2. 3x 25」LX2 (a) Perform three iterations for the following iterative methods using initial guess x0. Compute relative...

  • Problem 3. Find the first two iterations of both the Jacobi and the Gauss-Seidel methods for the ...

    Problem 3. Find the first two iterations of both the Jacobi and the Gauss-Seidel methods for the following linear systems, using X 0. a. b. 1011-22-9 Problem 3. Find the first two iterations of both the Jacobi and the Gauss-Seidel methods for the following linear systems, using X 0. a. b. 1011-22-9

  • Problem 2 [25 points] (Coding, pen and paper) Write the code to perform Jacobi and Gauss- Seidel ...

    Problem 2 [25 points] (Coding, pen and paper) Write the code to perform Jacobi and Gauss- Seidel methods for solving the linear systern in Problem i. Using rk 2 < 10-6 as the stopping criteria for both methods. Print out the residual norm rkl2 for all iterations and the final solution. Problem 2 [25 points] (Coding, pen and paper) Write the code to perform Jacobi and Gauss- Seidel methods for solving the linear systern in Problem i. Using rk 2

  • [-230; -1-2 3; 01-21 *X [160 -40 -160]AT Compute vector X using the following methods a) Jacobi m...

    [-230; -1-2 3; 01-21 *X [160 -40 -160]AT Compute vector X using the following methods a) Jacobi method; up to 12 iterations b) Forward Gauss Seidel method; up to 12 iterations c) Symmetric Gauss Seidel method; up to 12 iterations (6 forward and 6 backward iterations) You can use MATLAB to report the final results. However, it is required to calculate at least 3 iterations by hand. You are also expected to compute the spectral radius of the decisive matrix...

  • Question 1 (10 marks) For a linear system Ax b with 1 0-1 A-1 2-1 2-13 and b4 18 compute by hand ...

    Question 1 (10 marks) For a linear system Ax b with 1 0-1 A-1 2-1 2-13 and b4 18 compute by hand the first four iterations with the Jacobi method, usg0 Hint: for the ease of calculation, keep to rational fractions rather than decimals. (10 marks) Question 2 For the same linear svstem as in Question 1. compute by hand the first three iterations with the Gauss Seidel method, us0 Hint: for the ease of calculation, keep to rational fractions...

  • Question 1 (10 marks) For a linear system Ax- b with 1 0 -1 A-1 2-1 2 -1 3 b=14 18 and compute by...

    Please do question 5 for me. Thanks Question 1 (10 marks) For a linear system Ax- b with 1 0 -1 A-1 2-1 2 -1 3 b=14 18 and compute by hand the first four iterations with the Jacobi method, using x()0 Hint: for the ease of calculation, keep to rational fractions rather than decimals Question 2 For the same linear system as in Question 1, compute by hand the first three iterations (10 marks) with the Gauss Seidel method,...

  • just 1,2,4 Problem 1 Consider the linear system of equations Ax = b, where x €...

    just 1,2,4 Problem 1 Consider the linear system of equations Ax = b, where x € R4X1, and A= 120 b = and h= 0.1. [2+d -1 0 0 1 1 -1 2+d -1 0 h2 0 -1 2 + 1 Lo 0 -1 2+d] 1. Is the above matrix diagonally dominant? Why 2. Use hand calculations to solve the linear system Ax = b with d=1 with the following methods: (a) Gaussian elimination. (b) LU decomposition. Use MATLAB (L,...

  • Solve b and c only a) i. A numcrical scheme is known to perform best if...

    Solve b and c only a) i. A numcrical scheme is known to perform best if the height of the uniform subinterval is small enough in the interval (0.2]. The equation that gives the height h of the uniform subinterval is given by f(h) = 3 +h-1=0 Use the fixed point method of finding roots of equations to find the height h for which the scheme performs best. Conduct only four (4) iterations. 6 Marks ii. find algebraically all the...

  • Question 1: A single line diagram of a three-bus power system is shown in Fig 1....

    Question 1: A single line diagram of a three-bus power system is shown in Fig 1. Bus 1 is the slack bus with a voltage of 1.020 per unit, bus 2 is a voltage-controlled bus (PV-bus) with a voltage magnitude of 1.05 pu and real generated power of 1 00 MWand the reactive power in the range Q.(20MVAR) < Q<Q-60M¥AR .BUS 3 is PQ bus with P 300 MW and Q= 200 Mvar. Take 100 MVÅ susceptance are neglected as...

  • using python with only using import math and copy no other powerful functions. Write a function...

    using python with only using import math and copy no other powerful functions. Write a function defined as: def GaussSeidel(Aaug, x, Niter = 15): Purpose: use the Gauss-Seidel method to estimate the solution to a set of N linear equations expressed in matrix form as Ax = b. Both A and b are contained in the function argument – Aaug. Aaug: an augmented matrix containing [A | b ] having N rows and N+1 columns, where N is the number...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT