Algorithm Search⌘K

Proofs: Regula falsi

These are the human proofs of Regula falsi, at full length.

Regula falsi keeps its bracket, converges for every continuous f, and is linear with one end fixed full

This proof shows: correctness, termination, invariant, convergence, rate.

We write [ak,bk][a_k, b_k] for the bracket at the start of pass k+1k + 1 of the loop of lines L5 to L11, so [a0,b0][a_0, b_0] is the input, and ck+1c_{k+1} for the cut point computed in that pass. When one end is fixed we write xk=akx_k = a_k and ek=xk−x∗e_k = x_k - x^*. Divided differences are written f[u,v]f[u, v] and f[u,v,w]f[u, v, w].

Claim 1 (termination and the invariant). REGULA-FALSI returns after at most kmax⁡k_{\max} passes and kmax⁡+2k_{\max} + 2 evaluations of ff. If line L3 passes, then at the start of every pass ak<bka_k < b_k, [ak,bk]⊆[a0,b0][a_k, b_k] \subseteq [a_0, b_0], and f(ak)f(a_k), f(bk)f(b_k) are finite, nonzero and of opposite signs. This holds in floating point for the computed values of ff.

Proof. Line L1 makes two evaluations and each pass one (line L7); the loop runs at most kmax⁡k_{\max} times. The invariant holds for k=0k = 0 by lines L2 and L3. Assume it for kk. Line L6 gives a point cc with ak<c<bka_k < c < b_k: either the computed chord zero passes the test, or cc is the computed midpoint. (In floating point, when aka_k and bkb_k are adjacent numbers, the computed midpoint equals an end; then line L8 replaces that end by itself, the invariant still holds, and the next pass computes the same cc, so line L10 returns.) Line L7 returns unless f(c)f(c) is finite and nonzero. Line L8 replaces the end whose value has the sign of f(c)f(c), so the new ends still have values of opposite signs, and the new bracket lies inside the old one. □\square

In exact arithmetic the chord zero always lies strictly inside: with f(ak)<0<f(bk)f(a_k) < 0 < f(b_k) (the other case is symmetric),

c=akf(bk)−bkf(ak)f(bk)−f(ak)=ak+−f(ak)f(bk)−f(ak) (bk−ak),c = \frac{a_k f(b_k) - b_k f(a_k)}{f(b_k) - f(a_k)} = a_k + \frac{-f(a_k)}{f(b_k) - f(a_k)}\,(b_k - a_k),

and the fraction lies in (0,1)(0, 1). So the guard of line L6 is never used, and ck+1c_{k+1} is the chord zero.

Claim 2 (convergence for continuous f). Let ff be continuous on [a0,b0][a_0, b_0] with f(a0)<0<f(b0)f(a_0) < 0 < f(b_0), and run the method in exact arithmetic with δ=0\delta = 0 and kmax⁡=∞k_{\max} = \infty. If it does not return at line L7, then ak↑αa_k \uparrow \alpha, bk↓βb_k \downarrow \beta with α≤β\alpha \le \beta, f(α)≤0≤f(β)f(\alpha) \le 0 \le f(\beta), every end that moves infinitely often tends to a zero of ff, and every limit point of (ck)(c_k) is a zero of ff.

Proof. By Claim 1, (ak)(a_k) is non-decreasing and (bk)(b_k) non-increasing, with ak<bka_k < b_k, so the limits exist and α≤β\alpha \le \beta. Since f(ak)<0<f(bk)f(a_k) < 0 < f(b_k) and ff is continuous, f(α)≤0≤f(β)f(\alpha) \le 0 \le f(\beta).

Suppose aa moves in infinitely many passes, say in passes k∈Kk \in K, so that ak+1=ck+1a_{k+1} = c_{k+1} for k∈Kk \in K. For those kk,

ck+1 (f(bk)−f(ak))=akf(bk)−bkf(ak).c_{k+1}\,\big(f(b_k) - f(a_k)\big) = a_k f(b_k) - b_k f(a_k).

Let k→∞k \to \infty in KK: ck+1→αc_{k+1} \to \alpha, ak→αa_k \to \alpha, bk→βb_k \to \beta, and by continuity

α (f(β)−f(α))=αf(β)−βf(α),that isf(α) (β−α)=0.\alpha\,\big(f(\beta) - f(\alpha)\big) = \alpha f(\beta) - \beta f(\alpha), \quad\text{that is}\quad f(\alpha)\,(\beta - \alpha) = 0.

If α<β\alpha < \beta this gives f(α)=0f(\alpha) = 0. If α=β\alpha = \beta, then f(α)≤0≤f(β)=f(α)f(\alpha) \le 0 \le f(\beta) = f(\alpha) gives f(α)=0f(\alpha) = 0 as well. The case of bb is the same with the roles exchanged, giving f(β)(β−α)=0f(\beta)(\beta - \alpha) = 0.

Each pass moves exactly one end, so at least one end moves infinitely often. Each ck+1c_{k+1} equals ak+1a_{k+1} or bk+1b_{k+1}. A limit point of (ck)(c_k) is the limit of a subsequence that lies, after passing to a further subsequence, entirely in the moves of aa or entirely in the moves of bb; it is then α\alpha with aa moving infinitely often, or β\beta with bb moving infinitely often, and in both cases a zero. □\square

