root_aitken
Accelerate fixed-point iteration to find a root using Aitken's delta-squared method, an iteration function g(x), and an initial guess.
Instructions
Accelerate fixed-point iteration with Aitken's delta-squared method.
Args: g_str: Math expression for the iteration function g(x). x0: Initial guess. tol: Convergence tolerance. max_iter: Maximum iterations. precision: Rounding digits. plot: When True, also return a PNG plot of g(x) and y = x.
Returns:
Dict with the accelerated root, iteration table and convergence flag.
With plot=True a list [dict, Image] is returned instead.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x0 | Yes | ||
| tol | No | ||
| plot | No | ||
| g_str | Yes | ||
| max_iter | No | ||
| precision | No |