FLINT3.7.0-dev
Algorithm

Isolating and refining real roots

Cost
Isolation: one evaluation of ff and f′f' on an interval per examined subinterval, O(k⋅depth)O(k \cdot \mathrm{depth}) subintervals for kk roots in favourable cases. Refinement to pp bits: O(p)O(p) evaluations by bisection, O(log⁡p)O(\log p) Newton steps at doubling precisions, total cost about twice that of one evaluation at pp bits.

Let ff be a real function that is analytic on an interval [a,b][a, b], and suppose that for any subinterval II we can compute balls containing f(I)={f(t):t∈I}f(I) = \{f(t) : t \in I\} and f′(I)f'(I), as well as the value of ff at exact points. The root isolation problem asks for disjoint intervals that each contain exactly one root of ff and together contain all roots in [a,b][a, b]. With interval evaluations, this can be solved for simple roots by bisection, and isolated roots can then be refined rapidly by Newton's method with rigorous error bounds [Moo1966; Neu1990].

Exclusion and isolation tests#

Lemma 1 (Exclusion). If the computed enclosure of f(I)f(I) does not contain 0, then ff has no root in II.

Lemma 2 (Isolation). Let I=[u,v]I = [u, v]. If f(u)f(u) and f(v)f(v) are nonzero with opposite signs and the enclosure of f′(I)f'(I) does not contain 0, then ff has exactly one root in II, it lies in the interior, and it is simple.

Proof. f′f' is continuous and does not vanish on II, so it has constant sign and ff is strictly monotonic on II; by the intermediate value theorem it has a root in (u,v)(u, v), which is unique by monotonicity and simple since f′≠0f' \ne 0 there.

Algorithm 1: Isolation by bisection

Input: ff, [a,b][a, b], limits on the depth, the number of evaluations and the number of roots. Output: a sorted list of subintervals with flags.

  1. Compute the signs σa\sigma_a, σb\sigma_b of f(a)f(a) and f(b)f(b) (0 if the computed value contains zero).
  2. Process [a,b][a, b] recursively: for a subinterval I=[u,v]I = [u, v] with known endpoint signs, if Lemma 1 applies, discard II; if Lemma 2 applies, output II with flag 1; if a limit has been reached, output II with flag 2 (unknown); otherwise compute the sign of ff at the midpoint ww and process [u,w][u, w] and [w,v][w, v].

Every root of ff in [a,b][a, b] lies in some output interval, because only intervals that certainly contain no root are discarded. The intervals are output from left to right and overlap at most in endpoints. If all roots are simple and none of them is a bisection point, then once the intervals are small enough, each contains at most one root and the enclosures of f(I)f(I) and f′(I)f'(I) are accurate enough for the tests to succeed, so the algorithm terminates with all roots isolated. A multiple root, or a root at a bisection point (where the sign is zero), is never isolated and ends up in intervals of the minimal width with flag 2.

The cost is dominated by the evaluations on intervals. If the enclosures are tight, roots at distance δ\delta from each other are separated after about log⁡2((b−a)/δ)\log_2((b - a)/\delta) bisection levels; the dependency problem of interval evaluation (the enclosure of f(I)f(I) can be much wider than the true range) makes the tests succeed only later. Evaluating ff through a Taylor expansion at the midpoint of II (centred forms) reduces the overestimation from O(∣I∣)O(|I|) to O(∣I∣2)O(|I|^2).

Newton iteration with a quadratic error bound#

Theorem 3. Let ff be twice continuously differentiable on an interval JJ, let x=[m−r,m+r]⊆Jx = [m - r, m + r] \subseteq J contain a root ξ\xi of ff, and let

