Learn R Programming

pracma (version 1.5.8)

aitken: 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.

Value

  • The fixpoint (as found so far).

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.

References

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

See Also

lambertWp

Examples

Run this code
# 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

Run the code above in your browser using DataLab