练习三
1. 设有方程组
5x1 2x2 x3 12
x1 4x2 2x3 20 2x 3x 10x 3
23 1
(1) 考察用Jacobi法,Gauss-Seidal法解此方程组的收敛性; (2) 用Jacobi法及Gauss-Seidal法解方程组,要求当x
(k 1)
x(k)
10 4时迭代终止。
521
A是强对角占优阵。
4解:(1)A 14
2 310
故用雅克比法及高斯-塞德尔法解此方程均收敛。
212
(2)x1 x2 1x3 x2 4x1 2x3 53
x3 1x1 x3
3
10
123(k 1)(k)(k 1)(k)31(k)1(k)
x x x ,x2,, 1x x 53124123
510
雅克比法:
3(k)2(k)
x1(k 1) x2 x3
(0)(0)(0)
10 4(i=1,2,3) 取初始向量x1 x2 x3 0,迭代18次有xi18 x17i
x1 3.999996,x2 2.999974,x3 2.000000
高斯-塞德尔法:
3(k)2(k)
x1(k 1) x2 x3
123(k 1)(k)(k 1)(k)31(k)1(k)
x x x ,x2, 1x x 531213
510
(0)(0)(0)
取初始向量x1 x2 x3 0,迭代8次有xi8 xi7 10 4(i=1,2,3)
x1 4.000033,x2 2.999983,x3 2.000002
2. 设有方程组
a11x1 a12x2 b1
, (a11,a12 0) ,
a21x1 a22x2 b2
1 (k)(k 1)
x (b1 a12x2)1 a11
迭代公式: , k 1,2, .
1(k)(k 1)
x2 (b2 a21x2) a22