Jacobi, Gauss-Seidel, SOR question

  • Thread starter XodoX
  • Start date
  • Tags
    Jacobi
In summary, the task is to evaluate the number of iterations needed for 10^-9 precision using the Jacobi, Gauss-Seidel, and SOR methods with ω=1.5. This will be done for different values of n (3≤n≤20) by calculating the error using the formula ||x^(k) - x^*|| <= (||B||/||A||)^k * ||x^(0) - x^*|| and plotting the convergence curves for each method. The n in this case refers to the size of the matrix A.
  • #1
XodoX
203
0

Homework Statement


Evaluate the number of iterations that are needed to have 10^-9 precision with the Jacobi, Gauss-Seidel, and SOR ( with ω=1.5) methods. Compare these 3 methods for different values of n - for instance 3≤n≤20. Plot the convergence curves for the 3 methods for each n.

Homework Equations


Just the regular formulas for each, I guess.

http://en.wikipedia.org/wiki/Jacobi_method etc.

The Attempt at a Solution



No idea how to do it. Let's start with Jacobi. What is exactly the n here and where do I plug it in? I don't understand it. I guess you just plug in the 3≤n≤20, calculate the result and then plot the curve. For Jacobi, is the Matrix A the n in this case?
Help is very much appreciated!
 
Physics news on Phys.org
  • #2


Hello,

Great question! The n in this case refers to the size of the matrix A. So for n=3, the matrix A would be a 3x3 matrix, for n=4 it would be a 4x4 matrix, and so on.

To evaluate the number of iterations needed for 10^-9 precision, you can use the formula for the error in the Jacobi method, which is given by ||x^(k) - x^*|| <= (||B||/||A||)^k * ||x^(0) - x^*||, where x^(k) is the approximation at the k-th iteration, x^* is the exact solution, ||B|| is the norm of the matrix B (which is the diagonal elements of A), ||A|| is the norm of A, and ||x^(0) - x^*|| is the initial error.

You can use this formula to calculate the number of iterations needed for different values of n and compare it for the different methods (Jacobi, Gauss-Seidel, and SOR with ω=1.5). You can also plot the convergence curves for each method by plotting the error (||x^(k) - x^*||) against the number of iterations k.

I hope this helps! Let me know if you have any further questions. Good luck!
 

1. What is the difference between Jacobi, Gauss-Seidel, and SOR methods?

Jacobi, Gauss-Seidel, and SOR (Successive Over-Relaxation) are three different iterative methods used to solve linear systems of equations. Jacobi method updates all variables simultaneously, while Gauss-Seidel updates each variable as soon as a new value is available. SOR is a variation of Gauss-Seidel that introduces a relaxation parameter to speed up convergence.

2. Which method is the most efficient for solving linear systems?

The efficiency of Jacobi, Gauss-Seidel, and SOR methods depends on the specific system being solved. In general, the Gauss-Seidel method tends to converge faster than Jacobi, while SOR can converge even faster if the relaxation parameter is chosen correctly.

3. How do you choose the relaxation parameter in SOR method?

The optimal relaxation parameter for SOR method can be found experimentally by trying different values and choosing the one that results in the fastest convergence. Alternatively, there are some theoretical guidelines for choosing the relaxation parameter based on the spectral radius of the coefficient matrix.

4. Can Jacobi, Gauss-Seidel, and SOR methods be used for solving non-linear systems?

No, these methods are designed specifically for linear systems of equations. For non-linear systems, other iterative methods such as Newton's method or fixed-point iteration can be used.

5. Do Jacobi, Gauss-Seidel, and SOR methods always converge to a solution?

No, these methods may not converge for certain systems, especially if the coefficient matrix is ill-conditioned. In such cases, other methods or techniques such as preconditioning may be needed to obtain a solution.

Similar threads

  • Calculus and Beyond Homework Help
Replies
8
Views
1K
  • Linear and Abstract Algebra
Replies
1
Views
930
  • Calculus and Beyond Homework Help
Replies
2
Views
2K
  • Calculus and Beyond Homework Help
Replies
1
Views
2K
  • Programming and Computer Science
Replies
1
Views
2K
  • Calculus and Beyond Homework Help
Replies
2
Views
3K
  • Electrical Engineering
Replies
3
Views
2K
  • Calculus and Beyond Homework Help
Replies
1
Views
3K
Replies
7
Views
1K
Back
Top