The iteration formula for the Secant method can be reduced to the iteration formula for Newton-Raphson method by replacing the slope of the secant by : code example
Example: secant method
x(i+1) = x(i-1)f(xi)-x(i)f(xi-1)/f(xi)-f(xi-1)
x(i+1) = x(i-1)f(xi)-x(i)f(xi-1)/f(xi)-f(xi-1)