C≥sup⁡s,t∈J∣f′′(s)∣2∣f′(t)∣.C \ge \sup_{s, t \in J} \frac{|f''(s)|}{2 |f'(t)|}.

Then m′=m−f(m)/f′(m)m' = m - f(m)/f'(m) satisfies ∣m′−ξ∣≤Cr2|m' - \xi| \le C r^2.

Proof. By Taylor's theorem, 0=f(ξ)=f(m)+f′(m)(ξ−m)+12f′′(η)(ξ−m)20 = f(\xi) = f(m) + f'(m)(\xi - m) + \tfrac12 f''(\eta)(\xi - m)^2 for some η\eta between mm and ξ\xi, hence

m′−ξ=m−ξ−f(m)f′(m)=f′′(η)2f′(m)(ξ−m)2,m' - \xi = m - \xi - \frac{f(m)}{f'(m)} = \frac{f''(\eta)}{2 f'(m)} (\xi - m)^2,

and ∣m′−ξ∣≤C∣ξ−m∣2≤Cr2|m' - \xi| \le C |\xi - m|^2 \le C r^2.

arb_calc_newton_step and _arb_poly_newton_step compute m′m' in ball arithmetic at the working precision (the rounding errors are part of the resulting ball) and add Cr2C r^2 to the radius. The step is accepted if the new ball is contained in JJ (so that the next step can use the same CC) and has a smaller radius. Once Cr<1C r < 1, the radius is roughly squared at each step, so the number of correct bits doubles. arb_calc_refine_root_newton and _arb_poly_newton_refine_root exploit this by running the steps at precisions that also double: the last step at p+O(log⁡C)p + O(\log C) bits, the one before at about half of that, and so on, down to the accuracy of the starting ball. The total cost is then about twice that of the last step.

The factor CC is computed by evaluating f′(J)f'(J) and f′′(J)f''(J) on the whole interval JJ (arb_calc_newton_conv_factor, _arb_poly_newton_convergence_factor). It is finite only if f′f' is bounded away from zero on JJ, which requires JJ to be a narrow interval around a simple root. (In FLINT 3.6 and earlier arb_calc_newton_conv_factor returned only C/2C/2, for which Theorem 3 does not apply.)

The interval Newton operator#

A variant needs no bound for f′′f''. For an interval XX with midpoint mm, the interval Newton operator is

N(X)=m−f(m)f′(X),N(X) = m - \frac{f(m)}{f'(X)},

where f′(X)f'(X) is an enclosure of the range of f′f' on XX.

Theorem 4 (Interval Newton). If 0∉f′(X)0 \notin f'(X), then every root of ff in XX lies in N(X)N(X). If moreover N(X)N(X) is contained in the interior of XX, then ff has exactly one root in XX.

Proof. For a root ξ∈X\xi \in X, the mean value theorem gives f(m)=f(m)−f(ξ)=f′(η)(m−ξ)f(m) = f(m) - f(\xi) = f'(\eta)(m - \xi) with η∈X\eta \in X, so ξ=m−f(m)/f′(η)∈N(X)\xi = m - f(m)/f'(\eta) \in N(X).

For existence, let X=[u,v]X = [u, v] and suppose that f′(X)⊂(0,∞)f'(X) \subset (0, \infty) (the negative case is symmetric). By the mean value theorem, f(v)=f(m)+d(v−m)f(v) = f(m) + d (v - m) with d=f′(η)∈f′(X)d = f'(\eta) \in f'(X). Since m−f(m)/d∈N(X)m - f(m)/d \in N(X) lies in the interior of XX, we have m−f(m)/d<vm - f(m)/d < v, that is −f(m)<d(v−m)-f(m) < d (v - m), so f(v)>0f(v) > 0. In the same way, f(u)=f(m)−d′(m−u)f(u) = f(m) - d'(m - u) with d′∈f′(X)d' \in f'(X) and m−f(m)/d′>um - f(m)/d' > u give f(u)<0f(u) < 0. By the intermediate value theorem, ff has a root in (u,v)(u, v), which is unique since ff is strictly increasing on XX [Moo1966; Neu1990].

When the root is well isolated, N(X)N(X) has width O(∣X∣2)O(|X|^2), so the interval Newton method also converges quadratically. arb_fmpz_poly_refine_root_arb combines it with ordinary Newton steps and bisection: it keeps an exact interval [ℓ,h][\ell, h] that contains the root, tries an interval Newton step (accepted if N(X)N(X) lies in the interior of XX and gains at least 10% in accuracy), otherwise an ordinary Newton step whose result is accepted if a small interval around it has a sign change at its endpoints, and otherwise bisects. The working precision follows twice the current accuracy, so the cost is again dominated by the last steps.

Use in FLINT#

Referenced from#

References#

  • [Moo1966] R. E. Moore. Interval Analysis. Prentice-Hall, 1966.
  • [Neu1990] A. Neumaier. Interval Methods for Systems of Equations. Cambridge University Press, 1990.
Cite this page

The FLINT team, “Isolating and refining real roots,” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/algorithms/ball-arithmetic/real-root-isolation.html (generated 2026-11-02).