Previous Up Next

10.4.3  fsolve with the option falsepos_solver

The "false position" algorithm is an iterative algorithm based on linear interpolation: it computes 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.


Example.
Input:

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

Output:


0.739085133215

Previous Up Next