============== Brent's Method ============== This is a hybrid between the robustness of the interval-halving and the speed of the inverse quadratic interpolation. The method gauges the guesses and applies one or other method to suit the situation. Brent's method aggressively uses bracketing to ensure that the root finding methods stay on track. It is the default for scipy:: +------+-----------+-----------+-----------+------------+-----------+-----------+-----------+ | step | x0 | x1 | x2 | f(x0) | f(x1) | f(x2) | emax | +------+-----------+-----------+-----------+------------+-----------+-----------+-----------+ | 0 | 2 | 1.5 | 2 | 3 | -1.875 | 3 | 0.5 | | 1 | 1.75 | 1.5 | 1.5 | 0.171875 | -1.875 | -1.875 | 0.25 | | 2 | 1.625 | 1.75 | 1.5 | -0.9433594 | 0.171875 | -1.875 | 0.125 | | 3 | 1.625 | 1.7324852 | 1.75 | -0.9433594 | 0.0041123 | 0.171875 | 0.1074852 | | 4 | 1.7320501 | 1.7324852 | 1.7324852 | -6.4e-06 | 0.0041123 | 0.0041123 | 0.0004351 | | 5 | 1.7322677 | 1.7320501 | 1.7324852 | 0.0020527 | -6.4e-06 | 0.0041123 | 0.0002175 | | 6 | 1.7321589 | 1.7320501 | 1.7320501 | 0.0010231 | -6.4e-06 | -6.4e-06 | 0.0001088 | | 7 | 1.7321045 | 1.7320501 | 1.7320501 | 0.0005084 | -6.4e-06 | -6.4e-06 | 5.44e-05 | | 8 | 1.7320773 | 1.7320501 | 1.7320501 | 0.000251 | -6.4e-06 | -6.4e-06 | 2.72e-05 | | 9 | 1.7320637 | 1.7320501 | 1.7320501 | 0.0001223 | -6.4e-06 | -6.4e-06 | 1.36e-05 | +------+-----------+-----------+-----------+------------+-----------+-----------+-----------+ root is: 1.7320501357894793 steps taken: 9 .. container:: toggle .. container:: header *Show/Hide Code* brent_nick.py .. literalinclude:: ../examples/eq/brent_nick.py