中图 科亨技术大学数学系 University of Science and Technology of China DEPARTMENT OF MATHEMATICS Jacobii迭代算法 1、输入系数矩阵A和向量b,和误差控制eps 2、X1={0,0,0},2={1,1,1}1/赋初值 3.while(x1-x2ll>eps){ X1=X2: for(i=0;i<n;i++){ x2[0=0; for(j=0;j<i;j++){ x2[0+=A[]0]*x10] } for(j=i+1;j<n;j++){ 2[0+=A[]]*x1[] x2[0=-(x2[-b[)MA0 4、输出解x2
数 学 系 University of Science and Technology of China DEPARTMENT OF MATHEMATICS Jacobi迭代算法 1、输入系数矩阵A和向量b,和误差控制eps 2、x1={0,0,.,0} , x2={1,1,.,1} //赋初值 3、while( ||x1-x2||>eps) { x1=x2; for(i=0;i<n;i++) { x2[i]=0; for(j=0;j<i;j++) { x2[i] += A[i][j]*x1[j] } for(j=i+1;j<n;j++) { x2[i] += A[i][j]*x1[j] } x2[i]=-(x2[i]-b[i])/A[i][i] } } 4、输出解x2
中图科亨技术大学数学系 University of Science and Technology of China DEPARTMENT OF MATHEMATICS ●迭代矩阵 记A=D-L-U a D 0 0 (0-412 d21 0 U= 0 0 0n-ln 一anm-l 0 0 0
数 学 系 University of Science and Technology of China DEPARTMENT OF MATHEMATICS ⚫ 迭代矩阵 记 A= D− L−U = ann a D 0 11 0 − − − = − 0 0 0 0 0 1 1 2 1 an an n a L − − − = − 0 0 0 0 0 1 1 2 1 n n n a a a U
中固科营技术大学数学系 University of Science and Technology of China DEPARTMENT OF MATHEMATICS 易知,Jacobii迭代有 (D-L-U)x=b Dx=(L+U)x+b x=D(L+U)x+D-b .G=D (L+U)=1-D-A,8=D-b
数 学 系 University of Science and Technology of China DEPARTMENT OF MATHEMATICS 易知,Jacobi迭代有 (D − L −U)x = b Dx = (L +U)x + b x D L U x D b 1 1 ( ) − − = + + G D L U I D A g D b 1 1 1 ( ) , − − − = + = − =
中图科亨技术大学数学系 University of Science and Technology of China DEPARTMENT OF MATHEMATICS 收敛条件 迭代格式收敛的充要条件是G的谱半径<1。对于 Jacob迭代,我们有一些保证收敛的充分条件 定理:若A满足下列条件之一,则Jacob迭代收敛。 ①A为行对角占优阵la>∑a ② A为列对角占优阵口,小∑a ③A满足
数 学 系 University of Science and Technology of China DEPARTMENT OF MATHEMATICS ⚫ 收敛条件 迭代格式收敛的充要条件是G的谱半径<1。对于 Jacobi迭代,我们有一些保证收敛的充分条件 定理:若A满足下列条件之一,则Jacobi迭代收敛。 ① A为行对角占优阵 ② A为列对角占优阵 ③ A满足 j i aii aij i j ajj aij 1 i j ii ij a a
中图科亨技术大学数学系 University of Science and Technology of China DEPARTMENT OF MATHEMATICS 证明:G=D(L+U) lGl。=max 2、 l台∑la<laa lG,=max∑ <1 ②A为列对角占优阵,则AT为行对角占优阵,有 p(I-D-A)<1 ∴.p(I-DA)=p(I-DA)<1 #证毕
数 学 系 University of Science and Technology of China DEPARTMENT OF MATHEMATICS 证明: ( ) 1 G = D L +U − i i j i i j j i i i i j i a a a a G = max 1 max 1 1 = i j ii ij i a a G ② A为列对角占优阵,则A T为行对角占优阵,有 ( ) 1 1 − − T I D A ( ) ( ) 1 1 1 − = − − − T I D A I D A #证毕