Eemath 12
Eemath 12
Eemath 12
1. Find the roots of the given system equations using the Jacobi Iteration and Gauss-Seidel Method. Compare the
iteration result and roots.
5𝑥1 − 𝑥2 + 2𝑥3 = 12
3𝑥1 + 8𝑥2 − 2𝑥3 = −25
𝑥1 + 𝑥2 + 4𝑥3 = 6
10𝑥1 + 2𝑥2 − 𝑥3 = 27
−3𝑥1 − 6𝑥2 + 2𝑥3 = −61.5
𝑥1 + 𝑥2 + 5𝑥3 = −21.5
X Y Z C
A 5 -1 2 12
B 3 8 -2 -25
C 1 1 4 6
iteration x1 x2 x3
0 0 0 0
1 2.4 -3.125 1.5
2 1.175 -3.65 1.68125
3 0.9975 -3.1453125 2.11875
4 0.9234375 -2.969375 2.036953125
5 0.99134375 -2.96205078125 2.011484375
6 1.00299609375 -2.9938828125 1.9926767578125
7 1.004152734375 -3.00295434570313 1.9977216796875
8 1.00032045898437 -3.00212685546875 1.99970040283203
9 0.999694467773437 -3.00019507141113 2.00045159912109
10 0.999780346069336 -2.99977252563477 2.00012515090942
11 0.999995434509277 -2.99988634204865 1.99999804489136
12 1.00002351363373 -2.99999877671814 1.99997272688484
13 1.00001115390244 -3.00001563589144 1.9999938157711
14 0.999999346513272 -3.00000572877064 2.00000112049725
15 0.999998406046972 -2.99999947481816 2.00000159556434
16 0.999999466810631 -2.99999900337653 2.0000002671928
17 1.00000009244757 -2.99999973325579 1.99999988414147
18 1.00000009969225 -3.00000006363247 1.99999991020205
19 1.00000002319268 -3.00000005983408 1.99999999098505
20 0.999999991639162 -3.00000001095099 2.00000000916035
21 0.999999994145662 -2.9999999945746 2.00000000482796
22 0.999999999153898 -2.99999999659763 2.00000000010723
23 1.00000000063758 -2.9999999996559 1.99999999936093
24 1.00000000032445 -3.00000000039886 1.99999999975458
25 1.0000000000184 -3.00000000018302 2.0000000000186
26 0.999999999955955 -3.00000000000225 2.00000000004116
27 0.999999999983088 -2.99999999997319 2.00000000001157
28 1.00000000000073 -2.99999999999076 1.99999999999753
29 1.00000000000284 -3.00000000000089 1.99999999999751
30 1.00000000000082 -3.00000000000169 1.99999999999951
Method. Compare the
12 + 𝑥2 − 2𝑥3
𝑥1 =
5
iteration x1
0 0
1 2.7
2 0.22
3 0.517666666666667
4 0.5476
5 0.493702222222222
6 0.501046888888889
7 0.501026696296296
8 0.49986701037037
9 0.500038116691358
10 0.500022183051852
11 0.499997405131193
12 0.50000118516349
13 0.500000483006292
14 0.499999955255241
15 0.500000034093899
16 0.50000001067355
17 0.499999999410541
18 0.500000000937839
19 0.50000000024119
20 0.49999999999875
27 − 2𝑥2 + 𝑥3
𝑥1 =
10
Z C
61.5 − 3𝑥1 + 2𝑥3
-1 27 𝑥2 =
6
2 -61.5
5 -21.5 −21.5 − 𝑥1 − 𝑥2
𝑥3 =
5
x2 x3
0 0
10.25 -4.3
7.46666666666667 -6.89
7.84333333333333 -5.83733333333333
8.04538888888889 -5.9722
7.98546666666667 -6.01859777777778
7.99694962962963 -5.99583377777778
8.0008652962963 -5.9995993037037
7.99962021728395 -6.00037839851852
7.99994036197531 -5.99989744553086
8.00001512647737 -5.99999569573333
7.99999034322963 -6.00000746190584
7.99999881013246 -5.99999754967216
8.0000002241942 -5.99999999905919
7.99999975881046 -6.0000001414401
7.99999997522568 -5.99999994281314
8.00000000201534 -6.00000000186392
7.99999999404192 -6.00000000253778
7.9999999994488 -5.99999999869049
7.99999999996758 -6.00000000007733
7.99999999985363 -6.00000000004176
Gauss-Seidel Method
1. Find the roots of the given system equations using the Jacobi Iteration and Gauss-Seidel Method. Compare the
iteration result and roots.
5𝑥1 − 𝑥2 + 2𝑥3 = 12
3𝑥1 + 8𝑥2 − 2𝑥3 = −25
𝑥1 + 𝑥2 + 4𝑥3 = 6
10𝑥1 + 2𝑥2 − 𝑥3 = 27
−3𝑥1 − 6𝑥2 + 2𝑥3 = −61.5
𝑥1 + 𝑥2 + 5𝑥3 = −21.5 12 + 𝑥2
𝑥1 =
5
−25 − 3𝑥
X Y Z C 𝑥2 =
8
A 5 -1 2 12
B 3 8 -2 -25 6 − 𝑥1
𝑥3 =
C 1 1 4 6 4
iteration x1 x2 x3
0 0 0 0
1 2.4 -4.025 1.90625
2 0.8325 -2.960625 2.03203125
3 0.9950625 -2.990140625 1.99876953125
4 1.0024640625 -3.001231640625 1.99969189453125
5 0.9998769140625 -3.00003086914063 2.00003848876953
6 0.999978430664062 -2.99998228930664 2.00000096466064
7 1.00000315627441 -3.00000094243774 1.99999944654083
8 1.00000003289612 -3.00000015070084 2.00000002945118
9 0.999999958079361 -2.99999997691697 2.0000000047094
10 1.00000000273285 -2.99999999984747 1.99999999927866
11 1.00000000031904 -3.00000000029998 1.99999999999523
12 0.999999999941911 -2.99999999997941 2.00000000000937
13 1.00000000000037 -2.99999999999779 1.99999999999936
14 1.0000000000007 -3.00000000000042 1.99999999999993
15 0.999999999999943 -3 2.00000000000001
l Method. Compare the
12 + 𝑥2 − 2𝑥3
𝑥1 =
5
−25 − 3𝑥1 + 2𝑥3
𝑥2 = X Y
8
A 10 2
6 − 𝑥1 − 𝑥2 B -3 -6
𝑥3 =
4 C 1 1
iteration x1
0 0
1 2.7
2 0.258
3 0.523686666666667
4 0.497326022222222
5 0.500253429407408
6 0.499970260315802
7 0.500002685132801
8 0.499999666123976
9 0.50000002801133
10 0.499999996201918
11 0.500000000284862
12 0.499999999956006
13 0.500000000002771
14 0.499999999999478
15 0.500000000000025
Z C
-1 27
2 -61.5
5 -21.5
x2 x3
0 0
8.9 -6.62
7.91433333333333 -5.93446666666667
8.01000111111111 -6.00673755555556
7.99909113703704 -5.99928343185185
8.00011214134568 -6.00007311415062
7.99999049845856 -5.99999215175487
8.00000127351531 -6.00000079172962
7.99999990302814 -5.99999991383042
8.00000001471753 -6.00000000854577
7.99999999905045 -5.99999999905047
8.00000000017408 -6.00000000009179
7.9999999999914 -5.99999999998948
8.00000000000212 -6.00000000000098
7.99999999999994 -5.99999999999988
8.00000000000003 -6.00000000000001
Trapezoidal Rule
a b n h xi f(xi) I (integral) i
0 3 100 0.03 0 1
0.03 1.029563 0.030443 1
0.06 1.058301 0.031318 2
0.09 1.086278 0.032169 3
0.12 1.113553 0.032997 4
0.15 1.140175 0.033806 5
0.18 1.16619 0.034595 6
0.21 1.191638 0.035367 7
0.24 1.216553 0.036123 8
0.27 1.240967 0.036863 9
0.3 1.264911 0.037588 10
0.33 1.28841 0.0383 11
0.36 1.311488 0.038998 12
0.39 1.334166 0.039685 13
0.42 1.356466 0.040359 14
0.45 1.378405 0.041023 15
0.48 1.4 0.041676 16
0.51 1.421267 0.042319 17
0.54 1.442221 0.042952 18
0.57 1.462874 0.043576 19
0.6 1.48324 0.044192 20
0.63 1.50333 0.044799 21
0.66 1.523155 0.045397 22
0.69 1.542725 0.045988 23
0.72 1.56205 0.046572 24
0.75 1.581139 0.047148 25
0.78 1.6 0.047717 26
0.81 1.618641 0.04828 27
0.84 1.637071 0.048836 28
0.87 1.655295 0.049385 29
0.9 1.67332 0.049929 30
0.93 1.691153 0.050467 31
0.96 1.708801 0.050999 32
0.99 1.726268 0.051526 33
1.02 1.74356 0.052047 34
1.05 1.760682 0.052564 35
1.08 1.777639 0.053075 36
1.11 1.794436 0.053581 37
1.14 1.811077 0.054083 38
1.17 1.827567 0.05458 39
1.2 1.843909 0.055072 40
1.23 1.860108 0.05556 41
1.26 1.876166 0.056044 42
1.29 1.892089 0.056524 43
1.32 1.907878 0.057 44
1.35 1.923538 0.057471 45
1.38 1.939072 0.057939 46
1.41 1.954482 0.058403 47
1.44 1.969772 0.058864 48
1.47 1.984943 0.059321 49
1.5 2 0.059774 50
1.53 2.014944 0.060224 51
1.56 2.029778 0.060671 52
1.59 2.044505 0.061114 53
1.62 2.059126 0.061554 54
1.65 2.073644 0.061992 55
1.68 2.088061 0.062426 56
1.71 2.10238 0.062857 57
1.74 2.116601 0.063285 58
1.77 2.130728 0.06371 59
1.8 2.144761 0.064132 60
1.83 2.158703 0.064552 61
1.86 2.172556 0.064969 62
1.89 2.186321 0.065383 63
1.92 2.2 0.065795 64
1.95 2.213594 0.066204 65
1.98 2.227106 0.066611 66
2.01 2.240536 0.067015 67
2.04 2.253886 0.067416 68
2.07 2.267157 0.067816 69
2.1 2.280351 0.068213 70
2.13 2.293469 0.068607 71
2.16 2.306513 0.069 72
2.19 2.319483 0.06939 73
2.22 2.332381 0.069778 74
2.25 2.345208 0.070164 75
2.28 2.357965 0.070548 76
2.31 2.370654 0.070929 77
2.34 2.383275 0.071309 78
2.37 2.39583 0.071687 79
2.4 2.408319 0.072062 80
2.43 2.420744 0.072436 81
2.46 2.433105 0.072808 82
2.49 2.445404 0.073178 83
2.52 2.457641 0.073546 84
2.55 2.469818 0.073912 85
2.58 2.481935 0.074276 86
2.61 2.493993 0.074639 87
2.64 2.505993 0.075 88
2.67 2.517936 0.075359 89
2.7 2.529822 0.075716 90
2.73 2.541653 0.076072 91
2.76 2.553429 0.076426 92
2.79 2.565151 0.076779 93
2.82 2.57682 0.07713 94
2.85 2.588436 0.077479 95
2.88 2.6 0.077827 96
2.91 2.611513 0.078173 97
2.94 2.622975 0.078517 98
2.97 2.634388 0.07886 99
3 2.645751 0.079202 100
5.84004
1.405645
a b n h xi f(xi) I (integral) i
0 3 100 0.03 0 1
0.03 1.029563 0.061766 1
0.06 1.058301 2
0.09 1.086278 0.06517 3
0.12 1.113553 4
0.15 1.140175 0.068404 5
0.18 1.16619 6
0.21 1.191638 0.071493 7
0.24 1.216553 8
0.27 1.240967 0.074453 9
0.3 1.264911 10
0.33 1.28841 0.0773 11
0.36 1.311488 12
0.39 1.334166 0.080046 13
0.42 1.356466 14
0.45 1.378405 0.082701 15
0.48 1.4 16
0.51 1.421267 0.085273 17
0.54 1.442221 18
0.57 1.462874 0.08777 19
0.6 1.48324 20
0.63 1.50333 0.090197 21
0.66 1.523155 22
0.69 1.542725 0.092561 23
0.72 1.56205 24
0.75 1.581139 0.094866 25
0.78 1.6 26
0.81 1.618641 0.097116 27
0.84 1.637071 28
0.87 1.655295 0.099316 29
0.9 1.67332 30
0.93 1.691153 0.101467 31
0.96 1.708801 32
0.99 1.726268 0.103574 33
1.02 1.74356 34
1.05 1.760682 0.105639 35
1.08 1.777639 36
1.11 1.794436 0.107665 37
1.14 1.811077 38
1.17 1.827567 0.109653 39
1.2 1.843909 40
1.23 1.860108 0.111605 41
1.26 1.876166 42
1.29 1.892089 0.113524 43
1.32 1.907878 44
1.35 1.923538 0.115411 45
1.38 1.939072 46
1.41 1.954482 0.117268 47
1.44 1.969772 48
1.47 1.984943 0.119095 49
1.5 2 50
1.53 2.014944 0.120896 51
1.56 2.029778 52
1.59 2.044505 0.122669 53
1.62 2.059126 54
1.65 2.073644 0.124418 55
1.68 2.088061 56
1.71 2.10238 0.126142 57
1.74 2.116601 58
1.77 2.130728 0.127843 59
1.8 2.144761 60
1.83 2.158703 0.129521 61
1.86 2.172556 62
1.89 2.186321 0.131178 63
1.92 2.2 64
1.95 2.213594 0.132815 65
1.98 2.227106 66
2.01 2.240536 0.134431 67
2.04 2.253886 68
2.07 2.267157 0.136029 69
2.1 2.280351 70
2.13 2.293469 0.137607 71
2.16 2.306513 72
2.19 2.319483 0.139168 73
2.22 2.332381 74
2.25 2.345208 0.140712 75
2.28 2.357965 76
2.31 2.370654 0.142239 77
2.34 2.383275 78
2.37 2.39583 0.143749 79
2.4 2.408319 80
2.43 2.420744 0.145244 81
2.46 2.433105 82
2.49 2.445404 0.146724 83
2.52 2.457641 84
2.55 2.469818 0.148188 85
2.58 2.481935 86
2.61 2.493993 0.149639 87
2.64 2.505993 88
2.67 2.517936 0.151076 89
2.7 2.529822 90
2.73 2.541653 0.152499 91
2.76 2.553429 92
2.79 2.565151 0.153909 93
2.82 2.57682 94
2.85 2.588436 0.155306 95
2.88 2.6 96
2.91 2.611513 0.15669 97
2.94 2.622975 98
2.97 2.634388 0.158063 99
3 2.645751 100
5.840086
1.405648