You are on page 1of 1

Program the Gauss-Seidel method and test it on these examples

a. 3 x + y + z = 5

x + 3y − z = 3

3 x + y − 5 z = −1

3x + y + z = 5
b 3 x + y − 5 z = −1
x + 3y − z = 3

Test convergence for the case


k +1
x − xk ≤ 10 −4

and for the case

k +1
x − xk ≤ 10 − 6
Comment on the rate of convergence of both cases.

You might also like