Algorithm Search⌘K

Proofs: Halley's method

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

Correctness of Halley's method full

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

We use the notation of the page: ek=xk−x∗e_k = x_k - x^*, and at a simple root cj=f(j)(x∗)/(j! f′(x∗))c_j = f^{(j)}(x^*)/(j!\,f'(x^*)). The step is s(x)=2f(x)f′(x)/D(x)s(x) = 2f(x)f'(x)/D(x) with D=2f′2−ff′′D = 2f'^2 - ff'', and xk+1=xk−s(xk)x_{k+1} = x_k - s(x_k). All results below are in exact arithmetic unless stated otherwise.

Termination

Each pass of the loop L1 either returns at L3, L4, L5 or L7, or ends with kk increased by one. After KK passes the loop exits and L8 returns. So the procedure stops after at most KK passes and at most 3K3K evaluations (one each of ff, f′f', f′′f'' per pass). Non-finite values stop it at L2 with an error. No status claims more than its test shows: "exact" means f(x)=0f(x) = 0 was computed; "converged" means the step was small; "stalled" means s=0s = 0 while f(x)≠0f(x) \ne 0 and D≠0D \ne 0, which forces f′(x)=0f'(x) = 0 (or an underflow in the product 2ff′2ff').

Lemma 1 (Newton's method on a transformed function)

Let f′(x)≠0f'(x) \ne 0 on an interval and g=f/∣f′∣g = f/\sqrt{|f'|}. Then g/g′=sg/g' = s on that interval, so Halley's method is Newton's method on gg. If f∈C3f \in C^3 and x∗x^* is a simple root, then g′′(x∗)=0g''(x^*) = 0.

Proof. The derivative of ∣f′∣−1/2|f'|^{-1/2} is −12f′′/(f′∣f′∣1/2)-\tfrac12 f''/(f'|f'|^{1/2}), so

g′=∣f′∣−1/2(f′−ff′′2f′)=2f′2−ff′′2f′∣f′∣1/2,g' = |f'|^{-1/2}\Bigl(f' - \frac{ff''}{2f'}\Bigr) = \frac{2f'^2 - ff''}{2f'|f'|^{1/2}},

and g/g′=2ff′/(2f′2−ff′′)=sg/g' = 2ff'/(2f'^2 - ff'') = s. Differentiating g′g' once more and putting f(x∗)=0f(x^*) = 0: the derivative of f′−ff′′/(2f′)f' - ff''/(2f') at x∗x^* is f′′−f′f′′/(2f′)=f′′/2f'' - f'f''/(2f') = f''/2, and the derivative of the factor ∣f′∣−1/2|f'|^{-1/2} times f′f' gives −12f′′/∣f′∣1/2-\tfrac12 f''/|f'|^{1/2}. The sum is g′′(x∗)=∣f′∣−1/2(f′′/2−f′′/2)=0g''(x^*) = |f'|^{-1/2}(f''/2 - f''/2) = 0. □\square

Newton's error constant is g′′/(2g′)g''/(2g'), so Newton on gg loses its quadratic term; this is the reason for the cubic order. Theorem 1 proves it directly and gives the constant.

Theorem 1 (cubic local convergence at a simple root)

Let f∈C3f \in C^3 on a neighbourhood of x∗x^*, f(x∗)=0≠f′(x∗)f(x^*) = 0 \ne f'(x^*), and C=c22−c3C = c_2^2 - c_3. Then ek+1=Cek3+o(ek3)e_{k+1} = C e_k^3 + o(e_k^3), and there is ρ>0\rho > 0 such that from every x0x_0 with ∣e0∣≤ρ|e_0| \le \rho the iterates are defined, stay in [x∗−ρ,x∗+ρ][x^* - \rho, x^* + \rho], converge to x∗x^*, and satisfy ek+1/ek3→Ce_{k+1}/e_k^3 \to C when no eke_k is 00.

Proof. By Taylor's theorem with Peano remainder, writing e=x−x∗e = x - x^* and dividing by f′(x∗)f'(x^*),

ff′(x∗)=e+c2e2+c3e3+o(e3),f′f′(x∗)=1+2c2e+3c3e2+o(e2),f′′f′(x∗)=2c2+6c3e+o(e).\frac{f}{f'(x^*)} = e + c_2e^2 + c_3e^3 + o(e^3),\quad \frac{f'}{f'(x^*)} = 1 + 2c_2e + 3c_3e^2 + o(e^2),\quad \frac{f''}{f'(x^*)} = 2c_2 + 6c_3e + o(e).

Multiplying out,

2ff′f′(x∗)2=2e+6c2e2+(4c22+8c3)e3+o(e3),\frac{2ff'}{f'(x^*)^2} = 2e + 6c_2e^2 + (4c_2^2 + 8c_3)e^3 + o(e^3),
2f′2f′(x∗)2=2+8c2e+(8c22+12c3)e2+o(e2),ff′′f′(x∗)2=2c2e+(2c22+6c3)e2+o(e2),\frac{2f'^2}{f'(x^*)^2} = 2 + 8c_2e + (8c_2^2 + 12c_3)e^2 + o(e^2),\qquad \frac{ff''}{f'(x^*)^2} = 2c_2e + (2c_2^2 + 6c_3)e^2 + o(e^2),

so D/f′(x∗)2=2+6c2e+(6c22+6c3)e2+o(e2)D/f'(x^*)^2 = 2 + 6c_2e + (6c_2^2 + 6c_3)e^2 + o(e^2). The numerator of s/es/e and the denominator agree up to first order in ee and differ by (2c3−2c22)e2+o(e2)(2c_3 - 2c_2^2)e^2 + o(e^2) at second order, so

se=1+(2c3−2c22)e2+o(e2)2+O(e)=1+(c3−c22)e2+o(e2).\frac{s}{e} = 1 + \frac{(2c_3 - 2c_2^2)e^2 + o(e^2)}{2 + O(e)} = 1 + (c_3 - c_2^2)e^2 + o(e^2).

Hence ek+1=e−s=(c22−c3)e3+o(e3)e_{k+1} = e - s = (c_2^2 - c_3)e^3 + o(e^3).

For the ball: D(x∗)=2f′(x∗)2>0D(x^*) = 2f'(x^*)^2 > 0 and DD is continuous, so D>0D > 0 on some [x∗−ρ1,x∗+ρ1][x^* - \rho_1, x^* + \rho_1] and the step is defined there. By the expansion there is ρ2\rho_2 with ∣e−s∣≤(∣C∣+1)∣e∣3|e - s| \le (|C| + 1)|e|^3 for ∣e∣≤ρ2|e| \le \rho_2. Take ρ=min⁡(ρ1,ρ2,(2(∣C∣+1))−1/2)\rho = \min(\rho_1, \rho_2, (2(|C| + 1))^{-1/2}). If ∣ek∣≤ρ|e_k| \le \rho then ∣ek+1∣≤(∣C∣+1)ρ2∣ek∣≤∣ek∣/2|e_{k+1}| \le (|C| + 1)\rho^2 |e_k| \le |e_k|/2, so by induction all iterates stay in the ball and ∣ek∣≤2−kρ→0|e_k| \le 2^{-k}\rho \to 0. If some ek=0e_k = 0 then f(xk)=0f(x_k) = 0 and the method stops there (L3). Otherwise the expansion gives ek+1/ek3→Ce_{k+1}/e_k^3 \to C. □\square

So the order is at least 3, exactly 3 when c22≠c3c_2^2 \ne c_3, and higher on the special functions with c22=c3c_2^2 = c_3. This is a local result: nothing is claimed for starts outside the ball, whose size depends on ff.

Corollary (the stopping test)

In the ball of Theorem 1, ek=sk+ek+1e_k = s_k + e_{k+1} with ∣ek+1∣≤(∣C∣+1)∣ek∣3≤∣ek∣/2|e_{k+1}| \le (|C| + 1)|e_k|^3 \le |e_k|/2, so ∣ek∣≤2∣sk∣|e_k| \le 2|s_k| and ∣ek+1∣≤8(∣C∣+1)∣sk∣3|e_{k+1}| \le 8(|C| + 1)|s_k|^3. When L7 fires with ∣sk∣≤δ(1+∣xk+1∣)|s_k| \le \delta(1 + |x_{k+1}|), the returned point therefore has error far below δ(1+∣x∣)\delta(1 + |x|) in exact arithmetic. Outside the ball a small step proves nothing.

Theorem 2 (multiple roots)

Let f(x)=(x−x∗)mh(x)f(x) = (x - x^*)^m h(x) with m≥2m \ge 2, h∈C2h \in C^2 near x∗x^* and h(x∗)≠0h(x^*) \ne 0. Then ek+1=m−1m+1ek+O(ek2)e_{k+1} = \frac{m - 1}{m + 1}e_k + O(e_k^2), and the iteration converges linearly to x∗x^* from every start close enough to x∗x^*.

Proof. With e=x−x∗e = x - x^*,

f′=em−1(mh+eh′),f′′=em−2(m(m−1)h+2meh′+e2h′′).f' = e^{m-1}(mh + eh'),\qquad f'' = e^{m-2}\bigl(m(m-1)h + 2meh' + e^2h''\bigr).

Then 2ff′=2e2m−1h(mh+eh′)2ff' = 2e^{2m-1}h(mh + eh') and

D=e2m−2(2(mh+eh′)2−h(m(m−1)h+2meh′+e2h′′))=e2m−2(m(m+1)h2+2mehh′+O(e2)),D = e^{2m-2}\bigl(2(mh + eh')^2 - h(m(m-1)h + 2meh' + e^2h'')\bigr) = e^{2m-2}\bigl(m(m+1)h^2 + 2mehh' + O(e^2)\bigr),

where the O(e2)O(e^2) is uniform because h,h′,h′′h, h', h'' are bounded near x∗x^*. Since h(x∗)≠0h(x^*) \ne 0, D≠0D \ne 0 for small e≠0e \ne 0, and

s=e 2mh2+2ehh′m(m+1)h2+2mehh′+O(e2)=2em+1⋅1+eh′/(mh)1+2eh′/((m+1)h)+O(e2)=2em+1(1+O(e)).s = e\,\frac{2mh^2 + 2ehh'}{m(m+1)h^2 + 2mehh' + O(e^2)} = \frac{2e}{m+1}\cdot\frac{1 + eh'/(mh)}{1 + 2eh'/((m+1)h) + O(e^2)} = \frac{2e}{m+1}\bigl(1 + O(e)\bigr).

So ek+1=e−s=m−1m+1e+O(e2)e_{k+1} = e - s = \frac{m-1}{m+1}e + O(e^2). With r=(m−1)/(m+1)<1r = (m - 1)/(m + 1) < 1, choose ρ\rho so small that D≠0D \ne 0 and ∣e−s∣≤1+r2∣e∣|e - s| \le \frac{1 + r}{2}|e| for 0<∣e∣≤ρ0 < |e| \le \rho; then ∣ek∣≤(1+r2)kρ→0|e_k| \le (\frac{1+r}{2})^k \rho \to 0, and ek+1/ek→re_{k+1}/e_k \to r. Since h≠0h \ne 0 near x∗x^*, f(xk)≠0f(x_k) \ne 0 for every xk≠x∗x_k \ne x^* in the ball. □\square

For f=xmf = x^m the O(e2)O(e^2) term vanishes (h=1h = 1) and xk+1=m−1m+1xkx_{k+1} = \frac{m-1}{m+1}x_k exactly; for m=3m = 3 the iterates halve, as the tests check. Halley's method applied to F=f1/mF = f^{1/m}, which has a simple root, gives the step f/(m+12mf′−ff′′2f′)f/\bigl(\frac{m+1}{2m}f' - \frac{ff''}{2f'}\bigr), and Theorem 1 applied to FF shows that this modified step has order 3 when mm is known.

Floating point

The theorems are about exact arithmetic. In floating point the computed ff near a simple root is dominated by rounding once ∣e∣≲u cond|e| \lesssim u\,\mathrm{cond}, and the iteration then either hits a computed zero of ff (status "exact") or takes steps of the size of the rounding noise, which the relative test at L7 accepts. At a root of multiplicity mm the attainable error is of order u1/mu^{1/m} relative to the scale of ff, and the step test may fire there or the loop may reach KK. These floating point statements are observations on the test functions, not theorems.

Back to Halley's method