第三章数值计算方法答案
一、解:(1) Jacobi迭代法
?10x1?2x2?x3?3???2x1?10x2?x3?15 ??x?2x?5x?1023?1(k)(k)?x1(k?1)?0.2x2?0.1x3?0.3?(k?1)(k)(k)?x2?0.2x1?0.1x3?1.5 ?(k?1)(k)(k)x?0.2x?0.4x12?2?3取x(0)?(0,0,0)T 代入上式得
(1)(1)x1(1)?0.3x2?1.5x3?2
x12?0.2?1.5?0.1?2?0.3?0.82x2?0.2?0.3?0.1?2?1.5?1.76 2x3?0.2?0.3?0.4?1.5?2?2.66k x1(k) (k) x2(k) x30 1 2 3 4 5 6 7 0 0.3 0.8 0.918 0.9716 0.9894 0.9962 0.9986 0 1.5 1.76 1.926 1.97 1.9897 1.9961 1.9986 0 2 2.66 2.864 2.954 2.9823 2.9938 2.9977 8 9 0.9995 0.9998 1.9995 1.9998 2.9992 2.9997 与精确解x?(1,2,3)T比较,误差为x?x(9)Gauss-Seidel迭代法
k x1(k) ?1?0.0003??10?3
2(k) x2(k) x30 1 2 3 4 5 0 0.3 0.8804 0.9843 0.9978 0.9997 0 1.56 1.9445 1.9922 1.9989 1.9998 0 2.684 2.9539 2.9938 2.9991 2.9999 与精确解x?(1,2,3)T比较,误差为x?x(5)(2) Jacobi迭代法
?8x1?3x2+2x3?20??4x1?11x2?x3?33 ?2x+x?4x?123?12(k)?(k?1)3x21(k)5x??x3??1842?4(k)1(k)?(k?1)?x2??x1?x3?3
1111?1(k)1(k)?(k?1)x??x1?x2?3?324??1?0.0003??10?3
2取x(0)?(0,0,0)T 代入上式得
x1(1)?5(1)(1)x2?3x3?3 2335x12??3???2.8758424512x2?????3?3?2.3636
112111512x3?????3?3?1224k x1(k) (k) x2(k) x30 1 2 3 4 5 6 7 8 0 2.875 3.1364 3.0242 3.0003 2.9938 2.9990 3.0002 3.0003 0 2.3636 2.0455 1.9478 1.9840 2.0000 2.0026 2.0006 1.9999 0 1 0.9716 0.9204 1.0010 1.0039 1.0031 0.9998 0.9998 与精确解x?(3,2,1)T比较,误差为x?x(8)Gauss-Seidel迭代法
k x1(k) ?1?0.0003??10?3
2(k) x2(k) x30 1 2 3 4 0 2.5 2.9973 3.0098 2.9998 0 2.0909 2.0289 1.9968 1.9997 0 1.2273 1.0041 0.9959 1.0002