Saturday, 9 March 2013

Numerical Methods in Python : Regula-Falsi Method

The Regula-Falsi method is another one of the bracketing methods for finding roots of equations. This method is based on linear interpolation. The logic is very similar to the bisection method with the difference only in the finding of the middle point. In bisection method, the point in the exact middle is chosen whereas in regula-falsi method, the point where the line joining (a,f(a)) and (b,f(b)) and the x-axis intersects is chosen.
Apart from this the rest of the algorithm is similar to that of the bisection method.

Here's my python code :

No comments:

Post a Comment