Explaining add-on
Root finding
Show a bracket, convergence evidence, and explicit partial status rather than presenting a root as magic.
Explain convergence—and its limits.
RootAnalyzer uses bisection and exposes the original interval, endpoint sign check, midpoint history, and approximate result. A finite increasing bracket with opposite signs is required; an endpoint at zero is valid.
$analysis = (new RootAnalyzer())->analyze('x^2 - 2', 'x', 0, 2, iterations: 20);
// status: solved; root: approximately 1.4142135623731Partial is a result:If endpoints do not bracket a root or an interior sample is undefined, the analyzer returns
status: partial and root: null. Keep the steps and successful iterations in the explanation.