root_punto_fijo
Find a fixed point of g(x)=x using fixed-point iteration, report the Lipschitz convergence check and iteration table, and optionally return a plot.
Instructions
Find a fixed point of g(x) = x with the fixed-point iteration method.
Converges when |g'(x)| < 1 near the root (Lipschitz check is reported).
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 fixed point, the Lipschitz check, iteration table and
convergence flag. With plot=True a list [dict, Image] is returned.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x0 | Yes | ||
| tol | No | ||
| plot | No | ||
| g_str | Yes | ||
| max_iter | No | ||
| precision | No |