Steffensen's method

In numerical analysis, Steffensen's method is an iterative method for root-finding named after Johan Frederik Steffensen which is similar to Newton's method, but with certain situational advantages. In particular, Steffensen's method achieves similar quadratic convergence, but without using derivatives, as required for Newton's method.

Simple description
The simplest form of the formula for Steffensen's method occurs when it is used to find a zero of a real function $$\ f\, ;$$ that is, to find the real value $$x_\star$$ that satisfies $$\ f(x_\star) = 0 ~.$$ Near the solution $$\ x_\star\, ,$$ the function $$\ f\ $$ is supposed to approximately satisfy $$\ -1 < f'(x_\star) < 0\, ;$$ this condition makes $$\ f\ $$ adequate as a correction-function for $$~ x ~$$ for finding its own solution, although it is not required to work efficiently. For some functions, Steffensen's method can work even if this condition is not met, but in such a case, the starting value $$\ x_0\ $$ must be very close to the actual solution $$\ x_\star\, ,$$ and convergence to the solution may be slow. Adjustments of the method's step size, mentioned later, can improve convergence in some of these cases.

Given an adequate starting value $$\ x_0\, ,$$ a sequence of values $$\ x_0,\ x_1,\ x_2, \dots,\ x_n,\ \dots\ $$ can be generated using the formula below. When it works, each value in the sequence is much closer to the solution $$\ x_\star\ $$ than the prior value. The value $$\ x_n\ $$ from the current step generates the value $$\ x_{n+1}\ $$ for the next step, via this formula:


 * $$\ x_{n+1} = x_n - \frac{\, f(x_n) \,}{g(x_n)}\ $$

for $$\ n = 0, 1, 2, 3, ...\, ;$$ where the slope function $$\ g(x)\ $$ is a composite of the original function $$\ f\ $$ given by the following formula:


 * $$\ g(x) = \frac{\, f\bigl( x + f(x) \bigr) \,}{f(x)} - 1\ $$

or perhaps more clearly,


 * $$\ g(x) ~=~ \frac{\ f(x + h) - f(x) \ }{h}\ \approx \frac{\ \operatorname{d}f( x )\ }{ \operatorname{d}x } ~\equiv~ f'( x )\, ,$$

where $$\ h = f(x)\ $$ is a step-size between the last iteration point, $$\ x\, ,$$ and an auxiliary point located at $$\ x + h ~.$$

Technically, the function $$\ g\ $$ is called the first-order divided difference of $$\ f\ $$ between those two points (either forward type or backward type, depending on the sign of $\ h\ $). Practically, it is the averaged value of the slope $$\ f'\ $$ of the function $$\ f\ $$ between the last sequence point $$\ \left( x, y \right) = \bigl( x_n,\ f\left( x_n \right) \bigr)\ $$ and the auxiliary point at $$\ \bigl( x, y \bigr) = \bigl(\ x_n + h,\ f\left( x_n + h \right)\ \bigr)\, ,$$ with step of size (and direction) $$\ h = f(x_n) ~.$$

Because the value of $$\ g\ $$ is an approximation for $$\ f'\ ,$$ its value can optionally be checked to see if it meets the condition $$\ -1 < g < 0\ $$ which is required of $$\ f'\ ,$$ to guarantee convergence of Steffensen's algorithm. Although slight non-conformance may not necessarily be dire, any large departure from the condition warns that Steffensen's method is liable to fail, and temporary use of some fallback algorithm is warranted (e.g. the more robust Illinois algorithm, or plain regula falsi).

It is only for the purpose of finding $$\ h\ $$ for this auxiliary point that the value of the function $$\ f\ $$ must be an adequate correction to get closer to its own solution, and for that reason fulfill the requirement that $$\ -1 < f'(x_\star) < 0 ~.$$ For all other parts of the calculation, Steffensen's method only requires the function $$\ f\ $$ to be continuous and to actually have a nearby solution. Several modest modifications of the step $$\ h\ $$ in the formula for the slope $$\ g\ $$ exist, such as multiplying it by $1⁄2$ or $3⁄4$, to accommodate functions $$\ f\ $$ that do not quite meet the requirement.

Advantages and drawbacks
The main advantage of Steffensen's method is that it has quadratic convergence like Newton's method – that is, both methods find roots to an equation $$~ f ~$$ just as 'quickly'. In this case quickly means that for both methods, the number of correct digits in the answer doubles with each step. But the formula for Newton's method requires evaluation of the function's derivative $$~ f' ~$$ as well as the function $$~ f ~,$$ while Steffensen's method only requires $$~ f ~$$ itself. This is important when the derivative is not easily or efficiently available.

