C++ Programming
03-31-2009, 10:04 AM
solve the following system:
2x1-x2=1
-xi+2xi+1=0, i=1,2,.....,n-2.
-xn-1+2xn=1.
Using a)thomas method,
b) Jacobi method,
c) SOR scheme (use w=1 (Gauss-Seidel), w=1.1, w=1.2, w=1.3, w=1.4, w=1.5).
Use intial approximation x^(0) e=10^-6. Limit the maximum number of iteration to N=500. Display the output in the following form:
Number of iteration for convergence:?
Solution:
x1=
x2=
.
x20=
2x1-x2=1
-xi+2xi+1=0, i=1,2,.....,n-2.
-xn-1+2xn=1.
Using a)thomas method,
b) Jacobi method,
c) SOR scheme (use w=1 (Gauss-Seidel), w=1.1, w=1.2, w=1.3, w=1.4, w=1.5).
Use intial approximation x^(0) e=10^-6. Limit the maximum number of iteration to N=500. Display the output in the following form:
Number of iteration for convergence:?
Solution:
x1=
x2=
.
x20=