# fsolve with the option secant_solver

### 10.4.5 fsolve with the option secant_solver

The secant method is a simplified version of Newton’s method. The computation of x1 is done using Newton’s method, but then 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… .

#### Examples.

- Input:
  fsolve((cos(x))=x,x,-1..1,secant_solver)
  Output:

  ⎡ ⎣ | 0.739085133215 | ⎤ ⎦

- Input:
  fsolve((cos(x))=x,x,0,secant_solver)
  Output:

  0.739085133215