Math 128A, Fall 2026 · Per-Olof Persson
This chapter is about solving \(f(x)=0\) for a single unknown. Almost no equation of interest can be solved in closed form, so instead we build a sequence \(p_0, p_1, p_2, \ldots\) that converges to a root and stop when we are close enough. The three methods here — bisection, fixed-point iteration and Newton’s method — trade robustness against speed, and §2.4 makes that trade-off precise.
The method needs only one thing: a sign change. If \(f\) is continuous on \([a,b]\) and \(f(a)\) and \(f(b)\) have opposite signs, the intermediate value theorem (Theorem 1.8) guarantees a root somewhere between them. Evaluate \(f\) at the midpoint, keep whichever half still shows a sign change, and repeat.
Because the root always stays inside the current bracket, \(a_n \le p \le b_n\), and taking \(p_n\) to be the midpoint gives \[ |p_n - p| \le \tfrac{1}{2}(b_n - a_n). \] The interval is halved each step, so \[ b_n - a_n = \frac{b-a}{2^{\,n-1}}, \qquad\text{hence}\qquad |p_n - p| \le \frac{1}{2}\cdot\frac{b-a}{2^{\,n-1}} = \frac{b-a}{2^{\,n}} \] for \(n \ge 1\). This is a genuine error bound, known in advance, which is what makes bisection so dependable — and it is unusual: none of the faster methods in this chapter come with anything like it.
How many iterations are needed?
Given a tolerance, solve the error bound for \(n\). We want \[ \mathrm{tol} = \frac{b-a}{2^{\,n}}, \qquad\text{so}\qquad 2^{\,n} = \frac{b-a}{\mathrm{tol}}, \] and taking logarithms of both sides, \[ \log 2^{\,n} = \log\frac{b-a}{\mathrm{tol}}, \qquad\text{giving}\qquad n = \frac{\log\bigl((b-a)/\mathrm{tol}\bigr)}{\log 2}. \]
With \(\mathrm{tol} = 10^{-8}\) and \(b-a = 1\), \[ n = \frac{\log 10^{8}}{\log 2} = 26.6, \] so \(27\) iterations are needed. Note that this count does not depend on \(f\) at all — only on the width of the starting interval.
A fixed point of \(g\) is a value \(p\) with \(g(p) = p\). Root-finding and fixed-point problems are interchangeable: given \(f\), we can rearrange \(f(x) = 0\) into the form \(x = g(x)\) and then look for a fixed point instead.
Rearranging is not unique.
Take \[ f(x) = x^3 + 2x - 5 = 0 . \] Solving for the linear term gives \[ x = \frac{5 - x^3}{2}, \qquad\text{so}\qquad p = g(p) = \frac{5 - p^3}{2}, \] while solving for the cubic term instead gives \[ x = \sqrt[3]{5 - 2x}, \qquad\text{so}\qquad p = g(p) = \sqrt[3]{5 - 2p} . \]
Both have the same fixed point, since both are just \(f(x)=0\) rewritten. There is no unique \(g\), and the choice matters a great deal: as we will see, one of these iterations converges and the other does not.
The two hypotheses do different jobs. That \(g\) maps \([a,b]\) into itself gives existence; the derivative bound \(|g'(x)| \le k < 1\) gives uniqueness.
\(g(x) = \cos x\) on \([0,1]\).
Existence. \(g\) is continuous on \([0,1]\), and if \(x \in [0,1]\) then \(\cos x \in [\cos 1, 1] \subset [0,1]\), so \(g\) maps the interval into itself (the extreme value theorem, Theorem 1.5, is what says the extremes are attained). Hence at least one fixed point exists in \([0,1]\).
Uniqueness. \(g'(x) = -\sin x\), so on \([0,1]\) \[ |g'(x)| \le \sin 1 = k \approx 0.8415 < 1, \] and the fixed point is unique.
Without the derivative bound, existence still holds but uniqueness can fail.
If \(g(a) = a\) or \(g(b) = b\) we are done, so suppose otherwise. Since \(g\) maps into \([a,b]\), this forces \[ g(a) > a \qquad\text{and}\qquad g(b) < b . \] Consider \(h(x) = g(x) - x\), which is continuous on \([a,b]\). Then \[ h(a) = g(a) - a > 0, \qquad h(b) = g(b) - b < 0, \] so by the intermediate value theorem there is a \(p \in (a,b)\) with \(h(p) = 0\), that is \(g(p) - p = 0\), or \(g(p) = p\). ■
Suppose there were two fixed points \(p \ne q\). By the mean value theorem (Theorem 1.4) there is a \(\xi\) between them with \[ \frac{g(p) - g(q)}{p - q} = g'(\xi). \] Then \[ |p - q| = |g(p) - g(q)| = |g'(\xi)|\,|p-q| \le k\,|p-q| < |p-q|, \] where the first equality uses that \(p\) and \(q\) are fixed points, the second the mean value theorem, and the last the assumption \(k<1\). This says \(|p-q| < |p-q|\), a contradiction, so \(p = q\). ■
Given a starting value \(p_0\), simply feed each output back in: \[ p_n = g(p_{n-1}), \qquad n = 1, 2, \ldots \] If the sequence converges, its limit must be a fixed point — provided \(g\) is continuous, which is what lets the limit pass through \(g\): \[ p = \lim_{n\to\infty} p_n = \lim_{n\to\infty} g(p_{n-1}) = g\Bigl(\lim_{n\to\infty} p_{n-1}\Bigr) = g(p). \]
The iteration has a memorable picture. From \(p_n\) on the horizontal axis, move vertically to the curve to get \(g(p_n) = p_{n+1}\), then horizontally to the diagonal \(y=x\) to bring that value back onto the axis, and repeat.
Here the iterates alternate around \(p\) — \(p_1 < p_3 < p < p_2 < p_0\) — which is what a negative \(g'\) near the fixed point produces. A positive \(g'\) gives a staircase approaching from one side instead.
(1) Since \(g(x) \in [a,b]\) for every \(x \in [a,b]\), the iteration never leaves the interval: \(p_n \in [a,b]\) for all \(n\).
(2) By the mean value theorem, for each \(n\) there is a \(\xi\) between \(p_{n-1}\) and \(p\) with \[ |p_n - p| = |g(p_{n-1}) - g(p)| = |g'(\xi)|\,|p_{n-1} - p| \le k\,|p_{n-1}-p| . \]
Applying this repeatedly, \[ |p_n - p| \le k\,|p_{n-1}-p| \le k^2|p_{n-2}-p| \le \cdots \le k^n |p_0 - p| . \]
Since \(0 < k < 1\) we have \(\lim_{n\to\infty} k^n = 0\), so \(|p_n - p| \to 0\) as \(n \to \infty\).
The bound \(|p_n - p| \le k^n|p_0-p|\) also tells us how fast: the error is multiplied by roughly \(k\) each step. Smaller \(k\) means faster convergence. ■
\(g(x) = \sqrt{x}\) on \(\left[\tfrac12, \tfrac32\right]\).
Existence. \(g\) is increasing, and \[ g\!\left(\tfrac12\right) = \tfrac{1}{\sqrt2} > \tfrac12, \qquad g\!\left(\tfrac32\right) = \sqrt{\tfrac32} < \tfrac32, \] so \(g(x) \in \left[\tfrac12,\tfrac32\right]\) whenever \(x \in \left[\tfrac12,\tfrac32\right]\), and a fixed point exists.
Uniqueness. \(g'(x) = \dfrac{1}{2\sqrt{x}}\) is positive and decreasing, so its largest value on the interval is at the left endpoint: \[ |g'(x)| \le g'\!\left(\tfrac12\right) = \frac{1}{2\sqrt{1/2}} = \frac{1}{\sqrt2} = k < 1 . \] The fixed point is unique and the iteration converges to it.
When the hypotheses fail.
For \(g(x) = \cos x\) the conditions hold on \([0,1]\), so the iteration converges for any \(p_0 \in [0,1]\) — this is the picture in Figure 2.4.
For \(g(x) = \cos^{-1} x\), however, \[ g'(x) = -\frac{1}{\sqrt{1-x^2}}, \qquad\text{so}\qquad |g'(x)| > 1 \text{ for } x \in [0,1], \] and the iteration does not converge. Note that \(\cos^{-1}\) has the same fixed point as \(\cos\): rearranging \(f(x)=0\) the wrong way turns a convergent iteration into a divergent one.
Newton’s method replaces \(f\) by its tangent line at the current iterate and takes the next iterate to be where that tangent meets the axis. The tangent at \((p_0, f(p_0))\) has slope \(f'(p_0)\), and it crosses \(y=0\) at \(p_1\), so \[ f'(p_0) = \frac{0 - f(p_0)}{p_1 - p_0}, \qquad\text{which rearranges to}\qquad p_1 = p_0 - \frac{f(p_0)}{f'(p_0)} . \]
The same formula falls out of Taylor’s theorem, which also shows what is being neglected. Suppose \(f \in C^2[a,b]\), that \(p_0 \in [a,b]\), and that \(f'(p_0) \ne 0\). Expanding about \(p_0\) and evaluating at the root \(p\), \[ f(p) = f(p_0) + (p - p_0)f'(p_0) + \frac{(p-p_0)^2}{2}f''(\xi(p)) . \] Now set \(f(p) = 0\) and drop the quadratic term, which is small when \(p_0\) is close to \(p\): \[ 0 \approx f(p_0) + (p-p_0)f'(p_0) \qquad\Longrightarrow\qquad p \approx p_0 - \frac{f(p_0)}{f'(p_0)} \equiv p_1 . \]
Iterating gives Newton’s method: \[ p_n = p_{n-1} - \frac{f(p_{n-1})}{f'(p_{n-1})} . \]
This is fixed-point iteration in disguise, \(p_n = g(p_{n-1})\), with \[ g(x) = x - \frac{f(x)}{f'(x)} . \] Everything we proved in §2.2 therefore applies — and the discarded quadratic term is exactly why Newton converges so much faster than a generic fixed-point iteration.
The plan is to find an interval \([p-\delta, p+\delta]\) on which \(g\) satisfies the fixed-point theorem: \(g\) maps it into itself, and \(|g'(x)| \le k < 1\).
(1) Since \(f'(p) \ne 0\) and \(f'\) is continuous, there is a \(\delta_1 > 0\) with \(f'(x) \ne 0\) on \([p - \delta_1, p + \delta_1]\), so \(g\) is defined there.
(2) On that interval, differentiating \(g\) with the quotient rule, \[ g'(x) = 1 - \frac{f'(x)f'(x) - f(x)f''(x)}{[f'(x)]^2} = \frac{f(x)f''(x)}{[f'(x)]^2}, \] so \(g \in C^1[p-\delta_1, p+\delta_1]\).
(3) Evaluating at the root, where \(f(p) = 0\), \[ g'(p) = \frac{f(p)f''(p)}{[f'(p)]^2} = 0 . \] Since \(g'\) is continuous and vanishes at \(p\), there is a \(\delta\) with \(0 < \delta < \delta_1\) and a constant \(0 < k < 1\) such that \[ |g'(x)| \le k \qquad\text{for } x \in [p-\delta, p+\delta]. \]
(4) It remains to check that \(g\) maps the interval into itself. By the mean value theorem, for \(x \in [p-\delta, p+\delta]\), \[ |g(x) - p| = |g(x) - g(p)| = |g'(\xi)|\,|x-p| \le k\,|x-p| < |x-p| , \] using \(g(p) = p\). Since \(|x - p| < \delta\), this gives \(|g(x) - p| < \delta\): that is, \(g\) maps \([p-\delta, p+\delta]\) into itself.
(5) Both hypotheses hold, so the fixed-point theorem applies and \(\{p_n\}_{n=0}^\infty\) converges to \(p\) for any \(p_0 \in [p-\delta, p+\delta]\). ■
Notice what the theorem does not say. Convergence is guaranteed only for \(p_0\) close enough to \(p\), and the proof gives no way to find \(\delta\) in practice. This is the price of Newton’s speed: unlike bisection, it can fail outright from a bad starting point.
Newton’s method needs \(f'\), which may be unavailable or expensive. The secant method replaces it with a difference quotient over the two most recent iterates: if \(p_0\) is close to \(p_1\), then \[ f'(p_1) \approx \frac{f(p_1) - f(p_0)}{p_1 - p_0}. \] Substituting into Newton’s formula gives the secant method, which needs two starting values but no derivatives.
Comparing with Figure 2.5, the secant method takes more steps for the same accuracy: its order of convergence is about \(1.618\) rather than \(2\). But each step costs one function evaluation instead of two, which often makes it the better bargain in practice.
To compare methods we need to say precisely how fast an error shrinks. If \[ \lim_{n\to\infty} \frac{|p_{n+1} - p|}{|p_n - p|^{\alpha}} = \lambda \] for constants \(\alpha > 0\) and \(\lambda > 0\), then \(\{p_n\}\) converges to \(p\) with order \(\alpha\) and asymptotic error constant \(\lambda\). The cases \(\alpha = 1\) and \(\alpha = 2\) are common enough to have names: linear and quadratic convergence.
Linear convergence.
Let \(p_n = (0.5)^n\), which tends to \(p = 0\). With \(\alpha = 1\), \[ \frac{|p_{n+1} - p|}{|p_n - p|} = \frac{0.5^{\,n+1}}{0.5^{\,n}} = 0.5 = \lambda, \] so the sequence converges linearly. Each step buys a fixed factor of \(0.5\), which is roughly one binary digit — exactly the behaviour of bisection.
Quadratic convergence.
Let \(p_n = 0.5^{(2^n)}\), which also tends to \(p = 0\). With \(\alpha = 2\), \[ \frac{|p_{n+1} - p|}{|p_n - p|^2} = \frac{0.5^{(2^{\,n+1})}}{\bigl[0.5^{(2^{n})}\bigr]^{2}} = \frac{0.5^{\,2^{\,n+1}}}{0.5^{\,2\cdot 2^{n}}} = 1 = \lambda, \] so the sequence converges quadratically. Here the number of correct digits doubles at each step, which is why Newton’s method converges so abruptly once it gets close.
Under the usual fixed-point conditions the iteration converges to the unique fixed point \(p\). By the mean value theorem, for each \(n\) there is a \(\xi_n\) between \(p_n\) and \(p\) with \[ p_{n+1} - p = g(p_n) - g(p) = g'(\xi_n)(p_n - p). \] Since \(p_n \to p\), the intermediate points are squeezed too, \(\xi_n \to p\), and by continuity \[ \lim_{n\to\infty} g'(\xi_n) = g'(p) \ne 0 . \] Therefore \[ \lim_{n\to\infty} \frac{|p_{n+1}-p|}{|p_n - p|} = \lim_{n\to\infty} |g'(\xi_n)| = |g'(p)| \ne 0 , \] which is convergence of order \(\alpha = 1\): only linear. ■
So a generic fixed-point iteration is linearly convergent, and the only way to do better is to arrange \(g'(p) = 0\).
Suppose \(g'(p) = 0\) and \(|g''(x)| \le M\). Expanding \(g\) about \(p\) by Taylor’s theorem, \[ g(x) = g(p) + g'(p)(x-p) + \frac{g''(\xi)}{2}(x-p)^2 . \] Using \(g(p) = p\) and \(g'(p) = 0\), the first two terms collapse and \[ g(x) = p + \frac{g''(\xi)}{2}(x-p)^2 . \] Applying this at \(x = p_n\), the iteration satisfies \[ p_{n+1} = g(p_n) = p + \frac{g''(\xi_n)}{2}(p_n - p)^2 , \] or \[ p_{n+1} - p = \frac{g''(\xi_n)}{2}(p_n-p)^2 . \] Hence \[ \lim_{n\to\infty}\frac{|p_{n+1}-p|}{|p_n-p|^2} = \frac{|g''(p)|}{2}, \] which is quadratic convergence. ■
The two results above suggest how to derive Newton’s method rather than guess it: look for a fixed-point iteration with \(g'(p) = 0\). Try \[ g(x) = x - \phi(x)f(x) \] for some function \(\phi\) to be determined. Any such \(g\) has the right fixed point, since \(f(p) = 0\) gives \[ g(p) = p - \phi(p)f(p) = p . \] Now impose the condition for quadratic convergence. Differentiating and using \(f(p)=0\) again, \[ g'(p) = 1 - f'(p)\phi(p) = 0 \qquad\Longrightarrow\qquad \phi(p) = \frac{1}{f'(p)} . \] Choosing \(\phi(x) = 1/f'(x)\) throughout gives \[ g(x) = x - \frac{f(x)}{f'(x)}, \] which is exactly Newton’s method. So if \(f(p) = 0\) and \(f'(p) \ne 0\), Newton’s method converges (at least) quadratically — and this derivation shows the quadratic rate was designed in, not a lucky accident.
The caveat \(f'(p) \ne 0\) matters. A root where \(f'(p) = 0\) as well is a multiple root, and Newton’s method degrades to linear convergence there.
Newton on a double root.
Take \(f(x) = x^2\), which has a double root at \(p = 0\). Newton’s method gives \[ p_{n+1} = p_n - \frac{f(p_n)}{f'(p_n)} = p_n - \frac{p_n^2}{2p_n} = p_n - \frac{p_n}{2} = \frac{p_n}{2} . \] The error is merely halved each step: linear convergence, no better than bisection, on a problem where Newton would normally converge quadratically.
The fix is to apply Newton’s method not to \(f\) but to \[ \mu(x) = \frac{f(x)}{f'(x)}, \] which has a simple root wherever \(f\) has a multiple one. Differentiating, \[ \mu'(x) = \frac{f'(x)f'(x) - f(x)f''(x)}{[f'(x)]^2} = 1 - \frac{f(x)f''(x)}{[f'(x)]^2}, \] and substituting both into Newton’s formula, \[ p_{n+1} = p_n - \frac{\mu(p_n)}{\mu'(p_n)} = p_n - \frac{f(p_n)/f'(p_n)} {1 - f(p_n)f''(p_n)/[f'(p_n)]^2} . \] Clearing the compound fraction gives the modified Newton’s method: \[ p_{n+1} = p_n - \frac{f(p_n)\,f'(p_n)} {[f'(p_n)]^2 - f(p_n)\,f''(p_n)} . \]
The modified method on the same double root.
For \(f(x) = x^2\) we have \(f'(x) = 2x\) and \(f''(x) = 2\), so \[ p_{n+1} = p_n - \frac{p_n^2 \cdot 2p_n}{4p_n^2 - p_n^2 \cdot 2} = p_n - \frac{2p_n^3}{4p_n^2 - 2p_n^2} = p_n - p_n = 0 . \] The method lands exactly on the root in a single step, where ordinary Newton would have crept in by halves forever.
The cost is that \(f''\) is now needed, and the denominator involves a cancellation that can lose accuracy near the root.
A root that is multiple but not obvious.
Take \(f(x) = e^x - 1 - x\), which has \(f(x) = 0\) at \(x = 0\). Then \[ f'(x) = e^x - 1, \qquad\text{so}\qquad f'(0) = 0 \] as well: the root at the origin is a double root, and plain Newton’s method will converge only linearly on it.