aitken: Aitken' Method

View source: R/aitken.R

aitkenR Documentation

Aitken' Method

Description

Aitken's acceleration method.

Usage

aitken(f, x0, nmax = 12, tol = 1e-8, ...)

Arguments

f

Function with a fixpoint.

x0

Starting value.

nmax

Maximum number of iterations.

tol

Relative tolerance.

...

Additional variables passed to f.

Details

Aitken's acceleration method, or delta-squared process, is used for accelerating the rate of convergence of a sequence (from linear to quadratic), here applied to the fixed point iteration scheme of a function.

Value

The fixpoint (as found so far).

Note

Sometimes used to accerate Newton-Raphson (Steffensen's method).

References

Quarteroni, A., and F. Saleri (2006). Scientific Computing with Matlab and Octave. Second Edition, Springer-Verlag, Berlin Heidelberg.

See Also

lambertWp

Examples

# Find a zero of    f(x) = cos(x) - x*exp(x)
# as fixpoint of  phi(x) = x + (cos(x) - x*exp(x))/2
phi <- function(x) x + (cos(x) - x*exp(x))/2
aitken(phi, 0)  #=> 0.5177574

pracma documentation built on March 19, 2024, 3:05 a.m.