Bracketed root finder
Find one root in a sign-changing interval and inspect the final residual.
A clear answer. Here’s how.
Bisects an interval with strictly ordered bounds whose finite endpoint values have opposite signs, accepting an exact endpoint root. Stops at the requested width plus a floating-point relative allowance, up to 200 iterations. Rejects a narrow interval with a large residual as a possible discontinuity. Requires continuity; it finds one bracketed root, not all roots or even-multiplicity roots without a sign change.
See a worked example
Worked example
A fixed demonstration, separate from the values you enter above.
- Expression in x
- x^3-x-2
- Lower X bound
- 1
- Upper X bound
- 2
- Absolute X tolerance
- 1e-10
Example result
- Root estimate
- 1.52137970683
- Function residual
- 0.000000000140207401245
- Final bracket width
- 0.0000000000582076609135
- Iterations
- 35
Assumes continuity and an isolated root within a sign-changing interval. A small bracket does not establish that all roots were found.