Mehmet Emre Tiryaki
Back to Notes

Rootfinding

Conditioning

Find rr with f(r)=0f(r) = 0. If ff is perturbed to f~(x)=f(x)+ϵ\tilde{f}(x) = f(x) + \epsilon, the root moves to r~=r+δ\tilde{r} = r + \delta with δ≈−ϵ/f′(r)\delta \approx -\epsilon / f'(r), so

κr=∣f′(r)∣−1\kappa_r = |f'(r)|^{-1}

The residual is f(r~)f(\tilde{r}). If ∣f′(r)∣|f'(r)| is very small, f(r~)≈0f(\tilde{r}) \approx 0 says little about how close r~\tilde{r} is to rr.

rr is a simple root iff f′(r)≠0f'(r) \neq 0, and has multiplicity mm if f(r)=f′(r)=⋯=f(m−1)(r)=0f(r) = f'(r) = \cdots = f^{(m-1)}(r) = 0 but f(m)(r)≠0f^{(m)}(r) \neq 0. A multiple root has κr=∞\kappa_r = \infty.

Fixed Point Iteration

Rewrite f(x)=0f(x) = 0 as g(x)=xg(x) = x, e.g. g(x)=x−f(x)g(x) = x - f(x), which holds exactly at the roots. The roots are where y=g(x)y = g(x) intersects y=xy = x. Iterate xk+1=g(xk)x_{k+1} = g(x_k). With ϵk=xk−r\epsilon_k = x_k - r and g(r)=rg(r) = r,

ϵk+1+r=g(ϵk+r)=g(r)+g′(r)ϵk+12g′′(r)ϵk2+⋯  ⟹  ϵk+1=g′(r)ϵk+O(ϵk2)\epsilon_{k+1} + r = g(\epsilon_k + r) = g(r) + g'(r)\epsilon_k + \frac{1}{2}g''(r)\epsilon_k^2 + \cdots \implies \epsilon_{k+1} = g'(r)\epsilon_k + O(\epsilon_k^2)

So if ∣g′(r)∣>1|g'(r)| > 1 there is no convergence. If σ=∣g′(r)∣<1\sigma = |g'(r)| < 1, ∣ϵk∣≈Cσk|\epsilon_k| \approx C\sigma^k, log⁡∣ϵk∣≈klog⁡σ+log⁡C\log |\epsilon_k| \approx k \log \sigma + \log C, and

lim⁡k→∞∣xk+1−r∣∣xk−r∣=σ\lim_{k \to \infty} \frac{|x_{k+1} - r|}{|x_k - r|} = \sigma

i.e. linear convergence.

Newton's Method

xk+1=xk−f(xk)f′(xk)x_{k+1} = x_k - \frac{f(x_k)}{f'(x_k)}

With ϵk=r−xk\epsilon_k = r - x_k and f(r)=0f(r) = 0, assuming f′(r)≠0f'(r) \neq 0,

ϵk+1=ϵk+f(r−ϵk)f′(r−ϵk)=ϵk+f(r)−ϵkf′(r)+12ϵk2f′′(r)+O(ϵk3)f′(r)−ϵkf′′(r)+O(ϵk2)\epsilon_{k+1} = \epsilon_k + \frac{f(r - \epsilon_k)}{f'(r - \epsilon_k)} = \epsilon_k + \frac{f(r) - \epsilon_k f'(r) + \frac{1}{2}\epsilon_k^2 f''(r) + O(\epsilon_k^3)}{f'(r) - \epsilon_k f''(r) + O(\epsilon_k^2)} =ϵk−ϵk[1−12f′′(r)f′(r)ϵk+O(ϵk2)]⋅[1−f′′(r)f′(r)ϵk+O(ϵk2)]−1= \epsilon_k - \epsilon_k \Big[ 1 - \frac{1}{2}\frac{f''(r)}{f'(r)}\epsilon_k + O(\epsilon_k^2) \Big] \cdot \Big[ 1 - \frac{f''(r)}{f'(r)}\epsilon_k + O(\epsilon_k^2) \Big]^{-1}

Using (1+z)−1=1−z+O(z2)(1 + z)^{-1} = 1 - z + O(z^2) for ∣z∣<1|z| < 1 (the geometric series),

=ϵk−ϵk[1−12f′′(r)f′(r)ϵk+O(ϵk2)][1+f′′(r)f′(r)ϵk+O(ϵk2)]=−12f′′(r)f′(r)ϵk2+O(ϵk3)= \epsilon_k - \epsilon_k \Big[ 1 - \frac{1}{2}\frac{f''(r)}{f'(r)}\epsilon_k + O(\epsilon_k^2) \Big] \Big[ 1 + \frac{f''(r)}{f'(r)}\epsilon_k + O(\epsilon_k^2) \Big] = -\frac{1}{2}\frac{f''(r)}{f'(r)}\epsilon_k^2 + O(\epsilon_k^3)

so the convergence is quadratic, lim⁡k→∞∣xk+1−r∣∣xk−r∣2\lim_{k \to \infty} \frac{|x_{k+1} - r|}{|x_k - r|^2} exists.

Secant Method

Instead of the tangent, use the secant through the last two points,

g(x)=f(xk)+f(xk)−f(xk−1)xk−xk−1(x−xk)g(x) = f(x_k) + \frac{f(x_k) - f(x_{k-1})}{x_k - x_{k-1}}(x - x_k)

and solve g(x)=0g(x) = 0 for xk+1x_{k+1},

xk+1=xk−f(xk)(xk−xk−1)f(xk)−f(xk−1),k=1,2,…x_{k+1} = x_k - \frac{f(x_k)(x_k - x_{k-1})}{f(x_k) - f(x_{k-1})}, \qquad k = 1, 2, \ldots

With ϵk=r−xk\epsilon_k = r - x_k, ϵk+1≈−12f′′(r)f′(r)ϵkϵk−1\epsilon_{k+1} \approx -\frac{1}{2}\frac{f''(r)}{f'(r)}\epsilon_k \epsilon_{k-1}. If ∣ϵk+1∣≈C∣ϵk∣a|\epsilon_{k+1}| \approx C|\epsilon_k|^a and ∣ϵk∣≈C∣ϵk−1∣a|\epsilon_k| \approx C|\epsilon_{k-1}|^a, then ∣ϵk−1∣a2≈C∣ϵk−1∣a+1|\epsilon_{k-1}|^{a^2} \approx C|\epsilon_{k-1}|^{a+1}, so

a2=a+1,a=1+52≈1.62a^2 = a + 1, \qquad a = \frac{1 + \sqrt{5}}{2} \approx 1.62

the golden ratio: superlinear convergence, 1<a<21 < a < 2.

Newton gets order 2 for two function evaluations (ff and f′f'), i.e. ϵ2=(ϵ2)2\epsilon^2 = (\epsilon^{\sqrt{2}})^{\sqrt{2}}, order 2≈1.41\sqrt{2} \approx 1.41 per evaluation, less than the secant method's 1.621.62.