You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#%config InlineBackend.figure_format = 'svg'
from pylab import *
The secant method approximates the function by an affine polynomial and finds the root of the polynomial. We can improve this method by constructing a quadratic polynomial approximation.
Muller's method
Given three initial guesses $x_0, x_1, x_2$, construct a quadratic polynomial $p(x)$ such that
$$
p(x_i) = f(x_i), \qquad i=0,1,2
$$
The next approximation to the root $x_3$ is taken as the root of $p$
$$
p(x_3) = 0
$$
We can write the Newton form of the interpolating polynomial1
We have to choose the sign in the numerator that leads to small numerator. However this can lead to loss of significant figures. We can rewrite this as
Now we choose sign in denominator so that denominator is large in magnitude. We apply this algorithm recursively to obtain a sequence of iterates ${ x_n }$. If $x_n \to \alpha$ and $f'(\alpha) \ne 0$, then $\alpha$ is a root of $f$. To prove this, show that
Muller's method can give rise to complex roots even when starting with real initial guesses.
Inverse quadratic interpolation
We treat $x$ as a function of $f$, i.e., $x = x(f)$. Like in Muller's method, let us take $x_0, x_1,x_2$ and $f_i = f(x_i)$, $i=0,1,2$, but now construct an approximation
$$
x = q(f; x_0,x_1,x_2)
$$
such that
$$
x_i = q(f_i; x_0,x_1,x_2), \qquad i=0,1,2
$$
Once the quadratic polynomial $q$ is found, we estimate the root as
$$
x_4 = q(0; x_0,x_1,x_2)
$$
This can be used to generate the iteration
$$
x_{n+1} = q(0; x_n, x_{n-1}, x_{n-2})
$$
Note that all the iterates will be real if we start with real initial guess.
Linear fractional method
Suppose $f(x)$ has a vertical and horizontal asymptote, e.g., $f(x) = \frac{1}{x} - a$. Then the secant method may not converge, see figure (xxx), where $x_3$ can go to $-\infty$. Instead of linear approximation, we can use a fractional approximation.
Given $x_0, x_1, x_2$, fit a rational polynomial
$$
g(x) = \frac{x - a}{bx - c}
$$
using
$$
g(x_i) = f(x_i), \qquad i=0,1,2
$$
The solution is simplified if we shift the origin, $y = x - x_2$ and