3.2 Half interval method
This algorithm is generally used when an analytical expression for the derivative of the function f(x) = 0 with respect to the x is not available.
In this case the algorithm is as follows:
- Choose 2 values for x in such a way that it is: f(a) f(b) < 0
- Calculate the new value for xnew = [a + b]/2
- Calculate the new value for f(xnew)
- If f(xnew) is already almost zero (<e), xnew is the searched root
- If f(xnew) is >e, the procedure must be iterated from point 1 again until convergence. Of course, one of the new two values to choose in point 1 is xnew
Here below a scheme of the algorithm.