Menu
Home Explore People Places Arts History Plants & Animals Science Life & Culture Technology
On this page
Steffensen's method
Newton-like root-finding algorithm that does not use derivatives

In numerical analysis, Steffensen's method is an iterative method for root-finding named after Johan Frederik Steffensen. It achieves quadratic convergence without using derivatives, unlike Newton's method which requires them, while the secant method also avoids derivatives but converges more slowly. Steffensen’s method needs two function evaluations per step, impacting its computational cost, often comparable to Newton’s. It can be derived using Aitken’s delta-squared process applied to fixed-point iteration and generalizes to efficient fixed-point calculations in Banach spaces, under conditions ensured by the Banach fixed-point theorem.

We don't have any images related to Steffensen's method yet.
We don't have any YouTube videos related to Steffensen's method yet.
We don't have any PDF documents related to Steffensen's method yet.
We don't have any Books related to Steffensen's method yet.
We don't have any archived web articles related to Steffensen's method yet.

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 {\displaystyle f} ; that is, to find the real value   x ⋆   {\displaystyle \ x_{\star }\ } that satisfies   f ( x ⋆ ) = 0   . {\displaystyle \ f(x_{\star })=0~.} Near the solution   x ⋆   , {\displaystyle \ x_{\star }\ ,} the derivative of the function,   f ′   , {\displaystyle \ f'\ ,} needs to either exactly or very nearly satisfy − 1 < f ′ ( x ⋆ ) < 0   . {\displaystyle -1<f'(x_{\star })<0~.} 2 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   {\displaystyle \ x_{0}\ } must be very close to the actual solution   x ⋆   , {\displaystyle \ x_{\star }\ ,} and convergence to the solution may be slow. Adjustment of the size of the method's intermediate step, mentioned later, can improve convergence in some of these cases.

