2.6, 3.6 - Iterating towards a root

2.6, 3.6 - Iterating towards a root

A root bracket tells you where a solution lies; iteration gives a practical way to calculate increasingly accurate approximations. In 2.6 and 3.6, you will connect a recurrence to its original equation, use it with retained calculator precision and recognise failed attempts. A final sign-change check will separate a convincing numerical answer from digits that merely appear to have settled.

A recurrence from an equation

Can a calculation improve its own next input? Start with x0=0.5x_0=0.5 and the rule
xn+1=(xn+e−xn)/2x_{n+1}=(x_n+e^{-x_n})/2. The first output is approximately 0.553270.55327; use that output as the next input, then repeat. This repeated process is iteration.

Why might it solve x=e−xx=e^{-x}? If the inputs and outputs approach the same number rr, the limiting relation is r=(r+e−r)/2r=(r+e^{-r})/2. Rearranging gives r=e−rr=e^{-r}, the required equation. This identifies what a convergent sequence would approach; it does not yet prove that the sequence converges.

Iterative formula and fixed point

An iterative formula xn+1=F(xn)x_{n+1}=F(x_n) generates each new approximation from the preceding one, starting from a specified x0x_0 or x1x_1. A fixed point rr satisfies r=F(r)r=F(r). If a sequence generated by a continuous FF converges to a value rr in its domain, then rr is a fixed point.

The subscript counts the steps: x0x_0 is the initial value, x1x_1 the first calculated iteration, and x2x_2 the second. Check the question's starting subscript rather than assuming every list starts at zero.

Worked example 1: rearranging the fixed-point equation

Question. Show that if
xn+1=12(xn+e−xn)x_{n+1}=\frac12(x_n+e^{-x_n}) converges to rr, then rr satisfies x=e−xx=e^{-x}.

Plan. Replace both consecutive terms by their common limit and rearrange.

The function F(x)=(x+e−x)/2F(x)=(x+e^{-x})/2 is continuous for every real xx, so

r=12(r+e−r)2r=r+e−rr=e−r\begin{aligned} r&=\frac12(r+e^{-r})\\ 2r&=r+e^{-r}\\ r&=e^{-r} \end{aligned}

Answer. The limiting value is a root of x=e−xx=e^{-x}.

Check. Conversely, substituting any root r=e−rr=e^{-r} into the recurrence gives (r+r)/2=r(r+r)/2=r, so that root is unchanged by the iteration.

Change only the rearrangement. A simpler-looking recurrence can have the same fixed point without producing the same sequence.

Worked example 2: a second rearrangement

Question. Show that if xn+1=e−xnx_{n+1}=e^{-x_n} converges to rr, then rr satisfies the same equation x=e−xx=e^{-x}.

Plan. Use continuity of the exponential to pass to the common limit.

xn+1=e−xn⟹r=e−r.x_{n+1}=e^{-x_n} \quad\Longrightarrow\quad r=e^{-r}.

Answer. Any limit is again a root of x=e−xx=e^{-x}.

Check. The relation forces r>0r>0, because an exponential is positive. Taking logarithms therefore legitimately gives the equivalent equation ln⁡r=−r\ln r=-r.

When rearranging an equation yourself, preserve its domain. For instance, x=e−xx=e^{-x} also gives x=−ln⁡xx=-\ln x, but this version can only be evaluated at positive inputs. Algebraic equivalence of fixed-point equations does not guarantee that every generated sequence stays in that domain.

Watch out

xn+1=F(xn)x_{n+1}=F(x_n) does not mean xn+1=F(n)x_{n+1}=F(n). Substitute the previous approximation into FF, not the step number.

Here the logarithm has a positive scaled argument.

Computing a convergent sequence

Once the recurrence and start are specified, use exactly that rule repeatedly. Save the full calculator result for the next step, even if the question asks you to display only a few decimal places. Rounding the input at each step creates a different sequence and can spoil the final accuracy.

For xn+1=F(xn)x_{n+1}=F(x_n), the first two calculations are x1=F(x0)x_1=F(x_0), then x2=F(x1)x_2=F(x_1). A table makes clear which values were calculated and how many iterations were used. Use radian mode whenever a trigonometric function appears in the supplied formula.

Convergent sequence of approximations

A sequence converges to rr when its terms approach rr as the step number increases. The approximations need not all be on one side of rr: they can approach alternately from above and below.

In the following pair, use F(x)=(x+e−x)/2F(x)=(x+e^{-x})/2. The tables display five decimal places, but every new input uses the unrounded previous value.

Worked example 3: starting below the root

Question. Use xn+1=12(xn+e−xn)x_{n+1}=\frac12(x_n+e^{-x_n}), with x0=0.5x_0=0.5, to calculate six iterations. Give the apparent limiting value to three decimal places, and verify it by a sign-change calculation.

Plan. Keep the calculator's stored value between steps, then test the rounding boundaries for the proposed answer.

The first calculation is

x1=12(0.5+e−0.5)=0.5532653298….x_1=\frac12(0.5+e^{-0.5})=0.5532653298\ldots.
Step nnxnx_n, displayed to five decimal places
000.500000.50000
110.553270.55327
220.564170.56417
330.566500.56650
440.567000.56700
550.567110.56711
660.567140.56714

These terms suggest r=0.567r=0.567 to three decimal places. For f(x)=x−e−xf(x)=x-e^{-x},

f(0.5665)=−0.0010082…,f(0.5675)=0.00055898….f(0.5665)=-0.0010082\ldots, \qquad f(0.5675)=0.00055898\ldots.

Continuity establishes a root between these boundaries. The increasing line y=xy=x meets the decreasing curve y=e−xy=e^{-x} at most once, so this is the intended root.

Answer. r=0.567r=0.567 to three decimal places.

Check. The root's bracket (0.5665,0.5675)(0.5665,0.5675) lies entirely inside the rounding interval for 0.5670.567; this verifies the digits independently of the apparent convergence.

Change only the initial value to 11. The approximations now approach from above, and a different number of steps is needed to reach the same displayed accuracy.

Worked example 4: starting above the root

Question. Use the same recurrence with x0=1x_0=1 to calculate six iterations. Give the apparent limiting value to three decimal places, and verify that answer.

Plan. Restart from the specified value, retaining full intermediate precision.

x1=12(1+e−1)=0.6839397205….x_1=\frac12(1+e^{-1})=0.6839397205\ldots.
Step nnxnx_n, displayed to five decimal places
001.000001.00000
110.683940.68394
220.594280.59428
330.573120.57312
440.568440.56844
550.567420.56742
660.567200.56720

Answer. The values again suggest 0.5670.567 to three decimal places. The same sign-change calculation at 0.56650.5665 and 0.56750.5675 verifies the unique root's rounding.

Check. Both starting values produce approximations near the same root. Also, substituting the rounded answer gives e−0.567=0.567224…e^{-0.567}=0.567224\ldots, close to 0.5670.567; this is a useful sense-check, while the bracket is the accuracy justification.

Continue this lesson.

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

Create free account