Previous Up Next

4.4.3  fsolve or nSolve with the option falsepos_solver

The "false position" algorithm is an iterative algorithm based on linear interpolation : we compute the value of f at the intersection of the line (a,f(a)), (b,f(b)) with the x axis. This value gives us the part of the interval containing the root, and on which a new iteration is performed.
The convergence is linear but generically faster than bisection.
Input :

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

Output :

[0.739085133215,0.739085133215]

Previous Up Next