A20 - Numerical solutions by iteration

A20 - Numerical solutions by iteration

Iteration feeds an answer back into the same calculation. You will build suitable rules, retain enough accuracy and check whether repeated values really approach a solution.

Rearranging an equation for iteration (Higher)

Can a calculation find a root that does not factorise neatly? For x3−x−2=0x^3-x-2=0, trying x=1.5x=1.5 gives −0.125-0.125, so 1.5 is close but not a root. Repeated substitution can improve that starting guess.

You already know

Rearranging keeps an equation's solutions when each step is valid. Substitution means evaluating an expression using the given input, with brackets where needed.

An iteration uses the output of one calculation as the input of the next. Its notation keeps track of this order.

Iteration and fixed point

In xn+1=g(xn)x_{n+1}=g(x_n), xnx_n is the current value and xn+1x_{n+1} is the next. The starting value is x0x_0. A fixed point satisfies x=g(x)x=g(x), so the rule leaves it unchanged.

The subscript counts steps; it is not multiplication. An iteration rule is not on the formula sheet: derive it from the rearranged original equation, or use the rule supplied in the question. At a fixed point, the rule must recover the original equation.

Worked example 1: a cube-root rule

Question. Rearrange x3−x−2=0x^3-x-2=0 for iteration. Starting at x0=1.5x_0=1.5, calculate x1x_1 and x2x_2 to 6 decimal places.

Plan. Isolate x3x^3, take the cube root, then reuse each output.

x3=x+2add x+2x=x+23take the cube rootxn+1=xn+23make the repeated rulex1=1.5+23≈1.518294use the startx2=x1+23≈1.520935reuse the unrounded output\begin{aligned} x^3&=x+2 &&\text{add }x+2\\ x&=\sqrt[3]{x+2} &&\text{take the cube root}\\ x_{n+1}&=\sqrt[3]{x_n+2} &&\text{make the repeated rule}\\ x_1&=\sqrt[3]{1.5+2}\approx1.518294 &&\text{use the start}\\ x_2&=\sqrt[3]{x_1+2}\approx1.520935 &&\text{reuse the unrounded output} \end{aligned}

Why take a cube root? It makes the next xx-value an explicit calculation from the previous one.

Answer. x1=1.518294x_1=1.518294, x2=1.520935x_2=1.520935 to 6 decimal places.

Check. A fixed point has x=x+23x=\sqrt[3]{x+2}; cubing recovers x3−x−2=0x^3-x-2=0.

Change only the original equation's constant from 2 to 3. The same construction gives a different sequence of estimates.

Worked example 2: changing the equation's constant

Question. Rearrange x3−x−3=0x^3-x-3=0 for iteration. Use x0=1.5x_0=1.5 to calculate the first two outputs to 6 decimal places.

Plan. Isolate the cube again and feed the first full output into the second calculation.

x3=x+3rearrangexn+1=xn+33take the cube rootx1=4.53≈1.650964substitute 1.5x2=x1+33≈1.669223use unrounded x1\begin{aligned} x^3&=x+3 &&\text{rearrange}\\ x_{n+1}&=\sqrt[3]{x_n+3} &&\text{take the cube root}\\ x_1&=\sqrt[3]{4.5}\approx1.650964 &&\text{substitute }1.5\\ x_2&=\sqrt[3]{x_1+3}\approx1.669223 &&\text{use unrounded }x_1 \end{aligned}

Why change the rule as well? Keeping +2+2 would still target the previous equation.

Answer. x1=1.650964x_1=1.650964, x2=1.669223x_2=1.669223.

Check. Cubing x=x+33x=\sqrt[3]{x+3} gives the required equation.

A rearrangement can restrict which roots it finds. From x2=x+2x^2=x+2, the rule xn+1=xn+2x_{n+1}=\sqrt{x_n+2} always outputs a non-negative number. From 1 its first two outputs are 3\sqrt3 and 2+3≈1.931852\sqrt{2+\sqrt3}\approx1.931852. It may approach the positive root 2, but cannot approach the other root −1-1. Inputs must also satisfy xn+2≥0x_n+2\geq0.

Watch out

A correct fixed-point equation does not guarantee a useful iteration. Check the starting value, any square-root or denominator restrictions and the later behaviour.

Change only the cubic's constant again. A calculator may be used.

Intermediate accuracy and reported precision (Higher)

Store the full output between steps. Rounding the value you report is different from rounding the value you reuse.

On a calculator, use the previous answer or a stored memory value. Check the first two entries by hand to catch a wrong bracket or an unchanged input. Label x0x_0 as the start: calling it x1x_1 shifts every later label.

For the first cubic rule, the table displays 9 decimal places while the calculations retain more.

nnxnx_n
01.500000000
11.518294486
21.520935263
31.521315698
41.521370489
51.521378379
61.521379516

The last two outputs both round to 1.5214 at 4 decimal places. That is useful evidence, but not proof of accuracy. Slow change or premature rounding can also produce repeated displayed values.

Exact fractions make this distinction easy to see.

Worked example 3: exact values between steps

Question. Use xn+1=(xn+4)/3x_{n+1}=(x_n+4)/3, x0=1x_0=1, to find x1,x2,x3x_1,x_2,x_3. Give fractions, then report x3x_3 to 3 decimal places.

Plan. Retain fractions at every step and round only the requested final output.

x1=1+43=53first substitutionx2=5/3+43=179reuse the exact fractionx3=17/9+43=5327repeat the rule\begin{aligned} x_1&=\frac{1+4}{3}=\frac53 &&\text{first substitution}\\ x_2&=\frac{5/3+4}{3}=\frac{17}9 &&\text{reuse the exact fraction}\\ x_3&=\frac{17/9+4}{3}=\frac{53}{27} &&\text{repeat the rule} \end{aligned}

Why keep the fractions? They prevent rounding error from becoming the next input.

Answer. 53,179,5327\frac53,\frac{17}9,\frac{53}{27}; x3=1.963x_3=1.963 to 3 decimal places.

Check. 3x3−4=539−369=179=x23x_3-4=\frac{53}9-\frac{36}9=\frac{17}9=x_2, reversing the last step.

Change only the constant in the numerator from 4 to 6.

Worked example 4: the same accuracy habit

Question. Use xn+1=(xn+6)/3x_{n+1}=(x_n+6)/3, x0=1x_0=1, for three steps. Give exact fractions and x3x_3 to 3 decimal places.

Plan. Feed each exact fraction into the next calculation.

x1=1+63=73start at 1x2=7/3+63=259reuse x1x3=25/9+63=7927reuse x2\begin{aligned} x_1&=\frac{1+6}{3}=\frac73 &&\text{start at 1}\\ x_2&=\frac{7/3+6}{3}=\frac{25}9 &&\text{reuse }x_1\\ x_3&=\frac{25/9+6}{3}=\frac{79}{27} &&\text{reuse }x_2 \end{aligned}

Why not enter 2.333? It replaces 73\frac73 by a different number.

Answer. 73,259,7927\frac73,\frac{25}9,\frac{79}{27}; x3=2.926x_3=2.926.

Check. 3x3−6=799−549=259=x23x_3-6=\frac{79}9-\frac{54}9=\frac{25}9=x_2.

Rounding every cubic output to 1 decimal place creates a false fixed value: 1.518294…1.518294\ldots becomes 1.5, then the same calculation returns 1.5 again. Yet 1.53−1.5−2=−0.1251.5^3-1.5-2=-0.125. Repeating a rounded number has not solved the equation.

Continue this lesson.

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

Create free account