Rather than using two arbitrary values to estimate the derivative as in secant method, an alternative approach involves a fractional perturbation of the independent variable to estimate f ‘(x):
Where delta = a small perturbation fraction. This approximation can be substituted in the Secant formula to yield:
The example used in this code:
The code shows the root value and the plot of the value-update with number of iterations.