# Iteration

## â€‹â€‹In a nutshell

Iteration means the repetition of a process. It involves rearranging an equation to obtain an iteration formula. The iteration formula is then used to find the roots or solutions to the equation.

## Create an iteration formula

Take the equation to be solved, and rearrange it to make one of the values of $x$ the subject of the equation. Rename the subject of the equation $x$ to $x_{n+1}$ and rename the other $x$'s on the other side of the equation to $x_n$. This is now an iteration formula which can be used to find the solutions to the original equation.

##### Example 1

*Find an iteration formula for the equation *

â€‹$x^3+3x-2=0$â€‹â€‹

*There are different ways to rearrange the formula. This is one way.*

â€‹$\begin {aligned}x^3+3x-2&=0 \\x^3 + 3x &= 2 \\x(x^2+3) &=2 \\x &= \frac {2} {x^2+3}\end {aligned}$â€‹â€‹

*Rename the *$x$*'s.*â€‹

â€‹$\underline{x_{n+1} = \frac {2} {x_n^2+3}}$â€‹â€‹

## Use an iteration formula

The iteration formula can now be used to find an approximate solution to the equation. Given a starting value $x_0$â€‹, substitute this value into the formula to get an answer. The answer is now called $x_1$. Take $x_1$ and substitute this value into the formula to obtain $x_2$. Then substitute in $x_2$ to obtain $x_3$, and so on. More iterations will bring the answer closer to the value of the actual root to the equation.

##### Example 2

*Find the solution to the equation *

â€‹$x^3+3x-2=0$â€‹â€‹

*using the iteration formula *

â€‹$x_{n+1} = \frac {2} {x_n^2+3}$â€‹â€‹

*Use the iteration formula *$3$* times, starting with *$x_0=0$â€‹

*Start by substituting in *$0$* to find *$x_1$*.*â€‹

â€‹$x_1=\frac {2}{0^2+3} = \frac 2 3$â€‹â€‹

*Now substitute *$x_1=\frac 2 3$* in.*â€‹

â€‹$x_2=\frac {2}{\frac2 3 ^2+3} = \frac {18}{31}$â€‹â€‹

*Substitute *$x_2= \frac{18} {31}$* to find *$x_3$*.*â€‹

â€‹$x_3= \frac {2} {\frac {18}{31}^2 + 3} = \frac {1922}{3207} = 0.59931...$â€‹â€‹

*Now that the iteration formula has been used *$3$* times, the answer for *$x_3$* is taken to be an approximate solution to the equation.*â€‹

â€‹$\underline{x= 0.599}\space (3.s.f)$

â€‹â€‹

You can use the ANS button on the calculator to make it easy to perform the calculation. As the first $x$ value to substitute in is $0$, type in $0$ on the calculator and press $=$. This will now show $0$â€‹ as the answer.

Now, enter the formula using the ANS button. Type $\frac {2} {ANS^2+3}$ and then press $=$. The answer should now show as $\frac 2 3$ which is the answer for $x_1$. Pressing $=$ again should now bring up the answer for $x_2$, which is $\frac {18}{31}$. In this way, every time you press $=$, the answer will be substituted into the formula, so pressing $=$ again should give the next answer, which is $x_3=\frac{1922}{3207}$.â€‹