Accelerating Convergence for Iterative Methods

Subjects: Numerical Analysis
Links: Solutions of Equations of One Variable, Fixed Point Iteration, Newton-Raphson Method, Horner and Müller Methods, Secant Method, Method of False Position

Aitken’s Δ2 Method

Let suppose (pn)nN is a linearly convergent sequence to the limit point p, then we will define another sequence p^n, defined as

p^n=pn(Δpn)2Δ2pn

This is Aitken’sn Δ2 Method, we are going to use the Δ notation for differences that is present in Discrete Calculus

Let (pn)nN is a sequence that converges linearly to the limit point p, and that

limnpn+1ppnp<1

Then the Aitken’s Δ2 sequence (p^n)nN converges faster to p than (pn)nN in the sense that

limnp^n+1pp^np=0

Steffensen’s Method

We denote \{\Delta { #2} \} indicates the Aitken’s \Delta { #2} method, then

p0(0),p1(0)=g(p0(0)),p2(0)=g(p1(0)),p0(1)={Δ2}(p0(0)),p1(1)=g(p0(1))

Th: Suppose that x=g(x) has a solution p with g(p)1. If there exist a δ>0 such that gC3[pδ,p+δ], then Steffensen’s Method gives quadratic convergence for any p0[pδ,p+δ]

def steffensen_acceleration(f, x0, tol=1e-6, max_iter=1000):
    """
    Steffensen's acceleration method for fixed-point iteration.

    Parameters:
        f (callable): Function defining the fixed-point iteration x = f(x).
        x0 (float or complex): Initial guess.
        tol (float): Convergence tolerance.
        max_iter (int): Maximum number of iterations.

    Returns:
        x (float or complex): Approximated fixed point.
    """
    x_current = x0

    for iter_count in range(1, max_iter + 1):
        x_next = f(x_current)
        x_next_next = f(x_next)

        denominator = x_next_next - 2*x_next + x_current
        if denominator == 0:
            print("Denominator is zero. Steffensen's method cannot proceed.")
            return x_current

        # Apply Steffensen's acceleration
        x_accelerated = x_current - ((x_next - x_current)**2) / denominator

        # Check for convergence
        if abs(x_accelerated - x_current) < tol:
            print(f"Converged after {iter_count} iterations.")
            return x_accelerated

        x_current = x_accelerated

    print("Did not converge within the maximum iterations.")
    return x_current

# Fixed-point iteration example: sqrt(2) via g(x) = 0.5*(x + 2/x)
g = lambda x: 0.5 * (x + 2 / x)
root = steffensen_acceleration(g, x0=1.0)
print("Approximate fixed point:", root)