02 March 2022 01:16:14 PM TEST_ZERO_TEST C++ version Test the TEST_ZERO library. 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.14159 1.5708 -1.5708 0.214602 1 2.35619 1.5708 -0.47099 0.214602 2 1.9635 1.5708 -0.0578682 0.214602 3 1.9635 1.76715 -0.0578682 0.0972123 4 1.9635 1.86532 -0.0578682 0.02428 5 1.91441 1.86532 -0.0156599 0.02428 6 1.91441 1.88986 -0.0156599 0.00459602 7 1.90214 1.88986 -0.00546076 0.00459602 8 1.896 1.88986 -0.000414536 0.00459602 9 1.896 1.89293 -0.000414536 0.0020952 10 1.896 1.89447 -0.000414536 0.000841449 11 1.896 1.89523 -0.000414536 0.000213736 12 1.89562 1.89523 -0.00010033 0.000213736 13 1.89562 1.89543 -0.00010033 5.672e-05 14 1.89552 1.89543 -2.18009e-05 5.672e-05 15 1.89552 1.89547 -2.18009e-05 1.74606e-05 16 1.8955 1.89547 -2.16988e-06 1.74606e-05 17 1.8955 1.89548 -2.16988e-06 7.64543e-06 18 1.8955 1.89549 -2.16988e-06 2.7378e-06 19 1.8955 1.89549 -2.16988e-06 2.83963e-07 Function small enough for convergence. BRENT Step XA XB F(XA) F(XB) 0 3.14159 1.5708 -1.5708 0.214602 1 1.7596 3.14159 0.102427 -1.5708 2 1.92145 1.7596 -0.0215768 0.102427 3 1.89329 1.92145 0.0018041 -0.0215768 4 1.89546 1.92145 2.66883e-05 -0.0215768 5 1.89549 1.89546 -1.09785e-09 2.66883e-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 1 -1 1.63212 1 0 0.5 -1 0.393469 2 0.25 0.5 -0.278801 0.393469 3 0.25 0.375 -0.278801 0.0627107 4 0.3125 0.375 -0.106616 0.0627107 5 0.34375 0.375 -0.0216062 0.0627107 6 0.34375 0.359375 -0.0216062 0.0206375 7 0.351562 0.359375 -0.000462874 0.0206375 8 0.351562 0.355469 -0.000462874 0.0100927 9 0.351562 0.353516 -0.000462874 0.00481623 10 0.351562 0.352539 -0.000462874 0.00217701 11 0.351562 0.352051 -0.000462874 0.000857153 12 0.351562 0.351807 -0.000462874 0.00019716 13 0.351685 0.351807 -0.000132852 0.00019716 14 0.351685 0.351746 -0.000132852 3.21556e-05 15 0.351715 0.351746 -5.03478e-05 3.21556e-05 16 0.35173 0.351746 -9.09601e-06 3.21556e-05 17 0.35173 0.351738 -9.09601e-06 1.15298e-05 18 0.35173 0.351734 -9.09601e-06 1.21691e-06 19 0.351732 0.351734 -3.93955e-06 1.21691e-06 20 0.351733 0.351734 -1.36132e-06 1.21691e-06 Interval small enough for convergence. BRENT Step XA XB F(XA) F(XB) 0 1 0 1.63212 -1 1 0.379922 0 0.0759287 -1 2 0.353111 0 0.00372163 -1 3 0.351734 0 2.82665e-07 -1 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.09512e-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 1 0 1.63212 -1 1 1 0.379922 1.63212 0.0759287 2 0.349667 0.379922 -0.00558786 0.0759287 3 0.349667 0.351741 -0.00558786 2.03789e-05 4 0.349667 0.351734 -0.00558786 5.48104e-09 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 0.5 -2.71828 0.303265 1 -0.25 0.5 -0.321006 0.303265 2 -0.25 0.125 -0.321006 0.110312 3 -0.0625 0.125 -0.0665309 0.110312 4 -0.0625 0.03125 -0.0665309 0.0302885 5 -0.015625 0.03125 -0.0158711 0.0302885 6 -0.015625 0.0078125 -0.0158711 0.0077517 7 -0.00390625 0.0078125 -0.00392154 0.0077517 8 -0.00390625 0.00195312 -0.00392154 0.00194931 9 -0.000976562 0.00195312 -0.000977517 0.00194931 10 -0.000976562 0.000488281 -0.000977517 0.000488043 11 -0.000244141 0.000488281 -0.0002442 0.000488043 12 -0.000244141 0.00012207 -0.0002442 0.000122055 13 -6.10352e-05 0.00012207 -6.10389e-05 0.000122055 14 -6.10352e-05 3.05176e-05 -6.10389e-05 3.05166e-05 15 -1.52588e-05 3.05176e-05 -1.5259e-05 3.05166e-05 16 -1.52588e-05 7.62939e-06 -1.5259e-05 7.62934e-06 17 -3.8147e-06 7.62939e-06 -3.81471e-06 7.62934e-06 18 -3.8147e-06 1.90735e-06 -3.81471e-06 1.90734e-06 19 -9.53674e-07 1.90735e-06 -9.53675e-07 1.90734e-06 Function small enough for convergence. BRENT Step XA XB F(XA) F(XB) 0 0.5 -1 0.303265 -2.71828 1 0.349449 -1 0.246388 -2.71828 2 -0.248528 0.349449 -0.318647 0.246388 3 0.088696 -0.248528 0.0811678 -0.318647 4 -0.013398 0.088696 -0.0135787 0.0811678 5 0.00123372 -0.013398 0.0012322 -0.0135787 6 1.64292e-05 -0.013398 1.64289e-05 -0.0135787 7 -4.03522e-10 1.64292e-05 -4.03522e-10 1.64289e-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.99306 0.240218 0.120223 0.0149587 4 3.31767 2.22675 3.23322 0.120223 0.240218 0.127487 5 3.31767 3.23322 6.12976 0.120223 0.127487 0.0133451 6 3.23322 3.31767 3.02704 0.127487 0.120223 0.146687 7 3.31767 3.23322 6.01563 0.120223 0.127487 0.01468 8 3.23322 3.31767 1.39385 0.127487 0.120223 0.345839 9 3.31767 3.23322 6.00594 0.120223 0.127487 0.0147991 10 3.23322 3.31767 1.19875 0.127487 0.120223 0.361508 11 3.31767 3.23322 5.50978 0.120223 0.127487 0.0222981 12 3.31767 5.50978 14.6826 0.120223 0.0222981 6.16932e-06 13 5.50978 14.6826 14.6824 0.0222981 6.16932e-06 6.17044e-06 14 14.6826 14.6824 16.8097 6.16932e-06 6.17044e-06 8.41781e-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 0.5 -1 0.303265 -2.71828 1 0.5 0.349449 0.303265 0.246388 2 -0.302729 0.349449 -0.409758 0.246388 3 -0.302729 0.104551 -0.409758 0.094172 4 -0.302729 0.0284404 -0.409758 0.0276429 5 -0.302729 0.00751111 -0.409758 0.00745491 6 -0.302729 0.00196764 -0.409758 0.00196377 7 -0.302729 0.000514341 -0.409758 0.000514076 8 -0.302729 0.000134373 -0.409758 0.000134355 9 -0.302729 3.51002e-05 -0.409758 3.50989e-05 10 -0.302729 9.16832e-06 -0.409758 9.16824e-06 11 -0.302729 2.39478e-06 -0.409758 2.39478e-06 12 -0.302729 6.2552e-07 -0.409758 6.25519e-07 Function small enough for 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 0.03 1 -10.0807 2.70828 1 0.03 0.515 -10.0807 1.63593 2 0.03 0.2725 -10.0807 1.17857 3 0.03 0.15125 -10.0807 0.726159 4 0.090625 0.15125 -0.12274 0.726159 5 0.090625 0.120938 -0.12274 0.444835 6 0.090625 0.105781 -0.12274 0.217898 7 0.090625 0.0982031 -0.12274 0.066257 8 0.0944141 0.0982031 -0.0228142 0.066257 9 0.0944141 0.0963086 -0.0228142 0.0229718 10 0.0944141 0.0953613 -0.0228142 0.000403886 11 0.0948877 0.0953613 -0.0111223 0.000403886 12 0.0951245 0.0953613 -0.00533867 0.000403886 13 0.0952429 0.0953613 -0.00246229 0.000403886 14 0.0953021 0.0953613 -0.00102793 0.000403886 15 0.0953317 0.0953613 -0.000311704 0.000403886 16 0.0953317 0.0953465 -0.000311704 4.61705e-05 17 0.0953391 0.0953465 -0.000132747 4.61705e-05 18 0.0953428 0.0953465 -4.32831e-05 4.61705e-05 19 0.0953428 0.0953447 -4.32831e-05 1.44497e-06 20 0.0953438 0.0953447 -2.09187e-05 1.44497e-06 Interval small enough for convergence. BRENT Step XA XB F(XA) F(XB) 0 1 0.03 2.70828 -10.0807 1 0.794586 0.03 2.19768 -10.0807 2 0.412293 0.03 1.45145 -10.0807 3 0.221146 0.03 1.04303 -10.0807 4 0.125573 0.03 0.499627 -10.0807 5 0.0777866 0.125573 -0.571795 0.499627 6 0.103289 0.0777866 0.171488 -0.571795 7 0.0943304 0.103289 -0.0248975 0.171488 8 0.0954662 0.0943304 0.00293325 -0.0248975 9 0.0953465 0.0943304 4.46469e-05 -0.0248975 10 0.0953446 0.0953465 -1.31765e-09 4.46469e-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.60398e-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 1 0.03 2.70828 -10.0807 1 1 0.794586 2.70828 2.19768 2 -0.0895484 0.794586 -0.332707 2.19768 3 0.0267016 0.794586 -12.9987 2.19768 4 0.0267016 0.683535 -12.9987 1.95946 5 0.0267016 0.597492 -12.9987 1.78954 6 0.0267016 0.52842 -12.9987 1.66044 7 0.0267016 0.471591 -12.9987 1.55758 8 0.0267016 0.423986 -12.9987 1.47241 9 0.0267016 0.383563 -12.9987 1.39953 10 0.0267016 0.348875 -12.9987 1.33531 11 0.0267016 0.318863 -12.9987 1.27721 12 0.0267016 0.292724 -12.9987 1.22337 13 0.0267016 0.269841 -12.9987 1.17242 14 0.0267016 0.249726 -12.9987 1.12332 15 0.0267016 0.231985 -12.9987 1.07529 16 0.0267016 0.216301 -12.9987 1.02774 17 0.0267016 0.202409 -12.9987 0.980264 18 0.0267016 0.190088 -12.9987 0.932603 19 0.0267016 0.17915 -12.9987 0.884623 20 0.0267016 0.169436 -12.9987 0.83631 21 0.0267016 0.160808 -12.9987 0.787751 22 0.0267016 0.153145 -12.9987 0.739119 23 0.0267016 0.146342 -12.9987 0.690655 24 0.0267016 0.140306 -12.9987 0.642648 25 0.0267016 0.134954 -12.9987 0.595417 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 2 -72 5 1 -5 -1.5 -72 9.375 2 -3.25 -1.5 -4.51562 9.375 3 -3.25 -2.375 -4.51562 7.11914 4 -3.25 -2.8125 -4.51562 2.72534 5 -3.03125 -2.8125 -0.507843 2.72534 6 -3.03125 -2.92188 -0.507843 1.20165 7 -3.03125 -2.97656 -0.507843 0.370618 8 -3.00391 -2.97656 -0.0626221 0.370618 9 -3.00391 -2.99023 -0.0626221 0.155488 10 -3.00391 -2.99707 -0.0626221 0.0468064 11 -3.00049 -2.99707 -0.00781441 0.0468064 12 -3.00049 -2.99878 -0.00781441 0.0195193 13 -3.00049 -2.99963 -0.00781441 0.0058583 14 -3.00006 -2.99963 -0.000976592 0.0058583 15 -3.00006 -2.99985 -0.000976592 0.00244122 16 -3.00006 -2.99995 -0.000976592 0.000732405 17 -3.00001 -2.99995 -0.000122071 0.000732405 18 -3.00001 -2.99998 -0.000122071 0.000305173 19 -3.00001 -2.99999 -0.000122071 9.15525e-05 20 -3 -2.99999 -1.52588e-05 9.15525e-05 21 -3 -3 -1.52588e-05 3.81469e-05 22 -3 -3 -1.52588e-05 1.14441e-05 23 -3 -3 -1.90735e-06 1.14441e-05 Interval small enough for convergence. BRENT Step XA XB F(XA) F(XB) 0 -5 2 -72 5 1 1.54545 -5 1.35237 -72 2 1.38004 -5 0.632604 -72 3 1.23631 -5 0.236562 -72 4 -1.88185 -5 9.28631 -72 5 -3.44092 -1.88185 -8.69579 9.28631 6 -2.68698 -3.44092 4.2551 -8.69579 7 -2.9347 -3.44092 1.01104 -8.69579 8 -3.00386 -2.9347 -0.061806 1.01104 9 -2.99987 -3.00386 0.00206145 -0.061806 10 -3 -3.00386 3.9686e-06 -0.061806 11 -3.00001 -3 -0.000100032 3.9686e-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.70431e-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 0.0002 2 -0.9998 5.38656 1 0.0002 1.0001 -0.9998 0.708558 2 0.50015 1.0001 -0.390991 0.708558 3 0.50015 0.750125 -0.390991 0.0994975 4 0.625137 0.750125 -0.157078 0.0994975 5 0.687631 0.750125 -0.0321443 0.0994975 6 0.687631 0.718878 -0.0321443 0.0327847 7 0.687631 0.703255 -0.0321443 0.00010357 8 0.695443 0.703255 -0.0160737 0.00010357 9 0.699349 0.703255 -0.0079985 0.00010357 10 0.701302 0.703255 -0.00395084 0.00010357 11 0.702278 0.703255 -0.00192448 0.00010357 12 0.702766 0.703255 -0.000910666 0.00010357 13 0.703011 0.703255 -0.000403601 0.00010357 14 0.703133 0.703255 -0.000150029 0.00010357 15 0.703194 0.703255 -2.32326e-05 0.00010357 16 0.703194 0.703224 -2.32326e-05 4.01678e-05 17 0.703194 0.703209 -2.32326e-05 8.4674e-06 18 0.703201 0.703209 -7.38267e-06 8.4674e-06 19 0.703201 0.703205 -7.38267e-06 5.42347e-07 Function small enough for convergence. BRENT Step XA XB F(XA) F(XB) 0 2 0.0002 5.38656 -0.9998 1 0.313274 2 -0.733934 5.38656 2 1.07389 0.313274 0.918073 -0.733934 3 0.651191 1.07389 -0.105751 0.918073 4 0.702202 1.07389 -0.00208309 0.918073 5 0.703208 0.702202 6.27954e-06 -0.00208309 6 0.703205 0.703208 -2.68983e-09 6.27954e-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 2 0.0002 5.38656 -0.9998 1 0.313274 0.0002 -0.733934 -0.9998 2 0.313274 1.17753 -0.733934 1.23912 3 0.634757 1.17753 -0.138248 1.23912 4 0.689235 1.17753 -0.0288535 1.23912 5 0.700346 1.17753 -0.00593179 1.23912 6 0.70262 1.17753 -0.00121522 1.23912 7 0.703085 1.17753 -0.000248777 1.23912 8 0.70318 1.17753 -5.09212e-05 1.23912 9 0.7032 1.17753 -1.04226e-05 1.23912 10 0.703204 1.17753 -2.13328e-06 1.23912 11 0.703205 1.17753 -4.36635e-07 1.23912 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 -1000 1 -1e+09 1 1 -499.5 1 -1.24625e+08 1 2 -249.25 1 -1.54848e+07 1 3 -124.125 1 -1.9124e+06 1 4 -61.5625 1 -233318 1 5 -30.2812 1 -27766.5 1 6 -14.6406 1 -3138.19 1 7 -6.82031 1 -317.258 1 8 -2.91016 1 -24.6461 1 9 -0.955078 1 -0.871198 1 10 -0.955078 0.0224609 -0.871198 1.13314e-05 11 -0.466309 0.0224609 -0.101396 1.13314e-05 12 -0.221924 0.0224609 -0.0109298 1.13314e-05 13 -0.0997314 0.0224609 -0.000991965 1.13314e-05 14 -0.0386353 0.0224609 -5.76702e-05 1.13314e-05 15 -0.00808716 0.0224609 -5.28917e-07 1.13314e-05 Function small enough for convergence. BRENT Step XA XB F(XA) F(XB) 0 -1000 1 -1e+09 1 1 0.999997 -1000 0.999993 -1e+09 2 0.666666 -1000 0.296295 -1e+09 3 -499.667 0.666666 -1.2475e+08 0.296295 4 0.666664 -499.667 0.296293 -1.2475e+08 5 0.444443 -499.667 0.0877908 -1.2475e+08 6 -249.611 0.444443 -1.55522e+07 0.0877908 7 0.444442 -249.611 0.08779 -1.55522e+07 8 0.296295 -249.611 0.026012 -1.55522e+07 9 -124.657 0.296295 -1.93711e+06 0.026012 10 0.296293 -124.657 0.0260115 -1.93711e+06 11 0.197529 -124.657 0.00770718 -1.93711e+06 12 -62.2299 0.197529 -240990 0.00770718 13 0.197527 -62.2299 0.00770695 -240990 14 0.131686 -62.2299 0.00228358 -240990 15 -31.0491 0.131686 -29932.9 0.00228358 16 0.131683 -31.0491 0.00228345 -29932.9 17 0.0877896 -31.0491 0.000676597 -29932.9 18 -15.4807 0.0877896 -3709.96 0.000676597 19 0.0877868 -15.4807 0.000676531 -3709.96 20 0.0585255 -15.4807 0.000200463 -3709.96 21 -7.71107 0.0585255 -458.505 0.000200463 22 0.0585221 -7.71107 0.000200429 -458.505 23 0.0390159 -7.71107 5.93914e-05 -458.505 24 -3.83603 0.0390159 -56.4476 5.93914e-05 25 0.0390118 -3.83603 5.93728e-05 -56.4476 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 0.5 -0.459698 0.377583 1 0.75 0.5 -0.0183111 0.377583 2 0.75 0.625 -0.0183111 0.185963 3 0.75 0.6875 -0.0183111 0.0853349 4 0.75 0.71875 -0.0183111 0.0338794 5 0.75 0.734375 -0.0183111 0.00787473 6 0.742188 0.734375 -0.00519571 0.00787473 7 0.742188 0.738281 -0.00519571 0.00134515 8 0.740234 0.738281 -0.00192387 0.00134515 9 0.739258 0.738281 -0.000289009 0.00134515 10 0.739258 0.73877 -0.000289009 0.000528158 11 0.739258 0.739014 -0.000289009 0.000119597 12 0.739136 0.739014 -8.47007e-05 0.000119597 13 0.739136 0.739075 -8.47007e-05 1.74493e-05 14 0.739105 0.739075 -3.36253e-05 1.74493e-05 15 0.73909 0.739075 -8.08791e-06 1.74493e-05 16 0.73909 0.739082 -8.08791e-06 4.68074e-06 17 0.739086 0.739082 -1.70358e-06 4.68074e-06 18 0.739086 0.739084 -1.70358e-06 1.48858e-06 19 0.739085 0.739084 -1.07502e-07 1.48858e-06 Interval small enough for convergence. BRENT Step XA XB F(XA) F(XB) 0 0.5 1 0.377583 -0.459698 1 0.725482 1 0.0226984 -0.459698 2 0.739225 0.725482 -0.000233744 0.0226984 3 0.739085 0.739225 7.07057e-07 -0.000233744 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.29 has left the region [XMIN,XMAX]. REGULA FALSI Step XA XB F(XA) F(XB) 0 0.5 1 0.377583 -0.459698 1 0.5 0.725482 0.377583 0.0226984 2 0.739903 0.725482 -0.00136969 0.0226984 3 0.739903 0.739083 -0.00136969 4.1411e-06 4 0.739903 0.739085 -0.00136969 7.47874e-10 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 4.0625 2 5.25 -1.0625 3 6.35 0.2 BISECTION Step XA XB F(XA) F(XB) 0 5.25 11.25 -1.0625 4.0625 1 5.25 8.25 -1.0625 1.8125 2 5.25 6.75 -1.0625 0.6875 3 6 6.75 -0.5 0.6875 4 6 6.375 -0.5 0.25 5 6.1875 6.375 -0.125 0.25 6 6.1875 6.28125 -0.125 0.0625 7 6.23438 6.28125 -0.03125 0.0625 8 6.23438 6.25781 -0.03125 0.015625 9 6.24609 6.25781 -0.0078125 0.015625 10 6.24609 6.25195 -0.0078125 0.00390625 11 6.24902 6.25195 -0.00195312 0.00390625 12 6.24902 6.25049 -0.00195312 0.000976562 13 6.24976 6.25049 -0.000488281 0.000976562 14 6.24976 6.25012 -0.000488281 0.000244141 15 6.24994 6.25012 -0.00012207 0.000244141 16 6.24994 6.25003 -0.00012207 6.10352e-05 17 6.24998 6.25003 -3.05176e-05 6.10352e-05 18 6.24998 6.25001 -3.05176e-05 1.52588e-05 19 6.25 6.25001 -7.62939e-06 1.52588e-05 20 6.25 6.25 -7.62939e-06 3.8147e-06 21 6.25 6.25 -1.90735e-06 3.8147e-06 22 6.25 6.25 -1.90735e-06 9.53674e-07 Function small enough for convergence. BRENT Step XA XB F(XA) F(XB) 0 5.25 11.25 -1.0625 4.0625 1 6.4939 5.25 0.487805 -1.0625 2 6.10251 6.4939 -0.294985 0.487805 3 6.25 6.4939 0 0.487805 Function small enough for convergence. MULLER Step XA XB XC F(XA) F(XB) F(XC) 0 11.25 5.25 6.35 4.0625 -1.0625 0.2 1 5.25 6.35 6.16698 -1.0625 0.2 -0.166035 2 6.35 6.16698 6.25388 0.2 -0.166035 0.00776319 3 6.16698 6.25388 6.25 -0.166035 0.00776319 0 Function small enough for convergence. NEWTON Step X F(X) FP(X) 0 11.25 4.0625 0.75 1 5.83333 -0.625 0.75 2 6.66667 0.625 0.75 3 5.83333 -0.625 0.75 4 6.66667 0.625 0.75 5 5.83333 -0.625 0.75 6 6.66667 0.625 0.75 7 5.83333 -0.625 0.75 8 6.66667 0.625 0.75 9 5.83333 -0.625 0.75 10 6.66667 0.625 0.75 11 5.83333 -0.625 0.75 12 6.66667 0.625 0.75 13 5.83333 -0.625 0.75 14 6.66667 0.625 0.75 15 5.83333 -0.625 0.75 16 6.66667 0.625 0.75 17 5.83333 -0.625 0.75 18 6.66667 0.625 0.75 19 5.83333 -0.625 0.75 20 6.66667 0.625 0.75 21 5.83333 -0.625 0.75 22 6.66667 0.625 0.75 23 5.83333 -0.625 0.75 24 6.66667 0.625 0.75 25 5.83333 -0.625 0.75 Took maximum number of steps without convergence. NEWTON Step X F(X) FP(X) 0 5.25 -1.0625 0.75 1 6.66667 0.625 0.75 2 5.83333 -0.625 0.75 3 6.66667 0.625 0.75 4 5.83333 -0.625 0.75 5 6.66667 0.625 0.75 6 5.83333 -0.625 0.75 7 6.66667 0.625 0.75 8 5.83333 -0.625 0.75 9 6.66667 0.625 0.75 10 5.83333 -0.625 0.75 11 6.66667 0.625 0.75 12 5.83333 -0.625 0.75 13 6.66667 0.625 0.75 14 5.83333 -0.625 0.75 15 6.66667 0.625 0.75 16 5.83333 -0.625 0.75 17 6.66667 0.625 0.75 18 5.83333 -0.625 0.75 19 6.66667 0.625 0.75 20 5.83333 -0.625 0.75 21 6.66667 0.625 0.75 22 5.83333 -0.625 0.75 23 6.66667 0.625 0.75 24 5.83333 -0.625 0.75 25 6.66667 0.625 0.75 Took maximum number of steps without 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 -1.0625 4.0625 1 5.25 6.4939 -1.0625 0.487805 2 6.10251 6.4939 -0.294985 0.487805 3 6.10251 6.25 -0.294985 0 Function small enough for convergence. SECANT Step X F(X) -1 11.25 4.0625 0 5.25 -1.0625 1 6.4939 0.487805 2 6.10251 -0.294985 3 6.25 0 Function small enough for convergence. SECANT Step X F(X) -1 5.25 -1.0625 0 6.35 0.2 1 6.17574 -0.148515 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 -0.14 1 -0.945946 0.19802 1 -0.14 0.43 -0.945946 0.441252 2 -0.14 0.145 -0.945946 0.93473 3 -0.14 0.0025 -0.945946 0.0499688 4 -0.06875 0.0025 -0.933687 0.0499688 5 -0.033125 0.0025 -0.596994 0.0499688 6 -0.0153125 0.0025 -0.299234 0.0499688 7 -0.00640625 0.0025 -0.127601 0.0499688 8 -0.00195313 0.0025 -0.0390476 0.0499688 9 -0.00195313 0.000273437 -0.0390476 0.00546871 10 -0.000839844 0.000273437 -0.0167957 0.00546871 11 -0.000283203 0.000273437 -0.00566402 0.00546871 12 -4.88281e-06 0.000273437 -9.76562e-05 0.00546871 13 -4.88281e-06 0.000134277 -9.76562e-05 0.00268554 14 -4.88281e-06 6.46973e-05 -9.76562e-05 0.00129394 15 -4.88281e-06 2.99072e-05 -9.76562e-05 0.000598144 16 -4.88281e-06 1.25122e-05 -9.76562e-05 0.000250244 17 -4.88281e-06 3.8147e-06 -9.76562e-05 7.62939e-05 18 -5.34058e-07 3.8147e-06 -1.06812e-05 7.62939e-05 19 -5.34058e-07 1.64032e-06 -1.06812e-05 3.28064e-05 20 -5.34058e-07 5.53131e-07 -1.06812e-05 1.10626e-05 21 -5.34058e-07 9.53674e-09 -1.06812e-05 1.90735e-07 Interval small enough for convergence. BRENT Step XA XB F(XA) F(XB) 0 -0.14 1 -0.945946 0.19802 1 0.802667 -0.14 0.245361 -0.945946 2 0.331333 -0.14 0.553228 -0.945946 3 0.0956667 -0.14 0.99902 -0.945946 4 -0.0253821 0.0956667 -0.476916 0.99902 5 0.053504 -0.0253821 0.831927 -0.476916 6 0.00336245 -0.0253821 0.0671731 -0.476916 7 -0.000186338 0.00336245 -0.00372675 0.0671731 8 1.98988e-07 -0.000186338 3.97975e-06 -0.00372675 9 -3.01013e-07 1.98988e-07 -6.02025e-06 3.97975e-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.404 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.286 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.6814 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 0.25 -0.0609 255.897 1 2.625 0.25 -0.0414388 255.897 2 2.625 1.4375 -0.0414388 0.17169 3 2.03125 1.4375 -0.0037583 0.17169 4 2.03125 1.73438 -0.0037583 0.0480167 5 2.03125 1.88281 -0.0037583 0.0170741 6 2.03125 1.95703 -0.0037583 0.00567246 7 2.03125 1.99414 -0.0037583 0.000737818 8 2.0127 1.99414 -0.00156205 0.000737818 9 2.00342 1.99414 -0.000425427 0.000737818 10 2.00342 1.99878 -0.000425427 0.000152821 11 2.0011 1.99878 -0.000137141 0.000152821 12 2.0011 1.99994 -0.000137141 7.62998e-06 13 2.00052 1.99994 -6.48078e-05 7.62998e-06 14 2.00023 1.99994 -2.8602e-05 7.62998e-06 15 2.00008 1.99994 -1.04893e-05 7.62998e-06 16 2.00001 1.99994 -1.43049e-06 7.62998e-06 17 2.00001 1.99998 -1.43049e-06 3.09954e-06 18 2.00001 1.99999 -1.43049e-06 8.34472e-07 Function small enough for convergence. BRENT 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 2.62443 0.25 -0.0414207 255.897 3 1.43722 2.62443 0.171874 -0.0414207 4 2.39388 1.43722 -0.03205 0.171874 5 1.91555 2.39388 0.011772 -0.03205 6 2.04405 1.91555 -0.00521557 0.011772 7 2.0046 1.91555 -0.000571181 0.011772 8 1.99997 2.0046 3.94708e-06 -0.000571181 9 2 1.99997 -2.26996e-08 3.94708e-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.87528 0.620513 0.614295 0.0183607 3 1.10252 1.87528 1.85431 0.614295 0.0183607 0.0220803 4 1.87528 1.85431 2.08198 0.0183607 0.0220803 -0.00927787 5 1.87528 2.08198 1.99779 0.0183607 -0.00927787 0.000277207 6 2.08198 1.99779 1.99997 -0.00927787 0.000277207 3.65588e-06 7 1.99779 1.99997 2 0.000277207 3.65588e-06 7.74109e-10 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.5781 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 0.5 2 -9.15782 367.879 1 0.5 1.25 -9.15782 2.81338e-05 2 0.875 1.25 -2.00476e-26 2.81338e-05 Function small enough for convergence. BRENT 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.569978 2 -1.92721 367.879 3 1.28499 0.569978 0.00128115 -1.92721 4 1.28451 0.569978 0.00122745 -1.92721 5 1.27366 0.569978 0.000434696 -1.92721 6 0.92182 1.27366 -6.89877e-70 0.000434696 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+08 0.000999999 3 -1e+11 -1 BISECTION Step XA XB F(XA) F(XB) 0 -1e+11 1e+08 -1 0.000999999 1 -4.995e+10 1e+08 -0.4995 0.000999999 2 -2.4925e+10 1e+08 -0.24925 0.000999999 3 -1.24125e+10 1e+08 -0.124125 0.000999999 4 -6.15625e+09 1e+08 -0.0615625 0.000999999 5 -3.02812e+09 1e+08 -0.0302813 0.000999999 6 -1.46406e+09 1e+08 -0.0146406 0.000999999 7 -6.82031e+08 1e+08 -0.00682031 0.000999999 8 -2.91016e+08 1e+08 -0.00291016 0.000999999 9 -9.55078e+07 1e+08 -0.000955079 0.000999999 10 -9.55078e+07 2.24609e+06 -0.000955079 2.24599e-05 11 -4.66309e+07 2.24609e+06 -0.00046631 2.24599e-05 12 -2.21924e+07 2.24609e+06 -0.000221925 2.24599e-05 13 -9.97314e+06 2.24609e+06 -9.97324e-05 2.24599e-05 14 -3.86353e+06 2.24609e+06 -3.86363e-05 2.24599e-05 15 -808716 2.24609e+06 -8.08816e-06 2.24599e-05 16 -808716 718689 -8.08816e-06 7.18589e-06 17 -45013.4 718689 -4.51134e-07 7.18589e-06 Function small enough for convergence. BRENT Step XA XB F(XA) F(XB) 0 -1e+11 1e+08 -1 0.000999999 1 100 -1e+11 0 -1 Function small enough for convergence. MULLER Step XA XB XC F(XA) F(XB) F(XC) 0 1e+08 1e+08 -1e+11 0.000999999 0.000999999 -1 1 1e+08 1e+08 -47837.8 0.000999999 0.000999999 -4.79378e-07 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+08 0.000999999 1e-11 1 100 -1.49012e-19 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. 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+08 0.000999999 1 100.072 7.24015e-13 Function small enough for convergence. SECANT Step X F(X) -1 1e+08 0.000999999 0 -1e+11 -1 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 -0.5 3 -4.16154 1.16171 1 -0.5 1.25 -4.16154 4.54974 2 -0.5 0.375 -4.16154 62.7183 3 -0.5 -0.0625 -4.16154 2.78158 4 -0.28125 -0.0625 -2.19102 2.78158 5 -0.171875 -0.0625 -0.404641 2.78158 6 -0.171875 -0.117188 -0.404641 0.929585 7 -0.171875 -0.144531 -0.404641 0.211845 8 -0.158203 -0.144531 -0.107698 0.211845 9 -0.158203 -0.151367 -0.107698 0.0490929 10 -0.154785 -0.151367 -0.0300276 0.0490929 11 -0.154785 -0.153076 -0.0300276 0.00934895 12 -0.153931 -0.153076 -0.0103849 0.00934895 13 -0.153503 -0.153076 -0.000529426 0.00934895 14 -0.153503 -0.15329 -0.000529426 0.0044069 15 -0.153503 -0.153397 -0.000529426 0.00193802 16 -0.153503 -0.15345 -0.000529426 0.000704119 17 -0.153503 -0.153477 -0.000529426 8.73016e-05 18 -0.15349 -0.153477 -0.000221073 8.73016e-05 19 -0.153483 -0.153477 -6.68886e-05 8.73016e-05 20 -0.153483 -0.15348 -6.68886e-05 1.02058e-05 21 -0.153482 -0.15348 -2.83416e-05 1.02058e-05 22 -0.153481 -0.15348 -9.06793e-06 1.02058e-05 Interval small enough for convergence. BRENT Step XA XB F(XA) F(XB) 0 -0.5 3 -4.16154 1.16171 1 2.23619 -0.5 0.0862403 -4.16154 2 2.17618 -0.5 0.0349341 -4.16154 3 2.1357 -0.5 0.00545632 -4.16154 4 2.12824 -0.5 0.000524088 -4.16154 5 2.12745 -0.5 9.96823e-06 -4.16154 6 2.12743 -0.5 1.90397e-08 -4.16154 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 -0.25 0.01 -0.591793 0.215422 1 -0.12 0.01 -0.486191 0.215422 2 -0.055 0.01 -0.379147 0.215422 3 -0.0225 0.01 -0.282168 0.215422 4 -0.00625 0.01 -0.184194 0.215422 5 -0.00625 0.001875 -0.184194 0.12331 6 -0.0021875 0.001875 -0.129812 0.12331 7 -0.00015625 0.001875 -0.0538609 0.12331 8 -0.00015625 0.000859375 -0.0538609 0.0950737 9 -0.00015625 0.000351563 -0.0538609 0.0705777 10 -0.00015625 9.76563e-05 -0.0538609 0.0460504 11 -2.92969e-05 9.76563e-05 -0.0308277 0.0460504 12 -2.92969e-05 3.41797e-05 -0.0308277 0.0324531 13 -2.92969e-05 2.44141e-06 -0.0308277 0.0134652 14 -1.34277e-05 2.44141e-06 -0.0237685 0.0134652 15 -5.49316e-06 2.44141e-06 -0.0176444 0.0134652 16 -1.52588e-06 2.44141e-06 -0.0115126 0.0134652 17 -1.52588e-06 4.57764e-07 -0.0115126 0.00770691 18 -5.34058e-07 4.57764e-07 -0.00811327 0.00770691 Interval small enough for convergence. BRENT 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.00248453 -0.0015717 0.135439 -0.116267 5 0.000301931 -0.0015717 0.0670866 -0.116267 6 -0.000383605 0.000301931 -0.0726599 0.0670866 7 -2.71671e-05 0.000301931 -0.0300618 0.0670866 8 7.46695e-05 -2.71671e-05 0.0421096 -0.0300618 9 1.52512e-05 -2.71671e-05 0.024799 -0.0300618 10 -3.92338e-06 1.52512e-05 -0.015772 0.024799 11 3.53075e-06 -3.92338e-06 0.0152273 -0.015772 12 -1.30822e-07 3.53075e-06 -0.00507645 0.0152273 13 7.84665e-07 -1.30822e-07 0.00922348 -0.00507645 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 5 -0.0697246 3 185 3.21132 BISECTION Step XA XB F(XA) F(XB) 0 0 185 -0.0872665 3.21132 1 0 92.5 -0.0872665 0.727925 2 0 46.25 -0.0872665 0.142057 3 0 23.125 -0.0872665 0.00215019 4 11.5625 23.125 -0.0458122 0.00215019 5 17.3438 23.125 -0.023044 0.00215019 6 20.2344 23.125 -0.010799 0.00215019 7 21.6797 23.125 -0.00441841 0.00215019 8 22.4023 23.125 -0.00115836 0.00215019 9 22.4023 22.7637 -0.00115836 0.000489757 10 22.583 22.7637 -0.000335829 0.000489757 11 22.583 22.6733 -0.000335829 7.65808e-05 12 22.6282 22.6733 -0.00012972 7.65808e-05 13 22.6508 22.6733 -2.65934e-05 7.65808e-05 14 22.6508 22.662 -2.65934e-05 2.49877e-05 15 22.6564 22.662 -8.04366e-07 2.49877e-05 Function small enough for convergence. BRENT Step XA XB F(XA) F(XB) 0 185 0 3.21132 -0.0872665 1 4.89431 185 -0.070099 3.21132 2 24.4521 4.89431 0.00835729 -0.070099 3 22.3688 24.4521 -0.00131088 0.00835729 4 22.6512 24.4521 -2.43743e-05 0.00835729 5 22.6566 22.6512 9.08424e-10 -2.43743e-05 Function small enough for convergence. MULLER Step XA XB XC F(XA) F(XB) F(XC) 0 0 5 185 -0.0872665 -0.0697246 3.21132 1 5 0 18.9091 -0.0697246 -0.0872665 -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 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. 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. REGULA FALSI Step XA XB F(XA) F(XB) 0 185 0 3.21132 -0.0872665 1 4.89431 0 -0.070099 -0.0872665 2 4.89431 24.879 -0.070099 0.0103914 3 22.299 24.879 -0.00162765 0.0103914 4 22.6484 24.879 -3.7524e-05 0.0103914 5 22.6564 24.879 -8.63021e-07 0.0103914 Function small enough for convergence. SECANT Step X F(X) -1 0 -0.0872665 0 5 -0.0697246 1 24.8738 0.0103663 2 22.3015 -0.00161628 3 22.6484 -3.71725e-05 4 22.6566 1.35454e-07 Function small enough for convergence. SECANT Step X F(X) -1 5 -0.0697246 0 185 3.21132 1 8.82513 -0.0559743 2 11.8433 -0.0447504 3 23.8771 0.0056464 4 22.5288 -0.000582924 5 22.655 -7.34664e-06 6 22.6566 9.64046e-09 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 3 -1 16 1 2 2.5 -1 5.625 2 2 2.25 -1 1.89062 3 2 2.125 -1 0.345703 4 2.0625 2.125 -0.351318 0.345703 5 2.09375 2.125 -0.00894165 0.345703 6 2.09375 2.10938 -0.00894165 0.166836 7 2.09375 2.10156 -0.00894165 0.0785623 8 2.09375 2.09766 -0.00894165 0.0347143 9 2.09375 2.0957 -0.00894165 0.0128623 10 2.09375 2.09473 -0.00894165 0.00195435 11 2.09424 2.09473 -0.00349515 0.00195435 12 2.09448 2.09473 -0.000770775 0.00195435 13 2.09448 2.0946 -0.000770775 0.000591693 14 2.09454 2.0946 -8.95647e-05 0.000591693 15 2.09454 2.09457 -8.95647e-05 0.000251058 16 2.09454 2.09456 -8.95647e-05 8.07453e-05 17 2.09455 2.09456 -4.41007e-06 8.07453e-05 18 2.09455 2.09455 -4.41007e-06 3.81675e-05 19 2.09455 2.09455 -4.41007e-06 1.68787e-05 20 2.09455 2.09455 -4.41007e-06 6.23431e-06 Interval small enough for convergence. BRENT Step XA XB F(XA) F(XB) 0 3 2 16 -1 1 2.05882 3 -0.3908 16 2 2.09566 2.05882 0.0123685 -0.3908 3 2.09453 2.09566 -0.000252138 0.0123685 4 2.09455 2.09566 -1.57134e-07 0.0123685 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 3 2 16 -1 1 2.05882 2 -0.3908 -1 2 2.05882 2.09656 -0.3908 0.0224281 3 2.09451 2.09656 -0.000456805 0.0224281 4 2.09455 2.09656 -5.15785e-07 0.0224281 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 0.99 1.013 -1.42109 5.50671 1 1.0015 1.013 -0.710543 5.50671 2 1.0015 1.00725 -0.710543 0.621725 3 1.00438 1.00725 -1.06581 0.621725 4 1.00581 1.00725 -0.444089 0.621725 5 1.00653 1.00725 -0.177636 0.621725 6 1.00653 1.00689 -0.177636 0.355271 7 1.00653 1.00671 -0.177636 0.0888178 8 1.00662 1.00671 -0.177636 0.0888178 9 1.00667 1.00671 -0.621725 0.0888178 10 1.00669 1.00671 -0.177636 0.0888178 11 1.00669 1.0067 -0.177636 0.177636 12 1.00669 1.00669 -0.177636 0.355271 13 1.00669 1.00669 -0.177636 0.710543 14 1.00669 1.00669 -0.177636 0.799361 15 1.00669 1.00669 -0.177636 1.06581 Interval small enough for convergence. BRENT Step XA XB F(XA) F(XB) 0 1.013 0.99 5.50671 -1.42109 1 0.994718 1.013 -0.710543 5.50671 2 0.998897 1.013 -0.532907 5.50671 3 1.00595 1.013 -0.355271 5.50671 4 1.00947 1.00595 0.177636 -0.355271 5 1.0083 1.00595 1.15463 -0.355271 6 1.0065 1.0083 -0.177636 1.15463 7 1.00698 1.0083 -0.532907 1.15463 8 1.00764 1.0083 -0.532907 1.15463 9 1.00797 1.00764 0.976996 -0.532907 10 1.00776 1.00764 0.266454 -0.532907 11 1.00772 1.00764 0.710543 -0.532907 12 1.00767 1.00772 -0.710543 0.710543 13 1.0077 1.00772 -0.444089 0.710543 14 1.00771 1.0077 0.177636 -0.444089 15 1.0077 1.0077 0.532907 -0.444089 16 1.0077 1.0077 0.177636 -0.444089 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 1932.41 458977 The iterate X = 1.02947 has left the region [XMIN,XMAX]. NEWTON Step X F(X) FP(X) 0 1.013 5.50671 3383.6 The iterate X = 1.013 has left the region [XMIN,XMAX]. REGULA FALSI Step XA XB F(XA) F(XB) 0 1.013 0.99 5.50671 -1.42109 1 0.994718 0.99 -0.710543 -1.42109 2 0.999436 0.99 -0.0888178 -1.42109 3 0.999436 1.00006 -0.0888178 0.532907 4 0.999526 1.00006 -0.710543 0.532907 5 0.999834 1.00006 -0.355271 0.532907 6 0.999926 1.00006 -0.266454 0.532907 7 0.999973 1.00006 -0.532907 0.532907 8 0.999973 1.00002 -0.532907 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 0 -3.13768 5 1 0.5 0 -3.03503 5 2 0.5 0.25 -3.03503 4.98958 3 0.375 0.25 -2.71136 4.98958 4 0.375 0.3125 -2.71136 3.47923 5 0.34375 0.3125 -2.34926 3.47923 6 0.34375 0.328125 -2.34926 0.872882 7 0.335938 0.328125 -0.922331 0.872882 8 0.332031 0.328125 -0.0384975 0.872882 9 0.332031 0.330078 -0.0384975 0.418288 10 0.332031 0.331055 -0.0384975 0.189594 11 0.332031 0.331543 -0.0384975 0.0754015 12 0.332031 0.331787 -0.0384975 0.0184063 13 0.331909 0.331787 -0.0100581 0.0184063 14 0.331909 0.331848 -0.0100581 0.00417113 15 0.331879 0.331848 -0.00294424 0.00417113 16 0.331879 0.331863 -0.00294424 0.000613256 17 0.331871 0.331863 -0.00116554 0.000613256 18 0.331867 0.331863 -0.000276155 0.000613256 19 0.331867 0.331865 -0.000276155 0.000168548 20 0.331866 0.331865 -5.38042e-05 0.000168548 Interval small enough for convergence. BRENT Step XA XB F(XA) F(XB) 0 1 0 -3.13768 5 1 0.614426 0 -3.81949 5 2 0.307213 0.614426 3.69718 -3.81949 3 0.45832 0.307213 -4.27529 3.69718 4 0.377288 0.307213 -2.75162 3.69718 5 0.347388 0.307213 -2.77965 3.69718 6 0.3273 0.347388 1.06197 -2.77965 7 0.332853 0.3273 -0.229163 1.06197 8 0.331868 0.3273 -0.000359493 1.06197 9 0.331866 0.331868 1.42922e-06 -0.000359493 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 = -9.92617e+41 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.06196 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.04263 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]. TEST_ZERO_TEST Normal end of execution. 02 March 2022 01:16:14 PM