Ne1, Ne2 - Fixed point iteration and Newton-Raphson

Ne1, Ne2 - Fixed point iteration and Newton-Raphson

Generate root approximations by repeated substitution or tangent intercepts. You will draw staircase and cobweb paths, implement the correct iteration, choose meaningful starting values, and use the accuracy checks from the previous lesson.

A rearrangement chooses an iteration

The positive root of x2−x−1=0x^2-x-1=0 can be written as x=x+1x=\sqrt{x+1} or x=1+1/xx=1+1/x. If both start at 11, must they take the same route to the root?

They do not. The first approaches from below; the second jumps between sides. An algebraic rearrangement preserves the relevant fixed point but changes the function repeatedly applied.

You already know

A recurrence needs a starting value and a precise update. Keep stored precision between evaluations. A continuous sign change inside a proposed answer's rounding interval can justify its decimal places when the intended root is isolated.

A fixed point is a number α\alpha with g(α)=αg(\alpha)=\alpha, represented by an intersection of y=g(x)y=g(x) and y=xy=x.

Fixed point iteration

Rearrange the equation as x=g(x)x=g(x), and generate

xn+1=g(xn),n=0,1,2,…x_{n+1}=g(x_n),\qquad n=0,1,2,\ldots

If the iterates converge to α\alpha and gg is continuous there, the limit satisfies α=g(α)\alpha=g(\alpha). The rearrangement must remain valid for the root sought.

Not in the formula booklet: learn it.

For a graphical trace, start at (x0,0)(x_0,0), move vertically to y=g(x)y=g(x), then horizontally to y=xy=x. Repeat vertical-to-curve and horizontal-to-line. A monotone approach often produces a staircase; an alternating approach produces a cobweb.

[DIAGRAM: asset_name: Staircase and cobweb for the same positive root; asset_slug: fixed_point_paths; caption: Different rearrangements produce different graphical journeys to the same fixed point; description: Two equal-scale panels plot y=x with y=square root of x plus 1 and y=1 plus 1/x over positive x. From x0=1 the first four vertical and horizontal iteration moves form an increasing staircase in the first panel and an alternating cobweb in the second. The common intersection is alpha approximately 1.618.]
Different rearrangements produce different graphical journeys to the same fixed point

Worked example 1: the staircase rearrangement

Question. Use xn+1=xn+1x_{n+1}=\sqrt{x_n+1}, x0=1x_0=1, to find the positive root of x2−x−1=0x^2-x-1=0 to four decimal places.

Plan. Repeat the square-root update, inspect the later output and certify the proposed rounding.

x1=2=1.41421356…first substitutionx2=x1+1=1.55377397…retain stored x1x3=x2+1=1.59805318…same updatex4=x3+1=1.61184775…staircase continues\begin{aligned} x_1&=\sqrt2=1.41421356\ldots && \text{first substitution}\\ x_2&=\sqrt{x_1+1}=1.55377397\ldots && \text{retain stored }x_1\\ x_3&=\sqrt{x_2+1}=1.59805318\ldots && \text{same update}\\ x_4&=\sqrt{x_3+1}=1.61184775\ldots && \text{staircase continues} \end{aligned}

Continuing without intermediate rounding gives this output.

nnxnx_n, displayed to eight decimal places
881.617977531.61797753
991.618016541.61801654
10101.618028601.61802860

For f(x)=x2−x−1f(x)=x^2-x-1, test the proposed four-decimal answer's boundaries:

f(1.61795)=−0.0001877975<0,f(1.61805)=0.0000358025>0f(1.61795)=-0.0001877975<0,\qquad f(1.61805)=0.0000358025>0

Why this step? The iterates suggest 1.61801.6180; continuity and strict increase of ff on [1,2][1,2] put its unique root inside that rounding cell.

Answer. α=1.6180\alpha=1.6180 to four decimal places.

Check. All displayed early iterates rise towards the intersection, matching the staircase; the sign test supplies the accuracy justification.

Change only the rearrangement, keeping the equation, seed and required precision fixed.

Worked example 2: the cobweb rearrangement

Question. Find the same positive root using xn+1=1+1/xnx_{n+1}=1+1/x_n, x0=1x_0=1.

Plan. Use the reciprocal update, retaining full precision through its alternating values.

x1=1+1/1=2new updatex2=1+1/2=32cross backx3=1+1/(3/2)=53cross againx4=1+1/(5/3)=85same recurrence\begin{aligned} x_1&=1+1/1=2 && \text{new update}\\ x_2&=1+1/2=\frac32 && \text{cross back}\\ x_3&=1+1/(3/2)=\frac53 && \text{cross again}\\ x_4&=1+1/(5/3)=\frac85 && \text{same recurrence} \end{aligned}

The later output is:

nnxnx_n, displayed to eight decimal places
12121.618025751.61802575
13131.618037141.61803714
14141.618032791.61803279

Why this step? Here values alternate across the fixed point; a trace that increases every time would not represent this update.

Answer. Again α=1.6180\alpha=1.6180 to four decimal places, certified by the same f(1.61795)<0<f(1.61805)f(1.61795)<0<f(1.61805) test.

Check. The early fractions are 2/1,3/2,5/3,8/52/1,3/2,5/3,8/5: each new numerator is the sum of the previous numerator and denominator, which also explains the next fraction 13/813/8.

The opening equation therefore has the same positive answer but different routes. In a spreadsheet with iterates in column B\text{B}, the updates are =SQRT⁡(B2+1)=\operatorname{SQRT}(\text{B2}+1) or =1+1/B2=1+1/\text{B2}, copied down from B3\text{B3}.

Watch out

Wrong: a successful rearrangement guarantees every rearrangement will converge from every start. Right: it defines a different iteration; inspect the graph, domains and output for the one actually used.

Use a new square-root update.

Newton-Raphson follows a tangent to the axis

Newton-Raphson replaces the curve locally by its tangent. At xnx_n, the tangent has equation

y=f(xn)+f′(xn)(x−xn)y=f(x_n)+f'(x_n)(x-x_n)

Its horizontal-axis intercept is the next approximation.

Newton-Raphson

xn+1=xn−f(xn)f′(xn)x_{n+1}=x_n-\frac{f(x_n)}{f'(x_n)}

The function and derivative must be defined, with f′(xn)≠0f'(x_n)\ne0. An intercept can leave the initial neighbourhood, so check that later steps remain meaningful.

In the formula booklet.

Continue this lesson.

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

Create free account