Numerical methods for solving a nonlinear equation: The bisection method
Stopping criterion for the bisection method (programming assignment)
Modify the Python function from the previous assignment to use the relative truncation error as stopping criterion, i.e. using \(\left|\frac{b_n-a_n}{b_n+a_n}\right|<\epsilon\).
Verify that you now need more iterations with tolerance \(\epsilon=0.001\), but that you get an answer that is correct in at least 4 significant digits (instead of 3 significant digits with the usual stopping criterion of absolute truncation error).
Unlock full access