Everything to learn better...

Iteration

Select Lesson

Exam Board

Select an option

Explainer Video

Loading...
Tutor: Alice

Summary

Iteration

​​In a nutshell

Iteration is a method of re-inputting an output into a function to get closer and closer to the root. To find the root of f(x)f(x), you let f(x)=0f(x)=0 and rearrange into the format x=g(x)x=g(x), then iterate as follows, xn=g(xn1)x_n=g(x_{n-1}). The result will either converge closer to a root or diverge further from the root.



Iterative function

To make an iterative function, the formula must be in the format x=g(x)x=g(x). To begin, let f(x)=0f(x)=0 and rearrange.


Example 1

Find three iterative functions for f(x)=x22x1f(x)=x^2 -2x-1.


First, let f(x)=0f(x)=0


f(x)=x22x10=x22x1\begin{aligned}f(x)&=x^2 -2x-1\\0&=x^2 -2x-1\end{aligned}


Then rearrange as you wish to. There are two functions you can make by moving x2x^2.

x2=2x+1\begin{aligned}x^2&=2x+1\\\end{aligned}​​

x=2x+1\underline{x=\sqrt{2x+1}}​​​

x=2+1x\underline{x=2+\dfrac1x}​​

Another can be made by moving 2x-2x.

2x=x21x=x212\begin{aligned}2x&=x^2-1\\x&=\underline{\dfrac{x^2-1}{2}}\end{aligned}​​



Iteration: xn=g(xn1)x_n=g(x_{n-1})

With an iterative function in the form x=g(x)x=g(x)​, you will find subsequent xx values with the aim of getting closer to the root. You use an x0x_0 value to find x1x_1, use x1x_1 to find x2x_2 and so on.

xn=g(xn1)x1=g(x0)x2=g(x1)x3=g(x2)...\begin{aligned}x_n&=g(x_{n-1})\\x_1&=g(x_0)\\x_2&=g(x_1)\\x_3&=g(x_2)\\.\\.\\.\\\end{aligned}​​


Example 2

Use x=x212x=\dfrac{x^2-1}{2} and x0=5x_0=5 to find x1,x2,x3x_1,x_2,x_3

​​x0=5x1=5212=12x2=12212=71.5x3=71.5212=2555.625\begin{aligned}x_0&=5\\\\x_1&=\dfrac{5^2-1}{2}=\underline{12}\\\\x_2&=\dfrac{12^2-1}{2}=\underline{71.5}\\\\x_3&=\dfrac{71.5^2-1}{2}=\underline{2555.625}\\\end{aligned}​​



Diverging and converging iteration

The previous example showed a diverging iteration: xnx_n grew increasingly larger and diverged from the root. The opposite of this is a converging iteration, where xnx_n gets closer to the root.


Example 3

Use x=2+1xx=2+\dfrac1x and x0=2x_0=2 to find a root rounded to 3 d.p3\space d.p.


x0=2x1=2+12=2.5x2=2+12.5=2.4x3=2+12.4=2.4167x4=2+12.4167=2.4138x5=2+12.4138=2.4143x6=2+12.4143=2.4142x7=2+12.4142=2.4142\begin{aligned}x_0&=2\\x_1&=2+\dfrac12=2.5\\\\x_2&=2+\dfrac1{2.5}=2.4\\\\x_3&=2+\dfrac1{2.4}=2.4167\\\\x_4&=2+\dfrac1{2.4167}=2.4138\\\\x_5&=2+\dfrac1{2.4138}=2.4143\\\\x_6&=2+\dfrac1{2.4143}=2.4142\\\\x_7&=2+\dfrac1{2.4142}=2.4142\\\\\end{aligned}

As 2.4142.414 is repeating, you know that you have converged onto a root.

f(x)=0f(x)=0 when x=2.414\underline{x=2.414}​​


​​

Create an account to read the summary

Exercises

Create an account to complete the exercises

FAQs - Frequently Asked Questions

How do you create and iterative equation?

What are converging and diverging iterations?

How do you perform iteration to find a root?

Beta

I'm Vulpy, your AI study buddy! Let's study together.