数値解析 ヤコビ法・ガウス-ザイデル法実行例
連立一次方程式 A x = b の反復解法 収束しない例 A : 1.0000000 3.0000000 3.0000000 -2.0000000 b : 4.0000000 1.0000000 ----- Jacobi 法 ----- 0-th step : 0.0000000 0.0000000 1-th step : 4.0000000 -0.5000000 2-th step : 5.5000000 5.5000000 3-th step : -12.5000000 7.7500000 4-th step : -19.2500000 -19.2500000 5-th step : 61.7500000 -29.3750000 6-th step : 92.1250000 92.1250000 7-th step : -272.3750000 137.6875000 8-th step : -409.0625000 -409.0625000 9-th step : 1231.1875000 -614.0937500 10-th step : 1846.2812500 1846.2812500 11-th step : -5534.8437500 2768.9218750 12-th step : -8302.7656250 -8302.7656250 13-th step : 24912.2968750 -12454.6484375 14-th step : 37367.9453125 37367.9453125 15-th step : -112099.8359375 56051.4179688 16-th step : -168150.2539062 -168150.2539062 17-th step : 504454.7617188 -252225.8808594 18-th step : 756681.6425781 756681.6425781 19-th step : -2270040.9277344 1135021.9638672 20-th step : -3405061.8916016 -3405061.8916016 (以下省略) ----- Gauss-Seidel 法 ----- 0-th step : 0.0000000 0.0000000 1-th step : 4.0000000 5.5000000 2-th step : -12.5000000 -19.2500000 3-th step : 61.7500000 92.1250000 4-th step : -272.3750000 -409.0625000 5-th step : 1231.1875000 1846.2812500 6-th step : -5534.8437500 -8302.7656250 7-th step : 24912.2968750 37367.9453125 8-th step : -112099.8359375 -168150.2539062 9-th step : 504454.7617188 756681.6425781 10-th step : -2270040.9277344 -3405061.8916016 11-th step : 10215189.6748047 15322784.0122070 12-th step : -45968348.0366211 -68952522.5549316 13-th step : 206857571.6647949 310286356.9971924 14-th step : -930859066.9915771 -1396288600.9873657 15-th step : 4188865806.9620972 6283298709.9431458 16-th step : -18849896125.8294373 -28274844189.2441559 17-th step : 84824532571.7324677 127236798857.0986938 18-th step : -381710396567.2960815 -572565594851.4440918 19-th step : 1717696784558.3322754 2576545176836.9985352 20-th step : -7729635530506.9960938 -11594453295760.9941406 (以下省略)