1.09d, 1.09e - Newton–Raphson and convergence failures

1.09d, 1.09e - Newton–Raphson and convergence failures

Can a tangent find a root faster than repeated rearrangement? Under 1.09d, you will derive and use Newton–Raphson; under 1.09e, you will diagnose failed steps and apply the local slope condition for fixed point convergence. You will learn why a convincing decimal display still needs checking.

A tangent supplies the next approximation

How quickly can we reach the positive root of x2−2=0x^2-2=0 from 22? The tangent at (2,2)(2,2) meets the axis at 1.51.5, already much closer to 2\sqrt2. Repeating that geometrical idea is Newton–Raphson.

You already know

The tangent at (a,f(a))(a,f(a)) has gradient f′(a)f'(a) and equation y−f(a)=f′(a)(x−a)y-f(a)=f'(a)(x-a). Its xx-intercept has y=0y=0.

Use the current approximation as the tangent's input, then take its intercept as the next approximation.

Newton–Raphson iteration

For differentiable ff, provided f′(xn)≠0f'(x_n)\ne0,

0−f(xn)=f′(xn)(xn+1−xn)tangent interceptxn+1=xn−f(xn)f′(xn).\begin{aligned} 0-f(x_n)&=f'(x_n)(x_{n+1}-x_n) && \text{tangent intercept}\\ x_{n+1}&=x_n-\frac{f(x_n)}{f'(x_n)}. \end{aligned}

In the formula sheet.

The correction has a sign as well as a size; do not replace it by an absolute value.

Newton tangents and an initial horizontal tangent

The left panel shows two tangent steps. Move vertically from each intercept to the curve before constructing the next tangent. The right panel shows the horizontal tangent from 00, which has no intercept.

Worked example 1: the first tangent step

Question. For f(x)=x2−2f(x)=x^2-2, find the tangent at x0=2x_0=2 and its intercept.

Plan. Evaluate the point and gradient, then set the tangent's height to zero.

f(2)=2,f′(2)=4y−2=4(x−2)point and gradient0=4x−6axis interceptx1=32\begin{aligned} f(2)&=2,\qquad f'(2)=4\\ y-2&=4(x-2) && \text{point and gradient}\\ 0&=4x-6 && \text{axis intercept}\\ x_1&=\frac32 \end{aligned}

Why intersect the tangent? A nearby straight-line approximation is easier to solve than the curve itself.

Answer. The tangent is y=4x−6y=4x-6, giving x1=1.5x_1=1.5.

Check. f(1.5)=0.25f(1.5)=0.25, smaller in magnitude than f(2)=2f(2)=2.

Change only the input point to the new approximation.

Worked example 2: repeating the construction

Question. Find the next tangent intercept from x1=3/2x_1=3/2.

Plan. Re-evaluate both the function and its derivative at this new input.

f(32)=14,f′(32)=3y−14=3(x−32)x2=32−1/43=1712\begin{aligned} f(\tfrac32)&=\frac14,\qquad f'(\tfrac32)=3\\ y-\frac14&=3(x-\tfrac32)\\ x_2&=\frac32-\frac{1/4}{3}=\frac{17}{12} \end{aligned}

Why change the gradient too? The next tangent is at a different point of the curve.

Answer. The tangent is y=3x−17/4y=3x-17/4, with intercept 17/1217/12.

Check. f(17/12)=1/144f(17/12)=1/144, smaller again.

There is even an exact reason for this improvement: for a positive input xx, the new value (x+2/x)/2(x+2/x)/2 differs from 2\sqrt2 by (x−2)2/(2x)(x-\sqrt2)^2/(2x). The error is squared before being scaled.

Watch out

Wrong: use the original gradient at every step. Right: evaluate both ff and f′f' at the current iterate.

Apply the construction to a different square root.

Compute and validate a Newton root

For a less convenient equation, write the recurrence explicitly before pressing ANS. Keep full precision in every occurrence of the current input.

Worked example 3: iterating a cubic

Question. Apply Newton–Raphson to x3−2x−3=0x^3-2x-3=0 from x0=1.5x_0=1.5, giving four iterates.

