03-Feb-2021 09:20:17 test_zero_test MATLAB/Octave version 9.9.0.1467703 (R2020b) Test test_zero. Function value tolerance = 1e-06 Root absolute tolerance = 1e-06 Root relative tolerance = 1e-06 Maximum number of steps = 25 Number of problems available is 19 Problem number 1 "F(X) = SIN(X) - 0.5 * X" We seek roots between -1000 and 1000 Number of known roots = 3 I X F(X) 1 -1.89549 0 2 0 0 3 1.89549 0 Number of starting points = 2 I X F(X) 1 1.5708 0.214602 2 3.14159 -1.5708 BISECTION Step XA XB F(XA) F(XB) 0 3.141593e+00 1.570796e+00 -1.570796e+00 2.146018e-01 1 2.356194e+00 1.570796e+00 -4.709905e-01 2.146018e-01 2 1.963495e+00 1.570796e+00 -5.786817e-02 2.146018e-01 3 1.963495e+00 1.767146e+00 -5.786817e-02 9.721235e-02 4 1.963495e+00 1.865321e+00 -5.786817e-02 2.428002e-02 5 1.914408e+00 1.865321e+00 -1.565995e-02 2.428002e-02 6 1.914408e+00 1.889864e+00 -1.565995e-02 4.596015e-03 7 1.902136e+00 1.889864e+00 -5.460763e-03 4.596015e-03 8 1.896000e+00 1.889864e+00 -4.145359e-04 4.596015e-03 9 1.896000e+00 1.892932e+00 -4.145359e-04 2.095204e-03 10 1.896000e+00 1.894466e+00 -4.145359e-04 8.414494e-04 11 1.896000e+00 1.895233e+00 -4.145359e-04 2.137355e-04 12 1.895617e+00 1.895233e+00 -1.003305e-04 2.137355e-04 13 1.895617e+00 1.895425e+00 -1.003305e-04 5.671995e-05 14 1.895521e+00 1.895425e+00 -2.180091e-05 5.671995e-05 15 1.895521e+00 1.895473e+00 -2.180091e-05 1.746061e-05 16 1.895497e+00 1.895473e+00 -2.169878e-06 1.746061e-05 17 1.895497e+00 1.895485e+00 -2.169878e-06 7.645434e-06 18 1.895497e+00 1.895491e+00 -2.169878e-06 2.737795e-06 19 1.895497e+00 1.895494e+00 -2.169878e-06 2.839629e-07 Function small enough for convergence. BRENT Step XA XB F(XA) F(XB) 0 3.141593e+00 1.570796e+00 -1.570796e+00 2.146018e-01 1 1.759603e+00 3.141593e+00 1.024271e-01 -1.570796e+00 2 1.921450e+00 1.759603e+00 -2.157685e-02 1.024271e-01 3 1.893289e+00 1.921450e+00 1.804103e-03 -2.157685e-02 4 1.895462e+00 1.921450e+00 2.668830e-05 -2.157685e-02 5 1.895494e+00 1.895462e+00 -1.097850e-09 2.668830e-05 Function small enough for convergence. NEWTON Step X F(X) FP(X) 0 1.5708 0.214602 -0.5 1 2 -0.0907026 -0.916147 2 1.901 -0.00452004 -0.824232 3 1.89551 -1.42334e-05 -0.819039 4 1.89549 -1.4311e-10 -0.819023 The function norm is small enough for convergence. NEWTON Step X F(X) FP(X) 0 3.14159 -1.5708 -1.5 1 2.0944 -0.181172 -1 2 1.91322 -0.0146688 -0.835774 3 1.89567 -0.000145379 -0.819191 4 1.89549 -1.49238e-08 -0.819023 The function norm is small enough for convergence. REGULA FALSI Step XA XB F(XA) F(XB) 0 3.14159 1.5708 -1.5708 0.214602 1 3.14159 1.7596 -1.5708 0.102427 2 3.14159 1.8442 -1.5708 0.0407555 3 3.14159 1.87701 -1.5708 0.0149744 4 3.14159 1.88895 -1.5708 0.00533603 5 3.14159 1.8932 -1.5708 0.00188047 6 3.14159 1.89469 -1.5708 0.000660091 7 3.14159 1.89521 -1.5708 0.000231388 8 3.14159 1.8954 -1.5708 8.1071e-05 9 3.14159 1.89546 -1.5708 2.83999e-05 10 3.14159 1.89548 -1.5708 9.94815e-06 11 3.14159 1.89549 -1.5708 3.48465e-06 12 3.14159 1.89549 -1.5708 1.2206e-06 13 3.14159 1.89549 -1.5708 4.27547e-07 Function small enough for convergence. SECANT Step X F(X) -1 1.5708 0.214602 0 3.14159 -1.5708 1 1.7596 0.102427 2 1.8442 0.0407555 3 1.90011 -0.00379015 4 1.89535 0.000115882 5 1.89549 3.08518e-07 Function small enough for convergence. Problem number 2 "F(X) = 2 * X - EXP ( - X )" We seek roots between -10 and 100 Number of known roots = 1 I X F(X) 1 0.351734 0 Number of starting points = 4 I X F(X) 1 0 -1 2 1 1.63212 3 -5 -158.413 4 10 20 BISECTION Step XA XB F(XA) F(XB) 0 0.000000e+00 1.000000e+00 -1.000000e+00 1.632121e+00 1 0.000000e+00 5.000000e-01 -1.000000e+00 3.934693e-01 2 2.500000e-01 5.000000e-01 -2.788008e-01 3.934693e-01 3 2.500000e-01 3.750000e-01 -2.788008e-01 6.271072e-02 4 3.125000e-01 3.750000e-01 -1.066156e-01 6.271072e-02 5 3.437500e-01 3.750000e-01 -2.160618e-02 6.271072e-02 6 3.437500e-01 3.593750e-01 -2.160618e-02 2.063749e-02 7 3.515625e-01 3.593750e-01 -4.628743e-04 2.063749e-02 8 3.515625e-01 3.554688e-01 -4.628743e-04 1.009265e-02 9 3.515625e-01 3.535156e-01 -4.628743e-04 4.816230e-03 10 3.515625e-01 3.525391e-01 -4.628743e-04 2.177013e-03 11 3.515625e-01 3.520508e-01 -4.628743e-04 8.571531e-04 12 3.515625e-01 3.518066e-01 -4.628743e-04 1.971603e-04 13 3.516846e-01 3.518066e-01 -1.328518e-04 1.971603e-04 14 3.516846e-01 3.517456e-01 -1.328518e-04 3.215559e-05 15 3.517151e-01 3.517456e-01 -5.034777e-05 3.215559e-05 16 3.517303e-01 3.517456e-01 -9.096008e-06 3.215559e-05 17 3.517303e-01 3.517380e-01 -9.096008e-06 1.152981e-05 18 3.517303e-01 3.517342e-01 -9.096008e-06 1.216906e-06 19 3.517323e-01 3.517342e-01 -3.939550e-06 1.216906e-06 20 3.517332e-01 3.517342e-01 -1.361322e-06 1.216906e-06 Interval small enough for convergence. BRENT Step XA XB F(XA) F(XB) 0 1.000000e+00 0.000000e+00 1.632121e+00 -1.000000e+00 1 3.799218e-01 0.000000e+00 7.592873e-02 -1.000000e+00 2 3.531106e-01 0.000000e+00 3.721626e-03 -1.000000e+00 3 3.517338e-01 0.000000e+00 2.826651e-07 -1.000000e+00 Function small enough for convergence. MULLER Step XA XB XC F(XA) F(XB) F(XC) 0 0 1 -5 -1 1.63212 -158.413 1 0 1 0.148686 -1 1.63212 -0.564469 2 0 0.148686 0.349768 -1 -0.564469 -0.00531486 3 0.148686 0.349768 0.351741 -0.564469 -0.00531486 1.90258e-05 4 0.349768 0.351741 0.351734 -0.00531486 1.90258e-05 -3.46878e-10 Function small enough for convergence. NEWTON Step X F(X) FP(X) 0 0 -1 3 1 0.333333 -0.0498646 2.71653 2 0.351689 -0.00011998 2.7035 3 0.351734 -6.92772e-10 2.70347 The function norm is small enough for convergence. NEWTON Step X F(X) FP(X) 0 1 1.63212 2.36788 1 0.310725 -0.111466 2.73292 2 0.351511 -0.000601411 2.70362 3 0.351734 -1.74072e-08 2.70347 The function norm is small enough for convergence. NEWTON Step X F(X) FP(X) 0 -5 -158.413 150.413 1 -3.94681 -59.6637 53.7701 2 -2.83721 -22.7424 19.068 3 -1.6445 -8.46746 7.17845 4 -0.464938 -2.52179 3.59192 5 0.237136 -0.314611 2.78888 6 0.349945 -0.00483608 2.70473 7 0.351733 -1.12583e-06 2.70347 8 0.351734 -6.10623e-14 2.70347 The function norm is small enough for convergence. NEWTON Step X F(X) FP(X) 0 10 20 2.00005 1 0.000249694 -0.999251 2.99975 2 0.333361 -0.0497893 2.71651 3 0.351689 -0.000119617 2.7035 4 0.351734 -6.8859e-10 2.70347 The function norm is small enough for convergence. REGULA FALSI Step XA XB F(XA) F(XB) 0 0 1 -1 1.63212 1 0 0.379922 -1 0.0759287 2 0 0.353111 -1 0.00372163 3 0 0.351801 -1 0.000182714 4 0 0.351737 -1 8.97113e-06 5 0 0.351734 -1 4.40477e-07 Function small enough for convergence. SECANT Step X F(X) -1 0 -1 0 1 1.63212 1 0.379922 0.0759287 2 0.349667 -0.00558786 3 0.351741 2.03789e-05 4 0.351734 5.48104e-09 Function small enough for convergence. SECANT Step X F(X) -1 1 1.63212 0 -5 -158.413 1 0.938813 1.48653 2 0.883602 1.35391 3 0.319963 -0.0862511 4 0.353719 0.00536527 5 0.351742 2.2318e-05 6 0.351734 -5.76176e-09 Function small enough for convergence. SECANT Step X F(X) -1 -5 -158.413 0 10 20 1 8.31851 16.6368 2 0.000613089 -0.998161 3 0.471417 0.318717 4 0.357471 0.0154987 5 0.351647 -0.00023541 6 0.351734 1.75515e-07 Function small enough for convergence. Problem number 3 "F(X) = X * EXP ( - X )" We seek roots between -10 and 100 Number of known roots = 1 I X F(X) 1 0 0 Number of starting points = 3 I X F(X) 1 -1 -2.71828 2 0.5 0.303265 3 2 0.270671 BISECTION Step XA XB F(XA) F(XB) 0 -1.000000e+00 5.000000e-01 -2.718282e+00 3.032653e-01 1 -2.500000e-01 5.000000e-01 -3.210064e-01 3.032653e-01 2 -2.500000e-01 1.250000e-01 -3.210064e-01 1.103121e-01 3 -6.250000e-02 1.250000e-01 -6.653090e-02 1.103121e-01 4 -6.250000e-02 3.125000e-02 -6.653090e-02 3.028854e-02 5 -1.562500e-02 3.125000e-02 -1.587106e-02 3.028854e-02 6 -1.562500e-02 7.812500e-03 -1.587106e-02 7.751703e-03 7 -3.906250e-03 7.812500e-03 -3.921539e-03 7.751703e-03 8 -3.906250e-03 1.953125e-03 -3.921539e-03 1.949314e-03 9 -9.765625e-04 1.953125e-03 -9.775166e-04 1.949314e-03 10 -9.765625e-04 4.882812e-04 -9.775166e-04 4.880429e-04 11 -2.441406e-04 4.882812e-04 -2.442002e-04 4.880429e-04 12 -2.441406e-04 1.220703e-04 -2.442002e-04 1.220554e-04 13 -6.103516e-05 1.220703e-04 -6.103888e-05 1.220554e-04 14 -6.103516e-05 3.051758e-05 -6.103888e-05 3.051665e-05 15 -1.525879e-05 3.051758e-05 -1.525902e-05 3.051665e-05 16 -1.525879e-05 7.629395e-06 -1.525902e-05 7.629336e-06 17 -3.814697e-06 7.629395e-06 -3.814712e-06 7.629336e-06 18 -3.814697e-06 1.907349e-06 -3.814712e-06 1.907345e-06 19 -9.536743e-07 1.907349e-06 -9.536752e-07 1.907345e-06 Function small enough for convergence. BRENT Step XA XB F(XA) F(XB) 0 5.000000e-01 -1.000000e+00 3.032653e-01 -2.718282e+00 1 3.494487e-01 -1.000000e+00 2.463881e-01 -2.718282e+00 2 -2.485279e-01 3.494487e-01 -3.186468e-01 2.463881e-01 3 8.869604e-02 -2.485279e-01 8.116785e-02 -3.186468e-01 4 -1.339796e-02 8.869604e-02 -1.357868e-02 8.116785e-02 5 1.233723e-03 -1.339796e-02 1.232202e-03 -1.357868e-02 6 1.642917e-05 -1.339796e-02 1.642890e-05 -1.357868e-02 7 -4.035216e-10 1.642917e-05 -4.035216e-10 1.642890e-05 Function small enough for convergence. MULLER Step XA XB XC F(XA) F(XB) F(XC) 0 -1 0.5 2 -2.71828 0.303265 0.270671 1 0.5 2 2.22675 0.303265 0.270671 0.240218 2 2 2.22675 3.31767 0.270671 0.240218 0.120223 3 2.22675 3.31767 5.75397 0.240218 0.120223 0.018241 4 3.31767 5.75397 5.6193 0.120223 0.018241 0.0203821 5 5.75397 5.6193 6.39145 0.018241 0.0203821 0.010711 6 5.75397 6.39145 7.18859 0.018241 0.010711 0.00542851 7 6.39145 7.18859 7.70669 0.010711 0.00542851 0.00346653 8 7.18859 7.70669 8.32452 0.00542851 0.00346653 0.00201867 9 7.70669 8.32452 8.93775 0.00346653 0.00201867 0.00117385 10 8.32452 8.93775 9.50916 0.00201867 0.00117385 0.000705287 11 8.93775 9.50916 10.0944 0.00117385 0.000705287 0.000416985 12 9.50916 10.0944 10.6719 0.000705287 0.000416985 0.000247458 13 10.0944 10.6719 11.2409 0.000416985 0.000247458 0.000147557 14 10.6719 11.2409 11.8093 0.000247458 0.000147557 8.78061e-05 15 11.2409 11.8093 12.3734 0.000147557 8.78061e-05 5.2333e-05 16 11.8093 12.3734 12.9343 8.78061e-05 5.2333e-05 3.12222e-05 17 12.3734 12.9343 13.4929 5.2333e-05 3.12222e-05 1.86293e-05 18 12.9343 13.4929 14.0491 3.12222e-05 1.86293e-05 1.11229e-05 19 13.4929 14.0491 14.603 1.86293e-05 1.11229e-05 6.64396e-06 20 14.0491 14.603 15.1551 1.11229e-05 6.64396e-06 3.96979e-06 21 14.603 15.1551 15.7054 6.64396e-06 3.96979e-06 2.37281e-06 22 15.1551 15.7054 16.2541 3.96979e-06 2.37281e-06 1.41867e-06 23 15.7054 16.2541 16.8014 2.37281e-06 1.41867e-06 8.48407e-07 Function small enough for convergence. NEWTON Step X F(X) FP(X) 0 -1 -2.71828 5.43656 1 -0.5 -0.824361 2.47308 2 -0.166667 -0.196893 1.37825 3 -0.0238095 -0.0243832 1.04848 4 -0.00055371 -0.000554017 1.00111 5 -3.06425e-07 -3.06425e-07 1 The function norm is small enough for convergence. NEWTON Step X F(X) FP(X) 0 0.5 0.303265 0.303265 1 -0.5 -0.824361 2.47308 2 -0.166667 -0.196893 1.37825 3 -0.0238095 -0.0243832 1.04848 4 -0.00055371 -0.000554017 1.00111 5 -3.06425e-07 -3.06425e-07 1 The function norm is small enough for convergence. NEWTON Step X F(X) FP(X) 0 2 0.270671 -0.135335 1 4 0.0732626 -0.0549469 2 5.33333 0.0257491 -0.0209211 3 6.5641 0.00925597 -0.00784588 4 7.74383 0.00335625 -0.00292284 5 8.89211 0.00122239 -0.00108492 6 10.0188 0.000446374 -0.00040182 7 11.1297 0.000163274 -0.000148604 8 12.2284 5.9791e-05 -5.49015e-05 9 13.3175 2.19137e-05 -2.02682e-05 10 14.3987 8.03642e-06 -7.47828e-06 11 15.4733 2.9486e-06 -2.75804e-06 12 16.5424 1.08226e-06 -1.01683e-06 13 17.6067 3.9735e-07 -3.74782e-07 The function norm is small enough for convergence. REGULA FALSI Step XA XB F(XA) F(XB) 0 -1 0.5 -2.71828 0.303265 1 -1 0.349449 -2.71828 0.246388 2 -1 0.237299 -2.71828 0.187171 3 -1 0.157591 -2.71828 0.134614 4 -1 0.10297 -2.71828 0.0928949 5 -1 0.0665226 -2.71828 0.0622414 6 -1 0.0426488 -2.71828 0.0408681 7 -1 0.0272052 -2.71828 0.0264751 8 -1 0.0172971 -2.71828 0.0170005 9 -1 0.0109744 -2.71828 0.0108546 10 -1 0.00695341 -2.71828 0.00690523 11 -1 0.00440194 -2.71828 0.0043826 12 -1 0.00278518 -2.71828 0.00277743 13 -1 0.00176162 -2.71828 0.00175852 14 -1 0.00111397 -2.71828 0.00111273 15 -1 0.000704334 -2.71828 0.000703838 16 -1 0.000445291 -2.71828 0.000445093 17 -1 0.000281505 -2.71828 0.000281425 18 -1 0.000177956 -2.71828 0.000177924 19 -1 0.000112494 -2.71828 0.000112481 20 -1 7.11113e-05 -2.71828 7.11062e-05 21 -1 4.49516e-05 -2.71828 4.49496e-05 22 -1 2.84151e-05 -2.71828 2.84143e-05 23 -1 1.79619e-05 -2.71828 1.79615e-05 24 -1 1.13541e-05 -2.71828 1.1354e-05 25 -1 7.17719e-06 -2.71828 7.17713e-06 Took maximum number of steps without convergence. SECANT Step X F(X) -1 -1 -2.71828 0 0.5 0.303265 1 0.349449 0.246388 2 -0.302729 -0.409758 3 0.104551 0.094172 4 0.0284404 0.0276429 5 -0.00318363 -0.00319378 6 9.1694e-05 9.16856e-05 7 2.91469e-07 2.91469e-07 Function small enough for convergence. SECANT Step X F(X) -1 0.5 0.303265 0 2 0.270671 1 14.4562 7.61762e-06 2 14.4565 7.61513e-06 3 15.5307 2.79454e-06 4 16.1533 1.55938e-06 5 16.9395 7.4503e-07 Function small enough for convergence. Problem number 4 "F(X) = EXP ( X ) - 1 / ( 10 * X )^2" We seek roots between 1e-05 and 20 Number of known roots = 1 I X F(X) 1 0.0953446 0 Number of starting points = 2 I X F(X) 1 0.03 -10.0807 2 1 2.70828 BISECTION Step XA XB F(XA) F(XB) 0 3.000000e-02 1.000000e+00 -1.008066e+01 2.708282e+00 1 3.000000e-02 5.150000e-01 -1.008066e+01 1.635935e+00 2 3.000000e-02 2.725000e-01 -1.008066e+01 1.178575e+00 3 3.000000e-02 1.512500e-01 -1.008066e+01 7.261588e-01 4 9.062500e-02 1.512500e-01 -1.227397e-01 7.261588e-01 5 9.062500e-02 1.209375e-01 -1.227397e-01 4.448348e-01 6 9.062500e-02 1.057812e-01 -1.227397e-01 2.178975e-01 7 9.062500e-02 9.820313e-02 -1.227397e-01 6.625698e-02 8 9.441406e-02 9.820313e-02 -2.281420e-02 6.625698e-02 9 9.441406e-02 9.630859e-02 -2.281420e-02 2.297182e-02 10 9.441406e-02 9.536133e-02 -2.281420e-02 4.038858e-04 11 9.488770e-02 9.536133e-02 -1.112226e-02 4.038858e-04 12 9.512451e-02 9.536133e-02 -5.338670e-03 4.038858e-04 13 9.524292e-02 9.536133e-02 -2.462288e-03 4.038858e-04 14 9.530212e-02 9.536133e-02 -1.027928e-03 4.038858e-04 15 9.533173e-02 9.536133e-02 -3.117035e-04 4.038858e-04 16 9.533173e-02 9.534653e-02 -3.117035e-04 4.617054e-05 17 9.533913e-02 9.534653e-02 -1.327466e-04 4.617054e-05 18 9.534283e-02 9.534653e-02 -4.328309e-05 4.617054e-05 19 9.534283e-02 9.534468e-02 -4.328309e-05 1.444968e-06 20 9.534375e-02 9.534468e-02 -2.091875e-05 1.444968e-06 Interval small enough for convergence. BRENT Step XA XB F(XA) F(XB) 0 1.000000e+00 3.000000e-02 2.708282e+00 -1.008066e+01 1 7.945855e-01 3.000000e-02 2.197685e+00 -1.008066e+01 2 4.122928e-01 3.000000e-02 1.451448e+00 -1.008066e+01 3 2.211464e-01 3.000000e-02 1.043031e+00 -1.008066e+01 4 1.255732e-01 3.000000e-02 4.996275e-01 -1.008066e+01 5 7.778659e-02 1.255732e-01 -5.717946e-01 4.996275e-01 6 1.032893e-01 7.778659e-02 1.714882e-01 -5.717946e-01 7 9.433038e-02 1.032893e-01 -2.489755e-02 1.714882e-01 8 9.546617e-02 9.433038e-02 2.933247e-03 -2.489755e-02 9 9.534646e-02 9.433038e-02 4.464690e-05 -2.489755e-02 10 9.534462e-02 9.534646e-02 -1.317652e-09 4.464690e-05 Function small enough for convergence. NEWTON Step X F(X) FP(X) 0 0.03 -10.0807 741.771 1 0.04359 -4.21836 242.518 2 0.060984 -1.62598 89.2454 3 0.0792032 -0.511673 41.3358 4 0.0915816 -0.0963876 27.1337 5 0.0951339 -0.00510924 24.3284 6 0.095344 -1.60817e-05 24.1755 7 0.0953446 -1.60399e-10 24.175 The function norm is small enough for convergence. NEWTON Step X F(X) FP(X) 0 1 2.70828 2.73828 1 0.0109558 -82.3022 15210 2 0.0163668 -36.3146 4562.82 3 0.0243256 -15.8748 1390.46 4 0.0357426 -6.79119 439.034 5 0.0512111 -2.7605 149.967 6 0.0696184 -0.991149 60.3451 7 0.0860431 -0.260874 32.4864 8 0.0940734 -0.0313286 25.1218 9 0.0953204 -0.0005845 24.1926 10 0.0953446 -2.11728e-07 24.175 The function norm is small enough for convergence. REGULA FALSI Step XA XB F(XA) F(XB) 0 0.03 1 -10.0807 2.70828 1 0.03 0.794586 -10.0807 2.19768 2 0.03 0.657733 -10.0807 1.9073 3 0.03 0.55786 -10.0807 1.7148 4 0.03 0.481121 -10.0807 1.57469 5 0.03 0.420173 -10.0807 1.46558 6 0.03 0.370647 -10.0807 1.37588 7 0.03 0.329737 -10.0807 1.29863 8 0.03 0.295531 -10.0807 1.22934 9 0.03 0.266669 -10.0807 1.16498 10 0.03 0.242151 -10.0807 1.10345 11 0.03 0.22122 -10.0807 1.04326 12 0.03 0.203286 -10.0807 0.983441 13 0.03 0.187884 -10.0807 0.923409 14 0.03 0.174635 -10.0807 0.862913 15 0.03 0.16323 -10.0807 0.80199 16 0.03 0.153412 -10.0807 0.740909 17 0.03 0.144962 -10.0807 0.680124 18 0.03 0.137696 -10.0807 0.620208 19 0.03 0.131454 -10.0807 0.56179 20 0.03 0.126099 -10.0807 0.505499 21 0.03 0.12151 -10.0807 0.451908 22 0.03 0.117584 -10.0807 0.401496 23 0.03 0.114229 -10.0807 0.354623 24 0.03 0.111367 -10.0807 0.311517 25 0.03 0.108928 -10.0807 0.272281 Took maximum number of steps without convergence. SECANT Step X F(X) -1 0.03 -10.0807 0 1 2.70828 1 0.794586 2.19768 2 -0.0895484 -0.332707 Iterate has left the region [XMIN,XMAX]. Problem number 5 "F(X) = ( X + 3 ) * ( X - 1 )^2" We seek roots between -1000 and 1000 Number of known roots = 3 I X F(X) 1 -3 0 2 1 0 3 1 0 Number of starting points = 2 I X F(X) 1 2 5 2 -5 -72 BISECTION Step XA XB F(XA) F(XB) 0 -5.000000e+00 2.000000e+00 -7.200000e+01 5.000000e+00 1 -5.000000e+00 -1.500000e+00 -7.200000e+01 9.375000e+00 2 -3.250000e+00 -1.500000e+00 -4.515625e+00 9.375000e+00 3 -3.250000e+00 -2.375000e+00 -4.515625e+00 7.119141e+00 4 -3.250000e+00 -2.812500e+00 -4.515625e+00 2.725342e+00 5 -3.031250e+00 -2.812500e+00 -5.078430e-01 2.725342e+00 6 -3.031250e+00 -2.921875e+00 -5.078430e-01 1.201649e+00 7 -3.031250e+00 -2.976562e+00 -5.078430e-01 3.706183e-01 8 -3.003906e+00 -2.976562e+00 -6.262213e-02 3.706183e-01 9 -3.003906e+00 -2.990234e+00 -6.262213e-02 1.554880e-01 10 -3.003906e+00 -2.997070e+00 -6.262213e-02 4.680636e-02 11 -3.000488e+00 -2.997070e+00 -7.814407e-03 4.680636e-02 12 -3.000488e+00 -2.998779e+00 -7.814407e-03 1.951933e-02 13 -3.000488e+00 -2.999634e+00 -7.814407e-03 5.858302e-03 14 -3.000061e+00 -2.999634e+00 -9.765923e-04 5.858302e-03 15 -3.000061e+00 -2.999847e+00 -9.765923e-04 2.441220e-03 16 -3.000061e+00 -2.999954e+00 -9.765923e-04 7.324051e-04 17 -3.000008e+00 -2.999954e+00 -1.220708e-04 7.324051e-04 18 -3.000008e+00 -2.999981e+00 -1.220708e-04 3.051729e-04 19 -3.000008e+00 -2.999994e+00 -1.220708e-04 9.155247e-05 20 -3.000001e+00 -2.999994e+00 -1.525880e-05 9.155247e-05 21 -3.000001e+00 -2.999998e+00 -1.525880e-05 3.814693e-05 22 -3.000001e+00 -2.999999e+00 -1.525880e-05 1.144409e-05 23 -3.000000e+00 -2.999999e+00 -1.907349e-06 1.144409e-05 Interval small enough for convergence. BRENT Step XA XB F(XA) F(XB) 0 -5.000000e+00 2.000000e+00 -7.200000e+01 5.000000e+00 1 1.545455e+00 -5.000000e+00 1.352367e+00 -7.200000e+01 2 1.380038e+00 -5.000000e+00 6.326040e-01 -7.200000e+01 3 1.236308e+00 -5.000000e+00 2.365622e-01 -7.200000e+01 4 -1.881846e+00 -5.000000e+00 9.286310e+00 -7.200000e+01 5 -3.440923e+00 -1.881846e+00 -8.695792e+00 9.286310e+00 6 -2.686984e+00 -3.440923e+00 4.255095e+00 -8.695792e+00 7 -2.934695e+00 -3.440923e+00 1.011037e+00 -8.695792e+00 8 -3.003855e+00 -2.934695e+00 -6.180599e-02 1.011037e+00 9 -2.999871e+00 -3.003855e+00 2.061446e-03 -6.180599e-02 10 -3.000000e+00 -3.003855e+00 3.968598e-06 -6.180599e-02 11 -3.000006e+00 -3.000000e+00 -1.000317e-04 3.968598e-06 Interval small enough for convergence. NEWTON Step X F(X) FP(X) 0 2 5 11 1 1.54545 1.35237 5.2562 2 1.28816 0.356084 2.55443 3 1.14877 0.0918178 1.25652 4 1.07569 0.0233515 0.622734 5 1.03819 0.00589109 0.309935 6 1.01919 0.00147967 0.154603 7 1.00962 0.000370797 0.0772094 8 1.00481 9.28101e-05 0.0385816 9 1.00241 2.32165e-05 0.019285 10 1.0012 5.80586e-06 0.00964104 11 1.0006 1.45168e-06 0.00482016 12 1.0003 3.62948e-07 0.00240999 The function norm is small enough for convergence. NEWTON Step X F(X) FP(X) 0 -5 -72 60 1 -3.8 -18.432 30.72 2 -3.2 -3.528 19.32 3 -3.01739 -0.280686 16.2792 4 -3.00015 -0.00238868 16.0024 5 -3 -1.7826e-07 16 The function norm is small enough for convergence. REGULA FALSI Step XA XB F(XA) F(XB) 0 -5 2 -72 5 1 -5 1.54545 -72 1.35237 2 -5 1.42478 -72 0.798394 3 -5 1.35432 -72 0.546643 4 -5 1.30644 -72 0.40439 5 -5 1.27121 -72 0.314179 6 -5 1.24397 -72 0.252603 7 -5 1.22214 -72 0.208344 8 -5 1.20419 -72 0.17528 9 -5 1.18912 -72 0.149828 10 -5 1.17627 -72 0.129756 11 -5 1.16516 -72 0.11361 12 -5 1.15544 -72 0.100406 13 -5 1.14687 -72 0.0894524 14 -5 1.13924 -72 0.0802548 15 -5 1.13241 -72 0.0724489 16 -5 1.12624 -72 0.0657618 17 -5 1.12065 -72 0.0599852 18 -5 1.11556 -72 0.0549579 19 -5 1.11089 -72 0.0505534 20 -5 1.10661 -72 0.046671 21 -5 1.10265 -72 0.04323 22 -5 1.09899 -72 0.0401648 23 -5 1.09559 -72 0.0374217 24 -5 1.09242 -72 0.0349564 25 -5 1.08947 -72 0.032732 Took maximum number of steps without convergence. SECANT Step X F(X) -1 2 5 0 -5 -72 1 1.54545 1.35237 2 1.42478 0.798394 3 1.25086 0.267508 4 1.16322 0.110915 5 1.10115 0.0419598 6 1.06338 0.0163215 7 1.03933 0.00624883 8 1.02441 0.00239881 9 1.01512 0.000917903 10 1.00936 0.000351178 11 1.00579 0.000134247 12 1.00358 5.13077e-05 13 1.00221 1.96043e-05 14 1.00137 7.48977e-06 15 1.00085 2.86121e-06 16 1.00052 1.09297e-06 17 1.00032 4.17499e-07 Function small enough for convergence. Problem number 6 "F(X) = EXP(X) - 2 - 1 / ( 10 * X )^2 - 2 / ( 100 * X )^3" We seek roots between 1e-05 and 20 Number of known roots = 1 I X F(X) 1 0.703205 1.73902e-16 Number of starting points = 2 I X F(X) 1 0.0002 -0.9998 2 2 5.38656 BISECTION Step XA XB F(XA) F(XB) 0 2.000000e-04 2.000000e+00 -9.998000e-01 5.386556e+00 1 2.000000e-04 1.000100e+00 -9.998000e-01 7.085577e-01 2 5.001500e-01 1.000100e+00 -3.909914e-01 7.085577e-01 3 5.001500e-01 7.501250e-01 -3.909914e-01 9.949754e-02 4 6.251375e-01 7.501250e-01 -1.570777e-01 9.949754e-02 5 6.876312e-01 7.501250e-01 -3.214429e-02 9.949754e-02 6 6.876312e-01 7.188781e-01 -3.214429e-02 3.278469e-02 7 6.876312e-01 7.032547e-01 -3.214429e-02 1.035700e-04 8 6.954430e-01 7.032547e-01 -1.607370e-02 1.035700e-04 9 6.993488e-01 7.032547e-01 -7.998503e-03 1.035700e-04 10 7.013018e-01 7.032547e-01 -3.950839e-03 1.035700e-04 11 7.022782e-01 7.032547e-01 -1.924479e-03 1.035700e-04 12 7.027665e-01 7.032547e-01 -9.106660e-04 1.035700e-04 13 7.030106e-01 7.032547e-01 -4.036009e-04 1.035700e-04 14 7.031326e-01 7.032547e-01 -1.500287e-04 1.035700e-04 15 7.031937e-01 7.032547e-01 -2.323264e-05 1.035700e-04 16 7.031937e-01 7.032242e-01 -2.323264e-05 4.016785e-05 17 7.031937e-01 7.032089e-01 -2.323264e-05 8.467395e-06 18 7.032013e-01 7.032089e-01 -7.382675e-06 8.467395e-06 19 7.032013e-01 7.032051e-01 -7.382675e-06 5.423473e-07 Function small enough for convergence. BRENT Step XA XB F(XA) F(XB) 0 2.000000e+00 2.000000e-04 5.386556e+00 -9.998000e-01 1 3.132737e-01 2.000000e+00 -7.339340e-01 5.386556e+00 2 1.073890e+00 3.132737e-01 9.180731e-01 -7.339340e-01 3 6.511913e-01 1.073890e+00 -1.057508e-01 9.180731e-01 4 7.022018e-01 1.073890e+00 -2.083092e-03 9.180731e-01 5 7.032079e-01 7.022018e-01 6.279542e-06 -2.083092e-03 6 7.032048e-01 7.032079e-01 -2.689827e-09 6.279542e-06 Interval small enough for convergence. NEWTON Step X F(X) FP(X) 0 0.0002 -0.9998 -1.25e+09 1 0.000199999 1.19953e-05 -1.25003e+09 The stepsize is small enough for convergence. NEWTON Step X F(X) FP(X) 0 2 5.38656 7.39156 1 1.27126 1.55914 3.57506 2 0.83514 0.290802 2.33946 3 0.710837 0.0159089 2.09135 4 0.70323 5.18561e-05 2.07775 5 0.703205 5.52829e-10 2.07771 The function norm is small enough for convergence. REGULA FALSI Step XA XB F(XA) F(XB) 0 0.0002 2 -0.9998 5.38656 1 0.313274 2 -0.733934 5.38656 2 0.515536 2 -0.363075 5.38656 3 0.609276 2 -0.18783 5.38656 4 0.656137 2 -0.0958884 5.38656 5 0.679641 2 -0.0484732 5.38656 6 0.691417 2 -0.0243693 5.38656 7 0.697311 2 -0.012216 5.38656 8 0.700258 2 -0.00611468 5.38656 9 0.701732 2 -0.00305841 5.38656 10 0.702469 2 -0.00152916 5.38656 11 0.702837 2 -0.000764417 5.38656 12 0.703021 2 -0.000382091 5.38656 13 0.703113 2 -0.000190978 5.38656 14 0.703159 2 -9.54526e-05 5.38656 15 0.703182 2 -4.77077e-05 5.38656 16 0.703193 2 -2.38444e-05 5.38656 17 0.703199 2 -1.19174e-05 5.38656 18 0.703202 2 -5.95633e-06 5.38656 19 0.703203 2 -2.97697e-06 5.38656 20 0.703204 2 -1.48789e-06 5.38656 21 0.703204 2 -7.43644e-07 5.38656 Function small enough for convergence. SECANT Step X F(X) -1 0.0002 -0.9998 0 2 5.38656 1 0.313274 -0.733934 2 0.515536 -0.363075 3 0.713553 0.0215964 4 0.702436 -0.00159696 5 0.703201 -7.07529e-06 6 0.703205 2.32331e-09 Function small enough for convergence. Problem number 7 "F(X) = X^3, only linear Newton convergence." We seek roots between -1000 and 1000 Number of known roots = 1 I X F(X) 1 0 0 Number of starting points = 2 I X F(X) 1 1 1 2 -1000 -1e+09 BISECTION Step XA XB F(XA) F(XB) 0 -1.000000e+03 1.000000e+00 -1.000000e+09 1.000000e+00 1 -4.995000e+02 1.000000e+00 -1.246254e+08 1.000000e+00 2 -2.492500e+02 1.000000e+00 -1.548480e+07 1.000000e+00 3 -1.241250e+02 1.000000e+00 -1.912396e+06 1.000000e+00 4 -6.156250e+01 1.000000e+00 -2.333183e+05 1.000000e+00 5 -3.028125e+01 1.000000e+00 -2.776652e+04 1.000000e+00 6 -1.464062e+01 1.000000e+00 -3.138187e+03 1.000000e+00 7 -6.820312e+00 1.000000e+00 -3.172582e+02 1.000000e+00 8 -2.910156e+00 1.000000e+00 -2.464614e+01 1.000000e+00 9 -9.550781e-01 1.000000e+00 -8.711976e-01 1.000000e+00 10 -9.550781e-01 2.246094e-02 -8.711976e-01 1.133140e-05 11 -4.663086e-01 2.246094e-02 -1.013959e-01 1.133140e-05 12 -2.219238e-01 2.246094e-02 -1.092979e-02 1.133140e-05 13 -9.973145e-02 2.246094e-02 -9.919650e-04 1.133140e-05 14 -3.863525e-02 2.246094e-02 -5.767018e-05 1.133140e-05 15 -8.087158e-03 2.246094e-02 -5.289174e-07 1.133140e-05 Function small enough for convergence. BRENT Step XA XB F(XA) F(XB) 0 -1.000000e+03 1.000000e+00 -1.000000e+09 1.000000e+00 1 9.999975e-01 -1.000000e+03 9.999925e-01 -1.000000e+09 2 6.666658e-01 -1.000000e+03 2.962952e-01 -1.000000e+09 3 -4.996667e+02 6.666658e-01 -1.247502e+08 2.962952e-01 4 6.666640e-01 -4.996667e+02 2.962927e-01 -1.247502e+08 5 4.444433e-01 -4.996667e+02 8.779080e-02 -1.247502e+08 6 -2.496111e+02 4.444433e-01 -1.555220e+07 8.779080e-02 7 4.444419e-01 -2.496111e+02 8.778997e-02 -1.555220e+07 8 2.962950e-01 -2.496111e+02 2.601197e-02 -1.555220e+07 9 -1.246574e+02 2.962950e-01 -1.937110e+06 2.601197e-02 10 2.962934e-01 -1.246574e+02 2.601152e-02 -1.937110e+06 11 1.975295e-01 -1.246574e+02 7.707184e-03 -1.937110e+06 12 -6.222994e+01 1.975295e-01 -2.409895e+05 7.707184e-03 13 1.975275e-01 -6.222994e+01 7.706950e-03 -2.409895e+05 14 1.316857e-01 -6.222994e+01 2.283576e-03 -2.409895e+05 15 -3.104913e+01 1.316857e-01 -2.993286e+04 2.283576e-03 16 1.316833e-01 -3.104913e+01 2.283452e-03 -2.993286e+04 17 8.778965e-02 -3.104913e+01 6.765967e-04 -2.993286e+04 18 -1.548067e+01 8.778965e-02 -3.709959e+03 6.765967e-04 19 8.778681e-02 -1.548067e+01 6.765311e-04 -3.709959e+03 20 5.852549e-02 -1.548067e+01 2.004634e-04 -3.709959e+03 21 -7.711072e+00 5.852549e-02 -4.585051e+02 2.004634e-04 22 5.852209e-02 -7.711072e+00 2.004285e-04 -4.585051e+02 23 3.901587e-02 -7.711072e+00 5.939144e-05 -4.585051e+02 24 -3.836028e+00 3.901587e-02 -5.644757e+01 5.939144e-05 25 3.901179e-02 -3.836028e+00 5.937282e-05 -5.644757e+01 Maximum number of steps taken. NEWTON Step X F(X) FP(X) 0 1 1 3 1 0.666667 0.296296 1.33333 2 0.444444 0.0877915 0.592593 3 0.296296 0.0260123 0.263374 4 0.197531 0.00770735 0.117055 5 0.131687 0.00228366 0.0520246 6 0.0877915 0.000676639 0.023122 7 0.0585277 0.000200486 0.0102765 8 0.0390184 5.94032e-05 0.00456732 9 0.0260123 1.76009e-05 0.00202992 10 0.0173415 5.2151e-06 0.000902186 11 0.011561 1.54521e-06 0.000400972 12 0.00770735 4.57841e-07 0.00017821 The function norm is small enough for convergence. NEWTON Step X F(X) FP(X) 0 -1000 -1e+09 3e+06 1 -666.667 -2.96296e+08 1.33333e+06 2 -444.444 -8.77915e+07 592593 3 -296.296 -2.60123e+07 263374 4 -197.531 -7.70735e+06 117055 5 -131.687 -2.28366e+06 52024.6 6 -87.7915 -676639 23122 7 -58.5277 -200486 10276.5 8 -39.0184 -59403.2 4567.32 9 -26.0123 -17600.9 2029.92 10 -17.3415 -5215.1 902.186 11 -11.561 -1545.21 400.972 12 -7.70735 -457.841 178.21 13 -5.13823 -135.657 79.2043 14 -3.42549 -40.1945 35.2019 15 -2.28366 -11.9095 15.6453 16 -1.52244 -3.52874 6.95346 17 -1.01496 -1.04555 3.09043 18 -0.676639 -0.309793 1.37352 19 -0.451093 -0.0917906 0.610455 20 -0.300729 -0.0271972 0.271313 21 -0.200486 -0.00805843 0.120584 22 -0.133657 -0.00238768 0.0535927 23 -0.0891048 -0.000707462 0.023819 24 -0.0594032 -0.000209618 0.0105862 25 -0.0396021 -6.21091e-05 0.00470499 Took maximum number of steps without convergence. REGULA FALSI Step XA XB F(XA) F(XB) 0 -1000 1 -1e+09 1 1 -1000 0.999999 -1e+09 0.999997 2 -1000 0.999998 -1e+09 0.999994 3 -1000 0.999997 -1e+09 0.999991 4 -1000 0.999996 -1e+09 0.999988 5 -1000 0.999995 -1e+09 0.999985 6 -1000 0.999994 -1e+09 0.999982 7 -1000 0.999993 -1e+09 0.999979 8 -1000 0.999992 -1e+09 0.999976 9 -1000 0.999991 -1e+09 0.999973 10 -1000 0.99999 -1e+09 0.99997 11 -1000 0.999989 -1e+09 0.999967 12 -1000 0.999988 -1e+09 0.999964 13 -1000 0.999987 -1e+09 0.999961 14 -1000 0.999986 -1e+09 0.999958 15 -1000 0.999985 -1e+09 0.999955 16 -1000 0.999984 -1e+09 0.999952 17 -1000 0.999983 -1e+09 0.999949 18 -1000 0.999982 -1e+09 0.999946 19 -1000 0.999981 -1e+09 0.999943 20 -1000 0.99998 -1e+09 0.99994 21 -1000 0.999979 -1e+09 0.999937 22 -1000 0.999978 -1e+09 0.999934 23 -1000 0.999977 -1e+09 0.999931 24 -1000 0.999976 -1e+09 0.999928 25 -1000 0.999975 -1e+09 0.999925 Took maximum number of steps without convergence. SECANT Step X F(X) -1 1 1 0 -1000 -1e+09 1 0.999999 0.999997 2 0.999998 0.999994 3 0.666666 0.296295 4 0.526315 0.145793 5 0.390355 0.0594813 6 0.29666 0.0261081 7 0.223361 0.0111435 8 0.168778 0.00480785 9 0.127358 0.00206576 10 0.096154 0.000889001 11 0.0725804 0.000382347 12 0.0547905 0.000164481 13 0.0413598 7.07513e-05 14 0.0312217 3.04347e-05 15 0.0235685 1.30917e-05 16 0.0177914 5.63154e-06 17 0.0134303 2.42246e-06 18 0.0101382 1.04204e-06 19 0.00765312 4.48246e-07 Function small enough for convergence. Problem number 8 "F(X) = COS(X) - X" We seek roots between -10 and 10 Number of known roots = 1 I X F(X) 1 0.739085 0 Number of starting points = 3 I X F(X) 1 1 -0.459698 2 0.5 0.377583 3 -1.6 1.5708 BISECTION Step XA XB F(XA) F(XB) 0 1.000000e+00 5.000000e-01 -4.596977e-01 3.775826e-01 1 7.500000e-01 5.000000e-01 -1.831113e-02 3.775826e-01 2 7.500000e-01 6.250000e-01 -1.831113e-02 1.859631e-01 3 7.500000e-01 6.875000e-01 -1.831113e-02 8.533495e-02 4 7.500000e-01 7.187500e-01 -1.831113e-02 3.387937e-02 5 7.500000e-01 7.343750e-01 -1.831113e-02 7.874725e-03 6 7.421875e-01 7.343750e-01 -5.195712e-03 7.874725e-03 7 7.421875e-01 7.382812e-01 -5.195712e-03 1.345150e-03 8 7.402344e-01 7.382812e-01 -1.923873e-03 1.345150e-03 9 7.392578e-01 7.382812e-01 -2.890091e-04 1.345150e-03 10 7.392578e-01 7.387695e-01 -2.890091e-04 5.281584e-04 11 7.392578e-01 7.390137e-01 -2.890091e-04 1.195967e-04 12 7.391357e-01 7.390137e-01 -8.470073e-05 1.195967e-04 13 7.391357e-01 7.390747e-01 -8.470073e-05 1.744935e-05 14 7.391052e-01 7.390747e-01 -3.362535e-05 1.744935e-05 15 7.390900e-01 7.390747e-01 -8.087915e-06 1.744935e-05 16 7.390900e-01 7.390823e-01 -8.087915e-06 4.680737e-06 17 7.390862e-01 7.390823e-01 -1.703583e-06 4.680737e-06 18 7.390862e-01 7.390842e-01 -1.703583e-06 1.488578e-06 19 7.390852e-01 7.390842e-01 -1.075021e-07 1.488578e-06 Interval small enough for convergence. BRENT Step XA XB F(XA) F(XB) 0 5.000000e-01 1.000000e+00 3.775826e-01 -4.596977e-01 1 7.254816e-01 1.000000e+00 2.269839e-02 -4.596977e-01 2 7.392248e-01 7.254816e-01 -2.337444e-04 2.269839e-02 3 7.390847e-01 7.392248e-01 7.070566e-07 -2.337444e-04 Function small enough for convergence. MULLER Step XA XB XC F(XA) F(XB) F(XC) 0 1 0.5 -1.6 -0.459698 0.377583 1.5708 1 0.5 -1.6 -3.17664 0.377583 1.5708 2.17725 2 0.5 -1.6 1.03943 0.377583 1.5708 -0.532715 3 0.5 1.03943 0.741835 0.377583 -0.532715 -0.00460571 4 0.5 0.741835 0.739072 0.377583 -0.00460571 2.25856e-05 5 0.741835 0.739072 0.739085 -0.00460571 2.25856e-05 -9.29012e-10 Function small enough for convergence. NEWTON Step X F(X) FP(X) 0 1 -0.459698 -1.84147 1 0.750364 -0.0189231 -1.6819 2 0.739113 -4.64559e-05 -1.67363 3 0.739085 -2.84721e-10 -1.67361 The function norm is small enough for convergence. NEWTON Step X F(X) FP(X) 0 0.5 0.377583 -1.47943 1 0.755222 -0.0271033 -1.68545 2 0.739142 -9.46154e-05 -1.67365 3 0.739085 -1.18098e-09 -1.67361 The function norm is small enough for convergence. NEWTON Step X F(X) FP(X) 0 -1.6 1.5708 -0.000426397 1 3682.29 -3681.35 -1.33888 The iterate X = 3682.292313 has left the region [XMIN,XMAX]. REGULA FALSI Step XA XB F(XA) F(XB) 0 1 0.5 -0.459698 0.377583 1 1 0.725482 -0.459698 0.0226984 2 1 0.738399 -0.459698 0.00114878 3 1 0.739051 -0.459698 5.75753e-05 4 1 0.739083 -0.459698 2.88417e-06 5 1 0.739085 -0.459698 1.44476e-07 Function small enough for convergence. SECANT Step X F(X) -1 1 -0.459698 0 0.5 0.377583 1 0.725482 0.0226984 2 0.739903 -0.00136969 3 0.739083 4.1411e-06 4 0.739085 7.47874e-10 Function small enough for convergence. SECANT Step X F(X) -1 0.5 0.377583 0 -1.6 1.5708 1 1.16453 -0.769338 2 0.255667 0.711828 3 0.692451 0.0772317 4 0.745609 -0.0109343 5 0.739017 0.00011481 6 0.739085 1.64831e-07 Function small enough for convergence. Problem number 9 "The Newton Baffler" We seek roots between -5 and 16 Number of known roots = 1 I X F(X) 1 6.25 0 Number of starting points = 3 I X F(X) 1 11.25 3.75 2 5.25 -0.75 3 6.35 0.2 BISECTION Step XA XB F(XA) F(XB) 0 5.250000e+00 1.125000e+01 -7.500000e-01 3.750000e+00 1 5.250000e+00 8.250000e+00 -7.500000e-01 1.500000e+00 2 5.250000e+00 6.750000e+00 -7.500000e-01 3.750000e-01 3 6.000000e+00 6.750000e+00 -5.000000e-01 3.750000e-01 4 6.000000e+00 6.375000e+00 -5.000000e-01 2.500000e-01 5 6.187500e+00 6.375000e+00 -1.250000e-01 2.500000e-01 6 6.187500e+00 6.281250e+00 -1.250000e-01 6.250000e-02 7 6.234375e+00 6.281250e+00 -3.125000e-02 6.250000e-02 8 6.234375e+00 6.257812e+00 -3.125000e-02 1.562500e-02 9 6.246094e+00 6.257812e+00 -7.812500e-03 1.562500e-02 10 6.246094e+00 6.251953e+00 -7.812500e-03 3.906250e-03 11 6.249023e+00 6.251953e+00 -1.953125e-03 3.906250e-03 12 6.249023e+00 6.250488e+00 -1.953125e-03 9.765625e-04 13 6.249756e+00 6.250488e+00 -4.882812e-04 9.765625e-04 14 6.249756e+00 6.250122e+00 -4.882812e-04 2.441406e-04 15 6.249939e+00 6.250122e+00 -1.220703e-04 2.441406e-04 16 6.249939e+00 6.250031e+00 -1.220703e-04 6.103516e-05 17 6.249985e+00 6.250031e+00 -3.051758e-05 6.103516e-05 18 6.249985e+00 6.250008e+00 -3.051758e-05 1.525879e-05 19 6.249996e+00 6.250008e+00 -7.629395e-06 1.525879e-05 20 6.249996e+00 6.250002e+00 -7.629395e-06 3.814697e-06 21 6.249999e+00 6.250002e+00 -1.907349e-06 3.814697e-06 22 6.249999e+00 6.250000e+00 -1.907349e-06 9.536743e-07 Function small enough for convergence. BRENT Step XA XB F(XA) F(XB) 0 5.250000e+00 1.125000e+01 -7.500000e-01 3.750000e+00 1 6.250000e+00 1.125000e+01 0.000000e+00 3.750000e+00 Function small enough for convergence. MULLER Step XA XB XC F(XA) F(XB) F(XC) 0 11.25 5.25 6.35 3.75 -0.75 0.2 1 5.25 6.35 6.11293 -0.75 0.2 -0.274145 2 6.35 6.11293 6.25876 0.2 -0.274145 0.0175219 3 6.35 6.25876 6.25 0.2 0.0175219 0 Function small enough for convergence. NEWTON Step X F(X) FP(X) 0 11.25 3.75 0.75 1 6.25 0 2 The function norm is small enough for convergence. NEWTON Step X F(X) FP(X) 0 5.25 -0.75 0.75 1 6.25 0 2 The function norm is small enough for convergence. NEWTON Step X F(X) FP(X) 0 6.35 0.2 2 1 6.25 0 2 The function norm is small enough for convergence. REGULA FALSI Step XA XB F(XA) F(XB) 0 5.25 11.25 -0.75 3.75 1 5.25 6.25 -0.75 0 Function small enough for convergence. SECANT Step X F(X) -1 11.25 3.75 0 5.25 -0.75 1 6.25 0 Function small enough for convergence. SECANT Step X F(X) -1 5.25 -0.75 0 6.35 0.2 1 6.11842 -0.263158 2 6.25 0 Function small enough for convergence. Problem number 10 "The Repeller" We seek roots between -10 and 10 Number of known roots = 1 I X F(X) 1 0 0 Number of starting points = 3 I X F(X) 1 1 0.19802 2 -0.14 -0.945946 3 0.041 0.701995 BISECTION Step XA XB F(XA) F(XB) 0 -1.400000e-01 1.000000e+00 -9.459459e-01 1.980198e-01 1 -1.400000e-01 4.300000e-01 -9.459459e-01 4.412519e-01 2 -1.400000e-01 1.450000e-01 -9.459459e-01 9.347301e-01 3 -1.400000e-01 2.500000e-03 -9.459459e-01 4.996877e-02 4 -6.875000e-02 2.500000e-03 -9.336870e-01 4.996877e-02 5 -3.312500e-02 2.500000e-03 -5.969939e-01 4.996877e-02 6 -1.531250e-02 2.500000e-03 -2.992338e-01 4.996877e-02 7 -6.406250e-03 2.500000e-03 -1.276013e-01 4.996877e-02 8 -1.953125e-03 2.500000e-03 -3.904760e-02 4.996877e-02 9 -1.953125e-03 2.734375e-04 -3.904760e-02 5.468709e-03 10 -8.398438e-04 2.734375e-04 -1.679569e-02 5.468709e-03 11 -2.832031e-04 2.734375e-04 -5.664017e-03 5.468709e-03 12 -4.882813e-06 2.734375e-04 -9.765625e-05 5.468709e-03 13 -4.882813e-06 1.342773e-04 -9.765625e-05 2.685542e-03 14 -4.882813e-06 6.469727e-05 -9.765625e-05 1.293945e-03 15 -4.882813e-06 2.990723e-05 -9.765625e-05 5.981445e-04 16 -4.882813e-06 1.251221e-05 -9.765625e-05 2.502441e-04 17 -4.882813e-06 3.814697e-06 -9.765625e-05 7.629395e-05 18 -5.340576e-07 3.814697e-06 -1.068115e-05 7.629395e-05 19 -5.340576e-07 1.640320e-06 -1.068115e-05 3.280640e-05 20 -5.340576e-07 5.531311e-07 -1.068115e-05 1.106262e-05 21 -5.340576e-07 9.536743e-09 -1.068115e-05 1.907349e-07 Interval small enough for convergence. BRENT Step XA XB F(XA) F(XB) 0 -1.400000e-01 1.000000e+00 -9.459459e-01 1.980198e-01 1 8.026667e-01 -1.400000e-01 2.453611e-01 -9.459459e-01 2 3.313333e-01 -1.400000e-01 5.532283e-01 -9.459459e-01 3 9.566667e-02 -1.400000e-01 9.990195e-01 -9.459459e-01 4 -2.538207e-02 9.566667e-02 -4.769160e-01 9.990195e-01 5 5.350404e-02 -2.538207e-02 8.319267e-01 -4.769160e-01 6 3.362451e-03 -2.538207e-02 6.717306e-02 -4.769160e-01 7 -1.863381e-04 3.362451e-03 -3.726750e-03 6.717306e-02 8 1.989877e-07 -1.863381e-04 3.979755e-06 -3.726750e-03 9 -3.010126e-07 1.989877e-07 -6.020253e-06 3.979755e-06 Interval small enough for convergence. MULLER Step XA XB XC F(XA) F(XB) F(XC) 0 1 -0.14 0.041 0.19802 -0.945946 0.701995 1 -0.14 0.041 -0.0436705 -0.945946 0.701995 -0.73352 2 0.041 -0.0436705 0.00780687 0.701995 -0.73352 0.155192 3 -0.0436705 0.00780687 -0.00139278 -0.73352 0.155192 -0.0278503 4 0.00780687 -0.00139278 4.18288e-05 0.155192 -0.0278503 0.000836576 5 -0.00139278 4.18288e-05 -4.5293e-08 -0.0278503 0.000836576 -9.05861e-07 Function small enough for convergence. NEWTON Step X F(X) FP(X) 0 1 0.19802 -0.00970493 1 21.404 0.00934383 -2.18263e-05 The iterate X = 21.404040 has left the region [XMIN,XMAX]. NEWTON Step X F(X) FP(X) 0 -0.14 -0.945946 -0.109569 1 -8.77333 -0.0227934 -0.000129868 2 -184.286 -0.00108527 -2.94454e-07 The iterate X = -184.285599 has left the region [XMIN,XMAX]. NEWTON Step X F(X) FP(X) 0 0.041 0.701995 0.609693 1 -1.11039 -0.178668 -0.00791581 2 -23.6814 -0.0084453 -1.78305e-05 The iterate X = -23.681386 has left the region [XMIN,XMAX]. REGULA FALSI Step XA XB F(XA) F(XB) 0 -0.14 1 -0.945946 0.19802 1 -0.14 0.802667 -0.945946 0.245361 2 -0.14 0.608515 -0.945946 0.320026 3 -0.14 0.419298 -0.945946 0.451318 4 -0.14 0.238644 -0.945946 0.712892 5 -0.14 0.0759202 -0.945946 0.963217 6 -0.0330166 0.0759202 -0.595425 0.963217 7 -0.0330166 0.0085989 -0.595425 0.170716 8 -0.000674095 0.0085989 -0.0134813 0.170716 9 -0.000674095 4.59094e-06 -0.0134813 9.18188e-05 10 -2.07193e-10 4.59094e-06 -4.14387e-09 9.18188e-05 Function small enough for convergence. SECANT Step X F(X) -1 1 0.19802 0 -0.14 -0.945946 1 0.802667 0.245361 2 0.608515 0.320026 3 1.44068 0.138158 4 2.07284 0.0962621 5 3.52532 0.0566868 6 5.60583 0.0356658 7 9.13577 0.0218893 8 14.7445 0.0135638 Iterate has left the region [XMIN,XMAX]. SECANT Step X F(X) -1 -0.14 -0.945946 0 0.041 0.701995 1 -0.0361029 -0.638796 2 0.000631412 0.0126277 3 -8.06763e-05 -0.00161353 4 2.80544e-09 5.61087e-08 Function small enough for convergence. Problem number 11 "The Pinhead" We seek roots between 0 and 10 Number of known roots = 2 I X F(X) 1 -2 0 2 2 0 Number of starting points = 3 I X F(X) 1 0.25 255.897 2 5 -0.0609 3 1.1 0.620513 BISECTION Step XA XB F(XA) F(XB) 0 5.000000e+00 2.500000e-01 -6.090000e-02 2.558966e+02 1 2.625000e+00 2.500000e-01 -4.143882e-02 2.558966e+02 2 2.625000e+00 1.437500e+00 -4.143882e-02 1.716901e-01 3 2.031250e+00 1.437500e+00 -3.758303e-03 1.716901e-01 4 2.031250e+00 1.734375e+00 -3.758303e-03 4.801672e-02 5 2.031250e+00 1.882812e+00 -3.758303e-03 1.707409e-02 6 2.031250e+00 1.957031e+00 -3.758303e-03 5.672459e-03 7 2.031250e+00 1.994141e+00 -3.758303e-03 7.378179e-04 8 2.012695e+00 1.994141e+00 -1.562047e-03 7.378179e-04 9 2.003418e+00 1.994141e+00 -4.254269e-04 7.378179e-04 10 2.003418e+00 1.998779e+00 -4.254269e-04 1.528210e-04 11 2.001099e+00 1.998779e+00 -1.371407e-04 1.528210e-04 12 2.001099e+00 1.999939e+00 -1.371407e-04 7.629976e-06 13 2.000519e+00 1.999939e+00 -6.480782e-05 7.629976e-06 14 2.000229e+00 1.999939e+00 -2.860204e-05 7.629976e-06 15 2.000084e+00 1.999939e+00 -1.048932e-05 7.629976e-06 16 2.000011e+00 1.999939e+00 -1.430491e-06 7.629976e-06 17 2.000011e+00 1.999975e+00 -1.430491e-06 3.099537e-06 18 2.000011e+00 1.999993e+00 -1.430491e-06 8.344720e-07 Function small enough for convergence. BRENT Step XA XB F(XA) F(XB) 0 5.000000e+00 2.500000e-01 -6.090000e-02 2.558966e+02 1 4.998870e+00 2.500000e-01 -6.089855e-02 2.558966e+02 2 2.624435e+00 2.500000e-01 -4.142067e-02 2.558966e+02 3 1.437217e+00 2.624435e+00 1.718743e-01 -4.142067e-02 4 2.393884e+00 1.437217e+00 -3.204998e-02 1.718743e-01 5 1.915551e+00 2.393884e+00 1.177204e-02 -3.204998e-02 6 2.044047e+00 1.915551e+00 -5.215566e-03 1.177204e-02 7 2.004596e+00 1.915551e+00 -5.711815e-04 1.177204e-02 8 1.999968e+00 2.004596e+00 3.947084e-06 -5.711815e-04 9 2.000000e+00 1.999968e+00 -2.269962e-08 3.947084e-06 Function small enough for convergence. MULLER Step XA XB XC F(XA) F(XB) F(XC) 0 0.25 5 1.1 255.897 -0.0609 0.620513 1 0.25 1.1 1.10252 255.897 0.620513 0.614295 2 1.1 1.10252 1.10479 0.620513 0.614295 0.608737 3 1.10252 1.10479 1.32293 0.614295 0.608737 0.263981 4 1.10479 1.32293 1.41584 0.608737 0.263981 0.186354 5 1.32293 1.41584 1.54379 0.263981 0.186354 0.113554 6 1.41584 1.54379 1.71557 0.186354 0.113554 0.0529435 7 1.54379 1.71557 1.87436 0.113554 0.0529435 0.0185196 8 1.71557 1.87436 2.05831 0.0529435 0.0185196 -0.00678738 9 1.87436 2.05831 1.99627 0.0185196 -0.00678738 0.000468591 10 2.05831 1.99627 1.99996 -0.00678738 0.000468591 4.53384e-06 11 1.99627 1.99996 2 0.000468591 4.53384e-06 1.17654e-09 Function small enough for convergence. NEWTON Step X F(X) FP(X) 0 0.25 255.897 -4094.69 1 0.312495 104.795 -1342.11 2 0.390577 42.9071 -440.052 3 0.488082 17.5583 -144.407 4 0.609671 7.17546 -47.4875 5 0.760773 2.92274 -15.6958 6 0.946985 1.18095 -5.25224 7 1.17183 0.467822 -1.81023 8 1.43026 0.176466 -0.668313 9 1.69431 0.0588468 -0.286481 10 1.89972 0.0142784 -0.161662 11 1.98805 0.00151695 -0.128804 12 1.99982 2.22026e-05 -0.125056 13 2 4.92694e-09 -0.125 The function norm is small enough for convergence. NEWTON Step X F(X) FP(X) 0 5 -0.0609 -0.00128 1 -42.5781 -0.0624997 2.85843e-08 The iterate X = -42.578123 has left the region [XMIN,XMAX]. NEWTON Step X F(X) FP(X) 0 1.1 0.620513 -2.48368 1 1.34984 0.238715 -0.892596 2 1.61727 0.0836723 -0.361527 3 1.84872 0.023109 -0.185229 4 1.97347 0.00342859 -0.133629 5 1.99913 0.000108606 -0.125272 6 2 1.17645e-07 -0.125 The function norm is small enough for convergence. REGULA FALSI Step XA XB F(XA) F(XB) 0 5 0.25 -0.0609 255.897 1 4.99887 0.25 -0.0608986 255.897 2 4.99774 0.25 -0.0608971 255.897 3 4.99661 0.25 -0.0608957 255.897 4 4.99548 0.25 -0.0608942 255.897 5 4.99435 0.25 -0.0608928 255.897 6 4.99322 0.25 -0.0608913 255.897 7 4.9921 0.25 -0.0608898 255.897 8 4.99097 0.25 -0.0608884 255.897 9 4.98984 0.25 -0.0608869 255.897 10 4.98871 0.25 -0.0608855 255.897 11 4.98758 0.25 -0.060884 255.897 12 4.98646 0.25 -0.0608825 255.897 13 4.98533 0.25 -0.0608811 255.897 14 4.9842 0.25 -0.0608796 255.897 15 4.98308 0.25 -0.0608782 255.897 16 4.98195 0.25 -0.0608767 255.897 17 4.98083 0.25 -0.0608752 255.897 18 4.9797 0.25 -0.0608738 255.897 19 4.97858 0.25 -0.0608723 255.897 20 4.97745 0.25 -0.0608708 255.897 21 4.97633 0.25 -0.0608693 255.897 22 4.9752 0.25 -0.0608679 255.897 23 4.97408 0.25 -0.0608664 255.897 24 4.97296 0.25 -0.0608649 255.897 25 4.97183 0.25 -0.0608634 255.897 Took maximum number of steps without convergence. SECANT Step X F(X) -1 0.25 255.897 0 5 -0.0609 1 4.99887 -0.0608986 2 -42.5512 -0.0624997 Iterate has left the region [XMIN,XMAX]. SECANT Step X F(X) -1 5 -0.0609 0 1.1 0.620513 1 4.65144 -0.0603638 2 4.33659 -0.0596725 3 -22.8417 -0.0624963 Iterate has left the region [XMIN,XMAX]. Problem number 12 "Flat Stanley (ALL derivatives are zero at the root.)" We seek roots between -4 and 4 Number of known roots = 1 I X F(X) 1 1 0 Number of starting points = 3 I X F(X) 1 2 367.879 2 0.5 -9.15782 3 4 2684.52 BISECTION Step XA XB F(XA) F(XB) 0 5.000000e-01 2.000000e+00 -9.157819e+00 3.678794e+02 1 5.000000e-01 1.250000e+00 -9.157819e+00 2.813379e-05 2 8.750000e-01 1.250000e+00 -2.004764e-26 2.813379e-05 Function small enough for convergence. BRENT Step XA XB F(XA) F(XB) 0 5.000000e-01 2.000000e+00 -9.157819e+00 3.678794e+02 1 5.364333e-01 2.000000e+00 -4.417147e+00 3.678794e+02 2 5.699775e-01 2.000000e+00 -1.927210e+00 3.678794e+02 3 1.284989e+00 5.699775e-01 1.281146e-03 -1.927210e+00 4 1.284514e+00 5.699775e-01 1.227452e-03 -1.927210e+00 5 1.273662e+00 5.699775e-01 4.346958e-04 -1.927210e+00 6 9.218198e-01 1.273662e+00 -6.898765e-70 4.346958e-04 Function small enough for convergence. MULLER Step XA XB XC F(XA) F(XB) F(XC) 0 2 0.5 4 367.879 -9.15782 2684.52 1 0.5 2 1.08991 -9.15782 367.879 1.68319e-52 Function small enough for convergence. NEWTON Step X F(X) FP(X) 0 2 367.879 1103.64 1 1.66667 70.2661 579.696 2 1.54545 18.9255 267.936 3 1.47482 5.62626 116.964 4 1.42672 1.75816 49.3752 5 1.39111 0.566437 20.3842 6 1.36332 0.186312 8.28241 7 1.34083 0.0622096 3.32512 8 1.32212 0.0210103 1.32247 9 1.30623 0.00715988 0.522026 10 1.29251 0.0024577 0.20479 11 1.28051 0.000848693 0.0799242 12 1.26989 0.000294546 0.0310553 13 1.26041 0.000102663 0.0120213 14 1.25187 3.59149e-05 0.00463806 15 1.24413 1.26047e-05 0.0017843 16 1.23706 4.43623e-06 0.000684684 17 1.23058 1.56525e-06 0.000262134 18 1.22461 5.53504e-07 0.000100155 The function norm is small enough for convergence. NEWTON Step X F(X) FP(X) 0 0.5 -9.15782 164.841 1 0.555556 -2.81321 70.4181 2 0.595506 -0.896511 29.3088 3 0.626094 -0.292649 11.9794 4 0.650523 -0.0971692 4.83111 5 0.670637 -0.0326761 1.9283 6 0.687582 -0.0110973 0.76337 7 0.70212 -0.00379868 0.300186 8 0.714774 -0.00130874 0.11739 9 0.725923 -0.000453324 0.0456911 10 0.735844 -0.000157741 0.0177128 11 0.74475 -5.51037e-05 0.0068428 12 0.752802 -1.93148e-05 0.00263547 13 0.760131 -6.79033e-06 0.00101232 14 0.766839 -2.39349e-06 0.000387919 15 0.773009 -8.45643e-07 0.000148333 The function norm is small enough for convergence. NEWTON Step X F(X) FP(X) 0 4 2684.52 1093.69 1 1.54545 18.9255 267.936 2 1.47482 5.62626 116.964 3 1.42672 1.75816 49.3752 4 1.39111 0.566437 20.3842 5 1.36332 0.186312 8.28241 6 1.34083 0.0622096 3.32512 7 1.32212 0.0210103 1.32247 8 1.30623 0.00715988 0.522026 9 1.29251 0.0024577 0.20479 10 1.28051 0.000848693 0.0799242 11 1.26989 0.000294546 0.0310553 12 1.26041 0.000102663 0.0120213 13 1.25187 3.59149e-05 0.00463806 14 1.24413 1.26047e-05 0.0017843 15 1.23706 4.43623e-06 0.000684684 16 1.23058 1.56525e-06 0.000262134 17 1.22461 5.53504e-07 0.000100155 The function norm is small enough for convergence. REGULA FALSI Step XA XB F(XA) F(XB) 0 0.5 2 -9.15782 367.879 1 0.536433 2 -4.41715 367.879 2 0.553798 2 -2.93902 367.879 3 0.56526 2 -2.18957 367.879 4 0.573749 2 -1.73524 367.879 5 0.580445 2 -1.4308 367.879 6 0.585945 2 -1.21303 367.879 7 0.590592 2 -1.04986 367.879 8 0.594603 2 -0.923283 367.879 9 0.598121 2 -0.822388 367.879 10 0.601248 2 -0.740196 367.879 11 0.604057 2 -0.672029 367.879 12 0.606602 2 -0.614642 367.879 13 0.608926 2 -0.565712 367.879 14 0.611062 2 -0.523532 367.879 15 0.613036 2 -0.486823 367.879 16 0.614869 2 -0.454607 367.879 17 0.616578 2 -0.426124 367.879 18 0.618179 2 -0.400774 367.879 19 0.619683 2 -0.378079 367.879 20 0.6211 2 -0.357651 367.879 21 0.622439 2 -0.339174 367.879 22 0.623708 2 -0.322388 367.879 23 0.624913 2 -0.307077 367.879 24 0.62606 2 -0.293058 367.879 25 0.627154 2 -0.280178 367.879 Took maximum number of steps without convergence. SECANT Step X F(X) -1 2 367.879 0 0.5 -9.15782 1 0.536433 -4.41715 2 0.57038 -1.90597 3 0.596146 -0.877898 4 0.618148 -0.401256 5 0.63667 -0.186385 6 0.652736 -0.0869573 7 0.666788 -0.0408533 8 0.679239 -0.0192808 9 0.690367 -0.00913948 10 0.700397 -0.00434782 11 0.709497 -0.00207495 12 0.717804 -0.000992997 13 0.725429 -0.000476389 14 0.73246 -0.00022905 15 0.738971 -0.000110347 16 0.745024 -5.32552e-05 17 0.75067 -2.57436e-05 18 0.755953 -1.24629e-05 19 0.760911 -6.04163e-06 20 0.765576 -2.93245e-06 21 0.769975 -1.42496e-06 22 0.774134 -6.93167e-07 Function small enough for convergence. SECANT Step X F(X) -1 0.5 -9.15782 0 4 2684.52 1 0.511899 -7.33838 2 0.521408 -6.07992 3 0.567349 -2.07027 4 0.591069 -1.03413 5 0.614743 -0.456758 6 0.633472 -0.214475 7 0.650051 -0.0994752 8 0.664392 -0.0467729 9 0.677119 -0.022041 10 0.688462 -0.0104433 11 0.698675 -0.0049645 12 0.70793 -0.00236807 13 0.716371 -0.00113272 14 0.724111 -0.000543197 15 0.731242 -0.000261073 16 0.737842 -0.000125731 17 0.743972 -6.06616e-05 18 0.749688 -2.93157e-05 19 0.755033 -1.41885e-05 20 0.760046 -6.87658e-06 21 0.764761 -3.33699e-06 22 0.769207 -1.62122e-06 23 0.773407 -7.88491e-07 Function small enough for convergence. Problem number 13 "Lazy Boy (Linear function, almost flat.)" We seek roots between -1e+13 and 1e+13 Number of known roots = 1 I X F(X) 1 100 0 Number of starting points = 3 I X F(X) 1 1e+08 0.000999999 2 -1e+11 -1 3 1e+08 0.000999999 BISECTION Step XA XB F(XA) F(XB) 0 -1.000000e+11 1.000000e+08 -1.000000e+00 9.999990e-04 1 -4.995000e+10 1.000000e+08 -4.995000e-01 9.999990e-04 2 -2.492500e+10 1.000000e+08 -2.492500e-01 9.999990e-04 3 -1.241250e+10 1.000000e+08 -1.241250e-01 9.999990e-04 4 -6.156250e+09 1.000000e+08 -6.156250e-02 9.999990e-04 5 -3.028125e+09 1.000000e+08 -3.028125e-02 9.999990e-04 6 -1.464062e+09 1.000000e+08 -1.464063e-02 9.999990e-04 7 -6.820312e+08 1.000000e+08 -6.820313e-03 9.999990e-04 8 -2.910156e+08 1.000000e+08 -2.910157e-03 9.999990e-04 9 -9.550781e+07 1.000000e+08 -9.550791e-04 9.999990e-04 10 -9.550781e+07 2.246094e+06 -9.550791e-04 2.245994e-05 11 -4.663086e+07 2.246094e+06 -4.663096e-04 2.245994e-05 12 -2.219238e+07 2.246094e+06 -2.219248e-04 2.245994e-05 13 -9.973145e+06 2.246094e+06 -9.973245e-05 2.245994e-05 14 -3.863525e+06 2.246094e+06 -3.863625e-05 2.245994e-05 15 -8.087158e+05 2.246094e+06 -8.088158e-06 2.245994e-05 16 -8.087158e+05 7.186890e+05 -8.088158e-06 7.185890e-06 17 -4.501343e+04 7.186890e+05 -4.511343e-07 7.185890e-06 Function small enough for convergence. BRENT Step XA XB F(XA) F(XB) 0 -1.000000e+11 1.000000e+08 -1.000000e+00 9.999990e-04 1 1.000000e+02 -1.000000e+11 0.000000e+00 -1.000000e+00 Function small enough for convergence. MULLER Step XA XB XC F(XA) F(XB) F(XC) 0 1e+08 -1e+11 1e+08 0.000999999 -1 0.000999999 1 1e+08 1e+08 100.101 0.000999999 0.000999999 1.0072e-12 Function small enough for convergence. NEWTON Step X F(X) FP(X) 0 1e+08 0.000999999 1e-11 1 100 0 1e-11 The function norm is small enough for convergence. NEWTON Step X F(X) FP(X) 0 -1e+11 -1 1e-11 1 100 -1.52588e-16 1e-11 The function norm is small enough for convergence. NEWTON Step X F(X) FP(X) 0 1e+08 0.000999999 1e-11 1 100 -1.49012e-19 1e-11 The function norm is small enough for convergence. REGULA FALSI Step XA XB F(XA) F(XB) 0 -1e+11 1e+08 -1 0.000999999 1 100 1e+08 -5.9545e-20 0.000999999 Function small enough for convergence. SECANT Step X F(X) -1 1e+08 0.000999999 0 -1e+11 -1 1 100 -5.9545e-20 Function small enough for convergence. SECANT Step X F(X) -1 -1e+11 -1 0 1e+08 0.000999999 1 100 -1.89415e-19 Function small enough for convergence. Problem number 14 "The Camel (double hump and some shallow roots.)" We seek roots between -10 and 10 Number of known roots = 3 I X F(X) 1 -0.15348 8.88178e-16 2 1.81903 -8.88178e-16 3 2.12743 -8.88178e-16 Number of starting points = 4 I X F(X) 1 3 1.16171 2 -0.5 -4.16154 3 0 5.97647 4 2.12742 -8.37865e-06 BISECTION Step XA XB F(XA) F(XB) 0 -5.000000e-01 3.000000e+00 -4.161538e+00 1.161705e+00 1 -5.000000e-01 1.250000e+00 -4.161538e+00 4.549737e+00 2 -5.000000e-01 3.750000e-01 -4.161538e+00 6.271832e+01 3 -5.000000e-01 -6.250000e-02 -4.161538e+00 2.781585e+00 4 -2.812500e-01 -6.250000e-02 -2.191017e+00 2.781585e+00 5 -1.718750e-01 -6.250000e-02 -4.046414e-01 2.781585e+00 6 -1.718750e-01 -1.171875e-01 -4.046414e-01 9.295845e-01 7 -1.718750e-01 -1.445312e-01 -4.046414e-01 2.118445e-01 8 -1.582031e-01 -1.445312e-01 -1.076984e-01 2.118445e-01 9 -1.582031e-01 -1.513672e-01 -1.076984e-01 4.909286e-02 10 -1.547852e-01 -1.513672e-01 -3.002758e-02 4.909286e-02 11 -1.547852e-01 -1.530762e-01 -3.002758e-02 9.348954e-03 12 -1.539307e-01 -1.530762e-01 -1.038492e-02 9.348954e-03 13 -1.535034e-01 -1.530762e-01 -5.294259e-04 9.348954e-03 14 -1.535034e-01 -1.532898e-01 -5.294259e-04 4.406899e-03 15 -1.535034e-01 -1.533966e-01 -5.294259e-04 1.938021e-03 16 -1.535034e-01 -1.534500e-01 -5.294259e-04 7.041186e-04 17 -1.535034e-01 -1.534767e-01 -5.294259e-04 8.730164e-05 18 -1.534901e-01 -1.534767e-01 -2.210733e-04 8.730164e-05 19 -1.534834e-01 -1.534767e-01 -6.688862e-05 8.730164e-05 20 -1.534834e-01 -1.534801e-01 -6.688862e-05 1.020581e-05 21 -1.534817e-01 -1.534801e-01 -2.834158e-05 1.020581e-05 22 -1.534809e-01 -1.534801e-01 -9.067926e-06 1.020581e-05 Interval small enough for convergence. BRENT Step XA XB F(XA) F(XB) 0 -5.000000e-01 3.000000e+00 -4.161538e+00 1.161705e+00 1 2.236186e+00 -5.000000e-01 8.624031e-02 -4.161538e+00 2 2.176180e+00 -5.000000e-01 3.493409e-02 -4.161538e+00 3 2.135700e+00 -5.000000e-01 5.456325e-03 -4.161538e+00 4 2.128240e+00 -5.000000e-01 5.240876e-04 -4.161538e+00 5 2.127448e+00 -5.000000e-01 9.968227e-06 -4.161538e+00 6 2.127433e+00 -5.000000e-01 1.903970e-08 -4.161538e+00 Function small enough for convergence. MULLER Step XA XB XC F(XA) F(XB) F(XC) 0 3 -0.5 0 1.16171 -4.16154 5.97647 1 -0.5 0 -0.31281 -4.16154 5.97647 -2.56997 2 0 -0.31281 -0.186275 5.97647 -2.56997 -0.695481 3 -0.31281 -0.186275 -0.158639 -2.56997 -0.695481 -0.11751 4 -0.186275 -0.158639 -0.15335 -0.695481 -0.11751 0.00301335 5 -0.158639 -0.15335 -0.153481 -0.11751 0.00301335 -3.36252e-06 6 -0.15335 -0.153481 -0.15348 0.00301335 -3.36252e-06 -1.61267e-11 Stepsize small enough for convergence. NEWTON Step X F(X) FP(X) 0 3 1.16171 1.68657 1 2.3112 0.161268 1.07147 2 2.16069 0.0231325 0.741569 3 2.1295 0.00134496 0.654013 4 2.12744 6.22223e-06 0.647955 5 2.12743 1.36225e-10 0.647927 The function norm is small enough for convergence. NEWTON Step X F(X) FP(X) 0 -0.5 -4.16154 6.48698 1 0.141521 25.1858 263.049 2 0.0457758 9.59021 96.1733 3 -0.0539422 3.13708 42.7976 4 -0.127243 0.65239 26.7632 5 -0.151619 0.0432095 23.3322 6 -0.153471 0.000217143 23.0983 7 -0.15348 5.54031e-09 23.0971 The function norm is small enough for convergence. NEWTON Step X F(X) FP(X) 0 0 5.97647 64.4913 1 -0.0926709 1.68038 33.0197 2 -0.143561 0.235445 24.3916 3 -0.153214 0.00616505 23.1306 4 -0.15348 4.45962e-06 23.0971 5 -0.15348 2.3368e-12 23.0971 The function norm is small enough for convergence. NEWTON Step X F(X) FP(X) 0 2.12742 -8.37865e-06 0.647889 1 2.12743 2.47073e-10 0.647927 The function norm is small enough for convergence. REGULA FALSI Step XA XB F(XA) F(XB) 0 -0.5 3 -4.16154 1.16171 1 -0.5 2.23619 -4.16154 0.0862403 2 -0.5 2.18063 -4.16154 0.0384438 3 -0.5 2.1561 -4.16154 0.0197533 4 -0.5 2.14355 -4.16154 0.0108204 5 -0.5 2.13669 -4.16154 0.00612623 6 -0.5 2.13282 -4.16154 0.00353206 7 -0.5 2.13059 -4.16154 0.00205746 8 -0.5 2.12929 -4.16154 0.00120563 9 -0.5 2.12852 -4.16154 0.000708928 10 -0.5 2.12808 -4.16154 0.000417706 11 -0.5 2.12781 -4.16154 0.000246409 12 -0.5 2.12766 -4.16154 0.000145462 13 -0.5 2.12757 -4.16154 8.59055e-05 14 -0.5 2.12751 -4.16154 5.07457e-05 15 -0.5 2.12748 -4.16154 2.99806e-05 16 -0.5 2.12746 -4.16154 1.77141e-05 17 -0.5 2.12745 -4.16154 1.04669e-05 18 -0.5 2.12744 -4.16154 6.18489e-06 19 -0.5 2.12744 -4.16154 3.65471e-06 20 -0.5 2.12744 -4.16154 2.15962e-06 21 -0.5 2.12743 -4.16154 1.27616e-06 22 -0.5 2.12743 -4.16154 7.54112e-07 Function small enough for convergence. SECANT Step X F(X) -1 3 1.16171 0 -0.5 -4.16154 1 2.23619 0.0862403 2 2.18063 0.0384438 3 2.13595 0.00562704 4 2.12829 0.00055774 5 2.12745 1.04931e-05 6 2.12743 2.04948e-08 Function small enough for convergence. SECANT Step X F(X) -1 -0.5 -4.16154 0 0 5.97647 1 -0.294756 -2.35879 2 -0.211343 -1.1548 3 -0.131339 0.544056 4 -0.15696 -0.0796156 5 -0.153689 -0.00482085 6 -0.153479 4.55622e-05 7 -0.15348 -2.58252e-08 Function small enough for convergence. SECANT Step X F(X) -1 0 5.97647 0 2.12742 -8.37865e-06 1 2.12742 -1.0311e-05 2 2.12743 3.0406e-10 Function small enough for convergence. Problem number 15 "Donovan/Miller/Moreland Pathological Function" We seek roots between -10 and 10 Number of known roots = 1 I X F(X) 1 0 -0 Number of starting points = 2 I X F(X) 1 0.01 0.215422 2 -0.25 -0.591793 BISECTION Step XA XB F(XA) F(XB) 0 -2.500000e-01 1.000000e-02 -5.917931e-01 2.154219e-01 1 -1.200000e-01 1.000000e-02 -4.861906e-01 2.154219e-01 2 -5.500000e-02 1.000000e-02 -3.791466e-01 2.154219e-01 3 -2.250000e-02 1.000000e-02 -2.821679e-01 2.154219e-01 4 -6.250000e-03 1.000000e-02 -1.841944e-01 2.154219e-01 5 -6.250000e-03 1.875000e-03 -1.841944e-01 1.233102e-01 6 -2.187500e-03 1.875000e-03 -1.298117e-01 1.233102e-01 7 -1.562500e-04 1.875000e-03 -5.386087e-02 1.233102e-01 8 -1.562500e-04 8.593750e-04 -5.386087e-02 9.507374e-02 9 -1.562500e-04 3.515625e-04 -5.386087e-02 7.057769e-02 10 -1.562500e-04 9.765625e-05 -5.386087e-02 4.605039e-02 11 -2.929687e-05 9.765625e-05 -3.082765e-02 4.605039e-02 12 -2.929687e-05 3.417969e-05 -3.082765e-02 3.245309e-02 13 -2.929687e-05 2.441406e-06 -3.082765e-02 1.346522e-02 14 -1.342773e-05 2.441406e-06 -2.376845e-02 1.346522e-02 15 -5.493164e-06 2.441406e-06 -1.764443e-02 1.346522e-02 16 -1.525879e-06 2.441406e-06 -1.151260e-02 1.346522e-02 17 -1.525879e-06 4.577637e-07 -1.151260e-02 7.706913e-03 18 -5.340576e-07 4.577637e-07 -8.113272e-03 7.706913e-03 Interval small enough for convergence. BRENT Step XA XB F(XA) F(XB) 0 -2.500000e-01 1.000000e-02 -5.917931e-01 2.154219e-01 1 -5.938634e-02 1.000000e-02 -3.887740e-01 2.154219e-01 2 -1.473923e-02 1.000000e-02 -2.451304e-01 2.154219e-01 3 -1.571696e-03 1.000000e-02 -1.162666e-01 2.154219e-01 4 2.484525e-03 -1.571696e-03 1.354394e-01 -1.162666e-01 5 3.019307e-04 -1.571696e-03 6.708659e-02 -1.162666e-01 6 -3.836052e-04 3.019307e-04 -7.265989e-02 6.708659e-02 7 -2.716712e-05 3.019307e-04 -3.006177e-02 6.708659e-02 8 7.466953e-05 -2.716712e-05 4.210960e-02 -3.006177e-02 9 1.525122e-05 -2.716712e-05 2.479904e-02 -3.006177e-02 10 -3.923379e-06 1.525122e-05 -1.577200e-02 2.479904e-02 11 3.530751e-06 -3.923379e-06 1.522728e-02 -1.577200e-02 12 -1.308221e-07 3.530751e-06 -5.076453e-03 1.522728e-02 13 7.846648e-07 -1.308221e-07 9.223478e-03 -5.076453e-03 Interval small enough for convergence. NEWTON Step X F(X) FP(X) 0 0.01 0.215422 7.17642 1 -0.020018 -0.271414 4.50864 2 0.0401808 0.341957 2.80934 3 -0.0815406 -0.430762 1.69068 4 0.173246 0.540986 0.853438 5 -0.460644 -0.624646 -0.123471 6 -5.51971 -1.03652e-13 -1.138e-12 The function norm is small enough for convergence. NEWTON Step X F(X) FP(X) 0 -0.25 -0.591793 0.493161 1 0.95 0.398679 -0.617603 2 1.59553 0.0916324 -0.27326 3 1.93086 0.0299302 -0.110415 4 2.20193 0.0102 -0.043375 5 2.43708 0.00354419 -0.0167902 6 2.64817 0.00124554 -0.00644002 7 2.84158 0.000441011 -0.0024546 8 3.02124 0.000156985 -0.00093126 9 3.18982 5.61055e-05 -0.000352069 10 3.34918 2.01144e-05 -0.000132731 11 3.50072 7.22928e-06 -4.9927e-05 12 3.64552 2.6036e-06 -1.87449e-05 13 3.78441 9.39288e-07 -7.02657e-06 The function norm is small enough for convergence. REGULA FALSI Step XA XB F(XA) F(XB) 0 -0.25 0.01 -0.591793 0.215422 1 -0.0593863 0.01 -0.388774 0.215422 2 -0.0147392 0.01 -0.24513 0.215422 3 -0.0015717 0.01 -0.116267 0.215422 4 -0.0015717 0.00248453 -0.116267 0.135439 5 -0.0015717 0.000301931 -0.116267 0.0670866 6 -0.000383605 0.000301931 -0.0726599 0.0670866 7 -2.71671e-05 0.000301931 -0.0300618 0.0670866 8 -2.71671e-05 7.46695e-05 -0.0300618 0.0421096 9 -2.71671e-05 1.52512e-05 -0.0300618 0.024799 10 -3.92338e-06 1.52512e-05 -0.015772 0.024799 11 -3.92338e-06 3.53075e-06 -0.015772 0.0152273 12 -1.30822e-07 3.53075e-06 -0.00507645 0.0152273 13 -1.30822e-07 7.84665e-07 -0.00507645 0.00922348 Interval small enough for convergence. SECANT Step X F(X) -1 0.01 0.215422 0 -0.25 -0.591793 1 -0.0593863 -0.388774 2 0.305632 0.613524 3 0.0821978 0.431869 4 -0.448998 -0.625933 5 -0.134674 -0.503366 6 1.15621 0.2757 7 0.699386 0.544262 8 1.62518 0.083799 9 1.79366 0.0486807 10 2.02721 0.0207743 11 2.20107 0.010237 12 2.36998 0.00484803 13 2.52193 0.00235361 14 2.66531 0.00113958 15 2.79989 0.000555193 16 2.92775 0.000270933 17 3.04961 0.00013256 18 3.16636 6.49666e-05 19 3.27857 3.18905e-05 20 3.38675 1.56745e-05 21 3.49133 7.71301e-06 22 3.59264 3.79912e-06 23 3.69098 1.87294e-06 24 3.7866 9.24063e-07 Function small enough for convergence. Problem number 16 "Kepler's Eccentric Anomaly Equation, in degrees" We seek roots between -175 and 185 Number of known roots = 1 I X F(X) 1 22.6566 0 Number of starting points = 3 I X F(X) 1 0 -0.0872665 2 185 3.21132 3 5 -0.0697246 BISECTION Step XA XB F(XA) F(XB) 0 0.000000e+00 1.850000e+02 -8.726646e-02 3.211317e+00 1 0.000000e+00 9.250000e+01 -8.726646e-02 7.279245e-01 2 0.000000e+00 4.625000e+01 -8.726646e-02 1.420571e-01 3 0.000000e+00 2.312500e+01 -8.726646e-02 2.150185e-03 4 1.156250e+01 2.312500e+01 -4.581217e-02 2.150185e-03 5 1.734375e+01 2.312500e+01 -2.304398e-02 2.150185e-03 6 2.023438e+01 2.312500e+01 -1.079895e-02 2.150185e-03 7 2.167969e+01 2.312500e+01 -4.418405e-03 2.150185e-03 8 2.240234e+01 2.312500e+01 -1.158361e-03 2.150185e-03 9 2.240234e+01 2.276367e+01 -1.158361e-03 4.897571e-04 10 2.258301e+01 2.276367e+01 -3.358290e-04 4.897571e-04 11 2.258301e+01 2.267334e+01 -3.358290e-04 7.658076e-05 12 2.262817e+01 2.267334e+01 -1.297198e-04 7.658076e-05 13 2.265076e+01 2.267334e+01 -2.659342e-05 7.658076e-05 14 2.265076e+01 2.266205e+01 -2.659342e-05 2.498768e-05 15 2.265640e+01 2.266205e+01 -8.043662e-07 2.498768e-05 Function small enough for convergence. BRENT Step XA XB F(XA) F(XB) 0 1.850000e+02 0.000000e+00 3.211317e+00 -8.726646e-02 1 4.894311e+00 1.850000e+02 -7.009901e-02 3.211317e+00 2 2.445210e+01 4.894311e+00 8.357285e-03 -7.009901e-02 3 2.236877e+01 2.445210e+01 -1.310878e-03 8.357285e-03 4 2.265124e+01 2.445210e+01 -2.437427e-05 8.357285e-03 5 2.265658e+01 2.265124e+01 9.084244e-10 -2.437427e-05 Function small enough for convergence. MULLER Step XA XB XC F(XA) F(XB) F(XC) 0 0 185 5 -0.0872665 3.21132 -0.0697246 1 0 5 18.9091 -0.0872665 -0.0697246 -0.0164947 2 5 18.9091 22.9042 -0.0697246 -0.0164947 0.00113413 3 18.9091 22.9042 22.6541 -0.0164947 0.00113413 -1.11682e-05 4 22.9042 22.6541 22.6566 0.00113413 -1.11682e-05 -1.4932e-09 Function small enough for convergence. NEWTON Step X F(X) FP(X) 0 0 -0.0872665 0.00349066 1 25 0.0109712 0.00479885 2 22.7138 0.000261441 0.00457353 3 22.6566 1.5362e-07 0.00456815 The function norm is small enough for convergence. NEWTON Step X F(X) FP(X) 0 185 3.21132 0.0313628 1 82.6074 0.561155 0.0156568 2 46.7664 0.146107 0.00788924 3 28.2465 0.0271155 0.00515334 4 22.9848 0.00150449 0.00459917 5 22.6577 5.06855e-06 0.00456826 6 22.6566 5.77814e-11 0.00456815 The function norm is small enough for convergence. NEWTON Step X F(X) FP(X) 0 5 -0.0697246 0.00354379 1 24.6751 0.00941773 0.0047656 2 22.699 0.000193665 0.00457213 3 22.6566 8.43112e-08 0.00456815 The function norm is small enough for convergence. REGULA FALSI Step XA XB F(XA) F(XB) 0 0 185 -0.0872665 3.21132 1 4.89431 185 -0.070099 3.21132 2 8.74181 185 -0.0562788 3.21132 3 11.7776 185 -0.0449994 3.21132 4 14.1713 185 -0.0357879 3.21132 5 16.0541 185 -0.0283054 3.21132 6 17.5302 185 -0.0222733 3.21132 7 18.6838 185 -0.0174488 3.21132 8 19.5826 185 -0.013618 3.21132 9 20.2811 185 -0.0105955 3.21132 10 20.8228 185 -0.00822322 3.21132 11 21.2421 185 -0.00636937 3.21132 12 21.5663 185 -0.00492568 3.21132 13 21.8166 185 -0.00380449 3.21132 14 22.0097 185 -0.00293566 3.21132 15 22.1585 185 -0.00226353 3.21132 16 22.2732 185 -0.00174427 3.21132 17 22.3616 185 -0.00134351 3.21132 18 22.4296 185 -0.00103447 3.21132 19 22.482 185 -0.000796301 3.21132 20 22.5222 185 -0.000612836 3.21132 21 22.5532 185 -0.000471565 3.21132 22 22.5771 185 -0.000362815 3.21132 23 22.5954 185 -0.000279117 3.21132 24 22.6096 185 -0.000214712 3.21132 25 22.6204 185 -0.000165158 3.21132 Took maximum number of steps without convergence. SECANT Step X F(X) -1 0 -0.0872665 0 185 3.21132 1 4.89431 -0.070099 2 8.74181 -0.0562788 3 24.4096 0.00815582 4 22.4264 -0.0010488 5 22.6524 -1.90299e-05 6 22.6566 4.49594e-08 Function small enough for convergence. SECANT Step X F(X) -1 185 3.21132 0 5 -0.0697246 1 8.82513 -0.0559743 2 24.3964 0.00809304 3 22.4294 -0.00103546 4 22.6525 -1.86448e-05 5 22.6566 4.34887e-08 Function small enough for convergence. Problem number 17 "The Wallis example, x^3-2x-5=0" We seek roots between 2 and 3 Number of known roots = 1 I X F(X) 1 2.09455 -8.88178e-16 Number of starting points = 2 I X F(X) 1 2 -1 2 3 16 BISECTION Step XA XB F(XA) F(XB) 0 2.000000e+00 3.000000e+00 -1.000000e+00 1.600000e+01 1 2.000000e+00 2.500000e+00 -1.000000e+00 5.625000e+00 2 2.000000e+00 2.250000e+00 -1.000000e+00 1.890625e+00 3 2.000000e+00 2.125000e+00 -1.000000e+00 3.457031e-01 4 2.062500e+00 2.125000e+00 -3.513184e-01 3.457031e-01 5 2.093750e+00 2.125000e+00 -8.941650e-03 3.457031e-01 6 2.093750e+00 2.109375e+00 -8.941650e-03 1.668358e-01 7 2.093750e+00 2.101562e+00 -8.941650e-03 7.856226e-02 8 2.093750e+00 2.097656e+00 -8.941650e-03 3.471428e-02 9 2.093750e+00 2.095703e+00 -8.941650e-03 1.286233e-02 10 2.093750e+00 2.094727e+00 -8.941650e-03 1.954348e-03 11 2.094238e+00 2.094727e+00 -3.495149e-03 1.954348e-03 12 2.094482e+00 2.094727e+00 -7.707752e-04 1.954348e-03 13 2.094482e+00 2.094604e+00 -7.707752e-04 5.916927e-04 14 2.094543e+00 2.094604e+00 -8.956468e-05 5.916927e-04 15 2.094543e+00 2.094574e+00 -8.956468e-05 2.510581e-04 16 2.094543e+00 2.094559e+00 -8.956468e-05 8.074527e-05 17 2.094551e+00 2.094559e+00 -4.410068e-06 8.074527e-05 18 2.094551e+00 2.094555e+00 -4.410068e-06 3.816751e-05 19 2.094551e+00 2.094553e+00 -4.410068e-06 1.687870e-05 20 2.094551e+00 2.094552e+00 -4.410068e-06 6.234310e-06 Interval small enough for convergence. BRENT Step XA XB F(XA) F(XB) 0 3.000000e+00 2.000000e+00 1.600000e+01 -1.000000e+00 1 2.058824e+00 3.000000e+00 -3.907999e-01 1.600000e+01 2 2.095659e+00 2.058824e+00 1.236845e-02 -3.907999e-01 3 2.094529e+00 2.095659e+00 -2.521384e-04 1.236845e-02 4 2.094551e+00 2.095659e+00 -1.571343e-07 1.236845e-02 Function small enough for convergence. NEWTON Step X F(X) FP(X) 0 2 -1 10 1 2.1 0.061 11.23 2 2.09457 0.000185723 11.1616 3 2.09455 1.73976e-09 11.1614 The function norm is small enough for convergence. NEWTON Step X F(X) FP(X) 0 3 16 25 1 2.36 3.42426 14.7088 2 2.1272 0.3711 11.5749 3 2.09514 0.00652663 11.1688 4 2.09455 2.14614e-06 11.1614 5 2.09455 2.32703e-13 11.1614 The function norm is small enough for convergence. REGULA FALSI Step XA XB F(XA) F(XB) 0 2 3 -1 16 1 2.05882 3 -0.3908 16 2 2.08126 3 -0.147204 16 3 2.08964 3 -0.0546765 16 4 2.09274 3 -0.0202029 16 5 2.09388 3 -0.00745051 16 6 2.09431 3 -0.00274567 16 7 2.09446 3 -0.00101157 16 8 2.09452 3 -0.000372653 16 9 2.09454 3 -0.000137276 16 10 2.09455 3 -5.05686e-05 16 11 2.09455 3 -1.86279e-05 16 12 2.09455 3 -6.86195e-06 16 13 2.09455 3 -2.52773e-06 16 14 2.09455 3 -9.31134e-07 16 Function small enough for convergence. SECANT Step X F(X) -1 2 -1 0 3 16 1 2.05882 -0.3908 2 2.08126 -0.147204 3 2.09482 0.0030438 4 2.09455 -2.28866e-05 5 2.09455 -3.51281e-09 Function small enough for convergence. Problem number 18 "10^14 * (x-1)^7, written term by term." We seek roots between 0.988 and 1.012 Number of known roots = 1 I X F(X) 1 1 0 Number of starting points = 2 I X F(X) 1 0.99 -1.42109 2 1.013 5.50671 BISECTION Step XA XB F(XA) F(XB) 0 9.900000e-01 1.013000e+00 -1.421085e+00 5.506706e+00 1 1.001500e+00 1.013000e+00 -7.105427e-01 5.506706e+00 2 1.001500e+00 1.007250e+00 -7.105427e-01 6.217249e-01 3 1.004375e+00 1.007250e+00 -1.065814e+00 6.217249e-01 4 1.005812e+00 1.007250e+00 -4.440892e-01 6.217249e-01 5 1.006531e+00 1.007250e+00 -1.776357e-01 6.217249e-01 6 1.006531e+00 1.006891e+00 -1.776357e-01 3.552714e-01 7 1.006531e+00 1.006711e+00 -1.776357e-01 8.881784e-02 8 1.006621e+00 1.006711e+00 -1.776357e-01 8.881784e-02 9 1.006666e+00 1.006711e+00 -6.217249e-01 8.881784e-02 10 1.006688e+00 1.006711e+00 -1.776357e-01 8.881784e-02 11 1.006688e+00 1.006700e+00 -1.776357e-01 1.776357e-01 12 1.006688e+00 1.006694e+00 -1.776357e-01 3.552714e-01 13 1.006688e+00 1.006691e+00 -1.776357e-01 7.105427e-01 14 1.006688e+00 1.006690e+00 -1.776357e-01 4.440892e-01 15 1.006688e+00 1.006689e+00 -1.776357e-01 1.065814e+00 Interval small enough for convergence. BRENT Step XA XB F(XA) F(XB) 0 1.013000e+00 9.900000e-01 5.506706e+00 -1.421085e+00 1 9.947179e-01 1.013000e+00 -7.105427e-01 5.506706e+00 2 9.988967e-01 1.013000e+00 -5.329071e-01 5.506706e+00 3 1.005948e+00 1.013000e+00 -3.552714e-01 5.506706e+00 4 1.009474e+00 1.005948e+00 1.776357e-01 -3.552714e-01 5 1.008299e+00 1.005948e+00 1.154632e+00 -3.552714e-01 6 1.006501e+00 1.008299e+00 -1.776357e-01 1.154632e+00 7 1.006981e+00 1.008299e+00 -5.329071e-01 1.154632e+00 8 1.007640e+00 1.008299e+00 -5.329071e-01 1.154632e+00 9 1.007969e+00 1.007640e+00 9.769963e-01 -5.329071e-01 10 1.007756e+00 1.007640e+00 2.664535e-01 -5.329071e-01 11 1.007717e+00 1.007640e+00 7.105427e-01 -5.329071e-01 12 1.007673e+00 1.007717e+00 -7.105427e-01 7.105427e-01 13 1.007695e+00 1.007717e+00 -4.440892e-01 7.105427e-01 14 1.007706e+00 1.007695e+00 1.776357e-01 -4.440892e-01 15 1.007703e+00 1.007695e+00 5.329071e-01 -4.440892e-01 16 1.007699e+00 1.007695e+00 1.776357e-01 -4.440892e-01 Interval small enough for convergence. NEWTON Step X F(X) FP(X) 0 0.99 -1.42109 699.174 1 0.992033 -0.0888178 179.767 2 0.992527 -0.355271 124.345 3 0.995384 -0.266454 7.81597 4 1.02947 1931.7 458978 The iterate X = 1.029475 has left the region [XMIN,XMAX]. NEWTON Step X F(X) FP(X) 0 1.013 5.50671 3383.6 The iterate X = 1.013000 has left the region [XMIN,XMAX]. REGULA FALSI Step XA XB F(XA) F(XB) 0 0.99 1.013 -1.42109 5.50671 1 0.994718 1.013 -0.710543 5.50671 2 0.996807 1.013 -0.177636 5.50671 3 0.997313 1.013 -0.177636 5.50671 4 0.997804 1.013 -0.355271 5.50671 5 0.997804 0.998725 -0.355271 0 Function small enough for convergence. SECANT Step X F(X) -1 0.99 -1.42109 0 1.013 5.50671 Iterate has left the region [XMIN,XMAX]. Problem number 19 "The jumping cosine" We seek roots between 0 and 1 Number of known roots = 1 I X F(X) 1 0.331866 7.07767e-15 Number of starting points = 3 I X F(X) 1 0 5 2 1 -3.13768 3 0.5 -3.03503 BISECTION Step XA XB F(XA) F(XB) 0 1.000000e+00 0.000000e+00 -3.137681e+00 5.000000e+00 1 5.000000e-01 0.000000e+00 -3.035034e+00 5.000000e+00 2 5.000000e-01 2.500000e-01 -3.035034e+00 4.989575e+00 3 3.750000e-01 2.500000e-01 -2.711358e+00 4.989575e+00 4 3.750000e-01 3.125000e-01 -2.711358e+00 3.479229e+00 5 3.437500e-01 3.125000e-01 -2.349264e+00 3.479229e+00 6 3.437500e-01 3.281250e-01 -2.349264e+00 8.728824e-01 7 3.359375e-01 3.281250e-01 -9.223306e-01 8.728824e-01 8 3.320312e-01 3.281250e-01 -3.849746e-02 8.728824e-01 9 3.320312e-01 3.300781e-01 -3.849746e-02 4.182879e-01 10 3.320312e-01 3.310547e-01 -3.849746e-02 1.895942e-01 11 3.320312e-01 3.315430e-01 -3.849746e-02 7.540145e-02 12 3.320312e-01 3.317871e-01 -3.849746e-02 1.840634e-02 13 3.319092e-01 3.317871e-01 -1.005809e-02 1.840634e-02 14 3.319092e-01 3.318481e-01 -1.005809e-02 4.171133e-03 15 3.318787e-01 3.318481e-01 -2.944243e-03 4.171133e-03 16 3.318787e-01 3.318634e-01 -2.944243e-03 6.132558e-04 17 3.318710e-01 3.318634e-01 -1.165541e-03 6.132558e-04 18 3.318672e-01 3.318634e-01 -2.761546e-04 6.132558e-04 19 3.318672e-01 3.318653e-01 -2.761546e-04 1.685476e-04 20 3.318663e-01 3.318653e-01 -5.380424e-05 1.685476e-04 Interval small enough for convergence. BRENT Step XA XB F(XA) F(XB) 0 1.000000e+00 0.000000e+00 -3.137681e+00 5.000000e+00 1 6.144256e-01 0.000000e+00 -3.819487e+00 5.000000e+00 2 3.072128e-01 6.144256e-01 3.697179e+00 -3.819487e+00 3 4.583198e-01 3.072128e-01 -4.275286e+00 3.697179e+00 4 3.772877e-01 3.072128e-01 -2.751617e+00 3.697179e+00 5 3.473877e-01 3.072128e-01 -2.779653e+00 3.697179e+00 6 3.273002e-01 3.473877e-01 1.061968e+00 -2.779653e+00 7 3.328532e-01 3.273002e-01 -2.291630e-01 1.061968e+00 8 3.318676e-01 3.273002e-01 -3.594934e-04 1.061968e+00 9 3.318660e-01 3.318676e-01 1.429224e-06 -3.594934e-04 Interval small enough for convergence. MULLER Step XA XB XC F(XA) F(XB) F(XC) 0 0 1 0.5 5 -3.13768 -3.03503 1 0 0.5 0.249436 5 -3.03503 4.98068 2 0.5 0.249436 0.430283 -3.03503 4.98068 -3.42143 3 0.249436 0.430283 0.321604 4.98068 -3.42143 2.26043 4 0.430283 0.321604 0.369329 -3.42143 2.26043 -2.77259 5 0.321604 0.369329 0.338706 2.26043 -2.77259 -1.4944 6 0.321604 0.338706 0.330663 2.26043 -1.4944 0.281298 7 0.338706 0.330663 0.331942 -1.4944 0.281298 -0.0178101 8 0.330663 0.331942 0.331866 0.281298 -0.0178101 0.000123931 9 0.331942 0.331866 0.331866 -0.0178101 0.000123931 -9.98992e-09 Stepsize small enough for convergence. NEWTON Step X F(X) FP(X) 0 0 5 5.03719e-42 1 -9.92617e+41 4.68471 -72.8813 The iterate X = -992617412436903833480015075729737592602624.000000 has left the region [XMIN,XMAX]. NEWTON Step X F(X) FP(X) 0 1 -3.13768 50.6366 1 1.06196 -3.18477 57.9143 The iterate X = 1.061965 has left the region [XMIN,XMAX]. NEWTON Step X F(X) FP(X) 0 0.5 -3.03503 26.2375 1 0.615675 -3.69828 95.3398 2 0.654466 -4.8644 -50.2805 3 0.557721 -3.2867 70.0855 4 0.604616 -4.71696 69.7113 5 0.67228 -4.31096 95.0424 6 0.717639 -4.88103 -47.3062 7 0.614459 -3.8162 98.2963 8 0.653283 -4.79898 -60.1354 9 0.57348 -3.30279 -71.6863 10 0.527407 -4.78606 -61.8154 11 0.449982 -3.47313 -84.9941 12 0.409119 -4.99226 7.88028 13 1.04263 -4.83064 55.681 The iterate X = 1.042631 has left the region [XMIN,XMAX]. REGULA FALSI Step XA XB F(XA) F(XB) 0 1 0 -3.13768 5 1 0.614426 0 -3.81949 5 2 0.348334 0 -2.8642 5 3 0.348334 0.221468 -2.8642 3.01209 4 0.348334 0.286498 -2.8642 2.88199 5 0.348334 0.317512 -2.8642 2.93611 6 0.333114 0.317512 -0.289292 2.93611 7 0.333114 0.331715 -0.289292 0.0353374 8 0.331867 0.331715 -0.000196929 0.0353374 9 0.331866 0.331715 -1.0021e-07 0.0353374 Function small enough for convergence. SECANT Step X F(X) -1 0 5 0 1 -3.13768 1 0.614426 -3.81949 2 2.77442 -3.44445 Iterate has left the region [XMIN,XMAX]. SECANT Step X F(X) -1 1 -3.13768 0 0.5 -3.03503 1 -14.2838 3.49615 Iterate has left the region [XMIN,XMAX]. R8POLY2_RROOT_TEST R8POLY2_RROOT finds the real parts of quadratic equation roots. A B C R1 R2 2.000000 -2.000000 -24.000000 4.000000 -3.000000 1.000000 -20.000000 100.000000 10.000000 10.000000 1.000000 -2.000000 10.000000 1.000000 1.000000 1.000000 0.000000 1.000000 -0.000000 -0.000000 1.000000 -6.000000 10.000000 3.000000 3.000000 test_zero_test Normal end of execution. 03-Feb-2021 09:20:17