The price for the quick convergence is the double function evaluation: Both $$~ f(x_n) ~$$ and $$~ f(x_n + h) ~$$ must be calculated, which might be time-consuming if $$~ f ~$$ is a complicated function. For comparison, the secant method needs only one function evaluation per step. The secant method increases the number of correct digits by "only" a factor of roughly 1.6 per step, but one can do twice as many steps of the secant method within a given time. Since the secant method can carry out twice as many steps in the same time as Steffensen's method, in practical use the secant method actually converges faster than Steffensen's method, when both algorithms succeed: The secant method achieves a factor of about (1.6)2 ≈ 2.6 times as many digits for every two steps (two function evaluations), compared to Steffensen's factor of 2 for every one step (two function evaluations).

Similar to most other iterative root-finding algorithms, the crucial weakness in Steffensen's method is choosing an 'adequate' starting value $$~ x_0 ~.$$ If the value of $$~ x_0 ~$$ is not 'close enough' to the actual solution $$~ x_\star ~,$$ the method may fail and the sequence of values $$~ x_0, \, x_1, \, x_2, \, x_3, \, \dots ~$$ may either erratically flip-flop between two extremes, or diverge to infinity, or both.

Derivation using Aitken's delta-squared process
The version of Steffensen's method implemented in the MATLAB code shown below can be found using the Aitken's delta-squared process for accelerating convergence of a sequence. To compare the following formulae to the formulae in the section above, notice that $$x_n = p \, - \, p_n ~.$$ This method assumes starting with a linearly convergent sequence and increases the rate of convergence of that sequence. If the signs of $$~ p_n, \, p_{n+1}, \, p_{n+2} ~$$ agree and $$~ p_n ~$$ is 'sufficiently close' to the desired limit of the sequence $$~ p ~,$$ we can assume the following:


 * $$\frac{\, p_{n+1} - p \,}{\, p_n - p \,} ~ \approx ~ \frac{\, p_{n+2} - p \,}{\, p_{n+1} - p \,} $$

then
 * $$ ( p_{n+1} - p)^2 ~ \approx ~ (\, p_{n+2} - p \,)\,(\, p_n - p \, ) ~$$

so
 * $$ p_{n+1}^2 - 2 \, p_{n+1} \, p + p^2 ~ \approx ~ p_{n+2} \; p_n - (\, p_n + p_{n+2} \,) \, p + p^2 $$

and hence
 * $$(\, p_{n+2} - 2 \, p_{n+1} + p_n \,) \, p ~ \approx ~ p_{n+2} \, p_n - p_{n+1}^2 ~.$$

Solving for the desired limit of the sequence $$~ p ~$$ gives:


 * $$ p ~ \approx ~ \frac{\, p_{n+2} \, p_n - p_{n+1}^2 \,}{\, p_{n+2} - 2 \, p_{n+1} + p_n \,} ~=~ \frac{\, p_{n}^2 + p_{n} \, p_{n+2} + 2 \, p_{n} \, p_{n+1} - 2 \, p_{n} \, p_{n+1} - p_{n}^2 - p_{n+1}^2 \,}{\, p_{n+2} - 2 \, p_{n+1} + p_n \,}$$


 * $$ =~ \frac{\, (\, p_{n}^2 + p_{n} \, p_{n+2} - 2 \, p_{n} \, p_{n+1} \,) - (\, p_{n}^2 - 2 \, p_{n} \, p_{n+1} + p_{n+1}^2 \, ) \, }{\, p_{n+2} - 2 \, p_{n+1} + p_n \,}$$
 * $$ =~ p_n - \frac{\,(\, p_{n+1} - p_n )^2 \,}{\, p_{n+2} - 2 \, p_{n+1} + p_n \,} ~,$$

which results in the more rapidly convergent sequence:


 * $$ p ~ \approx ~ p_{n+3} ~=~ p_n - \frac{ \, ( \, p_{n+1} - p_n \, )^2 \, }{ \, p_{n+2} - 2 \, p_{n+1} + p_n \,} ~.$$

In Matlab
Here is the source for an implementation of Steffensen's Method in MATLAB.

In Python
Here is the source for an implementation of Steffensen's Method in Python.

Generalization to Banach space
Steffensen's method can also be used to find an input $$\ x = x_\star\ $$ for a different kind of function $$\ F\ $$ that produces output the same as its input: $$\ x_\star = F(x_\star)\ $$ for the special value $$\ x_\star ~.$$ Solutions like $$\ x_\star\ $$ are called fixed points. Many of these functions can be used to find their own solutions by repeatedly recycling the result back as input, but the rate of convergence can be slow, or the function can fail to converge at all, depending on the individual function. Steffensen's method accelerates this convergence, to make it quadratic.

