Fundamentals / Numerical mathematics / Nonlinear equations

Isolating and iterating roots

Use a verified interval to certify one solution, recognise the effect of a transformation on convergence and quantify a stopping rule.

Find a root within a specified distance

Show that \(F(x)=x+\ln x-2\) has exactly one root in \([1,2]\). Carry out two bisections. Determine how many halvings guarantee an absolute midpoint error below 0.001, and give a slope-based error bound for the trial value \(x=1.56\).

Worked solution

At 1 the residual is −1, while \(F(2)=\ln2>0\). Its derivative \(1+1/x\) is at least 1.5 throughout, giving strict monotonicity. At 1.5 the residual is approximately −0.0945 and at 1.75 it is +0.3096, so after two halvings the bracket is \([1.5,1.75]\).

The initial width is one. After nine halvings the midpoint bound is \(1/1024<0.001\). At \(x=1.56\), \(F\simeq0.004686\). The mean value bound gives an error at most \(0.004686/1.5=0.00313\), assuming the exact logarithm on the stated bracket.

Explore the related calculation with adjustable inputs. Compare actual root error with the shrinking bracket certificate. The explorer uses a cubic test residual; the continuity and slope checks in this exercise must still be carried out for its stated residual.

Compare two rearrangements

For \(x^2-3=0\) on \([1,2]\), consider \(g_1=3/x\) and \(g_2=(x+3/x)/2\). Starting at \(x_0=1.5\), compute two steps of each. Use the local derivatives to explain the different histories.

Worked solution

The first map produces 2, then 1.5, because applying the reciprocal transformation twice returns the start. At \(r=\sqrt3\) its derivative is \(-3/r^2=-1\). The second map first gives 1.75, then

\[(1.75+3/1.75)/2=1.7321429.\]

At the root \(g_2'=(1-3/x^2)/2=0\), which cancels the linear error term. In particular, a fixed point for either formulation solves the original equation, but a repeated two-cycle of \(g_1\) need not solve it.

Explore the related calculation with adjustable inputs. Explore how initial values and the residual slope affect Newton and secant convergence on the quadratic reference problem; retain the stated residual when checking the present hand calculation.

Interpret a small update

A contraction with known factor at most 0.95 has just changed its state by 0.002 K. Bound the current state error. How small must the next completed increment be to certify 0.01 K by the same test? Explain why stopping at a fixed increment of 0.01 K would be misleading.

Worked solution

Summing the future geometric changes from the current iterate gives a bound \(q|\Delta x|/(1-q)=19(0.002)=0.038\) K. To guarantee 0.01 K requires \(|\Delta x|\leq0.01/19\simeq0.000526\) K.

For a slowly contracting process small updates can continue in the same direction over many iterations. A rule using the increment alone ignores that accumulated tail.

Explore the related calculation with adjustable inputs. Vary the contraction slope and compare the remaining error after a fixed evaluation budget.

Notebook practice · A bracket can collapse onto a pole