Find a numerical root

Standard 64 · Real · bisection. Tolerances are explicit; a candidate is not a proof of uniqueness.

Halve a sign-changing interval

Enter a real function f(x) without units and a lower bound smaller than the upper bound. Bisection assumes the function is continuous throughout that interval. The values at the two bounds must have opposite signs unless one evaluates to zero. The calculator uses 64 significant working digits.

Each iteration evaluates the midpoint. If the search continues, it keeps the half whose endpoints have opposite signs. Apart from an evaluated numerical zero, acceptance requires both width ≤ 2×(xAbs+xRel×abs(midpoint)) and abs(f(midpoint))/s ≤ fRel, where s is the smaller absolute value of the two original endpoint evaluations. All three tolerances default to 10^−12.

The stop reason tells you whether the search found a candidate or why it stopped. A candidate is approximate and other roots may exist. The search can miss roots when the endpoints have the same sign, and a discontinuity can prevent convergence. It stops after at most 200 iterations and 256 function evaluations. If it fails to converge, it gives no candidate.

Worked example: x²−2 on [1,2]

Enter f(x)=x^2-2, lower 1 and upper 2, with the default tolerances. The endpoint values are −1 and 2, so s=1. The first midpoint is 1.5, where f(x)=0.25; the next interval is [1,1.5]. Its midpoint is 1.25, where f(x)=−0.4375, so the following interval is [1.25,1.5].

Continuing these halvings gives a candidate near 1.414213562373095, subject to both stopping gates. The independent value sqrt(2) begins 1.41421356237309504880. In contrast, x² on [−1,1] has equal positive endpoint values: this search reports no bracket even though x=0 is a root.

Load example fills the form without calculating. Choose its primary action to work it out.

Sources and related calculators

The method and worked example here are original. Sources describe the underlying mathematics or notation; calculation choices and limits are in the precision and syntax guide.