Given an adequate starting value   x 0   , {\displaystyle \ x_{0}\ ,} a sequence of values   x 0 ,     x 1 ,   x 2 ,   … ,   x n ,   …   {\displaystyle \ 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 ⋆   {\displaystyle \ x_{\star }\ } than the prior value. The value   x n   {\displaystyle \ x_{n}\ } from the current step generates the value   x n + 1   {\displaystyle \ x_{n+1}\ } for the next step, via the formula3

x n + 1 = x n − f ( x n ) g ( x n ) {\displaystyle x_{n+1}=x_{n}-{\frac {f(x_{n})}{g(x_{n})}}}

for   n = 0 , 1 , 2 , 3 , . . .   , {\displaystyle \ n=0,1,2,3,...\ ,} where the slope function   g ( x )   {\displaystyle \ g(x)\ } is a composite of the original function   f   {\displaystyle \ f\ } given by the formula

g ( x ) = f ( x + f ( x ) ) f ( x ) − 1 {\displaystyle g(x)={\frac {f{\bigl (}x+f(x){\bigr )}}{f(x)}}-1}

or perhaps more clearly,

g ( x ) = f ( x + h ) − f ( x ) h ≈ d ⁡ f ( x ) d ⁡ x ≡ f ′ ( x ) , {\displaystyle g(x)={\frac {f(x+h)-f(x)}{h}}\qquad \approx \quad {\frac {\operatorname {d} f(x)}{\operatorname {d} x}}\equiv f'(x),}

where   h ≡ f ( x )   {\displaystyle \ h\equiv f(x)\ } is a step-size between the last iteration point,   x   , {\displaystyle \ x\ ,} and an auxiliary point located at   x + h   . {\displaystyle \ x+h~.}

Technically, the function   g   {\displaystyle \ g\ } is called the first-order divided difference of   f   {\displaystyle \ f\ } between those two points4 Practically, it is the averaged value of the slope f ′ {\displaystyle f'} of the function   f   {\displaystyle \ f\ } between the last sequence point ( x , y ) = ( x n , f ( x n ) ) {\displaystyle \left(x,y\right)={\bigl (}x_{n},f\left(x_{n}\right){\bigr )}} and the auxiliary point at   ( x , y ) = ( x n + h , f ( x n + h ) )   , {\displaystyle \ {\bigl (}x,y{\bigr )}={\bigl (}x_{n}+h,f\left(x_{n}+h\right){\bigr )}\ ,} with the size of the intermediate step (and its direction) given by   h = f ( x n )   . {\displaystyle \ h=f(x_{n})~.}

Because the value of   g   {\displaystyle \ g\ } is an approximation for   f ′   , {\displaystyle \ f'\ ,} its value can optionally be checked to see if it meets the condition   − 1 < g < 0   , {\displaystyle \ -1<g<0\ ,} which is required 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   {\displaystyle \ h\ } for this auxiliary point that the value of the function   f   {\displaystyle \ f\ } must fulfill the requirement that   − 1 < f ′ ( x ⋆ ) < 0   . {\displaystyle \ -1<f'(x_{\star })<0~.} 5 For all other parts of the calculation, Steffensen's method only requires the function   f   {\displaystyle \ f\ } to be continuous and to actually have a nearby solution.6 Several modest modifications of the step   h   {\displaystyle \ h\ } used in the formula for the slope   g   {\displaystyle \ g\ } exist, such as multiplying it by ⁠ 1 /2⁠ or ⁠ 3 /4⁠, to accommodate functions   f   {\displaystyle \ f\ } that do not quite meet the requirement.

Advantages and drawbacks

The main advantage of Steffensen's method is that it has quadratic convergence7 like Newton's method – that is, both methods find roots to an equation   f   {\displaystyle \ 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 ′   {\displaystyle \ f'\ } as well as the function   f   , {\displaystyle \ f\ ,} while Steffensen's method only requires   f   {\displaystyle \ 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 )   {\displaystyle \ f(x_{n})\ } and   f ( x n + h )   {\displaystyle \ f(x_{n}+h)\ } must be calculated, which might be time-consuming if   f   {\displaystyle \ f\ } is complicated. For comparison, both regula falsi and the secant method only need 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,8 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 a "sufficiently close" starting value   x 0   . {\displaystyle \ x_{0}~.} If the value of   x 0   {\displaystyle \ x_{0}\ } is not "close enough" to the actual solution   x ⋆   , {\displaystyle \ x_{\star }\ ,} the method may fail, and the sequence of values   x 0 , x 1 , x 2 , x 3 , …   {\displaystyle \ x_{0},\,x_{1},\,x_{2},\,x_{3},\,\dots \ } may either erratically flip-flop between two (or more) 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 Aitken's delta-squared process for convergence acceleration. To compare the following formulae to the formulae in the section above, notice that x n = p − p n {\displaystyle 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 {\displaystyle p_{n},\,p_{n+1},\,p_{n+2}} agree and p n {\displaystyle p_{n}} is "sufficiently close" to the desired limit of the sequence p {\displaystyle p} , then we can assume

p n + 1 − p p n − p ≈ p n + 2 − p p n + 1 − p , {\displaystyle {\frac {p_{n+1}-p}{p_{n}-p}}\approx {\frac {p_{n+2}-p}{p_{n+1}-p}},}

so that

( p n + 2 − 2 p n + 1 + p n ) p ≈ p n + 2 p n − p n + 1 2 . {\displaystyle (p_{n+2}-2p_{n+1}+p_{n})p\approx p_{n+2}p_{n}-p_{n+1}^{2}.}

Solving for the desired limit of the sequence p {\displaystyle p} gives:

p ≈ p n + 2 p n − p n + 1 2 p n + 2 − 2 p n + 1 + p n {\displaystyle p\approx {\frac {p_{n+2}p_{n}-p_{n+1}^{2}}{p_{n+2}-2p_{n+1}+p_{n}}}} =   ( 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 {\displaystyle =~{\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 − ( p n + 1 − p n ) 2 p n + 2 − 2 p n + 1 + p n , {\displaystyle =p_{n}-{\frac {(p_{n+1}-p_{n})^{2}}{p_{n+2}-2p_{n+1}+p_{n}}},}

which results in the more rapidly convergent sequence:

p ≈ p n + 3 = p n − ( p n + 1 − p n ) 2 p n + 2 − 2 p n + 1 + p n . {\displaystyle p\approx p_{n+3}=p_{n}-{\frac {(p_{n+1}-p_{n})^{2}}{p_{n+2}-2p_{n+1}+p_{n}}}.}

Code example

In Matlab

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

function Steffensen(f, p0, tol) % This function takes as inputs: a fixed point iteration function, f, % and initial guess to the fixed point, p0, and a tolerance, tol. % The fixed point iteration function is assumed to be input as an % inline function. % This function will calculate and return the fixed point, p, % that makes the expression f(x) = p true to within the desired % tolerance, tol. format compact % This shortens the output. format long % This prints more decimal places. for i = 1:1000 % get ready to do a large, but finite, number of iterations. % This is so that if the method fails to converge, we won't % be stuck in an infinite loop. p1 = f(p0) + p0; % calculate the next two guesses for the fixed point. p2 = f(p1) + p1; p = p0-(p1-p0)^2/(p2-2*p1+p0) % use Aitken's delta squared method to % find a better approximation to p0. if abs(p - p0) < tol % test to see if we are within tolerance. break % if we are, stop the iterations, we have our answer. end p0 = p; % update p0 for the next iteration. end if abs(p - p0) > tol % If we fail to meet the tolerance, we output a % message of failure. 'failed to converge in 1000 iterations.' end

In Python

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

from typing import Callable, Iterator Func = Callable[[float], float, float] def g(f: Func, x: float, fx: float) -> Func: """First-order divided difference function. Arguments: f: Function input to g x: Point at which to evaluate g fx: Function f evaluated at x """ return lambda x: f(x + fx) / fx - 1 def steff(f: Func, x: float, tol: float) -> Iterator[float]: """Steffenson algorithm for finding roots. This recursive generator yields the x_{n+1} value first then, when the generator iterates, it yields x_{n+2} from the next level of recursion. Arguments: f: Function whose root we are searching for x: Starting value upon first call, each level n that the function recurses x is x_n """ n = 0 while True: if n > 1000: print( "failed to converge in 1000 itterations" ) break else: n = n + 1 fx = f(x) if abs(fx) < tol: break else: gx = g(f, x, fx)(x) x = x - fx / gx # Update to x_{n+1} yield x # Yield value

Generalization to Banach space

Steffensen's method can also be used to find an input   x = x ⋆   {\displaystyle \ x=x_{\star }\ } for a different kind of function   F   {\displaystyle \ F\ } that produces output the same as its input:   x ⋆ = F ( x ⋆ )   {\displaystyle \ x_{\star }=F(x_{\star })\ } for the special value   x ⋆   . {\displaystyle \ x_{\star }~.} Solutions like   x ⋆   {\displaystyle \ 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.

Momentarily ignoring the issues of a more general Banach space vs. basic real numbers for the sake of an example: To re-orient the reader to the earlier section, a simple toy model fixed-point function,   F ~   , {\displaystyle \ {\tilde {F}}\ ,} using any root function   f   , {\displaystyle \ f\ ,} can be made with   F ~ ( x ) = x + ε   f ( x )   . {\displaystyle \ {\tilde {F}}(x)=x+\varepsilon \ f(x)~.} Here   ε   {\displaystyle \ \varepsilon \ } is a constant with the appropriate sign that is small enough in magnitude to make   F ~   {\displaystyle \ {\tilde {F}}\ } stable under iteration, but large enough for the non-linearity of the function   f   {\displaystyle \ f\ } to be appreciable.

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

F ( u ) − F ( v ) = G ( u , v )   (   u − v   ) {\displaystyle F\left(u\right)-F\left(v\right)=G\left(u,v\right)\ {\bigl (}\ u-v\ {\bigr )}\quad } 1

The operator   G   {\displaystyle \ G\ } is roughly equivalent to a matrix whose entries are all functions of vector arguments   u   {\displaystyle \ u\ } and   v   . {\displaystyle \ v~.} Refer again back to the simple function   f   , {\displaystyle \ f\ ,} given in the first section, where the function merely takes in and puts out real numbers: There, the function   g   {\displaystyle \ g\ } is a divided difference. In the generalized form here, the operator   G   {\displaystyle \ G\ } is the analogue of a divided difference for use in the Banach space.

If division is possible in the Banach space, then the linear operator   G   {\displaystyle \ G\ } can be obtained from

G ( u , v ) = [   F ( u ) − F ( v )   ]   (   u − v   ) − 1   , {\displaystyle 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   {\displaystyle \ G\ } can be more easily seen to be an elaborate version of the divided difference   g   {\displaystyle \ 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   {\displaystyle \ G\ } satisfy (1).

Steffensen's method is then very similar to the Newton's method, except that it uses the divided difference   G ( F ( x ) , x )   {\displaystyle \ G{\bigl (}F\left(x\right),x{\bigr )}\ } instead of the derivative   F ′ ( x )   . {\displaystyle \ F'(x)~.} Note that for arguments   x   {\displaystyle \ x\ } close to some fixed point   x ⋆   , {\displaystyle \ x_{\star }\ ,} fixed point functions   F   {\displaystyle \ F\ } and their linear operators   G   {\displaystyle \ G\ } meeting condition (1),   F ′ ( x )   ≈   G ( F ( x ) , x )   ≈   I   , {\displaystyle \ F'(x)\ \approx \ G{\bigl (}F\left(x\right),x{\bigr )}\ \approx \ I\ ,} where   I   {\displaystyle \ 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 + [   I − G ( F ( x n ) , x n )   ] − 1 [   F ( x n ) − x n   ]   , {\displaystyle 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 ,   . . .   . {\displaystyle \ 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   {\displaystyle \ x_{n+1}\ } close to   x n   {\displaystyle \ x_{n}\ } for which

[   I − G ( F ( x n ) , x n )   ] (   x n + 1 − x n   ) = F ( x n ) − x n   . {\displaystyle {\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   {\displaystyle \ x_{n+1}\ } to the somewhat reduced form

[   I − G ( F ( x n ) , x n )   ]   x n + 1 = [   F ( x n ) − G ( F ( x n ) , x n )   x n   ]   , {\displaystyle {\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   : {\displaystyle \ x_{n+1}\ :} The bracketed terms all only depend on   x n   {\displaystyle \ x_{n}\ } . However, 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   . {\displaystyle \ x_{n}~.}

If the linear operator   G   {\displaystyle \ G\ } satisfies

‖ G ( u , v ) − G ( x , y ) ‖ ≤ k ( ‖ u − x ‖ + ‖ v − y ‖ ) {\displaystyle {\Bigl \|}G\left(u,v\right)-G\left(x,y\right){\Bigr \|}\leq k{\biggl (}{\Bigl \|}u-x{\Bigr \|}+{\Bigr \|}v-y{\Bigr \|}{\biggr )}}

for some positive real constant   k   , {\displaystyle \ k\ ,} then the method converges quadratically to a fixed point of   F   {\displaystyle \ F\ } if the initial approximation   x 0   {\displaystyle \ x_{0}\ } is "sufficiently close" to the desired solution   x ⋆   {\displaystyle \ x_{\star }\ } that satisfies   x ⋆ = F ( x ⋆ )   . {\displaystyle \ x_{\star }=F(x_{\star })~.}

Notes

References

  1. For rare special case functions the derivative for Newton's method can be calculated at negligible cost, by using saved parts from evaluation of the main function. If optimized in this way, Newton's method becomes only slightly more costly per step than the secant method, and benefits from slightly faster convergence.

  2. The condition − 1 < f ′ ( x ⋆ ) < 0   {\displaystyle -1

  3. Dahlquist, Germund; Björck, Åke (1974). Numerical Methods. Translated by Anderson, Ned. Englewood Cliffs, NJ: Prentice Hall. pp. 230–231. /wiki/Germund_Dahlquist

  4. The divided difference   g   {\displaystyle \ g\ } is either a forward-type or backward-type divided difference, depending on the sign of   h   {\displaystyle \ h\ } . /wiki/Divided_difference

  5. The condition − 1 < f ′ ( x ⋆ ) < 0   {\displaystyle -1

  6. Dahlquist, Germund; Björck, Åke (1974). Numerical Methods. Translated by Anderson, Ned. Englewood Cliffs, NJ: Prentice Hall. pp. 230–231. /wiki/Germund_Dahlquist

  7. Dahlquist, Germund; Björck, Åke (1974). Numerical Methods. Translated by Anderson, Ned. Englewood Cliffs, NJ: Prentice Hall. pp. 230–231. /wiki/Germund_Dahlquist

  8. Because   f ( x n + h )   {\displaystyle \ f(x_{n}+h)\ } requires the prior calculation of   h ≡ f ( x n )   , {\displaystyle \ h\equiv f(x_{n})\ ,} the two evaluations must be done sequentially – the algorithm per se cannot be made faster by running the function evaluations in parallel. This is yet another disadvantage of Steffensen's method.

  9. Johnson, L.W.; Scholz, D.R. (June 1968). "On Steffensen's method". SIAM Journal on Numerical Analysis. 5 (2): 296–302. doi:10.1137/0705026. JSTOR 2949443. /wiki/SIAM_Journal_on_Numerical_Analysis