# Iterative Methods

Solving an equation by an iterative method is carrying out a process to get closer to a value. We are given a rough approximated initial value, and then become more and more accurate. This gets us closer to the real value and is necessary when we do not have a straightforward way of solving for the roots of the equation.

#### Create learning materials about Iterative Methods with our free learning app!

• Flashcards, notes, mock-exams and more
• Everything you need to ace your exams

## Using the iterative method

An iterative method can be used to find a value of $x$ when $f\left(x\right)=0$. To perform this iteration we first need to rearrange the function.

The basis of this is we need to rearrange $f\left(x\right)=0$ to $x=g\left(x\right)$. Therefore we need to make $x$ the subject of $f\left(x\right)=0$. However, it does not matter if we have $x$ terms remaining on the other side.

This is because we can perform ${x}_{n+1}=g\left({x}_{n}\right)$, meaning we take our value of $x$ and iterate it.

Let's look at two key worked examples below.

## Worked examples of iteration calculation

1. ${x}^{2}-3x-5=0$

a) Prove that $x=\sqrt{3x+5}$.

b) Using the iterative formula ${x}_{n+1}=\sqrt{3{x}_{n}+5}$, and letting ${x}_{0}=4$, find values for ${x}_{1},{x}_{2},{x}_{3}$. SOLUTION: 1a) ${x}^{2}-3x-5=0\phantom{\rule{0ex}{0ex}}{x}^{2}=3x+5\phantom{\rule{0ex}{0ex}}x=\sqrt{3x+5}$1b)${x}_{0}=4⇒{x}_{1}=\sqrt{3\left(4\right)+5}\phantom{\rule{0ex}{0ex}}{x}_{1}=\sqrt{17}=4.123105626\phantom{\rule{0ex}{0ex}}{x}_{2}=\sqrt{3\left(4.123105626\right)+5}=4.167651242\phantom{\rule{0ex}{0ex}}{x}_{3}=\sqrt{3\left(4.167651242\right)+5}=4.183653156$

When iterating we use all the digits our calculator has given us to find our next value. You can do this easily by using the ANS button on your calculator

Let's look at a more difficult example.

2. $f\left(x\right)=x{e}^{-x}-x+3$

a) Prove that $f\left(x\right)=0$ can be rearranged to form $x=-\mathrm{ln}\left(1-\frac{3}{x}\right)$.

b) Using the iterative formula ${x}_{n+1}=-\mathrm{ln}\left(1-\frac{3}{{x}_{n}}\right)$ and letting${x}_{0}=-1.$

SOLUTION:

2a)

$x{e}^{-x}-x+3=0\phantom{\rule{0ex}{0ex}}x{e}^{-x}=x-3\phantom{\rule{0ex}{0ex}}{e}^{-x}=1-\frac{3}{x}\phantom{\rule{0ex}{0ex}}-x=\mathrm{ln}\left(1-\frac{3}{x}\right)\phantom{\rule{0ex}{0ex}}x=-\mathrm{ln}\left(1-\frac{3}{x}\right)$2 B)${x}_{0}=-1⇒{x}_{1}=-\mathrm{ln}\left(1-\frac{3}{-1}\right)\phantom{\rule{0ex}{0ex}}{x}_{1}=-\mathrm{ln}\left(4\right)=-1.386294361\phantom{\rule{0ex}{0ex}}{x}_{2}=-\mathrm{ln}\left(1-\frac{3}{-1.386294361}\right)=-\mathrm{ln}\left(3.164042561\right)=-1.151850501\phantom{\rule{0ex}{0ex}}{x}_{3}=-\mathrm{ln}\left(1-\frac{3}{-1.151850501}\right)=-\mathrm{ln}\left(3.604504661\right)=-1.282184358\phantom{\rule{0ex}{0ex}}$

## How do we see iterative methods on a graph?

Iterative methods are all about getting closer and closer to a root of an equation. We use them when we cannot directly solve Equations with any other methods.

The higher the value of $n$ in ${x}_{n}$, the closer we are to the root of this equation as we are performing this process more and more times.

We can see this on a graph in two ways: a staircase diagram or a cobweb diagram.

### Staircase diagrams