Plan. Differentiate the difference function and apply the tangent correction repeatedly.

f′(x)=3x2−2xn+1=xn−xn3−2xn−33xn2−2x1=2.052631579…x2=1.907603557…x3=1.893420372…x4=1.893289207…\begin{aligned} f'(x)&=3x^2-2\\ x_{n+1}&=x_n-\frac{x_n^3-2x_n-3}{3x_n^2-2}\\ x_1&=2.052631579\ldots\\ x_2&=1.907603557\ldots\\ x_3&=1.893420372\ldots\\ x_4&=1.893289207\ldots \end{aligned}

Why retain the first overshoot? A step across the root is not automatically failure; inspect the subsequent behaviour.

Answer. The iterates suggest a root near 1.8932891.893289.

Check. In the initial function, f(1.89325)≈−0.000343101297f(1.89325)\approx-0.000343101297 and f(1.89335)≈0.000532274170f(1.89335)\approx0.000532274170. Continuity proves a root rounding to 1.89331.8933.

Change only the start to 22.

Worked example 4: a closer starting value

Question. Calculate four iterates for the same cubic from x0=2x_0=2.

Plan. Keep the recurrence and substitute each new stored value.

x1=2−110=1.9x2=1.893318233…x3=1.893289197…x4=1.893289196…\begin{aligned} x_1&=2-\frac{1}{10}=1.9\\ x_2&=1.893318233\ldots\\ x_3&=1.893289197\ldots\\ x_4&=1.893289196\ldots \end{aligned}

Why state the start? The same recurrence can take a different route from another input.

Answer. Four steps give 1.893289196…1.893289196\ldots, consistent with the previous calculation.

Check. The derivative 3x2−23x^2-2 is positive on the checking interval, so its root there is unique.

A spreadsheet can use columns for xn,f(xn),f′(xn)x_n,f(x_n),f'(x_n) and the next iterate. Fill down with previous-row references, keeping stored precision. This exposes a small denominator instead of hiding it inside one output.

Exam tip

If a question specifies Newton–Raphson, show its recurrence and relevant iterates. A black-box solver result does not demonstrate that requested method. Give the required final precision; use radians for trigonometric functions.

Use fresh values in the same cubic family.

Recognise undefined steps and cycles

The horizontal tangent in the diagram explains division by zero. For x2−2x^2-2 at 00, f′(0)=0f'(0)=0 and f(0)=−2f(0)=-2, so no tangent intercept exists. If both are zero, the root is already found and the formula's 0/00/0 remains undefined. A small nonzero derivative is different: it may create an enormous step, perhaps towards another root.

Nonzero derivatives do not ensure convergence either.

Worked example 5: an exact two-cycle

Question. Show how Newton–Raphson fails for f(x)=x3−2x+2f(x)=x^3-2x+2 from 00.

Plan. Calculate two exact steps and see whether they repeat.

f′(x)=3x2−2x1=0−2−2=1x2=1−11=0\begin{aligned} f'(x)&=3x^2-2\\ x_1&=0-\frac{2}{-2}=1\\ x_2&=1-\frac{1}{1}=0 \end{aligned}

Why use exact arithmetic? It establishes repetition, rather than merely suggesting it from rounded values.

Answer. The sequence repeats 0,1,0,1,…0,1,0,1,\ldots, and neither value is a root.

Check. f(0)=2f(0)=2 and f(1)=1f(1)=1, both nonzero.

Change only the start to 11.

Worked example 6: entering the same cycle elsewhere

Question. Diagnose the same Newton rule from x0=1x_0=1.

Plan. Follow its next two tangent intercepts.

x1=1−11=0x2=0−2−2=1\begin{aligned} x_1&=1-\frac{1}{1}=0\\ x_2&=0-\frac{2}{-2}=1 \end{aligned}

Why does a new start not help here? It is the other member of the same repeating pair.

Answer. The cycle is 1,0,1,0,…1,0,1,0,\ldots, again failing to approach a root.

Check. Both derivatives used, 11 and −2-2, are nonzero: this is not a division-by-zero failure.

Continue this lesson.

You’re previewing NovaLearn without an account. Create a free account to read the rest.

Create free account