Algorithm Search⌘K

Proofs: Dekker's method

These are the human proofs of Dekker's method, at full length.

Correctness and termination of Dekker's method full

This proof shows: correctness, termination.

We work in exact arithmetic for the decisions, with t=4u∣b∣+δ/2>0t = 4u|b| + \delta/2 > 0 as in line L4; in exact arithmetic take u=0u = 0 and δ>0\delta > 0. Let ff be continuous on [a0,b0][a_0, b_0] with f(a0)f(b0)<0f(a_0) f(b_0) < 0, and write W=∣a−b∣W = |a - b| for the width of the current bracket.

Theorem 1 (invariant). At each test of line L4: aa and bb lie in [a0,b0][a_0, b_0], f(a)f(a) and f(b)f(b) are nonzero with opposite signs, and ∣f(b)∣≤∣f(a)∣|f(b)| \le |f(a)|. So a root x∗x^* lies strictly between aa and bb, and a return at L4 gives ∣b−x∗∣<W≤2t=δ+8u∣b∣|b - x^*| < W \le 2t = \delta + 8u|b|.

Proof. At the first pass the first two claims are the hypothesis, and line L3 gives the third by a swap, which keeps the first two. Suppose the claims hold at the test of L4 and the method does not return. Lines L5 to L7 produce ss strictly between bb and mm: L6 replaces any ss outside the open interval between bb and mm by mm, which is also strictly inside (a,b)(a, b); if ∣s−b∣<t|s - b| < t, L7 sets s=b+t sign⁡(m−b)s = b + t\,\operatorname{sign}(m - b), which lies strictly between bb and mm because ∣m−b∣>t|m - b| > t. So ss lies strictly between aa and bb, hence in [a0,b0][a_0, b_0]. If f(s)=0f(s) = 0 the method returns a root. Otherwise, at L9, if f(s)f(s) has the sign of f(a)f(a), then the old bb (now pp) has the opposite sign, and the new contrapoint is pp; if not, aa stays. In both cases f(a)f(a) and f(b)f(b) have opposite signs, and line L3 of the next pass restores ∣f(b)∣≤∣f(a)∣|f(b)| \le |f(a)|. The intermediate value theorem gives the root. Since mm is the midpoint, W=2∣m−b∣W = 2|m - b|, so the test ∣m−b∣≤t|m - b| \le t means W≤2tW \le 2t. □\square

Lemma 2 (progress). If a pass does not return, the width after it satisfies W′≤W−tW' \le W - t.

Proof. The new point ss lies between bb and mm with ∣s−b∣≥t|s - b| \ge t (by L7, or because s=ms = m and ∣m−b∣>t|m - b| > t). If the contrapoint stays, the new bracket is between aa and ss, and since ss lies between bb and aa, W′=W−∣s−b∣≤W−tW' = W - |s - b| \le W - t. If the contrapoint becomes the old bb, the new bracket is between the old bb and ss, so W′=∣s−b∣≤∣m−b∣=W/2W' = |s - b| \le |m - b| = W/2. Since the pass did not return, W>2tW > 2t, so W/2<W−tW/2 < W - t. In both cases W′≤W−tW' \le W - t. A swap at L3 does not change WW. □\square

Theorem 3 (termination). Let δ>0\delta > 0 and w=∣b0−a0∣w = |b_0 - a_0|. DEKKER returns within ⌈2w/δ⌉\lceil 2w/\delta \rceil passes, so with at most ⌈2w/δ⌉+2\lceil 2w/\delta \rceil + 2 evaluations of ff. For any δ≥0\delta \ge 0 it ends within kmax⁡k_{\max} passes.

Proof. t≥δ/2t \ge \delta/2 at every pass. By Lemma 2, after jj passes that do not return, 0<W≤w−jδ/20 < W \le w - j\delta/2, so j<2w/δj < 2w/\delta. Each pass costs one evaluation, the start two. The loop has kmax⁡k_{\max} passes. □\square

In binary64 with δ=0\delta = 0, t=4u∣b∣t = 4u|b| is at least one unit in the last place of bb when b≠0b \ne 0, so each pass moves bb to a different floating point number and the width shrinks; the bound of Theorem 3 does not apply, and kmax⁡k_{\max} is the guarantee. Near b=0b = 0 with δ=0\delta = 0 the floor tt can underflow; a positive δ\delta avoids this.

Local behavior. Theorem 3 is the only bound for general continuous ff, and it is linear in w/δw/\delta. The page shows functions (x9x^9 and (x−0.3)19(x - 0.3)^{19}) that need hundreds of steps. Near a simple root of a C2C^2 function the accepted steps are secant steps, which converge with order (1+5)/2(1 + \sqrt5)/2; this is the classical local theory of the secant method, and the observed log ratios in the example are 1.61 to 1.66. ■\blacksquare

Back to Dekker's method