### 8.4.5 fsolve or nSolve with the option secant_solver

The secant method is a simplified version of the Newton method. The computation of x1 is done using the Newton method. The computation of f′(xn), n>1 is done approximately. This method is used when the computation of the derivative is expensive:

xi+1 = xi−

f(xi)
f′est

, f′est =

f(xi) − f(xi−1)
(xi − xi−1)

The convergence for roots of multiplicity 1 is of order (1 + √5)/2 ≈ 1.62... .
Input :

fsolve((cos(x))=x,x,-1..1,secant_solver)

Output :

[0.739085078239,0.739085137844]

Input :

fsolve((cos(x))=x,x,0,secant_solver)

Output :

0.739085133215