Provide f(x) (and optionally f′(x)), an initial guess x₀, tolerance ε, and max iterations N. The page computes the iterate, explains why Newton works (and when it fails), and verifies convergence with a test harness.
N is the maximum number of iterations. If f′(x) is omitted, a centered finite‑difference derivative is used. Convergence is declared when both the step size and the residual are ≤ ε (scaled by magnitude). Supported syntax: numbers, x, operators + - * / ^, parentheses, and functions sin, cos, tan, asin, acos, atan, exp, log (ln), log10, sqrt, cbrt, abs, floor, ceil, round; constants pi, e.
| # | x | f(x) | f′(x) | |Δx| |
|---|
Each block runs Newton and reports the approximate root, residual, iterations, status, and observed rate. Some cases are intentionally tricky.