Ridders' method

In numerical analysis, Ridders' method is a root-finding algorithm based on the false position method and the use of an exponential function to successively approximate a root of a continuous function $$f(x)$$. The method is due to C. Ridders.

Ridders' method is simpler than Muller's method or Brent's method but with similar performance. The formula below converges quadratically when the function is well-behaved, which implies that the number of additional significant digits found at each step approximately doubles; but the function has to be evaluated twice for each step, so the overall order of convergence of the method is $$\sqrt{2}$$. If the function is not well-behaved, the root remains bracketed and the length of the bracketing interval at least halves on each iteration, so convergence is guaranteed.

Method
Given two values of the independent variable, $$x_0$$ and $$x_2$$, which are on two different sides of the root being sought, i.e.,$$f(x_0)f(x_2) < 0$$, the method begins by evaluating the function at the midpoint $$x_1 = (x_0 +x_2)/2 $$. One then finds the unique exponential function $$e^{ax}$$ such that function $$h(x)=f(x)e^{ax}$$ satisfies $$h(x_1)=(h(x_0) +h(x_2))/2 $$. Specifically, parameter $$a$$ is determined by
 * $$e^{a(x_1 - x_0)} = \frac{f(x_1)-\operatorname{sign}[f(x_0)]\sqrt{f(x_1)^2 - f(x_0)f(x_2)}}{f(x_2)} .$$

The false position method is then applied to the points $$(x_0,h(x_0))$$ and $$(x_2,h(x_2))$$, leading to a new value $$x_3 $$ between $$x_0 $$ and $$x_2 $$,
 * $$x_3 = x_1 + (x_1 - x_0)\frac{\operatorname{sign}[f(x_0)]f(x_1)}{\sqrt{f(x_1)^2 - f(x_0)f(x_2)}},$$

which will be used as one of the two bracketing values in the next step of the iteration.

The other bracketing value is taken to be $$x_1 $$ if $$f(x_1)f(x_3) <0$$ (well-behaved case), or otherwise whichever of $$x_0 $$ and $$x_2 $$ has function value of opposite sign to $$f(x_3)$$. The procedure can be terminated when a given accuracy is obtained.