Secant Method
Experiment 2 a) x+exp(-x)=sin(x) with previous guess 10 and old guess 12 iteration limit 50
And error tolerance 0.0001
b) x^2-3x+6=1 with previous guess of 5 old guess 4 iteration limit 50
1.02.2017 error tolerance 0.0001
Theory:
A potential problem in implementing the Newton-Raphson method is the evaluation of the derivative.
Although this is not inconvenient for polynomials and many other functions, there are certain functions whose
derivatives may be extremely difficult or inconvenient to evaluate. For these cases, the derivative can be
approximated by a backward finite divided
difference,
Upon substituting in Newton Raphson formula we get
Formula of numerical
Advantages
A potential problem in implementing the Newton-Raphson method is the evaluation
of the derivative.
Secant method is useful where derivative is difficult or complex
Although the secant method may be divergent, when it converges it usually does so
at a quicker rate than the false-position method.
Using this gives an advantage in that it prevents divergence, is a shortcoming with
regard to the rate of con- vergence; it makes the finite-difference estimate a less-
accurate approximation of the derivative.
Application:
It is used when derivative of a function is complicated.
CHE3001 Computational Methods in Process Engineering
Secant Method
Experiment 2 a) x+exp(-x)=sin(x) with previous guess 10 and old guess 12 iteration limit
50 And error tolerance 0.0001
b) x^2-3x+6=1 with previous guess of 5 old guess 4 iteration limit 50
1.02.2017 error tolerance 0.0001
Flowsheet:
CHE3001 Computational Methods in Process Engineering
Secant Method
Experiment 2 a) x+exp(-x)=sin(x) with previous guess 10 and old guess 12 iteration limit 50
And error tolerance 0.0001
b) x^2-3x+6=1 with previous guess of 5 old guess 4 iteration limit 50
1.02.2017 error tolerance 0.0001
Matlab code:
%Secant Method
clear all
close all
clc
syms x
f_x=input('Enter the function to be evaluated only in terms of x DO NOT
WRITE =0 while entering :');%Concerned polynomial to be evaluated
x_prev=input('enter the previous value:');%the previous value to start the
iteration
x_old=input('enter the old value:');%the old value to start the iteration
iter_max=input('enter the maximum iterations permitted for a converging
solution any valid guess:');
%x is in radian in case of trigonometric function
err_lim=input('enter the tolerance limit of the method:');%error limit
iter=1;
err=1;%initialising with the maximum possible relative error
disp([' S_No ' ' x_old ' ' x_prev ' ' x_new ' ' error ' ' error_percent
'])
x_new=0;x_old=0;
while(err>=err_lim && iter<=iter_max)
x=x_old;
b=eval(f_x);
x=x_prev;%dummy variable x introduced to falicitate evaluation
a=eval(f_x);
if((a~=0) && (b~=0) && (a-b)==0)
disp('wrong initial guesses since function at two values are same')
disp('Rerun the program with a different trigger value of x')
break
elseif(a==0 || b==0)
disp('your initial guess is the root')
break
end
x_new=x_prev-((a*(x_prev-x_old))/(a-b));
err=abs((x_new-x_prev)/x_prev);
disp(num2str([iter x_old x_prev x_new err 100*err]))
iter=iter+1;
x_old=x_prev;
x_prev=x_new;
end
if(iter-1==iter_max)
disp('the function is non converging and thus has no real root')
elseif(iter~=1)
disp(['your required approximate root is:' num2str(x_new)])
end
%if a-b=0 no need to display x as root
%dealt with no real root
%dealt when function values entered are same
%dealt with infinite loop guess
CHE3001 Computational Methods in Process Engineering
Secant Method
Experiment 2 a) x+exp(-x)=sin(x) with previous guess 10 and old guess 12 iteration limit 50
And error tolerance 0.0001
b) x^2-3x+6=1 with previous guess of 5 old guess 4 iteration limit 50
1.02.2017 error tolerance 0.0001
Validation:
Case 1:
Enter the function to be evaluated only in terms of x DO NOT WRITE =0 while
entering :x+exp(-x)-sin(x) enter the previous value:10
enter the old value:12
enter the maximum iterations permitted for a converging solution any
valid guess:50 enter the tolerance limit of the method:0.0001
S_No x_old x_prev x_new error error_percent
1 0 10 -1.047771 1.104777 110.4777
2 10 -1.047771 -4.793618 3.57506 357.506
3 -1.04777 -4.79362 -0.958699 0.800005 80.0005
4 -4.7936 -0.9587 -0.87455 0.087772 8.7772
5 -0.9586992 -0.8745523 0.2110482 1.241321 124.1321
6 -0.8745523 0.2110482 0.8064656 2.821238 282.1238
7 0.21104820.8064656 1.934757 1.399057 139.9057
8 0.8064656 1.934757 -0.1699282 1.087829 108.7829
9 1.93475691 -0.169928195 62.6507825 369.689744 36968.9744
10 -0.1699282 62.65078 -1.3768921.021977 102.1977
11 62.65078 -1.376892 -5.230543 2.798804 279.8804
12 -1.37689 -5.23054 -1.29933 0.751587 75.1587
13 -5.23054 -1.29933 -1.22555 0.056788 5.6788
14 -1.29933 -1.22555 -0.125762 0.897383 89.7383
15 -1.225546 -0.1257622 0.5014696 4.987444 498.7444
16 -0.1257622 0.5014696 1.275972 1.544466 154.4466
17 0.50146958 1.2759725 17.756365 12.915947 1291.5947
18 1.27597 17.7564 0.729604 0.95891 95.891
19 17.7564 0.729604 0.216779 0.702881 70.2881
CHE3001 Computational Methods in Process Engineering
Secant Method
Experiment 2 a) x+exp(-x)=sin(x) with previous guess 10 and old guess 12 iteration limit 50
And error tolerance 0.0001
b) x^2-3x+6=1 with previous guess of 5 old guess 4 iteration limit 50
1.02.2017 error tolerance 0.0001
20 0.72960410.2167793 1.797948 7.293909 729.3909
21 0.2167793 1.797948 -6.774327 4.76781 476.781
22 1.797948 -6.774327 1.80772 1.266849 126.6849
23 -6.77433 1.80772 1.81761 0.00546901 0.546901
24 1.80772 1.81761 0.878902 0.516451 51.6451
25 1.817607 0.8789015 -0.1329342 1.15125 115.125
26 0.87890151 -0.13293423 1.737442 14.069937 1406.9937
27 -0.1329342 1.737442 9.822224 4.653267 465.3267
28 1.73744 9.82222 0.929785 0.905339 90.5339
29 9.82222 0.929785 0.449716 0.516322 51.6322
30 0.92978480.4497161 2.862623 5.365401 536.5401
31 0.4497161 2.862623 -0.3412125 1.119196 111.9196
32 2.8626232 -0.34121248 -3.9461038 10.564946 1056.4946
33 -0.341212 -3.9461 -0.230692 0.941539 94.1539
34 -3.9461 -0.230692 -0.128707 0.442083 44.2083
35 -0.2306923 -0.1287072 0.8341621 7.481083 748.1083
36 -0.128707 0.834162 1.667980.999585 99.9585
37 0.8341621 1.667978 -0.4844831 1.290461 129.0461
38 1.667978 -0.4844831 4.162287 9.591192 959.1192
39 -0.4844831 4.162287 -2.6610211.639317 163.9317
40 4.162287 -2.661021 9.008988 4.385538 438.5538
41 -2.661021 9.008988 37.64427 3.178524 317.8524
42 9.00899 37.6443 0.539432 0.98567 98.567
43 37.64427 0.5394324 -0.06966999 1.129154 112.9154
44 0.53943241 -0.069669994 1.3400178 20.233786 2023.3786
45 -0.06966999 1.340018 3.3363 1.489743 148.9743
46 1.34002 3.3363 0.912911 0.72637 72.637
CHE3001 Computational Methods in Process Engineering
Secant Method
Experiment 2 a) x+exp(-x)=sin(x) with previous guess 10 and old guess 12 iteration limit 50
And error tolerance 0.0001
b) x^2-3x+6=1 with previous guess of 5 old guess 4 iteration limit 50
1.02.2017 error tolerance 0.0001
47 3.3363 0.912911 0.496334 0.456317 45.6317
48 0.9129106 0.496334 2.969964 4.983801 498.3801
49 0.496334 2.969964 -0.2038993 1.068654 106.8654
your required approximate root is:-0.2039
Case 2:
Enter the function to be evaluated only in terms of x DO NOT WRITE =0 while
entering :x^2-3*x+5 enter the previous value:5
enter the old value:4
enter the maximum iterations permitted for a converging solution any
valid guess:50 enter the tolerance limit of the method:10^-4
S_No x_old x_prev x_new error
error_percent 1 0 5 -2.5
1.5 150
2 5 -2.5 35 15 1500
3 -2.5 35 -3.135593 1.089588 108.9588
4 35 -3.13559 -3.97534 0.26781 26.781
5 -3.13559 -3.97534 -0.738314 0.81427681.4276
6 -3.975338 -0.738314 0.267701 1.362584 136.2584
7 -0.738314 0.267701 1.497617 4.594362 459.4362
8 0.267701 1.497617 3.724915 1.487229 148.7229
9 1.49762 3.72491 0.260286 0.930123 93.0123
10 3.72491460.26028602 -4.0910011 16.71733 1671.733
11 0.260286 -4.091001 0.8878763 1.217032 121.7032
12 -4.091 0.887876 1.39161 0.567342 56.7342
13 0.8878763 1.391606 5.224611 2.754376 275.4376
14 1.39161 5.22461 0.627893 0.87982 87.982
CHE3001 Computational Methods in Process Engineering
Secant Method
Experiment 2 a) x+exp(-x)=sin(x) with previous guess 10 and old guess 12 iteration limit 50
And error tolerance 0.0001
b) x^2-3x+6=1 with previous guess of 5 old guess 4 iteration limit 50
1.02.2017 error tolerance 0.0001
15 5.224611 0.6278931 -0.6028047 1.960044 196.0044
16 0.6278931 -0.6028047 1.807952 3.999233 399.9233
17 -0.602805 1.80795 3.39295 0.87668 87.668
18 1.80795 3.39295 0.515374 0.848104 84.8104
19 3.392948 0.5153739-3.579529 7.9455 794.55
20 0.5153739-3.579529 1.12873 1.315329 131.5329
21 -3.57953 1.12873 1.65853 0.469378 46.9378
22 1.12873 1.658532 14.70337 7.865292 786.5292
23 1.65853 14.7034 1.45084 0.901326 90.1326
24 14.7034 1.45084 1.2416 0.144221 14.4221
25 1.450842 1.2416 10.40008 7.376358 737.6358
26 1.2416 10.4001 0.915648 0.911958 91.1958
27 10.4001 0.915648 0.543886 0.406009 40.6009
28 0.91564790.5438865 2.922487 4.373341 437.3341
29 0.5438865 2.922487 -7.3128 3.502252 350.2252
30 2.922487 -7.3128 3.568396 1.487966 148.7966
31 -7.3128 3.5684 4.61048 0.292033 29.2033
32 3.5684 4.61048 2.2113 0.520377 52.0377
33 4.61048 2.2113 1.35935 0.385269 38.5269
34 2.211296 1.359352 -3.494399 3.570636 357.0636
35 1.359352 -3.494399 1.89874 1.543367 154.3367
36 -3.4944 1.89874 2.53173 0.333372 33.3372
37 1.89874 2.531727 -0.1348576 1.053267 105.3267
38 2.5317269 -0.13485764 8.856161 66.670445 6667.0445
39 -0.1348576 8.856161 -1.0826771.122251 112.2251
40 8.856161 -1.082677 -3.056123 1.822748 182.2748
CHE3001 Computational Methods in Process Engineering
Secant Method
Experiment 2 a) x+exp(-x)=sin(x) with previous guess 10 and old guess 12 iteration limit 50
And error tolerance 0.0001
b) x^2-3x+6=1 with previous guess of 5 old guess 4 iteration limit 50
1.02.2017 error tolerance 0.0001
41 -1.082677 -3.056123 0.2369035 1.077518 107.7518
42 -3.056123 0.23690350.9836381 3.152062 315.2062
43 0.23690350.9836381 2.67889 1.723451 172.3451
44 0.9836381 2.67889 -3.569574 2.332483 233.2483
45 2.67889 -3.569574 3.742913 2.04856 204.856
46 -3.56957 3.74291 6.49551 0.735416 73.5416
47 3.74291 6.49551 2.668 0.589254 58.9254
48 6.49551 2.668 2.00049 0.250192 25.0192
49 2.668 2.00049 0.202164 0.898943 89.8943
your required approximate root is:0.20216
Case
3:
Enter the function to be evaluated only in terms of x DO NOT WRITE =0 while
entering :x^2-2*x+1 enter the previous value:1
enter the old value:1
enter the maximum iterations permitted for a converging solution any
valid guess:100 enter the tolerance limit of the method:0.000001
S_No x_old x_prev x_new error
error_percent your initial guess is the
root
Case 4:
Enter the function to be evaluated only in terms of x DO NOT WRITE =0 while
entering :x^2-x+1enter the previous value:4
enter the old value:5
enter the maximum iterations permitted for a converging solution any
valid guess:1000 enter the tolerance limit of the method:0.000001
S_No x_old x_prev x_new error error_percent
1 0 4 -0.3333333 1.083333 108.3333
CHE3001 Computational Methods in Process Engineering
Secant Method
Experiment 2 a) x+exp(-x)=sin(x) with previous guess 10 and old guess 12 iteration limit 50
And error tolerance 0.0001
b) x^2-3x+6=1 with previous guess of 5 old guess 4 iteration limit 50
1.02.2017 error tolerance 0.0001
2 4 -0.3333333 -0.875 1.625 162.5
3 -0.3333333 -0.875 0.3207547 1.366577 136.6577
4 -0.875 0.32075470.8239757 1.568865 156.8865
5 0.32075470.8239757-5.083284 7.169216 716.9216
6 0.8239757-5.083284 0.9865371 1.194075 119.4075
7 -5.08328 0.986537 1.18013 0.19624 19.624
8 0.986537 1.18013 0.140782 0.880707 88.0707
9 1.18013480.14078225 -2.5983602 19.456589 1945.6589
10 0.1407823 -2.59836 0.3950173 1.152026 115.2026
11 -2.59836 0.395017 0.632588 0.601419 60.1419
12 0.39501727 0.63258827 -27.172689 43.954778 4395.4778
13 0.6325883-27.17269 0.6604596 1.024306 102.4306
14 -27.1727 0.66046 0.688656 0.0426922 4.26922
15 0.66045960.6886561-1.561575 3.267569 326.7569
16 0.6886561-1.561575 1.108103 1.709606 170.9606
17 -1.56158 1.1081 1.87853 0.695264 69.5264
18 1.1081 1.87853 0.544441 0.710177 71.0177
19 1.87853 0.544441 0.0159855 0.970639 97.0639
20 0.544440711 0.0159854817 2.25513176 140.073744 14007.3744
21 0.01598548 2.255132 -0.7583491 1.336277 133.6277
22 2.255132 -0.7583491 -5.4554596.193862 619.3862
23 -0.758349 -5.45546 -0.43488 0.920285 92.0285
24 -5.45546 -0.43488 -0.199188 0.541971 54.1971
25 -0.4348802 -0.1991877 0.5589591 3.806192 380.6192
26 -0.1991877 0.5589591 1.735845 2.105496 210.5496
CHE3001 Computational Methods in Process Engineering
Secant Method
Experiment 2 a) x+exp(-x)=sin(x) with previous guess 10 and old guess 12 iteration limit 50
And error tolerance 0.0001
b) x^2-3x+6=1 with previous guess of 5 old guess 4 iteration limit 50
1.02.2017 error tolerance 0.0001
27 0.5589591 1.735845 -0.02296365 1.013229 101.3229
28 1.7358453 -0.022963649 -1.4586732 62.520967 6252.0967
29 -0.02296365 -1.458673 0.3894621 1.266998 126.6998
30 -1.45867 0.389462 0.757824 0.945822 94.5822
31 0.38946210.7578241-4.785624 7.314954 731.4954
32 0.7578241-4.785624 0.9202158 1.192288 119.2288
33 -4.78562 0.920216 1.11066 0.206954 20.6954
34 0.920216 1.11066 0.0213852 0.980745 98.0745
35 1.11065847 0.0213852213 -7.3933736 346.723502 34672.3502
36 0.02138522 -7.393374 0.1383314 1.01871 101.871
37 -7.39337 0.138331 0.24503 0.771328 77.1328
38 0.13833140.2450303 1.566728 5.394018 539.4018
39 0.2450303 1.566728 -0.7589744 1.484433 148.4433
40 1.5667283 -0.75897441 11.387001 16.003143 1600.3143
41 -0.7589744 11.387 -1.001497 1.087951 108.7951
42 11.387 -1.0015 -1.32162 0.319642 31.9642
43 -1.0015 -1.32162 -0.0973775 0.926319 92.6319
44 -1.321618 -0.09737753 0.3601925 4.698929 469.8929
45 -0.09737753 0.3601925 1.404091 2.898167 289.8167
46 0.3601925 1.404091 -0.6466934 1.460578 146.0578
47 1.4040908 -0.64669341 7.8647799 13.161528 1316.1528
48 -0.6466934 7.86478 -0.978774 1.12445 112.445
49 7.86478 -0.978774 -1.47772 0.509762 50.9762
50 -0.978774 -1.47772 -0.129134 0.912613 91.2613
51 -1.477715 -0.1291338 0.3104042 3.403742 340.3742
CHE3001 Computational Methods in Process Engineering
Secant Method
Experiment 2 a) x+exp(-x)=sin(x) with previous guess 10 and old guess 12 iteration limit 50
And error tolerance 0.0001
b) x^2-3x+6=1 with previous guess of 5 old guess 4 iteration limit 50
1.02.2017 error tolerance 0.0001
52 -0.1291338 0.3104042 1.270363 3.092608 309.2608
53 0.3104042 1.270363 -1.042886 1.820935 182.0935
54 1.270363 -1.042886 3.009417 3.885663 388.5663
55 -1.042886 3.009417 -4.281785 2.422795 242.2795
56 3.009417 -4.281785 6.110664 2.42713 242.713
57 -4.281785 6.110664 -32.77263 6.363187 636.3187
58 6.110664 -32.77263 7.275785 1.222008 122.2008
59 -32.7726 7.27579 9.0368 0.242037 24.2037
60 7.27579 9.0368 4.22854 0.532076 53.2076
61 9.0368 4.22854 3.03395 0.282505 28.2505
62 4.22854 3.03395 1.88889 0.377415 37.7415
63 3.03395 1.88889 1.20596 0.36155 36.155
64 1.88889 1.20596 0.610036 0.494151 49.4151
65 1.205964 0.6100356 -0.3239203 1.530986 153.0986
66 0.6100356 -0.3239203 1.677586 6.179008 617.9008
67 -0.3239203 1.677586 -4.364022 3.60137 360.137
68 1.677586 -4.364022 2.2572 1.517229 151.7229
69 -4.36402 2.2572 3.49247 0.547256 54.7256
70 2.2572 3.49247 1.4492 0.585051 58.5051
71 3.49247 1.4492 1.03034 0.289024 28.9024
72 1.4492 1.03034 0.333326 0.67649 67.649
73 1.030343 0.3333259-1.805376 6.416248 641.6248
74 0.3333259-1.805376 0.6479556 1.358903 135.8903
75 -1.80538 0.647956 1.00574 0.552174 55.2174
76 0.6479556 1.00574 -0.5328557 1.529815 152.9815
CHE3001 Computational Methods in Process Engineering
Secant Method
Experiment 2 a) x+exp(-x)=sin(x) with previous guess 10 and old guess 12 iteration limit 50
And error tolerance 0.0001
b) x^2-3x+6=1 with previous guess of 5 old guess 4 iteration limit 50
1.02.2017 error tolerance 0.0001
77 1.00574 -0.5328557 2.913807 6.468287 646.8287
78 -0.5328557 2.913807 -1.8484631.634381 163.4381
79 2.9138074-1.8484634 -97.72999 51.870936 5187.0936
80 -1.84846 -97.73 -1.78617 0.981723 98.1723
81 -97.73 -1.78617 -1.72671 0.0332885 3.32885
82 -1.78617 -1.72671 -0.461834 0.732536 73.2536
83 -1.726712 -0.461834 0.06352288 1.137545 113.7545
84 -0.46183402 0.06352288 0.73612875 10.588403 1058.8403
85 0.06352288 0.7361287 4.757907 5.463417 546.3417
86 0.736129 4.75791 0.556834 0.882967 88.2967
87 4.75791 0.556834 0.382263 0.313507 31.3507
88 0.55683406 0.3822627412.924494 32.8105 3281.05
89 0.382263 12.9245 0.320194 0.975226 97.5226
90 12.9245 0.320194 0.256303 0.199539 19.9539
91 0.32019420.2563028 2.167478 7.456707 745.6707
92 0.2563028 2.167478 -0.3121753 1.144027 114.4027
93 2.167478 -0.3121753 -1.96028 5.279421 527.9421
94 -0.3121753 -1.96028 0.1185804 1.060492 106.0492
95 -1.96028 0.1185804 0.433702 2.657451 265.7451
96 0.1185804 0.433702 2.118682 3.885111 388.5111
97 0.433702 2.118682 -0.05225724 1.024665 102.4665
98 2.1186823 -0.052257243 -1.0415326 18.930876 1893.0876
99 -0.05225724 -1.041533 0.4516081 1.4336 143.36
100 -1.041533 0.45160810.9248014 1.047797 104.7797
101 0.45160810.9248014-1.547124 2.672926 267.2926
CHE3001 Computational Methods in Process Engineering
Secant Method
Experiment 2 a) x+exp(-x)=sin(x) with previous guess 10 and old guess 12 iteration limit 50
And error tolerance 0.0001
b) x^2-3x+6=1 with previous guess of 5 old guess 4 iteration limit 50
1.02.2017 error tolerance 0.0001
102 0.9248014-1.547124 1.498335 1.968464 196.8464
103 -1.547124 1.498335 3.163752 1.111512 111.1512
104 1.498335 3.163752 1.021374 0.6771638 67.71638
105 3.163752 1.021374 0.70056060.3140997 31.40997
106 1.021374 0.7005606 -0.3940325 1.562453 156.2453
107 0.7005606 -0.3940325 1.84008 5.669869 566.9869
108 -0.3940325 1.84008 -3.8674163.101765 310.1765
109 1.84008 -3.867416 2.681022 1.693233 169.3233
110 -3.867416 2.681022 5.199717 0.939453 93.9453
111 2.681022 5.199717 1.880693 0.6383086 63.83086
112 5.199717 1.880693 1.443829 0.2322889 23.22889
113 1.880693 1.443829 0.73795750.4888884 48.88884
114 1.443829 0.7379575 0.05541123 0.9249127 92.49127
115 0.73795753 0.055411227 4.6416449 82.767228 8276.7228
116 0.05541123 4.641645 -0.2009168 1.043286 104.3286
117 4.641645 -0.2009168 -0.5616789 1.79558 179.558
118 -0.2009168 -0.5616789 0.5033197 1.896099 189.6099
119 -0.5616789 0.5033197 1.211974 1.407961 140.7961
120 0.5033197 1.211974 -0.5452156 1.449857 144.9857
121 1.2119743 -0.54521556 4.9837376 10.140857 1014.0857
122 -0.5452156 4.983738 -1.0810491.216915 121.6915
123 4.983738 -1.081049 -2.200603 1.035618 103.5618
124 -1.081049 -2.200603 -0.3220626 0.853648 85.3648
125 -2.200603 -0.3220626 0.08268399 1.256733125.6733
126 -0.3220626 0.08268399 0.828342 9.018168 901.8168
CHE3001 Computational Methods in Process Engineering
Secant Method
Experiment 2 a) x+exp(-x)=sin(x) with previous guess 10 and old guess 12 iteration limit 50
And error tolerance 0.0001
b) x^2-3x+6=1 with previous guess of 5 old guess 4 iteration limit 50
1.02.2017 error tolerance 0.0001
127 0.082683988 0.82834205 10.46946 11.639054 1163.9054
128 0.828342 10.46946 0.74504190.9288366 92.88366
129 10.46946 0.74504190.66573840.1064416 10.64416
130 0.74504190.6657384-1.226926 2.842955 284.2955
131 0.6657384-1.226926 1.163737 1.948498 194.8498
132 -1.226926 1.163737 2.283526 0.9622352 96.22352
133 1.163737 2.283526 0.67725610.7034165 70.34165
134 2.283526 0.67725610.2787315 0.58844 58.844
135 0.67725608 0.27873154 18.4318 65.127429 6512.7429
136 0.2787315 18.4318 0.23361940.9873252 98.73252
137 18.4318 0.23361940.18714680.1989245 19.89245
138 0.23361940.1871468 1.650938 7.821619 782.1619
139 0.1871468 1.650938 -0.8245379 1.499436 149.9436
140 1.6509376 -0.82453787 13.601712 17.496165 1749.6165
141 -0.8245379 13.60171 -1.0371871.076254 107.6254
142 13.60171 -1.037187 -1.306367 0.2595293 25.95293
143 -1.037187 -1.306367 -0.1061584 0.9187377 91.87377
144 -1.306367 -0.1061584 0.3570194 4.363083 436.3083
145 -0.1061584 0.3570194 1.385458 2.880624 288.0624
146 0.3570194 1.385458 -0.6806465 1.491279 149.1279
147 1.385458 -0.68064651 6.5822589 10.670598 1067.0598
148 -0.6806465 6.582259 -1.1180391.169856 116.9856
149 6.582259 -1.118039 -1.872492 0.6748014 67.48014
150 -1.118039 -1.872492 -0.2740284 0.8536558 85.36558
151 -1.872492 -0.2740284 0.1547372 1.564676 156.4676
CHE3001 Computational Methods in Process Engineering
Secant Method
Experiment 2 a) x+exp(-x)=sin(x) with previous guess 10 and old guess 12 iteration limit 50
And error tolerance 0.0001
b) x^2-3x+6=1 with previous guess of 5 old guess 4 iteration limit 50
1.02.2017 error tolerance 0.0001
152 -0.2740284 0.1547372 0.9313058 5.018628 501.8628
153 0.15473723 0.93130584 -9.9472541 11.680975 1168.0975
154 0.9313058-9.947254 1.024759 1.103019 110.3019
155 -9.947254 1.024759 1.128097 0.1008414 10.08414
156 1.024759 1.128097 0.13534060.8800276 88.00276
157 1.12809740.13534059 -3.216402224.765245 2476.5245
158 0.1353406-3.216402 0.3517001 1.109346 110.9346
159 -3.216402 0.35170010.55145490.5679692 56.79692
160 0.35170010.55145491 8.3231283 14.093035 1409.3035
161 0.5514549 8.323128 0.45587560.9452279 94.52279
162 8.323128 0.45587560.35921190.2120396 21.20396
163 0.45587556 0.3592119 4.5223761 11.589717 1158.9717
164 0.3592119 4.522376 0.16088550.9644246 96.44246
165 4.522376 0.1608855 -0.07396031 1.459708 145.9708
166 0.16088552 -0.073960306 1.1082325 15.984152 1598.4152
167 -0.073960306 1.1082325 -31.569778 29.486602 2948.6602
168 1.108232 -31.56978 1.14383 1.036232 103.6232
169 -31.56978 1.14383 1.180886 0.03239634 3.239634
170 1.14383 1.180886 0.2647605 0.775795 77.5795
171 1.180886 0.2647605-1.542363 6.825504 682.5504
172 0.2647605-1.542363 0.6183505 1.400911 140.0911
173 -1.542363 0.6183505 1.015441 0.6421768 64.21768
174 0.6183505 1.015441 -0.5871042 1.578177 157.8177
175 1.015441 -0.5871042 2.79215 5.7558 575.58
176 -0.5871042 2.79215 -2.1901931.784411 178.4411
CHE3001 Computational Methods in Process Engineering
Secant Method
Experiment 2 a) x+exp(-x)=sin(x) with previous guess 10 and old guess 12 iteration limit 50
And error tolerance 0.0001
b) x^2-3x+6=1 with previous guess of 5 old guess 4 iteration limit 50
1.02.2017 error tolerance 0.0001
177 2.79215 -2.190193 17.87583 9.161761 916.1761
178 -2.190193 17.87583 -2.734067 1.152948 115.2948
179 17.87583 -2.734067 -3.526697 0.2899088 28.99088
180 -2.734067 -3.526697 -1.190264 0.6624989 66.24989
181 -3.526697 -1.190264 -0.5593357 0.5300742 53.00742
182 -1.190264 -0.5593357 0.1215605 1.21733 121.733
183 -0.5593357 0.1215605 0.7428096 5.110614 511.0614
184 0.12156050.7428096 6.707249 8.029568 802.9568
185 0.7428096 6.707249 0.61739110.9079517 90.79517
186 6.707249 0.61739110.49662840.1956016 19.56016
187 0.61739109 0.49662839 -6.0812947 13.245161 1324.5161
188 0.4966284-6.081295 0.6105311 1.100395 110.0395
189 -6.081295 0.61053110.72832510.1929369 19.29369
190 0.61053110.7283251-1.638851 3.250164 325.0164
191 0.7283251-1.638851 1.148174 1.700597 170.0597
192 -1.638851 1.148174 1.933139 0.6836639 68.36639
193 1.148174 1.933139 0.58596670.6968833 69.68833
194 1.933139 0.5859667 0.08739042 0.8508611 85.08611
195 0.58596673 0.087390415 2.9046774 32.237941 3223.7941
196 0.08739042 2.904677 -0.3745651 1.128952 112.8952
197 2.904677 -0.3745651 -1.3646 2.643158 264.3158
198 -0.3745651 -1.3646 0.1784736 1.130788 113.0788
199 -1.3646 0.1784736 0.568835 2.187222 218.7222
200 0.1784736 0.568835 3.555634 5.25073 525.073
201 0.568835 3.555634 0.32727780.9079552 90.79552
CHE3001 Computational Methods in Process Engineering
Secant Method
Experiment 2 a) x+exp(-x)=sin(x) with previous guess 10 and old guess 12 iteration limit 50
And error tolerance 0.0001
b) x^2-3x+6=1 with previous guess of 5 old guess 4 iteration limit 50
1.02.2017 error tolerance 0.0001
202 3.555634 0.3272778 0.05677595 0.8265206 82.65206
203 0.32727778 0.056775951 1.5933508 27.063833 2706.3833
204 0.05677595 1.593351 -1.3990131.878032 187.8032
205 1.593351 -1.399013 4.008029 3.864897 386.4897
206 -1.399013 4.008029 -4.106414 2.024547 202.4547
207 4.008029 -4.106414 15.89482 4.87073 487.073
208 -4.106414 15.89482 -6.142772 1.386464 138.6464
209 15.89482 -6.142772 -11.2703 0.8347263 83.47263
210 -6.142772 -11.2703 -3.705568 0.6712096 67.12096
211 -11.2703 -3.705568 -2.551528 0.3114341 31.14341
212 -3.705568 -2.551528 -1.165047 0.5433923 54.33923
213 -2.551528 -1.165047 -0.4182379 0.6410121 64.10121
214 -1.165047 -0.4182379 0.198481 1.474565 147.4565
215 -0.4182379 0.198481 0.8878919 3.473435 347.3435
216 0.19848102 0.88789192 -9.5373653 11.741584 1174.1584
217 0.8878919-9.537365 0.9812089 1.102881 110.2881
218 -9.537365 0.9812089 1.083924 0.1046822 10.46822
219 0.9812089 1.083924 0.05966957 0.9449504 94.49504
220 1.0839241 0.0596695673 -6.5136766 110.162457 11016.2457
221 0.05966957 -6.513677 0.1862982 1.028601 102.8601
222 -6.513677 0.18629820.30208440.6215096 62.15096
223 0.18629820.3020844 1.844586 5.106194 510.6194
224 0.3020844 1.844586 -0.3861437 1.209339 120.9339
225 1.844586 -0.3861437 -3.7349878.672531 867.2531
226 -0.3861437 -3.734987 -0.08635631 0.9768791 97.68791
CHE3001 Computational Methods in Process Engineering
Secant Method
Experiment 2 a) x+exp(-x)=sin(x) with previous guess 10 and old guess 12 iteration limit 50
And error tolerance 0.0001
b) x^2-3x+6=1 with previous guess of 5 old guess 4 iteration limit 50
1.02.2017 error tolerance 0.0001
227 -3.734987 -0.08635631 0.1405128 2.627128 262.7128
228 -0.08635631 0.1405128 1.070086 6.615581 661.5581
229 0.1405128 1.070086 -4.034394 4.770158 477.0158
230 1.070086 -4.034394 1.341255 1.332455 133.2455
231 -4.034394 1.341255 1.735963 0.2942824 29.42824
232 1.341255 1.735963 0.63949470.6316197 63.16197
233 1.735963 0.6394947 0.08007464 0.8747845 87.47845
234 0.63949467 0.080074641 3.3833411 41.252342 4125.2342
235 0.08007464 3.383341 -0.2959631 1.087477 108.7477
236 3.383341 -0.2959631 -0.9587838 2.239538 223.9538
237 -0.2959631 -0.9587838 0.3176567 1.331312 133.1312
238 -0.9587838 0.3176567 0.7949196 1.502449 150.2449
239 0.31765670.7949196-6.639842 9.352847 935.2847
240 0.7949196-6.639842 0.9171967 1.138135 113.8135
241 -6.639842 0.9171967 1.054651 0.1498629 14.98629
242 0.9171967 1.054651 -0.0336246 1.031882 103.1882
243 1.054650533 -0.03362460338 -49.24691563 1463.609562
146360.9562
244 -0.0336246 -49.24692 -0.01304497 0.9997351 99.97351
245 -49.24692 -0.01304497 0.007114522 1.545384 154.5384
246 -0.0130449674 0.00711452196 0.994196779 138.741895 13874.1895
247 0.00711452196 0.994196779 -757.207388 762.627279
76262.7279
248 0.9941968-757.2074 0.9955098 1.001315 100.1315
249 -757.2074 0.99550980.9968245 0.001320661 0.1320661
250 0.99550980.9968245 -0.007710534 1.007735 100.7735
251 0.99682452262 -0.0077105337714 92.567060134 12006.272641
1200627.2641
CHE3001 Computational Methods in Process Engineering
Secant Method
Experiment 2 a) x+exp(-x)=sin(x) with previous guess 10 and old guess 12 iteration limit 50
And error tolerance 0.0001
b) x^2-3x+6=1 with previous guess of 5 old guess 4 iteration limit 50
1.02.2017 error tolerance 0.0001
252 -0.007710534 92.56706 -0.01871727 1.000202 100.0202
253 92.56706 -0.01871727 -0.02984874 0.5947164 59.47164
254 -0.018717274 -0.029848744 0.95315058 32.932687 3293.2687
255 -0.029848744 0.95315058 13.409062 13.068146 1306.8146
256 0.9531506 13.40906 0.88165450.9342493 93.42493
257 13.40906 0.88165450.8142646 0.07643573 7.643573
258 0.88165450.8142646 -0.4053631 1.497827 149.7827
259 0.8142646 -0.4053631 2.250171 6.551003 655.1003
260 -0.4053631 2.250171 -2.2633972.005877 200.5877
261 2.250171 -2.263397 6.013501 3.656848 365.6848
262 -2.263397 6.013501 -5.312867 1.88349 188.349
263 6.0135006-5.3128669 110.06226 21.716171 2171.6171
264 -5.312867 110.0623 -5.645779 1.051296 105.1296
265 110.0623 -5.645779 -6.018259 0.065975 6.5975
266 -5.645779 -6.018259 -2.604048 0.5673088 56.73088
267 -6.018259 -2.604048 -1.524773 0.4144604 41.44604
268 -2.604048 -1.524773 -0.579194 0.6201442 62.01442
269 -1.524773 -0.579194 0.0376488 1.065002 106.5002
270 -0.57919395 0.037648803 0.6628453 16.606013 1660.6013
271 0.03764880.6628453 3.255511 3.911419 391.1419
272 0.6628453 3.255511 0.39676450.8781253 87.81253
273 3.255511 0.39676450.10997010.7228328 72.28328
274 0.39676447 0.10997012 1.9388503 16.630701 1663.0701
275 0.1099701 1.93885 -0.7501613 1.38691 138.691
276 1.9388503 -0.75016126 -13.007914 16.340158 1634.0158
CHE3001 Computational Methods in Process Engineering
Secant Method
Experiment 2 a) x+exp(-x)=sin(x) with previous guess 10 and old guess 12 iteration limit 50
And error tolerance 0.0001
b) x^2-3x+6=1 with previous guess of 5 old guess 4 iteration limit 50
1.02.2017 error tolerance 0.0001
277 -0.7501613 -13.00791 -0.5934401 0.9543785 95.43785
278 -13.00791 -0.5934401 -0.4601914 0.22453622.4536
279 -0.5934401 -0.4601914 0.3539603 1.769159 176.9159
280 -0.4601914 0.3539603 1.051217 1.969874 196.9874
281 0.3539603 1.051217 -1.549717 2.474211 247.4211
282 1.051217 -1.549717 1.754482 2.132131 213.2131
283 -1.549717 1.754482 4.676541 1.665483 166.5483
284 1.754482 4.676541 1.32662 0.7163245 71.63245
285 4.676541 1.32662 1.040141 0.2159466 21.59466
286 1.32662 1.040141 0.27793630.7327899 73.27899
287 1.040141 0.2779363-2.235012 9.041454 904.1454
288 0.2779363-2.235012 0.5482413 1.245297 124.5297
289 -2.235012 0.5482413 0.828253 0.5107454 51.07454
290 0.5482413 0.828253 -1.450002 2.750676 275.0676
291 0.828253 -1.450002 1.357157 1.935969 193.5969
292 -1.450002 1.357157 2.715738 1.001049 100.1049
293 1.357157 2.715738 0.87399120.6781754 67.81754
294 2.715738 0.87399120.5303763 0.393156 39.3156
295 0.87399120.5303763-1.326654 3.501345 350.1345
296 0.5303763-1.326654 0.94842 1.714896 171.4896
297 -1.326654 0.94842 1.638492 0.7276015 72.76015
298 0.94842 1.638492 0.3490922 0.786943 78.6943
299 1.638492 0.3490922 -0.4333964 2.241496 224.1496
300 0.3490922 -0.4333964 1.061783 3.449911 344.9911
301 -0.4333964 1.061783 3.929274 2.700639 270.0639
CHE3001 Computational Methods in Process Engineering
Secant Method
Experiment 2 a) x+exp(-x)=sin(x) with previous guess 10 and old guess 12 iteration limit 50
And error tolerance 0.0001
b) x^2-3x+6=1 with previous guess of 5 old guess 4 iteration limit 50
1.02.2017 error tolerance 0.0001
302 1.061783 3.929274 0.79478570.7977271 79.77271
303 3.929274 0.79478570.57005820.2827523 28.27523
304 0.79478570.5700582-1.499069 3.629676 362.9676
305 0.5700582-1.499069 0.961403 1.641334 164.1334
306 -1.499069 0.961403 1.587607 0.6513442 65.13442
307 0.961403 1.587607 0.33978490.7859767 78.59767
308 1.587607 0.3397849 -0.4966131 2.461552 246.1552
309 0.3397849 -0.4966131 1.010298 3.034377 303.4377
310 -0.4966131 1.010298 3.087974 2.056497 205.6497
311 1.010298 3.087974 0.68417970.7784374 77.84374
312 3.087974 0.68417970.40139520.4133191 41.33191
313 0.68417968 0.40139516 -8.4764816 22.117548 2211.7548
314 0.4013952-8.476482 0.4851104 1.05723 105.723
315 -8.476482 0.48511040.56854840.1719979 17.19979
316 0.48511039 0.56854835 -13.496242 24.738072 2473.8072
317 0.5685484-13.49624 0.6227353 1.046141 104.6141
318 -13.49624 0.6227353 0.677881 0.08855397 8.855397
319 0.6227353 0.677881 -1.92225 3.835675 383.5675
320 0.677881 -1.92225 1.026149 1.533827 153.3827
321 -1.92225 1.026149 1.567698 0.5277494 52.77494
322 1.026149 1.567698 0.38190090.7563939 75.63939
323 1.567698 0.3819009 -0.4225938 2.106554 210.6554
324 0.3819009 -0.4225938 1.115977 3.640778 364.0778
325 -0.4225938 1.115977 4.799486 3.300705 330.0705
326 1.115977 4.799486 0.88620630.8153539 81.53539
CHE3001 Computational Methods in Process Engineering
Secant Method
Experiment 2 a) x+exp(-x)=sin(x) with previous guess 10 and old guess 12 iteration limit 50
And error tolerance 0.0001
b) x^2-3x+6=1 with previous guess of 5 old guess 4 iteration limit 50
1.02.2017 error tolerance 0.0001
327 4.799486 0.88620630.6943125 0.216534 21.6534
328 0.88620630.6943125 -0.6626759 1.954435 195.4435
329 0.6943125 -0.6626759 1.507806 3.275329 327.5329
330 -0.6626759 1.507806 12.90882 7.561324 756.1324
331 1.507806 12.90882 1.376203 0.8933905 89.33905
332 12.90882 1.376203 1.261959 0.08301379 8.301379
333 1.376203 1.261959 0.44971820.6436348 64.36348
334 1.261959 0.4497182-0.607683 2.351253 235.1253
335 0.4497182-0.607683 1.09959 2.809479 280.9479
336 -0.607683 1.09959 3.283259 1.985894 198.5894
337 1.09959 3.283259 0.77160930.7649867 76.49867
338 3.283259 0.77160930.50195070.3494756 34.94756
339 0.77160930.5019507-2.239692 5.461977 546.1977
340 0.5019507-2.239692 0.7759005 1.346432 134.6432
341 -2.239692 0.7759005 1.111205 0.4321492 43.21492
342 0.7759005 1.111205 -0.1553539 1.139807 113.9807
343 1.11120524 -0.155353878 26.5609562 171.970668 17197.0668
344 -0.1553539 26.56096 -0.2017802 1.007597 100.7597
345 26.56096 -0.2017802 -0.2507761 0.2428181 24.28181
346 -0.2017802 -0.2507761 0.6536052 3.60633 360.633
347 -0.2507761 0.6536052 1.949038 1.98198 198.198
348 0.6536052 1.949038 0.17090590.9123127 91.23127
349 1.949038 0.1709059 -0.5954746 4.484224 448.4224
350 0.1709059 -0.5954746 0.7734061 2.298806 229.8806
351 -0.5954746 0.7734061 1.776669 1.297201 129.7201
CHE3001 Computational Methods in Process Engineering
Secant Method
Experiment 2 a) x+exp(-x)=sin(x) with previous guess 10 and old guess 12 iteration limit 50
And error tolerance 0.0001
b) x^2-3x+6=1 with previous guess of 5 old guess 4 iteration limit 50
1.02.2017 error tolerance 0.0001
352 0.7734061 1.776669 0.24133460.8641646 86.41646
353 1.776669 0.2413346 -0.5611258 3.325094 332.5094
354 0.2413346 -0.5611258 0.8603021 2.533172 253.3172
355 -0.5611258 0.8603021 2.115707 1.459261 145.9261
356 0.8603021 2.115707 0.41505240.8038233 80.38233
357 2.115707 0.4150524 -0.07961453 1.191818 119.1818
358 0.41505237 -0.079614528 1.5544734 20.524997 2052.4997
359 -0.07961453 1.554473 -2.3665112.522387 252.2387
360 1.554473 -2.366511 2.581999 2.091057 209.1057
361 -2.366511 2.581999 9.063375 2.510217 251.0217
362 2.581999 9.063375 2.104353 0.767818 76.7818
363 9.063375 2.104353 1.777441 0.1553502 15.53502
364 2.104353 1.777441 0.95092280.4650047 46.50047
365 1.777441 0.95092280.39934260.5800473 58.00473
366 0.95092280.3993426-1.770818 5.434332 543.4332
367 0.3993426-1.770818 0.7198738 1.406521 140.6521
368 -1.770818 0.7198738 1.109131 0.5407296 54.07296
369 0.7198738 1.109131 -0.2431417 1.219218 121.9218
370 1.1091309 -0.24314174 9.4744308 39.966699 3996.6699
371 -0.2431417 9.474431 -0.4013502 1.042361 104.2361
372 9.474431 -0.4013502 -0.5948863 0.4822124 48.22124
373 -0.4013502 -0.5948863 0.3813387 1.641028 164.1028
374 -0.5948863 0.3813387 1.010964 1.651093 165.1093
375 0.3813387 1.010964 -1.566341 2.549353 254.9353
376 1.010964 -1.566341 1.661022 2.060447 206.0447
CHE3001 Computational Methods in Process Engineering
Secant Method
Experiment 2 a) x+exp(-x)=sin(x) with previous guess 10 and old guess 12 iteration limit 50
And error tolerance 0.0001
b) x^2-3x+6=1 with previous guess of 5 old guess 4 iteration limit 50
1.02.2017 error tolerance 0.0001
377 -1.566341 1.661022 3.978406 1.395156 139.5156
378 1.661022 3.978406 1.208817 0.6961554 69.61554
379 3.978406 1.208817 0.90971150.2474366 24.74366
380 1.208817 0.90971150.08911240.9020432 90.20432
381 0.9097115019 0.08911239889 781.3400829 8767.028834
876702.8834
382 0.0891124 781.3401 0.08793506 0.9998875 99.98875
383 781.3401 0.08793506 0.08675648 0.01340285 1.340285
384 0.087935061 0.08675648 1.2024244 12.859765 1285.9765
385 0.08675648 1.202424 -3.0973063.575884 357.5884
386 1.202424 -3.097306 1.631941 1.52689 152.689
387 -3.097306 1.631941 2.455872 0.5048779 50.48779
388 1.631941 2.455872 0.9741 0.6033588 60.33588
389 2.455872 0.9741 0.57295510.4118108 41.18108
390 0.9741 0.5729551 -0.8077513 2.409798 240.9798
391 0.5729551 -0.8077513 1.184653 2.466606 246.6606
392 -0.8077513 1.184653 3.140605 1.651076 165.1076
393 1.184653 3.140605 0.8181404 0.739496 73.9496
394 3.140605 0.81814040.53044640.3516438 35.16438
395 0.81814040.5304464-1.623757 4.061115 406.1115
396 0.5304464-1.623757 0.8891733 1.547602 154.7602
397 -1.623757 0.8891733 1.408869 0.5844707 58.44707
398 0.8891733 1.408869 0.1947 0.8618041 86.18041
399 1.408869 0.1947 -1.202337 7.17533 717.533
400 0.1947 -1.202337 0.6147003 1.511255 151.1255
401 -1.202337 0.6147003 1.095387 0.7819859 78.19859
CHE3001 Computational Methods in Process Engineering
Secant Method
Experiment 2 a) x+exp(-x)=sin(x) with previous guess 10 and old guess 12 iteration limit 50
And error tolerance 0.0001
b) x^2-3x+6=1 with previous guess of 5 old guess 4 iteration limit 50
1.02.2017 error tolerance 0.0001
402 0.6147003 1.095387 -0.4600348 1.419975 141.9975
403 1.095387 -0.4600348 4.124303 9.965198 996.5198
404 -0.4600348 4.124303 -1.0874741.263675 126.3675
405 4.124303 -1.087474 -2.692948 1.476333 147.6333
406 -1.087474 -2.692948 -0.4034186 0.8501944 85.01944
407 -2.692948 -0.4034186 -0.02108827 0.9477261 94.77261
408 -0.40341862 -0.021088266 0.69602514 34.005329 3400.5329
409 -0.02108827 0.6960251 3.12148 3.484723 348.4723
410 0.6960251 3.12148 0.41619390.8666678 86.66678
411 3.12148 0.4161939 0.11788 0.7167667 71.67667
412 0.41619391 0.11787996 2.0409653 16.31393 1631.393
413 0.11788 2.040965 -0.6553171 1.321082 132.1082
414 2.040965 -0.6553171 -6.0611698.249217 824.9217
415 -0.6553171 -6.061169 -0.3851478 0.9364565 93.64565
416 -6.061169 -0.3851478 -0.1792089 0.53470153.4701
417 -0.3851478 -0.1792089 0.5951188 4.320811 432.0811
418 -0.1792089 0.5951188 1.894657 2.183662 218.3662
419 0.5951188 1.894657 0.08561441 0.9548127 95.48127
420 1.8946575 0.085614411 -0.85465067 10.982556 1098.2556
421 0.08561441 -0.8546507 0.6066413 1.709812 170.9812
422 -0.8546507 0.6066413 1.216711 1.005651 100.5651
423 0.6066413 1.216711 -0.3180816 1.261427 126.1427
424 1.2167107 -0.31808155 13.682564 44.015899 4401.5899
425 -0.3180816 13.68256 -0.4328666 1.031636 103.1636
426 13.68256 -0.4328666 -0.5651343 0.3055624 30.55624
CHE3001 Computational Methods in Process Engineering
Secant Method
Experiment 2 a) x+exp(-x)=sin(x) with previous guess 10 and old guess 12 iteration limit 50
And error tolerance 0.0001
b) x^2-3x+6=1 with previous guess of 5 old guess 4 iteration limit 50
1.02.2017 error tolerance 0.0001
427 -0.4328666 -0.5651343 0.378064 1.668981 166.8981
428 -0.5651343 0.378064 1.022397 1.704296 170.4296
429 0.378064 1.022397 -1.531906 2.498348 249.8348
430 1.022397 -1.531906 1.700033 2.10975 210.975
431 -1.531906 1.700033 4.332741 1.548622 154.8622
432 1.700033 4.332741 1.26487 0.7080671 70.80671
433 4.332741 1.26487 0.97449590.2295681 22.95681
434 1.26487 0.9744959 0.187685 0.807403 80.7403
435 0.97449589 0.18768496 -5.0382137 27.843992 2784.3992
436 0.187685 -5.038214 0.3325506 1.066006 106.6006
437 -5.038214 0.33255060.46891330.4100508 41.00508
438 0.33255060.4689133 4.251431 8.066562 806.6562
439 0.4689133 4.251431 0.26705930.9371837 93.71837
440 4.251431 0.2670593 0.03847787 0.8559201 85.59201
441 0.26705926 0.038477869 1.4251649 36.038561 3603.8561
442 0.03847787 1.425165 -2.0385582.430401 243.0401
443 1.425165 -2.038558 2.420539 2.187378 218.7378
444 -2.038558 2.420539 9.602317 2.967015 296.7015
445 2.420539 9.602317 2.017879 0.789855 78.9855
446 9.602317 2.017879 1.730317 0.1425067 14.25067
447 2.017879 1.730317 0.90662040.4760381 47.60381
448 1.730317 0.90662040.34744210.6167723 61.67723
449 0.90662040.3474421-2.696195 8.760126 876.0126
450 0.3474421-2.696195 0.5783561 1.214508 121.4508
451 -2.696195 0.57835610.82087660.4193273 41.93273
CHE3001 Computational Methods in Process Engineering
Secant Method
Experiment 2 a) x+exp(-x)=sin(x) with previous guess 10 and old guess 12 iteration limit 50
And error tolerance 0.0001
b) x^2-3x+6=1 with previous guess of 5 old guess 4 iteration limit 50
1.02.2017 error tolerance 0.0001
452 0.57835610.8208766-1.315626 2.602709 260.2709
453 0.8208766-1.315626 1.391515 2.057683 205.7683
454 -1.315626 1.391515 3.063176 1.201324 120.1324
455 1.391515 3.063176 0.94435530.6917071 69.17071
456 3.063176 0.94435530.62932890.3335888 33.35888
457 0.94435530.6293289 -0.7071659 2.123682 212.3682
458 0.6293289 -0.7071659 1.340685 2.895857 289.5857
459 -0.7071659 1.340685 5.315659 2.964883 296.4883
460 1.340685 5.315659 1.083142 0.7962356 79.62356
461 5.315659 1.083142 0.88123530.1864084 18.64084
462 1.083142 0.8812353 -0.04717741 1.053536 105.3536
463 0.881235346 -0.0471774128 6.27673515 134.045345 13404.5345
464 -0.04717741 6.276735 -0.2478451 1.039486 103.9486
465 6.276735 -0.2478451 -0.5081952 1.050455 105.0455
466 -0.2478451 -0.5081952 0.4977371 1.979421 197.9421
467 -0.5081952 0.4977371 1.23998 1.491234 149.1234
468 0.4977371 1.23998-0.5189203 1.418491 141.8491
469 1.2399797 -0.51892028 5.8917583 12.353879 1235.3879
470 -0.5189203 5.891758 -0.9278535 1.157483 115.7483
471 5.891758 -0.9278535 -1.631393 0.7582447 75.82447
472 -0.9278535 -1.631393 -0.1443266 0.9115317 91.15317
473 -1.631393 -0.1443266 0.2754408 2.908455 290.8455
474 -0.1443266 0.2754408 1.196651 3.344496 334.4496
475 0.2754408 1.196651 -1.420048 2.186684 218.6684
476 1.196651 -1.420048 2.206401 2.553751 255.3751
CHE3001 Computational Methods in Process Engineering
Secant Method
Experiment 2 a) x+exp(-x)=sin(x) with previous guess 10 and old guess 12 iteration limit 50
And error tolerance 0.0001
b) x^2-3x+6=1 with previous guess of 5 old guess 4 iteration limit 50
1.02.2017 error tolerance 0.0001
477 -1.420048 2.206401 19.3459 7.768083 776.8083
478 2.206401 19.3459 2.028231 0.8951597 89.51597
479 19.3459 2.028231 1.876789 0.07466679 7.466679
480 2.028231 1.876789 0.96610740.4852339 48.52339
481 1.876789 0.9661074 0.441251 0.5432692 54.32692
482 0.9661074 0.441251 -1.408352 4.191725 419.1725
483 0.441251 -1.408352 0.8242773 1.585278 158.5278
484 -1.408352 0.8242773 1.364123 0.654932 65.4932
485 0.8242773 1.364123 0.10469160.9232535 92.32535
486 1.36412290.10469161 -1.828415718.464777 1846.4777
487 0.1046916-1.828416 0.4374231 1.239236 123.9236
488 -1.828416 0.43742310.75273810.7208468 72.08468
489 0.43742310.7527381-3.527191 5.685815 568.5815
490 0.7527381-3.527191 0.9683658 1.274543 127.4543
491 -3.527191 0.9683658 1.24075 0.2812819 28.12819
492 0.9683658 1.24075 0.16665030.8656858 86.56858
493 1.24074960.16665029 -1.947052 12.68346 1268.346
494 0.1666503-1.947052 0.4763617 1.244658 124.4658
495 -1.947052 0.47636170.78014670.6377193 63.77193
496 0.47636170.7801467-2.449698 4.140048 414.0048
497 0.7801467-2.449698 1.090492 1.445154 144.5154
498 -2.449698 1.090492 1.556191 0.4270543 42.70543
499 1.090492 1.556191 0.42328350.7280003 72.80003
500 1.556191 0.4232835-0.348442 1.823188 182.3188
501 0.4232835-0.348442 1.240317 4.559608 455.9608
CHE3001 Computational Methods in Process Engineering
Secant Method
Experiment 2 a) x+exp(-x)=sin(x) with previous guess 10 and old guess 12 iteration limit 50
And error tolerance 0.0001
b) x^2-3x+6=1 with previous guess of 5 old guess 4 iteration limit 50
1.02.2017 error tolerance 0.0001
502 -0.348442 1.240317 13.24557 9.679182 967.9182
503 1.240317 13.24557 1.144063 0.9136267 91.36267
504 13.24557 1.144063 1.057069 0.07603948 7.603948
505 1.144063 1.057069 0.17429690.8351131 83.51131
506 1.057069 0.17429687 -3.5258272 21.228861 2122.8861
507 0.1742969-3.525827 0.3710282 1.105232 110.5232
508 -3.525827 0.37102820.55554590.4973143 49.73143
509 0.37102824 0.55554589 10.811949 18.461847 1846.1847
510 0.5555459 10.81195 0.48290680.9553358 95.53358
511 10.81195 0.48290680.4100265 0.15092 15.092
512 0.4829068 0.4100265 7.490615 17.268612 1726.8612
513 0.4100265 7.490615 0.30016780.9599275 95.99275
514 7.490615 0.30016780.18384360.3875308 38.75308
515 0.30016780.1838436 1.831079 8.959986 895.9986
516 0.1838436 1.831079 -0.653614 1.356956 135.6956
517 1.8310794 -0.65361399 -12.378859 17.939098 1793.9098
518 -0.653614 -12.37886 -0.5053276 0.9591782 95.91782
519 -12.37886 -0.5053276 -0.3785154 0.2509504 25.09504
520 -0.5053276 -0.3785154 0.4292957 2.134156 213.4156
521 -0.3785154 0.4292957 1.224685 1.852777 185.2777
522 0.4292957 1.224685 -0.7251713 1.592129 159.2129
523 1.224685 -0.7251713 3.772543 6.202278 620.2278
524 -0.7251713 3.772543 -1.8246521.483666 148.3666
525 3.772543 -1.824652 -8.316967 3.558112 355.8112
526 -1.824652 -8.316967 -1.272308 0.8470226 84.70226
CHE3001 Computational Methods in Process Engineering
Secant Method
Experiment 2 a) x+exp(-x)=sin(x) with previous guess 10 and old guess 12 iteration limit 50
And error tolerance 0.0001
b) x^2-3x+6=1 with previous guess of 5 old guess 4 iteration limit 50
1.02.2017 error tolerance 0.0001
527 -8.316967 -1.272308 -0.9048535 0.2888093 28.88093
528 -1.272308 -0.9048535 -0.0476061 0.9473881 94.73881
529 -0.90485353 -0.047606102 0.49011177 11.295146 1129.5146
530 -0.0476061 0.4901118 1.835592 2.745252 274.5252
531 0.4901118 1.835592 -0.07569909 1.04124 104.124
532 1.8355923 -0.075699092 -1.4988325 18.799874 1879.9874
533 -0.07569909 -1.498833 0.3443499 1.229745 122.9745
534 -1.498833 0.34434990.7037062 1.043579 104.3579
535 0.34434992 0.70370624 -15.766529 23.404986 2340.4986
536 0.7037062-15.76653 0.7529813 1.047758 104.7758
537 -15.76653 0.75298130.8038132 0.06750756 6.750756
538 0.75298130.8038132 -0.7089576 1.881993 188.1993
539 0.8038132 -0.7089576 1.734386 3.446388 344.6388
540 -0.70895761 1.7343857 -87.682802 51.555538 5155.5538
541 1.734386 -87.6828 1.760536 1.020078 102.0078
542 -87.6828 1.760536 1.787444 0.01528428 1.528428
543 1.760536 1.787444 0.84257320.5286157 52.86157
544 1.787444 0.84257320.31045840.6315354 63.15354
545 0.84257317 0.3104584-4.8252534 16.542351 1654.2351
546 0.3104584-4.825253 0.4529707 1.093875 109.3875
547 -4.825253 0.45297070.59298780.3091087 30.91087
548 0.45297068 0.59298784 -15.914219 27.837345 2783.7345
549 0.5929878-15.91422 0.63947 1.040182 104.0182
550 -15.91422 0.63947 0.6867489 0.07393447 7.393447
551 0.63947 0.6867489-1.719228 3.50343 350.343
CHE3001 Computational Methods in Process Engineering
Secant Method
Experiment 2 a) x+exp(-x)=sin(x) with previous guess 10 and old guess 12 iteration limit 50
And error tolerance 0.0001
b) x^2-3x+6=1 with previous guess of 5 old guess 4 iteration limit 50
1.02.2017 error tolerance 0.0001
552 0.6867489-1.719228 1.072915 1.624068 162.4068
553 -1.719228 1.072915 1.727853 0.6104281 61.04281
554 1.072915 1.727853 0.47415320.7255824 72.55824
555 1.727853 0.4741532 -0.1503593 1.317111 131.7111
556 0.47415324 -0.1503593 1.5842705 11.536565 1153.6565
557 -0.1503593 1.584271 -2.8536022.801208 280.1208
558 1.584271 -2.853602 2.432821 1.852544 185.2544
559 -2.853602 2.432821 5.590099 1.297785 129.7785
560 2.432821 5.590099 1.794084 0.6790604 67.90604
561 5.590099 1.794084 1.414294 0.2116906 21.16906
562 1.794084 1.414294 0.69614990.5077755 50.77755
563 1.414294 0.6961499-0.013904 1.019973 101.9973
564 0.696149922 -0.0139039951 3.1775494 229.534991 22953.4991
565 -0.013904 3.177549 -0.4826025 1.151879 115.1879
566 3.177549 -0.4826025 -1.4947332.097235 209.7235
567 -0.4826025 -1.494733 0.0935864 1.062611 106.2611
568 -1.494733 0.0935864 0.474726 4.072596 407.2596
569 0.0935864 0.474726 2.213573 3.662844 366.2844
570 0.474726 2.213573 0.03011353 0.986396 98.6396
571 2.2135731 0.030113527 -0.75046358 25.921145 2592.1145
572 0.03011353 -0.7504636 0.5944134 1.792062 179.2062
573 -0.7504636 0.5944134 1.250885 1.104402 110.4402
574 0.5944134 1.250885 -0.3033927 1.242543 124.2543
575 1.2508848 -0.30339275 26.272386 87.5953 8759.53
576 -0.3033927 26.27239 -0.3592797 1.013675 101.3675
CHE3001 Computational Methods in Process Engineering
Secant Method
Experiment 2 a) x+exp(-x)=sin(x) with previous guess 10 and old guess 12 iteration limit 50
And error tolerance 0.0001
b) x^2-3x+6=1 with previous guess of 5 old guess 4 iteration limit 50
1.02.2017 error tolerance 0.0001
577 26.27239 -0.3592797 -0.4190218 0.16628316.6283
578 -0.3592797 -0.4190218 0.4776772 2.139982 213.9982
579 -0.4190218 0.4776772 1.274939 1.669039 166.9039
580 0.4776772 1.274939 -0.5195085 1.407477 140.7477
581 1.2749392 -0.51950853 6.7970171 14.083552 1408.3552
582 -0.5195085 6.797017 -0.8585696 1.126316 112.6316
583 6.797017 -0.8585696 -1.384182 0.612196 61.2196
584 -0.8585696 -1.384182 -0.05810402 0.9580229 95.80229
585 -1.384182 -0.05810402 0.3765215 7.480129 748.0129
586 -0.05810402 0.3765215 1.499272 2.981902 298.1902
587 0.3765215 1.499272 -0.4972541 1.331664 133.1664
588 1.499271818 -0.4972541469 -865.1158643 1738.786123
173878.6123
589 -0.4972541 -865.1159 -0.4952411 0.9994275 99.94275
590 -865.1159 -0.4952411 -0.4932327 0.0040554060.4055406
591 -0.4952411 -0.4932327 0.3800557 1.77054 177.054
592 -0.4932327 0.3800557 1.066727 1.806765 180.6765
593 0.3800557 1.066727 -1.330813 2.247567 224.7567
594 1.066727 -1.330813 1.914121 2.43831 243.831
595 -1.330813 1.914121 8.513097 3.447522 344.7522
596 1.914121 8.513097 1.62244 0.8094183 80.94183
597 8.513097 1.62244 1.402435 0.1356019 13.56019
598 1.62244 1.402435 0.62984950.5508885 55.08885
599 1.402435 0.6298495 -0.1130283 1.179453 117.9453
600 0.62984951 -0.1130283 2.2169657 20.614253 2061.4253
601 -0.1130283 2.216966 -1.1328361.510985 151.0985
CHE3001 Computational Methods in Process Engineering
Secant Method
Experiment 2 a) x+exp(-x)=sin(x) with previous guess 10 and old guess 12 iteration limit 50
And error tolerance 0.0001
b) x^2-3x+6=1 with previous guess of 5 old guess 4 iteration limit 50
1.02.2017 error tolerance 0.0001
602 2.2169657-1.1328359 -41.738552 35.844307 3584.4307
603 -1.132836 -41.73855 -1.054968 0.9747244 97.47244
604 -41.73855 -1.054968 -0.9826306 0.06856868 6.856868
605 -1.054968 -0.9826306 -0.01206356 0.9877232 98.77232
606 -0.98263061 -0.012063558 0.49538721 42.064768 4206.4768
607 -0.01206356 0.4953872 1.947014 2.930287 293.0287
608 0.4953872 1.947014 -0.02459379 1.012632 101.2632
609 1.9470141 -0.024593794 -1.1360163 45.191176 4519.1176
610 -0.02459379 -1.136016 0.4499012 1.396034 139.6034
611 -1.136016 0.44990120.89619930.9919913 99.19913
612 0.44990120.8961993-1.724352 2.924072 292.4072
613 0.8961993-1.724352 1.392314 1.807442 180.7442
614 -1.724352 1.392314 2.553111 0.8337176 83.37176
615 1.392314 2.553111 0.86735620.6602748 66.02748
616 2.553111 0.86735620.5017448 0.421524 42.1524
617 0.86735620.5017448-1.530227 4.049812 404.9812
618 0.5017448-1.530227 0.8714808 1.569511 156.9511
619 -1.530227 0.8714808 1.406824 0.6142909 61.42909
620 0.8714808 1.406824 0.17681210.8743182 87.43182
621 1.406824 0.1768121-1.287201 8.280051 828.0051
622 0.1768121-1.287201 0.5816902 1.451903 145.1903
623 -1.287201 0.5816902 1.025354 0.7627147 76.27147
624 0.5816902 1.025354 -0.6647978 1.648359 164.8359
625 1.025354 -0.6647978 2.629868 4.955891 495.5891
626 -0.6647978 2.629868 -2.847804 2.08287 208.287
CHE3001 Computational Methods in Process Engineering
Secant Method
Experiment 2 a) x+exp(-x)=sin(x) with previous guess 10 and old guess 12 iteration limit 50
And error tolerance 0.0001
b) x^2-3x+6=1 with previous guess of 5 old guess 4 iteration limit 50
1.02.2017 error tolerance 0.0001
627 2.629868 -2.847804 6.970275 3.447596 344.7596
628 -2.847804 6.970275 -6.677397 1.957982 195.7982
629 6.9702746-6.6773967 67.234909 11.06903 1106.903
630 -6.677397 67.23491 -7.554952 1.112367 111.2367
631 67.23491 -7.554952 -8.67343 0.1480457 14.80457
632 -7.554952 -8.67343 -3.74541 0.5681743 56.81743
633 -8.67343 -3.74541 -2.346369 0.3735348 37.35348
634 -3.74541 -2.346369 -1.098189 0.5319624 53.19624
635 -2.346369 -1.098189 -0.3547612 0.676958 67.6958
636 -1.098189 -0.3547612 0.2488453 1.701445 170.1445
637 -0.3547612 0.2488453 0.9840537 2.95448 295.448
638 0.24884530.9840537-3.242275 4.294815 429.4815
639 0.9840537-3.242275 1.286154 1.396682 139.6682
640 -3.242275 1.286154 1.748935 0.359818 35.9818
641 1.286154 1.748935 0.61392850.6489701 64.89701
642 1.748935 0.6139285 0.05409258 0.9118911 91.18911
643 0.61392846 0.054092584 2.9122057 52.83743 5283.743
644 0.05409258 2.912206 -0.4284555 1.147124 114.7124
645 2.912206 -0.4284555 -1.514912 2.53575 253.575
646 -0.4284555 -1.514912 0.1192267 1.078702 107.8702
647 -1.514912 0.11922670.4928101 3.133389 313.3389
648 0.11922670.4928101 2.426116 3.923025 392.3025
649 0.4928101 2.426116 0.10193970.9579824 95.79824
650 2.426116 0.1019397 -0.4925751 5.832025 583.2025
651 0.1019397 -0.4925751 0.7552036 2.533174 253.3174
CHE3001 Computational Methods in Process Engineering
Secant Method
Experiment 2 a) x+exp(-x)=sin(x) with previous guess 10 and old guess 12 iteration limit 50
And error tolerance 0.0001
b) x^2-3x+6=1 with previous guess of 5 old guess 4 iteration limit 50
1.02.2017 error tolerance 0.0001
652 -0.4925751 0.7552036 1.860656 1.46378 146.378
653 0.7552036 1.860656 0.25074830.8652366 86.52366
654 1.860656 0.2507483 -0.4799728 2.914162 291.4162
655 0.2507483 -0.4799728 0.9114302 2.89892 289.892
656 -0.4799728 0.9114302 2.528327 1.774022 177.4022
657 0.9114302 2.528327 0.53464070.7885397 78.85397
658 2.528327 0.53464070.17050510.6810847 68.10847
659 0.53464072 0.17050512 3.0823409 17.077703 1707.7703
660 0.1705051 3.082341 -0.2105981 1.068324 106.8324
661 3.082341 -0.2105981 -0.8810693 3.183653 318.3653
662 -0.2105981 -0.8810693 0.3893776 1.441938 144.1938
663 -0.8810693 0.3893776 0.9003661 1.312321 131.2321
664 0.38937760.9003661-2.241352 3.489378 348.9378
665 0.9003661-2.241352 1.289216 1.575196 157.5196
666 -2.241352 1.289216 1.992478 0.5454957 54.54957
667 1.289216 1.992478 0.687531 0.6549368 65.49368
668 1.992478 0.687531 0.22017180.6797645 67.97645
669 0.68753101 0.22017182 9.1944864 40.760505 4076.0505
670 0.2201718 9.194486 0.121736 0.9867599 98.67599
671 9.194486 0.121736 0.01434545 0.8821593 88.21593
672 0.121736 0.014345451 1.1554951 79.54784 7954.784
673 0.01434545 1.155495 -5.790278 6.01108 601.108
674 1.155495 -5.790278 1.364851 1.235714 123.5714
675 -5.790278 1.364851 1.640952 0.202294 20.2294
676 1.364851 1.640952 0.61803410.6233685 62.33685
CHE3001 Computational Methods in Process Engineering
Secant Method
Experiment 2 a) x+exp(-x)=sin(x) with previous guess 10 and old guess 12 iteration limit 50
And error tolerance 0.0001
b) x^2-3x+6=1 with previous guess of 5 old guess 4 iteration limit 50
1.02.2017 error tolerance 0.0001
677 1.640952 0.6180341 0.01125057 0.9817962 98.17962
678 0.618034128 0.0112505699 2.67873152 237.097408 23709.7408
679 0.01125057 2.678732 -0.5738894 1.214239 121.4239
680 2.678732 -0.5738894 -2.2965233.001683 300.1683
681 -0.5738894 -2.296523 -0.08214891 0.964229 96.4229
682 -2.296523 -0.08214891 0.2401367 3.923188 392.3188
683 -0.08214891 0.2401367 1.21106 4.043209 404.3209
684 0.2401367 1.21106 -1.571777 2.297853 229.7853
685 1.21106 -1.571777 2.133812 2.357579 235.7579
686 -1.571777 2.133812 9.941144 3.658866 365.8866
687 2.133812 9.941144 1.825067 0.8164128 81.64128
688 9.941144 1.825067 1.59232 0.1275279 12.75279
689 1.825067 1.59232 0.78849190.5048156 50.48156
690 1.59232 0.78849190.18505880.7653004 76.53004
691 0.788491936 0.185058761 32.2913104 173.4922 17349.22
692 0.1850588 32.29131 0.15808020.9951046 99.51046
693 32.29131 0.1580802 0.130515 0.1743749 17.43749
694 0.1580802 0.130515 1.376668 9.547969 954.7969
695 0.130515 1.376668 -1.617414 2.174876 217.4876
696 1.376668 -1.617414 2.600566 2.607855 260.7855
697 -1.617413532.60056597 309.017546 117.827036 11782.7036
698 2.600566 309.0175 2.583946 0.9916382 99.16382
699 309.0175 2.583946 2.56755 0.006345595 0.6345595
700 2.583946 2.56755 1.3572 0.4714026 47.14026
701 2.56755 1.3572 0.84953540.3740529 37.40529
CHE3001 Computational Methods in Process Engineering
Secant Method
Experiment 2 a) x+exp(-x)=sin(x) with previous guess 10 and old guess 12 iteration limit 50
And error tolerance 0.0001
b) x^2-3x+6=1 with previous guess of 5 old guess 4 iteration limit 50
1.02.2017 error tolerance 0.0001
702 1.3572 0.84953540.12677960.8507659 85.07659
703 0.849535404 0.126779621 37.6735133 296.157486
29615.7486
704 0.1267796 37.67351 0.10261420.9972762 99.72762
705 37.67351 0.10261420.07792660.2405868 24.05868
706 0.10261423 0.0779266 1.2105589 14.534605 1453.4605
707 0.0779266 1.210559 -3.139378 3.59333 359.333
708 1.210559 -3.139378 1.639023 1.522085 152.2085
709 -3.139378 1.639023 2.457856 0.499586 49.9586
710 1.639023 2.457856 0.97791440.6021271 60.21271
711 2.457856 0.97791440.57623360.4107525 41.07525
712 0.97791440.5762336 -0.7876827 2.36695 236.695
713 0.5762336 -0.7876827 1.200124 2.523614 252.3614
714 -0.7876827 1.200124 3.310848 1.758754 175.8754
715 1.200124 3.310848 0.84689610.7442057 74.42057
716 3.310848 0.84689610.57127620.3254471 32.54471
717 0.84689610.5712762-1.234392 3.160762 316.0762
718 0.5712762-1.234392 1.025292 1.830605 183.0605
719 -1.234392 1.025292 1.8738 0.8275775 82.75775
720 1.025292 1.8738 0.48506970.7411305 74.11305
721 1.8738 0.4850697 -0.06702365 1.138173 113.8173
722 0.48506966 -0.067023647 1.7742144 27.471469 2747.1469
723 -0.06702365 1.774214 -1.5821961.891773 189.1773
724 1.774214 -1.582196 4.711933 3.978097 397.8097
725 -1.582196 4.711933 -3.970069 1.842556 184.2556
726 4.7119327-3.9700686 76.342315 20.22947 2022.947
CHE3001 Computational Methods in Process Engineering
Secant Method
Experiment 2 a) x+exp(-x)=sin(x) with previous guess 10 and old guess 12 iteration limit 50
And error tolerance 0.0001
b) x^2-3x+6=1 with previous guess of 5 old guess 4 iteration limit 50
1.02.2017 error tolerance 0.0001
727 -3.970069 76.34231 -4.260539 1.055808 105.5808
728 76.34231 -4.260539 -4.589916 0.07730886 7.730886
729 -4.260539 -4.589916 -1.883722 0.5895956 58.95956
730 -4.589916 -1.883722 -1.023079 0.456884 45.6884
731 -1.883722 -1.023079 -0.2373289 0.7680249 76.80249
732 -1.023079 -0.2373289 0.3349809 2.411463 241.1463
733 -0.2373289 0.3349809 1.196324 2.57132 257.132
734 0.3349809 1.196324 -1.127891 1.942797 194.2797
735 1.196324 -1.127891 2.521905 3.235947 323.5947
736 -1.127891 2.521905 -9.757111 4.868945 486.8945
737 2.521905 -9.757111 3.109394 1.31868 131.868
738 -9.757111 3.109394 4.097786 0.3178727 31.78727
739 3.109394 4.097786 1.891621 0.5383797 53.83797
740 4.097786 1.891621 1.353158 0.2846567 28.46567
741 1.891621 1.353158 0.69479560.4865379 48.65379
742 1.353158 0.6947956 -0.05709364 1.082173 108.2173
743 0.69479559 -0.057093639 2.8696495 51.262159 5126.2159
744 -0.05709364 2.86965 -0.6420981 1.223755 122.3755
745 2.86965 -0.6420981 -2.3156642.606402 260.6402
746 -0.6420981 -2.315664 -0.1230199 0.9468749 94.68749
747 -2.315664 -0.1230199 0.2079654 2.690502 269.0502
748 -0.1230199 0.2079654 1.12079 4.38931 438.931
749 0.2079654 1.12079 -2.332782 3.081373 308.1373
750 1.12079 -2.332782 1.634074 1.700483 170.0483
751 -2.332782 1.634074 2.832705 0.7335229 73.35229
CHE3001 Computational Methods in Process Engineering
Secant Method
Experiment 2 a) x+exp(-x)=sin(x) with previous guess 10 and old guess 12 iteration limit 50
And error tolerance 0.0001
b) x^2-3x+6=1 with previous guess of 5 old guess 4 iteration limit 50
1.02.2017 error tolerance 0.0001
752 1.634074 2.832705 1.046749 0.630477 63.0477
753 2.832705 1.046749 0.68246690.3480132 34.80132
754 1.046749 0.6824669 -0.3916919 1.573935 157.3935
755 0.6824669 -0.3916919 1.786904 5.562014 556.2014
756 -0.3916919 1.786904 -4.3012773.407112 340.7112
757 1.786904 -4.301277 2.471555 1.57461 157.461
758 -4.301277 2.471555 4.110243 0.6630189 66.30189
759 2.471555 4.110243 1.640814 0.6007988 60.07988
760 4.110243 1.640814 1.209025 0.2631557 26.31557
761 1.640814 1.209025 0.53182180.5601232 56.01232
762 1.209025 0.5318218 -0.4819006 1.906132 190.6132
763 0.5318218 -0.4819006 1.322296 3.743918 374.3918
764 -0.4819006 1.322296 10.25794 6.75767 675.767
765 1.322296 10.25794 1.1875 0.884236 88.4236
766 10.25794 1.1875 1.070448 0.09856987 9.856987
767 1.1875 1.070448 0.21555540.7986308 79.86308
768 1.07044840.21555536 -2.689682213.477919 1347.7919
769 0.2155554-2.689682 0.4547259 1.169063 116.9063
770 -2.689682 0.45472590.68720190.5112443 51.12443
771 0.45472590.6872019-4.844094 8.049011 804.9011
772 0.6872019-4.844094 0.839434 1.17329 117.329
773 -4.844094 0.839434 1.012316 0.2059506 20.59506
774 0.839434 1.012316 -0.1763752 1.174229 117.4229
775 1.012316 -0.17637515 7.1836728 41.729507 4172.9507
776 -0.1763752 7.183673 -0.3773779 1.052533 105.2533
CHE3001 Computational Methods in Process Engineering
Secant Method
Experiment 2 a) x+exp(-x)=sin(x) with previous guess 10 and old guess 12 iteration limit 50
And error tolerance 0.0001
b) x^2-3x+6=1 with previous guess of 5 old guess 4 iteration limit 50
1.02.2017 error tolerance 0.0001
777 7.183673 -0.3773779 -0.6391269 0.6935992 69.35992
778 -0.3773779 -0.6391269 0.3762984 1.58877 158.877
779 -0.6391269 0.3762984 0.9823206 1.610483 161.0483
780 0.37629840.9823206-1.757726 2.789361 278.9361
781 0.9823206-1.757726 1.53579 1.873737 187.3737
782 -1.757726 1.53579 3.027571 0.9713443 97.13443
783 1.53579 3.027571 1.024234 0.661698 66.1698
784 3.027571 1.024234 0.68842550.3278628 32.78628
785 1.024234 0.6884255 -0.4137905 1.601068 160.1068
786 0.6884255 -0.4137905 1.771334 5.280752 528.0752
787 -0.4137905 1.771334 -4.846849 3.73627 373.627
788 1.771334 -4.846849 2.351946 1.485253 148.5253
789 -4.846849 2.351946 3.547888 0.5084906 50.84906
790 2.351946 3.547888 1.498916 0.5775187 57.75187
791 3.547888 1.498916 1.067012 0.2881446 28.81446
792 1.498916 1.067012 0.38275140.6412866 64.12866
793 1.067012 0.3827514-1.315359 4.436589 443.6589
794 0.3827514-1.315359 0.7779413 1.591429 159.1429
795 -1.315359 0.7779413 1.31602 0.6916697 69.16697
796 0.7779413 1.31602 0.02174318 0.9834781 98.34781
797 1.31601977 0.021743176 -2.87593873 133.268567
13326.8567
798 0.02174318 -2.875939 0.2756819 1.095858 109.5858
799 -2.875939 0.27568190.49797680.8063455 80.63455
800 0.27568190.4979768 3.811575 6.654122 665.4122
801 0.4979768 3.811575 0.27135880.9288067 92.88067
CHE3001 Computational Methods in Process Engineering
Secant Method
Experiment 2 a) x+exp(-x)=sin(x) with previous guess 10 and old guess 12 iteration limit 50
And error tolerance 0.0001
b) x^2-3x+6=1 with previous guess of 5 old guess 4 iteration limit 50
1.02.2017 error tolerance 0.0001
802 3.811575 0.2713588 0.01112715 0.9589947 95.89947
803 0.271358761 0.0111271503 1.38949265 123.874079 12387.4079
804 0.01112715 1.389493 -2.4575392.768659 276.8659
805 1.389493 -2.457539 2.134736 1.868648 186.8648
806 -2.457539 2.134736 4.721937 1.211954 121.1954
807 2.134736 4.721937 1.550383 0.6716637 67.16637
808 4.721937 1.550383 1.198867 0.2267284 22.67284
809 1.550383 1.198867 0.49089810.5905317 59.05317
810 1.198867 0.4908981 -0.5965482 2.215218 221.5218
811 0.4908981 -0.5965482 1.169307 2.960121 296.0121
812 -0.5965482 1.169307 3.973278 2.397976 239.7976
813 1.169307 3.973278 0.88012230.7784896 77.84896
814 3.973278 0.88012230.64799150.2637484 26.37484
815 0.88012230.6479915 -0.8136281 2.255615 225.5615
816 0.6479915 -0.8136281 1.310206 2.610325 261.0325
817 -0.8136281 1.310206 4.103953 2.132296 213.2296
818 1.310206 4.103953 0.99158730.7583824 75.83824
819 4.103953 0.99158730.74945610.2441855 24.41855
820 0.99158730.7494561 -0.3466045 1.462475 146.2475
821 0.7494561 -0.3466045 2.109634 7.086576 708.6576
822 -0.3466045 2.109634 -2.2688612.075476 207.5476
823 2.109634 -2.268861 4.991662 3.200074 320.0074
824 -2.268861 4.991662 -7.154272 2.433244 243.3244
825 4.991662 -7.154272 11.60804 2.622533 262.2533
826 -7.154272 11.60804 -24.33488 3.096381 309.6381
CHE3001 Computational Methods in Process Engineering
Secant Method
Experiment 2 a) x+exp(-x)=sin(x) with previous guess 10 and old guess 12 iteration limit 50
And error tolerance 0.0001
b) x^2-3x+6=1 with previous guess of 5 old guess 4 iteration limit 50
1.02.2017 error tolerance 0.0001
827 11.60804 -24.33488 20.65154 1.848639 184.8639
828 -24.33488 20.65154 107.52 4.206391 420.6391
829 20.65154 107.52 17.45244 0.8376819 83.76819
830 107.52 17.45244 15.12825 0.1331727 13.31727
831 17.45244 15.12825 8.328661 0.449463 44.9463
832 15.12825 8.328661 5.566129 0.3316898 33.16898
833 8.328661 5.566129 3.517576 0.3680391 36.80391
834 5.566129 3.517576 2.298362 0.3466062 34.66062
835 3.517576 2.298362 1.471087 0.3599412 35.99412
836 2.298362 1.471087 0.85977040.4155543 41.55543
837 1.471087 0.85977040.1989672 0.768581 76.8581
838 0.85977042 0.19896722 -14.112481 71.928675 7192.8675
839 0.1989672-14.11248 0.2553336 1.018093 101.8093
840 -14.11248 0.25533360.3098435 0.213485 21.3485
841 0.25533360.3098435 2.117843 5.835202 583.5202
842 0.3098435 2.117843 -0.2408093 1.113705 111.3705
843 2.117843 -0.2408093 -1.7217096.149677 614.9677
844 -0.2408093 -1.721709 0.1976009 1.11477 111.477
845 -1.721709 0.19760090.5309643 1.687054 168.7054
846 0.19760090.5309643 3.297591 5.210571 521.0571
847 0.5309643 3.297591 0.26547240.9194951 91.94951
848 3.297591 0.2654724 -0.04860615 1.183093 118.3093
849 0.26547235 -0.048606146 1.2933979 27.60976 2760.976
850 -0.04860615 1.293398 -4.341924 4.35699 435.699
851 1.293398 -4.341924 1.634134 1.376362 137.6362
CHE3001 Computational Methods in Process Engineering
Secant Method
Experiment 2 a) x+exp(-x)=sin(x) with previous guess 10 and old guess 12 iteration limit 50
And error tolerance 0.0001
b) x^2-3x+6=1 with previous guess of 5 old guess 4 iteration limit 50
1.02.2017 error tolerance 0.0001
852 -4.341924 1.634134 2.183319 0.3360706 33.60706
853 1.634134 2.183319 0.91140330.5825606 58.25606
854 2.183319 0.9114033 0.472561 0.4815018 48.15018
855 0.9114033 0.472561 -1.482706 4.137598 413.7598
856 0.472561 -1.482706 0.8460429 1.570607 157.0607
857 -1.482706 0.8460429 1.377457 0.6281169 62.81169
858 0.8460429 1.377457 0.13517570.9018658 90.18658
859 1.37745670.13517567 -1.587495212.743941 1274.3941
860 0.1351757-1.587495 0.4952824 1.31199 131.199
861 -1.587495 0.49528240.85376520.7237947 72.37947
862 0.49528240.8537652-1.653485 2.936698 293.6698
863 0.8537652-1.653485 1.340035 1.810431 181.0431
864 -1.653485 1.340035 2.448306 0.8270464 82.70464
865 1.340035 2.448306 0.81798320.6658983 66.58983
866 2.448306 0.81798320.44242950.4591215 45.91215
867 0.81798320.4424295-2.450341 6.538376 653.8376
868 0.4424295-2.450341 0.6928739 1.282766 128.2766
869 -2.450341 0.69287390.97835330.4120223 41.20223
870 0.69287390.9783533 -0.4799039 1.490522 149.0522
871 0.9783533 -0.4799039 2.929945 7.105274 710.5274
872 -0.4799039 2.929945 -1.6593271.566334 156.6334
873 2.929945 -1.6593268 -21.660546 12.053815 1205.3815
874 -1.659327 -21.66055 -1.436764 0.9336691 93.36691
875 -21.66055 -1.436764 -1.249978 0.1300051 13.00051
876 -1.436764 -1.249978 -0.215888 0.8272865 82.72865
CHE3001 Computational Methods in Process Engineering
Secant Method
Experiment 2 a) x+exp(-x)=sin(x) with previous guess 10 and old guess 12 iteration limit 50
And error tolerance 0.0001
b) x^2-3x+6=1 with previous guess of 5 old guess 4 iteration limit 50
1.02.2017 error tolerance 0.0001
877 -1.249978 -0.215888 0.2961008 2.371548 237.1548
878 -0.215888 0.2961008 1.156707 2.906465 290.6465
879 0.2961008 1.156707 -1.452045 2.255326 225.5326
880 1.156707 -1.452045 2.068643 2.424641 242.4641
881 -1.452045 2.068643 10.44272 4.048102 404.8102
882 2.068643 10.44272 1.789732 0.8286144 82.86144
883 10.44272 1.789732 1.574872 0.1200517 12.00517
884 1.789732 1.574872 0.76909240.5116476 51.16476
885 1.574872 0.76909240.15716350.7956507 79.56507
886 0.76909245 0.15716348 11.921321 74.852998 7485.2998
887 0.1571635 11.92132 0.07885522 0.9933854 99.33854
888 11.92132 0.07885522 -0.005449145 1.069103 106.9103
889 0.078855222 -0.00544914544 1.07968514 199.138434 19913.8434
890 -0.0054491454 1.0796851 -13.549806 13.549775 1354.9775
891 1.079685 -13.54981 1.160311 1.085633 108.5633
892 -13.54981 1.160311 1.248888 0.07633961 7.633961
893 1.160311 1.248888 0.31869050.7448206 74.48206
894 1.248888 0.3186905 -1.06063 4.328088 432.8088
895 0.3186905 -1.06063 0.7681166 1.724208 172.4208
896 -1.06063 0.7681166 1.403999 0.8278461 82.78461
897 0.7681166 1.403999 0.06691745 0.952338 95.2338
898 1.403999 0.066917449 -1.92401 29.751993 2975.1993
899 0.06691745 -1.92401 0.3950694 1.205336 120.5336
900 -1.92401 0.3950694 0.69599 0.7616906 76.16906
901 0.39506940.69599005 -7.962223112.440139 1244.0139
CHE3001 Computational Methods in Process Engineering
Secant Method
Experiment 2 a) x+exp(-x)=sin(x) with previous guess 10 and old guess 12 iteration limit 50
And error tolerance 0.0001
b) x^2-3x+6=1 with previous guess of 5 old guess 4 iteration limit 50
1.02.2017 error tolerance 0.0001
902 0.69599 -7.962223 0.7913675 1.09939 109.939
903 -7.962223 0.79136750.89354710.1291178 12.91178
904 0.79136750.8935471 -0.4276093 1.478553 147.8553
905 0.8935471 -0.4276093 2.58788 7.051973 705.1973
906 -0.4276093 2.58788 -1.8156121.701583 170.1583
907 2.5878802 -1.815612 25.023235 14.782259 1478.2259
908 -1.815612 25.02324 -2.090835 1.083556 108.3556
909 25.02324 -2.090835 -2.431082 0.1627325 16.27325
910 -2.090835 -2.431082 -0.7394158 0.6958491 69.58491
911 -2.431082 -0.7394158 -0.1912435 0.7413587 74.13587
912 -0.7394158 -0.1912435 0.4447142 3.325382 332.5382
913 -0.1912435 0.4447142 1.453458 2.268296 226.8296
914 0.4447142 1.453458 -0.3937185 1.270884 127.0884
915 1.4534576 -0.39371846 -26.318648 65.846364 6584.6364
916 -0.3937185 -26.31865 -0.3378325 0.9871638 98.71638
917 -26.31865 -0.3378325 -0.2853326 0.1554023 15.54023
918 -0.3378325 -0.2853326 0.5566935 2.951034 295.1034
919 -0.2853326 0.5566935 1.590421 1.856906 185.6906
920 0.5566935 1.590421 -0.09992297 1.062828 106.2828
921 1.5904209 -0.099922967 -2.3627412 22.645627 2264.5627
922 -0.09992297 -2.362741 0.2206128 1.093372 109.3372
923 -2.362741 0.22061280.4841466 1.194554 119.4554
924 0.22061280.4841466 3.025299 5.248724 524.8724
925 0.4841466 3.025299 0.1851756 0.938791 93.8791
926 3.025299 0.1851756 -0.1989566 2.074421 207.4421
CHE3001 Computational Methods in Process Engineering
Secant Method
Experiment 2 a) x+exp(-x)=sin(x) with previous guess 10 and old guess 12 iteration limit 50
And error tolerance 0.0001
b) x^2-3x+6=1 with previous guess of 5 old guess 4 iteration limit 50
1.02.2017 error tolerance 0.0001
927 0.1851756 -0.1989566 1.022748 6.140557 614.0557
928 -0.1989566 1.022748 6.829855 5.677949 567.7949
929 1.022748 6.829855 0.8734225 0.872117 87.2117
930 6.829855 0.87342250.74073450.1519173 15.19173
931 0.87342250.7407345 -0.5748136 1.776005 177.6005
932 0.7407345 -0.5748136 1.709411 3.973854 397.3854
933 -0.5748136 1.709411 -14.729759.616854 961.6854
934 1.709411 -14.72975 1.86723 1.126766 112.6766
935 -14.72975 1.86723 2.05618 0.1011925 10.11925
936 1.86723 2.05618 0.97124990.5276436 52.76436
937 2.05618 0.97124990.4917875 0.493655 49.3655
938 0.97124990.4917875-1.128098 3.293872 329.3872
939 0.4917875-1.128098 0.950177 1.842283 184.2283
940 -1.128098 0.950177 1.758941 0.8511715 85.11715
941 0.950177 1.758941 0.39277870.7766959 77.66959
942 1.758941 0.3927787 -0.2684035 1.683345 168.3345
943 0.3927787 -0.2684035 1.262439 5.703513 570.3513
944 -0.2684035 1.26243936 224.482046 176.816103 17681.6103
945 1.262439 224.482 1.256516 0.9944026 99.44026
946 224.482 1.256516 1.250632 0.004682629 0.4682629
947 1.256516 1.250632 0.37915240.6968314 69.68314
948 1.250632 0.3791524 -0.8349208 3.202072 320.2072
949 0.3791524 -0.8349208 0.9043761 2.083188 208.3188
950 -0.8349208 0.9043761 1.886081 1.085505 108.5505
951 0.9043761 1.886081 0.39416 0.7910164 79.10164
CHE3001 Computational Methods in Process Engineering
Secant Method
Experiment 2 a) x+exp(-x)=sin(x) with previous guess 10 and old guess 12 iteration limit 50
And error tolerance 0.0001
b) x^2-3x+6=1 with previous guess of 5 old guess 4 iteration limit 50
1.02.2017 error tolerance 0.0001
952 1.886081 0.39416 -0.2004173 1.508467 150.8467
953 0.39416 -0.2004173 1.338278 7.677457 767.7457
954 -0.2004173 1.338278 -9.1992447.873941 787.3941
955 1.338278 -9.199244 1.502223 1.163299 116.3299
956 -9.199244 1.502223 1.703953 0.1342877 13.42877
957 1.502223 1.703953 0.70697770.5850955 58.50955
958 1.703953 0.70697770.14505090.7948296 79.48296
959 0.70697771 0.1450509 6.0650387 40.813176 4081.3176
960 0.1450509 6.065039 -0.02308227 1.003806 100.3806
961 6.065039 -0.02308227 -0.2261017 8.79547 879.547
962 -0.02308227 -0.2261017 0.7963447 4.522064 452.2064
963 -0.2261017 0.7963447 2.745866 2.448087 244.8087
964 0.7963447 2.745866 0.46678110.8300059 83.00059
965 2.745866 0.46678110.12732180.7272345 72.72345
966 0.46678105 0.12732176 2.3172583 17.200018 1720.0018
967 0.1273218 2.317258 -0.4880052 1.210596 121.0596
968 2.317258 -0.4880052 -2.5695834.265482 426.5482
969 -0.4880052 -2.569583 -0.0625913 0.9756415 97.56415
970 -2.569583 -0.0625913 0.231037 4.6912 469.12
971 -0.0625913 0.231037 1.219957 4.280356 428.0356
972 0.231037 1.219957 -1.592358 2.305257 230.5257
973 1.219957 -1.592358 2.144133 2.346514 234.6514
974 -1.592358 2.144133 9.848231 3.593107 359.3107
975 2.144133 9.848231 1.82999 0.8141808 81.41808
976 9.848231 1.82999 1.594101 0.1289017 12.89017
977 1.82999 1.594101 0.79088980.5038647 50.38647
CHE3001 Computational Methods in Process Engineering
Secant Method
Experiment 2 a) x+exp(-x)=sin(x) with previous guess 10 and old guess 12 iteration limit 50
And error tolerance 0.0001
b) x^2-3x+6=1 with previous guess of 5 old guess 4 iteration limit 50
1.02.2017 error tolerance 0.0001
978 1.594101 0.79088980.18827430.7619462 76.19462
979 0.790889795 0.188274347 40.8476458 215.958107
21595.8107
980 0.1882743 40.84765 0.167114 0.9959088 99.59088
981 40.84765 0.167114 0.14560160.1287288 12.87288
982 0.167114 0.1456016 1.419599 8.749881 874.9881
983 0.1456016 1.419599 -1.40358 1.988716 198.8716
984 1.419599 -1.40358 3.041236 3.16677 316.677
985 -1.40358 3.041236 -8.262485 3.716818 371.6818
986 3.041236 -8.262485 4.199827 1.508301 150.8301
987 -8.262485 4.199827 7.05183 0.6790764 67.90764
988 4.199827 7.05183 2.791399 0.6041596 60.41596
989 7.05183 2.791399 2.112856 0.2430834 24.30834
990 2.791399 2.112856 1.254484 0.4062617 40.62617
991 2.112856 1.254484 0.6972145 0.444222 44.4222
992 1.254484 0.6972145-0.131718 1.18892 118.892
993 0.6972145 -0.13171796 2.5128354 20.077393 2007.7393
994 -0.131718 2.512835 -0.963702 1.383512 138.3512
995 2.512835 -0.963702 -6.230953 5.465643 546.5643
996 -0.963702 -6.230953 -0.6107373 0.9019833 90.19833
997 -6.230953 -0.6107373 -0.3577641 0.4142095 41.42095
998 -0.6107373 -0.3577641 0.3970026 2.109677 210.9677
999 -0.3577641 0.3970026 1.188675 1.994124 199.4124
1000 0.39700257 1.1886751 -0.90167856 1.7585577 175.85577
the function is non converging and thus has no real root
Result:
The code has been successfully validated to calculate root using secant
method
Various pitfalls have been rectified and validated like
When initial values are root itself,
When denominator becomes zero
When the solution does not exist and nature of equation is diverging.
Errors have been displayed and run time error has been considered too.
Thus a generic code has been successfully validated for the secant method .
CHE3001 Computational Methods in Process Engineering