You are on page 1of 7

CAUAN, JHOANIE MARIE P.

201517338

BSECE 4 – 1 NUMERICAL METHODS

MIDTERM EXAM

Using n = 8:

Given: 2x + y – z = 1 3x – y + z = 4 8x – 3y + z = 3

z = 2x + y – 1

4+y−z
x=
3

−3 + 8y + z
y=
3

GAUSS-SEIDEL METHOD

n x y z
1 0 0 0
2 1.33333 -1.00000 -1.00000
3 1.33333 2.22222 0.66667
4 1.85185 2.77778 3.88889
5 0.96296 5.23457 5.48148
6 1.25103 3.39506 6.16049
7 0.41152 4.38957 4.89712
8 1.16415 1.72977 4.21262
9 0.50572 3.50861 3.05807
10 1.48351 1.36793 3.52004
11 0.61596 4.12938 3.33496
12 1.59814 1.75422 4.36131
13 0.46430 4.71548 3.95050
14 1.58833 1.55498 4.64409
15 0.30363 4.78356 3.73163
16 1.68398 1.05356 4.39082
17 0.22091 4.95422 3.42151
18 1.84423 0.72960 4.39604
19 0.11119 5.38331 3.41807
20 1.98841 0.43585 4.60568
21 -0.05661 5.83766 3.41268
22 2.14166 -0.01340 4.72444
23 -0.24595 6.28591 3.26992
24 2.33866 -0.56588 4.79402
25 -0.45330 6.83443 3.11144
26 2.57433 -1.17165 4.92784
27 -0.69983 7.50750 2.97701
28 2.84349 -1.87387 5.10784
29 -0.99390 8.28526 2.81312
30 3.15738 -2.71270 5.29746
31 -1.33672 9.18551 2.60206
32 3.52782 -3.69723 5.51207
33 -1.73643 10.24486 2.35840
34 3.96216 -4.84436 5.77200
35 -2.20545 11.48975 2.07995
36 4.46993 -6.18788 6.07884
37 -2.75558 12.94610 1.75198
38 5.06471 -7.76421 6.43494
39 -3.39972 14.65087 1.36520
40 5.76189 -9.61085 6.85143

It does not show the right answer of roots even though there are many number of iterations.
Also, as the number of iterations increases, the values also increase and get far to the right answers
(x = 1, y = 3, z = 4). Lastly, even the order/position of equations changes into 6 different
combinations, still the right roots cannot be find using this method. Therefore, Gauss-Seidel
Method is not applicable in this problem.
GAUSS-JACOBI METHOD

n x y z
1 0.00000 0.00000 0.00000
2 1.33333 2.55556 4.22222
3 0.77778 2.48148 3.03704
4 1.14815 3.07407 4.37037
5 0.90123 2.86008 3.66255
6 1.06584 3.06310 4.19479
7 0.95610 2.94787 3.86008
8 1.02926 3.03140 4.08993
9 0.98049 2.97795 3.93893
10 1.01301 3.01433 4.04034
11 0.99133 2.99032 3.97298
12 1.00578 3.00641 4.01797
13 0.99615 2.99571 3.98801
14 1.00257 3.00285 4.00799
15 0.99829 2.99810 3.99467
16 1.00114 3.00127 4.00355
17 0.99924 2.99915 3.99763
18 1.00051 3.00056 4.00158
19 0.99966 2.99962 3.99895
20 1.00023 3.00025 4.00070
21 0.99985 2.99983 3.99953
22 1.00010 3.00011 4.00031
23 0.99993 2.99993 3.99979
24 1.00004 3.00005 4.00014
25 0.99997 2.99997 3.99991
26 1.00002 3.00002 4.00006
27 0.99999 2.99999 3.99996
28 1.00001 3.00001 4.00003
29 0.99999 2.99999 3.99998
30 1.00000 3.00000 4.00001
31 1.00000 3.00000 3.99999
32 1.00000 3.00000 4.00001
33 1.00000 3.00000 4.00000
34 1.00000 3.00000 4.00000
35 1.00000 3.00000 4.00000
36 1.00000 3.00000 4.00000