For orientation, the root function $$\ f\ $$ and the fixed-point functions are simply related by $$\ F(x) = x + \varepsilon\ f(x)\ ,$$ where $$\ \varepsilon\ $$ is some scalar constant small enough in magnitude to make $$\ F\ $$ stable under iteration, but large enough for the non-linearity of the function $$\ f\ $$ to be appreciable. All issues of a more general Banach space vs. basic real numbers being momentarily ignored for the sake of the comparison.

This method for finding fixed points of a real-valued function has been generalised for functions $$\ F : X \to X\ $$ that map a Banach space $$\ X\ $$ onto itself or even more generally $$\ F : X \to Y\ $$ that map from one Banach space $$\ X\ $$ into another Banach space $$\ Y ~.$$ The generalized method assumes that a family of bounded linear operators $$\ \{\; G(u,v): u, v \in X \;\}\ $$ associated with $$\ u\ $$ and $$\ v\ $$ can be devised that (locally) satisfies this condition:


 * $$\ F\left( u \right) - F\left( v \right) = G\left( u, v \right) \, \bigl[\, u - v \,\bigr]\ \qquad\qquad\qquad\qquad $$.

If division is possible in the Banach space, the linear operator $$\ G\ $$ can be obtained from
 * $$\ G\left( u, v \right) = \bigl[\ F\left( u \right)- F\left( v \right)\ \bigr] \bigl[\ u - v\ \bigr]^{-1}\ ,$$

which may provide some insight: Expressed in this way, the linear operator $$\ G\ $$ can be more easily seen to be an elaborate version of the divided difference $$\ g\ $$ discussed in the first section, above. The quotient form is shown here for orientation only; it is not required per se. Note also that division within the Banach space is not necessary for the elaborated Steffensen's method to be viable; the only requirement is that the operator $$\ G\ $$ satisfy the equation marked with the segno, ($𝄋$).

For the basic real number function $$\ f\ ,$$ given in the first section, the function simply takes in and puts out real numbers. There, the function $$\ g\ $$ is a divided difference. In the generalized form here, the operator $$\ G\ $$ is the analogue of a divided difference for use in the Banach space. The operator $$\ G\ $$ is roughly equivalent to a matrix whose entries are all functions of vector arguments $$\ u\ $$ and $$\ v ~.$$

Steffensen's method is then very similar to the Newton's method, except that it uses the divided difference $$\ G \bigl( \, F\left( x \right), \, x \,\bigr)\ $$ instead of the derivative $$\ F'(x) ~.$$ Note that for arguments $$\ x\ $$ close to some fixed point $$\ x_\star\ ,$$ fixed point functions $$\ F\ $$ and their linear operators $$\ G\ $$ meeting the marked ($𝄋$) condition, $$\ F'(x) \approx G \bigl( \, F\left( x \right), \, x \,\bigr) \approx I\ $$ where $$\ I\ $$ is the identity operator.

In the case that division is possible in the Banach space, the generalized iteration formula is given by


 * $$ x_{n+1} = x_n + \Bigl[ I - G\bigl( F\left( x_n \right), x_n \bigr) \Bigr]^{-1}\Bigl[ F\left( x_n \right) - x_n \Bigr]\ ,$$

for $$\ n = 1,\,2,\,3,\,... ~.$$ In the more general case in which division may not be possible, the iteration formula requires finding a solution $$\ x_{n+1}\ $$ close to $$\ x_{n}\ $$ for which


 * $$ \Bigl[ I - G\bigl( F\left( x_n \right), x_n \bigr) \Bigr] \Bigl[ x_{n+1} - x_n \Bigr] =  F\left( x_n \right) - x_n ~.$$

Equivalently one may seek the solution $$\ x_{n+1}\ $$ to the somewhat reduced form


 * $$ \Bigl[ I - G\bigl( F\left( x_n \right), x_n \bigr) \Bigr] x_{n+1} = \Bigl[ F\left( x_n \right) - G\bigl( F\left( x_n \right), x_n \bigr) \ x_n \Bigr]\ ,$$

with all the values inside square brackets being independent of $$\ x_{n+1}\ :$$ The bracketed terms all only depend on $$\ x_{n} ~.$$ Be aware, however, that the second form may not be as numerically stable as the first: Because the first form involves finding a value for a (hopefully) small difference it may be numerically more likely to avoid excessively large or erratic changes to the iterated value $$\ x_n ~.$$

If the linear operator $$~ G ~$$ satisfies


 * $$ \Bigl\| G \left( u, v \right) - G \left( x, y \right) \Bigr\| \le k \biggl( \Bigl\|u - x \Bigr\| + \Bigr\| v - y \Bigr\| \biggr) ~$$

for some positive real constant $$\ k ~,$$ then the method converges quadratically to a fixed point of $$\ F\ $$ if the initial approximation $$\ x_0\ $$ is 'sufficiently close' to the desired solution $$\ x_\star\ ,$$ that satisfies $$\ x_\star = F(x_\star) ~.$$