The width bk−akb_k - a_k tends to β−α\beta - \alpha, which may be positive; Claim 3 shows that this is the usual case.

Claim 3 (one end fixed). Let f∈C2f \in C^2 on [a0,b0][a_0, b_0] with f′′>0f'' > 0 there and f(a0)<0<f(b0)f(a_0) < 0 < f(b_0). Then ff has exactly one zero x∗x^* in (a0,b0)(a_0, b_0), and in exact arithmetic f(ck)<0f(c_k) < 0 for every kk, so bk=b0b_k = b_0 and ak=cka_k = c_k for all k≥1k \ge 1, and ak↑x∗a_k \uparrow x^*.

Proof. A zero exists by the intermediate value theorem. If z1<z2z_1 < z_2 were two zeros in (a0,b0)(a_0, b_0), then z1=λa0+(1−λ)z2z_1 = \lambda a_0 + (1 - \lambda) z_2 with λ∈(0,1)\lambda \in (0, 1), and strict convexity gives f(z1)<λf(a0)+(1−λ)f(z2)<0f(z_1) < \lambda f(a_0) + (1 - \lambda) f(z_2) < 0, a contradiction. So the zero is unique. Now let ℓ\ell be the affine function through (ak,f(ak))(a_k, f(a_k)) and (b0,f(b0))(b_0, f(b_0)). By strict convexity f<ℓf < \ell on (ak,b0)(a_k, b_0), and ck+1c_{k+1} is the zero of ℓ\ell in that interval, so f(ck+1)<ℓ(ck+1)=0f(c_{k+1}) < \ell(c_{k+1}) = 0. Line L8 then replaces aa, and bb never moves. By Claim 2, aa moves infinitely often and tends to a zero in [a0,b0][a_0, b_0]; f(a0)<0<f(b0)f(a_0) < 0 < f(b_0) rules out the ends, so the limit is x∗x^*. □\square

Lemma (the error identity with a fixed end). In the setting of Claim 3, with b=b0b = b_0,

ek+1=(b−x∗) f[xk,b,x∗]f[xk,b]  ek.e_{k+1} = \frac{(b - x^*)\, f[x_k, b, x^*]}{f[x_k, b]}\; e_k .

Proof. Line L6 is the secant step from the points xkx_k and bb, so the secant error identity (the lemma in the proof for the secant method) holds with ek−1e_{k-1} replaced by b−x∗b - x^*. Its proof uses only f(x∗)=0f(x^*) = 0 and the definition of divided differences. Here f[xk,b]>0f[x_k, b] > 0 because f(xk)<0<f(b)f(x_k) < 0 < f(b). □\square

Claim 4 (linear rate). In the setting of Claim 3, if no eke_k is zero, then

lim⁡k→∞ek+1ek=C=1−f′(x∗) (b−x∗)f(b),0<C<1.\lim_{k \to \infty} \frac{e_{k+1}}{e_k} = C = 1 - \frac{f'(x^*)\,(b - x^*)}{f(b)}, \qquad 0 < C < 1.

Proof. As xk→x∗x_k \to x^*, the divided differences are continuous in their arguments for f∈C2f \in C^2, so f[xk,b]→f[x∗,b]=f(b)/(b−x∗)f[x_k, b] \to f[x^*, b] = f(b)/(b - x^*) and f[xk,b,x∗]→f[x∗,x∗,b]=(f[x∗,b]−f′(x∗))/(b−x∗)f[x_k, b, x^*] \to f[x^*, x^*, b] = (f[x^*, b] - f'(x^*))/(b - x^*). Putting these into the lemma,

ek+1ek→(b−x∗) (f[x∗,b]−f′(x∗))/(b−x∗)f(b)/(b−x∗)=f(b)−f′(x∗)(b−x∗)f(b)=C.\frac{e_{k+1}}{e_k} \to \frac{(b - x^*)\,\big(f[x^*, b] - f'(x^*)\big)/(b - x^*)}{f(b)/(b - x^*)} = \frac{f(b) - f'(x^*)(b - x^*)}{f(b)} = C.

For the bounds, convexity gives f′(x∗)≥(f(x∗)−f(a0))/(x∗−a0)>0f'(x^*) \ge (f(x^*) - f(a_0))/(x^* - a_0) > 0, so C<1C < 1, and strict convexity gives f(b)>f(x∗)+f′(x∗)(b−x∗)=f′(x∗)(b−x∗)f(b) > f(x^*) + f'(x^*)(b - x^*) = f'(x^*)(b - x^*), so C>0C > 0. □\square

So the convergence is linear with a nonzero rate, and the order is exactly 11.

Floating point. Claim 1 holds as stated. Claims 2 to 4 hold in exact arithmetic. In floating point the iterates follow them until ∣f(c)∣|f(c)| reaches its rounding error, after which the computed signs, and so the moves of line L8, are no longer governed by the true ff. ■\blacksquare

Back to Regula falsi