Answers:

x=1

y=3

z=4
NEWTON-RAPHSON METHOD

When n = 8:

2xy + 4y2 = 8

5xy2 – 8x2y = 3

Estimation of Results Delta Jacobian F(x,y)


x1 1 -0.4912 2 10 2
y1 1 0.29825 -11 2 6
x2 0.5088 0.85519 2.5965 11.404 -0.0628
y2 1.2982 -0.2002 -2.14097 4.534318 -2.73881
x3 1.364 -0.7415 2.196 11.512 0.1821
y3 1.098 0.15727 -17.9342 0.093471 13.31367
x4 0.6224 0.18418 2.5106 11.287 0.13431
y4 1.2553 -0.0291 -4.62226 4.713944 -0.98837
x5 0.8066 -0.1998 2.4525 11.423 0.00733
y5 1.2262 0.04355 -8.30707 4.685908 1.864175
x6 0.6068 0.24885 2.5395 11.372 0.00982
y6 1.2698 -0.0547 -4.2655 4.759205 -1.32183
x7 0.8556 -0.267 2.4301 11.432 0.01526
y7 1.2151 0.05809 -9.25193 4.539664 2.734093
x8 0.5886 0.32028 2.5463 11.362 0.01752
y8 1.2732 -0.0702 -3.88532 4.722191 -1.57605
x9 0.9089 -0.3318 2.4059 11.441 0.02526
y9 1.2029 0.07197 -10.2578 4.324662 3.714305
x10 0.5771 0.37045 2.5498 11.353 0.02703
y10 1.2749 -0.0808 -3.64553 4.693139 -1.72976
x11 0.9476 -0.3748 2.3882 11.448 0.03375
y11 1.1941 0.08113 -10.9744 4.131628 4.448069
x12 0.5728 0.39015 2.5504 11.347 0.03448
y12 1.2752 -0.0847 -3.55628 4.679606 -1.78361
x13 0.9629 -0.3911 2.3811 11.45 0.03739
y13 1.1906 0.0846 -11.256 4.0463 4.744624
x14 0.5718 0.39445 2.5503 11.345 0.03755
y14 1.2752 -0.0854 -3.53688 4.675843 -1.79427
x15 0.9663 -0.3946 2.3796 11.451 0.0382
y15 1.1898 0.08534 -11.317 4.027104 4.809462
x16 0.5717 0.39514 2.5503 11.344 0.03822
y16 1.2751 -0.0855 -3.53375 4.675138 -1.79587
x17 0.9668 -0.3952 2.3793 11.451 0.03832
y17 1.1897 0.08546 -11.3267 4.024033 4.819778
x18 0.5717 0.39524 2.5503 11.344 0.03833
y18 1.2751 -0.0855 -3.53329 4.67503 -1.7961
x19 0.9669 -0.3952 2.3793 11.451 0.03834
y19 1.1897 0.08547 -11.3281 4.023581 4.821295
x20 0.5717 0.39526 2.5503 11.344 0.03834
y20 1.2751 -0.0855 -3.53322 4.675014 -1.79613
x21 0.9669 -0.3953 2.3793 11.451 0.03835
y21 1.1897 0.08548 -11.3283 4.023515 4.821515
x22 0.5717 0.39526 2.5503 11.344 0.03835
y22 1.2751 -0.0855 -3.53321 4.675011 -1.79614

This challenging problem was computed manually and in excel to check if both are the
same. I also edited the excel file of my classmates and changed the given to n = 8, just to check if
I am wrong. But still, the iterations are the same. It can’t reach to delta = 0. The answers cannot
be presented using this method. In the last parts of iteration, the values are just repeating.
Therefore, Newton-Raphson Method is not applicable in this problem.

You might also like