A staircase diagram works for a function that directly converges to a root meaning that from ${x}_{0}$we are either directly increasing or decreasing towards our root with each iterative value.

Let's look at our initial example $f\left(x\right)={x}^{2}-3x-5$.

We will solely be focusing on the positive root (the one on the right).

A graph of $f\left(x\right)={x}^{2}-3x-5$

We know from rearranging that $x=\sqrt{3x+5}$when$f\left(x\right)=0$ . Therefore if we sketch the lines $y=x$ and $y=\sqrt{3x+5}$, the intersection is the root of this equation.

An intersection between the lines $y=x$ and$y=\sqrt{3x+5}$

Let's now plot our points for ${x}_{0},{x}_{1},{x}_{2}$ and ${x}_{3}$.

Values ${x}_{0},{x}_{1},{x}_{2},{x}_{3}$ marked.

Alt-text: Values marked on graph.

This is a more zoomed-in version and we can see that these points are slowly converging to the intersection. If we add a few lines, we can see our staircase.

A staircase diagram attaching all of the aforementioned points.

If we continue and use more values we will get closer and closer to that intersection. We will never actually reach it but we can get it in view of high accuracy.

### Cobweb Diagrams

A cobweb diagram is when we are converging on a root in more than one direction, meaning our values become both too high and too low around the root.

Our second example $f\left(x\right)=x{e}^{-x}-x+3$ demonstrates this. We will be focusing on the negative root, the one to the left.

Image Caption

A sketch of the graph $f\left(x\right)=x{e}^{-x}-x+3$

Once again, from rearranging we know that $x=-\mathrm{ln}\left(1-\frac{3}{x}\right)$when $f\left(x\right)=0$. Therefore we can sketch the lines $y=x$ and $y=-\mathrm{ln}\left(1-\frac{3}{x}\right)$, and their intersection is the solution to the equation $f\left(x\right)=0$.

Intersection between the lines $y=x$ and $y=-\mathrm{ln}\left(1-\frac{3}{x}\right)$,

Now let's plot our points for ${x}_{0},{x}_{1},{x}_{2}$ and ${x}_{3}$.

Points ${x}_{0},{x}_{1},{x}_{2},{x}_{3}$ marked.

We can clearly see these points are not in order. Therefore we do not have a staircase, we have a cobweb and are converging on the value from different directions. This is what it looks like.

A cobweb diagram attaching all marked points.

We can see this is like a cobweb, and is converging towards a value from values greater than and less than the intersection.

## Iterative Methods - Key takeaways

• Iterative methods can be used to find solutions to Equations we cannot solve otherwise.
• They give us formulas to help us converge on particular roots of equations.
• We can use Graphs to help us visualise how the roots are getting more accurate (the closer to the intersection, the more accurate our answer is).
• A staircase diagram is one where we are moving in one direction towards the intersection.
• A cobweb diagram is where we are moving around the intersection in more than one direction.

#### Flashcards in Iterative Methods 5

###### Learn with 5 Iterative Methods flashcards in the free StudySmarter app

We have 14,000 flashcards about Dynamic Landscapes.

What is an iterative method?

An iterative method is one in which we use the previous answers to generate more accurate answers.

How do we solve using an iteration method?

We construct an iterative formula by rearranging and then using this formula to generate more values.

How do we use graphs to see iterations?

We can sketch either cobweb or staircase diagram to help us visualise how more accurate roots are moving.

How can we apply iteration?

There are many applications to iteration especially in physics and engineering in calculating next values when we cannot solve.

StudySmarter is a globally recognized educational technology company, offering a holistic learning platform designed for students of all ages and educational levels. Our platform provides learning support for a wide range of subjects, including STEM, Social Sciences, and Languages and also helps students to successfully master various tests and exams worldwide, such as GCSE, A Level, SAT, ACT, Abitur, and more. We offer an extensive library of learning materials, including interactive flashcards, comprehensive textbook solutions, and detailed explanations. The cutting-edge technology and tools we provide help students create their own learning materials. StudySmarter’s content is not only expert-verified but also regularly updated to ensure accuracy and relevance.

##### StudySmarter Editorial Team

Team Math Teachers

• Checked by StudySmarter Editorial Team