next up previous contents index
suivant: fsolve or nSolve with monter: Solve equations with fsolve précédent: fsolve or nSolve with   Table des matières   Index

fsolve or nSolve with the option secant_solver

The secant methode 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 approximatively. This method is used when the computation of the derivative is expensive:

xi+1 = xi - $\displaystyle {\frac{{ f(x_i)}}{{f'_{est}}}}$,    f'est = $\displaystyle {\frac{{f(x_i) - f(x_{i-1})}}{{(x_i - x_{i-1})}}}$

The convergence for roots of multiplicity 1 is of order (1 + $ \sqrt{5}$)/2 $ \approx$ 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



giac documentation written by Renée De Graeve and Bernard Parisse