Newton Secany
Newton Secany
Newton Secany
1.2
0.8
0.6
0.4
0.2
0
1
1. f(x) = 〖 4𝑥 〗 ^3−15𝑥2+17x−6
2. f(x) = e-xx
3. f(x) = 3ex-4cos(x)
Newton-Raphson Method
x 0 1 2 3
f(x) -6 0 0 18
f'(x)=12x2−30𝑥+17
n x0 f(x0) f'(x0) x1
0 1.50000 -0.75000 -1.00000 0.75000
1 0.75000 0.00000 23.75000 0.75000
2 0.75000 0.00000 23.75000 0.75000
3 0.75000 0.00000 23.75000 0.75000
4 0.75000 0.00000 23.75000 0.75000
5 0.75000 0.00000 23.75000 0.75000
f(x) = e-xx x -1 0 1 2 3
f'(x)= -xe +e
-x -x
f(x) -2.718282 0 0.367879 0.270671 0.149361
n x0 f(x0) f'(x0) x1
0 -0.50000 -0.82436 2.47308 -0.16667
1 -0.16667 -0.19689 1.37825 -0.02381
2 -0.02381 -0.02438 1.04848 -0.00055
3 -0.00055 -0.00055 1.00111 0.00000
4 0.00000 0.00000 1.00000 0.00000
5 0.00000 0.00000 1.00000 0.00000
f(x) = 3ex-4cos(x) x 0 1 2 3
f'(x)= 3ex+4sinx f(x) -1 6 24 64
n x0 f(x0) f'(x0) x1
0 0.50000 1.43583 6.86387 0.29081
1 0.29081 0.18050 5.15947 0.25583
2 0.25583 0.00478 4.88679 0.25485
3 0.25485 0.00000 4.87921 0.25485
4 0.25485 0.00000 4.87921 0.25485
5 0.25485 0.00000 4.87921 0.25485
a. Graphical Method
0.5x1-x2=-9.5
1.02x1-2x2=-18.8
0.5x1-x2=-9.5
x1 0 2 4 6 8 10 12
x2 9.5 10.5 11.5 12.5 13.5 14.5 15.5
1.02x1-2x2=-18.8
x1 0 2 4 6 8 10 12
x2 9.4 10.42 11.44 12.46 13.48 14.5 15.52
20
18
16
6; 14.5
6; 14.5
14
12
10
4
0.5x1-x2=-9.5
2 1.02x1-2x2=-
0
0 2 4 6 8 10 12 14 16 18
LU DECOMPOSITION
Column1
6x1-2x2+2x3+4x4= 16
12x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2 4 -2 -2 x1 -4
0 3 5 -4 x2 5
0 0 5 -2 x3 7
0 0 0 -1 x4 -4
A=LU
2 4 -2 -2 1 0
1 2 4 -3 = -0.5 1
-3 -3 8 -2 0.5 0
-1 1 6 -3 -1.5 1
LY=B
1 0 0 0 Y1 -4
-0.5 1 0 0 Y2 = 7
0.5 0 1 0 Y3 5
-1.5 1 0 1 Y4 7
UX=Y
2 4 -2 -2 x1 -4
0 3 5 -4 x2 = 5
0 0 5 -2 x3 7
0 0 0 -1 x4 -4
Therefore:
x1= 1
x2= 2
Gaussian Elimination with Pivoting x3=3
x4=4
6x1-2x2+2x3+4x4= 16
12x1-8x2+6x3+10x4= 26
3x1-13x2+9x3+3x4= -19
-6x1+ 4x2+x3-18x4= -34
6 -2 2 4 16
m21=12/6= 2 12 -8 6 10 26 m21=1/2=0
m31= 3/6= 0.5 3 -13 9 3 -19 m31= -3/2=
m41= -6/6= -1 -6 4 1 -18 -34 m41= -1/2=
Therefore:
x1= 3
x2 = 1
x3 = -2
x4= 1
6x1-2x2+2x3+4x4= 16
12x1-8x2+6x3+10x4= 26
3x1-13x2+9x3+3x4= -19
-6x1+ 4x2+x3-18x4= -34
12x1-8x2+6x3+10x4= 26
A21/A11= 12/6 2 - 12x1-4x2+8x3+8x4= 32
-4x2+2x3+2x4 = -6
3x1-13x2+9x3+3x4= -19
A31/A11= 3/6 1/2 - 3x1-x2+x3+2x4= 8
-12x2+8x3+x4= -27
6x1-2x2+2x3+4x4= 16
-4x2+2x3+2x4 = -6
-12x2+8x3+x4= -27
2x2+3x3-14x4= -18
-12x2+8x3+x4= -27
A32/A22=-12/-4 3 - -12x2+6x3+6x4 = -18
2x3-5x4= -9
2x2+3x3-14x4= -18
A42/A22=2/-4 -1/2 - 2x2-x3-x4 = 3
4x3-13x4= -21
6x1-2x2+2x3+4x4= 16
-4x2+2x3+2x4 = -6
2x3-5x4= -9
4x3-13x4= -21
4x3-13x4= -21
A43/A33= 4/2 2 - 4x3-10x4= -19
-3x4= -3
x 0 1 2 3
f(x) -6 0 0 18
x -1 0 1 2 3
f(x) -2.718281828 0 0.367879441 0.2706706 0.149361205
b. Cramer's Rule
x1+x2-x3= -3
6x1+2x2+2x3= 2
-3x1+4x2+x3= 1
x1+x2-x3= -3 1 1 -1
14 16 18 6x1+2x2+2x3= 2 6 2 2
16.5 17.5 18.5 -3x1+4x2+x3= 1 -3 4 1
14 16 18 1 1 -1 = 1[2(1)-4(2)] - 1[6(1)-(-
D= = 1(-6) - 1(12) - 1(30)
16.54 17.56 18.58 6 2 2 = - 48
-3 4 1
-3 1 -1 = -3[2(1)-4(2)] - 1[2(1)-
Dx1=
= -3(-6) - 1(0) + (-1)(6)
2 2 2 = 12
1 4 1
1 -3 -1 = 1[2(1)-1(2)] - (-3)[6(1)
Dx2= 6 2 2 = 1(0) + 3(12) + (-1)(12)
= 24
-3 1 1
1 1 -3 = 1[2(1)-4(2)] - 1[6(1)-(-
Dx3= 6 2 2 = 1(-6) - 1(12) + (-3)(30)
0.5x1-x2=-9.5 = -108
1.02x1-2x2=-18.8
-3 4 1
14 16 18 20
c. Elimination of Unknown
x1+x2-x3= -3
6x1+2x2+2x3= 2
-3x1+4x2+x3= 1
x1+x2-x3= -3 Equation 1
6x1+2x2+2x3= 2 Equation 2
-3x1+4x2+x3= 1 Equation 3
x1 x2 x3 x4 x B
2 4 -2 -2 x1 -4
swap 0 3 5 -4 x2 5
0 3 5 -5 x3 1
0 0 5 -2 x4 7
x1 x2 x3 x4 x B
2 4 -2 -2 x1 -4
swap 0 3 5 -4 x2 5
0 0 5 -2 x3 7
0 0 0 -1 x4 -4
0 0 2 4 -2 -2
0 0 0 3 5 -4
1 0 0 0 5 -2
0 1 0 0 0 -1
2x1+4x2-2x3-2x4=-4
x1+2x2+4x3-3x4=5
-3x1-3x2+8x3-2x4=7
-x1+x2+6x3-3x4=7
2 4 -2 -2 x1 -4
0.5 1 2 4 -3 x2 5
1.5 -3 -3 8 -2 x3 7
-0.5 -1 1 6 -3 x4 7
2 4 -2 -2 x1 -4
0 3 5 -4 x2 5
0 0 5 -2 x3 7
0 0 0 0 -1 x4 -4
2 4 -2 -2 x1 -4
0 3 5 -4 x2 5
0 0 5 -2 x3 7
0 0 0 -1 x4 -4
Therefore:
x1= 1
x2= 2
x3=3
x4=4
2x1+4x2-2x3-2x4=-4
x1+2x2+4x3-3x4=5
-3x1-3x2+8x3-2x4=7
-x1+x2+6x3-3x4=7
x1+2x2+4x3-3x4=5
A21/A11=1/2 1/2 - x1+2x2-x3-x4=-2
5x3-2x4= 7
-3x1-3x2+8x3-2x4=7
A31/A11= -3/2 -1.5 - -3x1-6x2+3x3+3x4=6
3x2+5x3-5x4=1
-x1+x2+6x3-3x4=7
A41/A11= -1/2 -1/2 - -x1-2x2+x3+x4=2
3x2+5x3-4x4=5
2x1+4x2-2x3-2x4=-4 2x1+4x2-2x3-2x4=-4
5x3-2x4= 7 Swap 3x2+5x3-4x4=5
3x2+5x3-5x4=1 3x2+5x3-5x4=1
3x2+5x3-4x4=5 5x3-2x4= 7
3x2+5x3-5x4=1
A32/A22=3/3 1 - 3x2+5x3-4x4=5
-x4=-4
x4= 4 5x3-2(4)= 7
x3= (7+8)/5
x3= 3
Therefore:
x1= 1
x2= 2
x3=3
x4=4
6x1-2x2+2x3+4x4= 16
6x1-2(1)+2(-2)+4(1)=16
x1= (16-4+4+2)/6
Jacobi Method
Assumption:
x1=0 x3=0 n x1
x2=0 x4=0 0 0
1 2.66667
2 1.02778
3 5.84362
4 -0.76569
5 11.46482
6 -8.36002
7 25.60053
8 -31.24422
9 64.79759
10 -96.88330
11 175.65036
12 -283.55786
13 490.24472
14 -813.71206
15 1383.51757
16 -2319.07337
17 3920.04050
18 -6593.49680
x 0 1 2 19 11122.64750
f(x) -1 6 24 -1 20 -18730.69956
-3
2
1
6x1+2x2+2x3= 2 Equation 2
-6x1+8x2+2x3= 2 Equation 3
10x2+4x3 = 4 Equation 5
-96
Equation 4
Equation 5
Equation 4
Equation 5
3x2+5x3-5x4=1 2x1+4x2-2x3-2x4=-4
3x2+5(3)-5(4)=2 2x1+4(2)-2(3)-2(4)=-4
x2= (2+20-15)/3 x1= (-4+8+6-8)/2
x2= 1 x1= 1
Gauss Seidel Method
6x1-2x2+2x3+4x4= 16
12x1-8x2+6x3+10x4= 26
3x1-13x2+9x3+3x4= -19
-6x1+ 4x2+x3-18x4= -34
Assumption: n x1
x2 x3 x4 x1=0 x3=0 0 0
0 0 0 x2=0 x4=0 1 2.66667
-3.25000 -2.11111 1.88889 2 2.84877
1.52778 -8.32407 0.16049 3 2.98633
-7.75077 -0.30041 1.42335 4 3.02037
7.06932 -15.72900 -1.79807 5 3.02578
-18.44287 8.95471 2.84124 6 3.02589
24.21481 -33.51949 -5.53365 7 3.02529
-47.84671 37.49706 8.19444 8 3.02465
73.51664 -82.48802 -15.19405 9 3.02403
-130.97490 119.55902 24.05799 10 3.02343
213.68813 -220.91561 -42.17367 11 3.02284
-366.97875 352.90185 69.39649 12 3.02227
611.64754 -613.87381 -118.60641 13 3.02171
-1037.25015 1015.43454 198.22575 14 3.02117
1741.47517 -1729.85149 -335.61302 15 3.02064
-2940.72299 2896.46139 564.01787 16 3.02012
4949.39472 -4899.00057 -951.86311 17 3.01962
-8345.93937 8237.32676 1602.61214 18 3.01912
14058.07100 -13898.24108 -2701.81521 19 3.01865
### 23402.42879 4551.61243 20 3.01818
39922.05838 -39452.17390 -7670.95757 21 3.01772
f(x) = x^3-x-1
x3=x+1
x= 3√x+1
g(x)= 3√x+1 a= 1
b= 2
X0= (a+b)/2 X0= 1.5
x 0 1 2
f(x) -1 -1 5
n x0 x1= g(X0)
0 1.5 1.357208808
1 1.357208808 1.330860959
2 1.330860959 1.325883774
3 1.325883774 1.324939363
4 1.324939363 1.324760011
5 1.324760011 1.324725945
6 1.324725945 1.324719475
7 1.324719475 1.324718245
8 1.324718245 1.324718012
9 1.324718012 1.324717968
10 1.324717968 1.324717959
Jacobi Method
1
Gauss Seidel Method
-0.988031624
-0.15425145
x1= (-4-4x2+2x3+2x4)/2
x2= (5-x1-4x3+3x4)/2
x3= (7+3x1+3x2+2x4)/8
x4= (-7-x1+x2+6x3)/3
x4
0
2.37500
4.70573
9.35563
16.59624
26.88094
40.14240
55.48371
70.66282
81.50790
81.32527
60.45655
6.23275
-96.31287
-262.49454
-504.21480
-823.80201
-1204.96493
-1600.72755
-1918.88910
-2006.68983
-1638.05440
DG FG DF BH Rah DE EF HG
0 0 0 0 0 0 0 0 6000
0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0
0 0 0 1
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0
1
0 0 2000
-0.988031624
0.15425145 1 -1
1
-1 1
0.988031624 0.9880316241 3000
-0.15425145 0.1542514499
-0.9880316241
-0.1542514499 -1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16