Discussion about math, puzzles, games and fun. Useful symbols: ÷ × ½ √ ∞ ≠ ≤ ≥ ≈ ⇒ ± ∈ Δ θ ∴ ∑ ∫ π -¹ ² ³ °

You are not logged in.

- Topics: Active | Unanswered

**Still Learning****Guest**

How do i solve a equation with iteration?

**bobbym****Administrator**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 107,751

Hi Still Learning;

Which equation would you like to solve?

**In mathematics, you don't understand things. You just get used to them.****If it ain't broke, fix it until it is.**** Always satisfy the Prime Directive of getting the right answer above all else.**

Offline

**Still Learning****Guest**

I am new to solving equation using iteration,so I dont know which equations can be solved using it,so please show me an example u like.

**bobbym****Administrator**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 107,751

Hi;

Let's do one that Fibonacci first did around 1200 AD.

There are many forms of iteration but we can do only one at at time so I pick this one.

We need to get an x by itself on the LHS.

Now we need an initial value for x. These can be attained from a plot of the function or in this case a guess.

We will choose x1 = 1. For purposes of computation we will change that equation into a recurrence.

Do you follow up to here?

**In mathematics, you don't understand things. You just get used to them.****If it ain't broke, fix it until it is.**** Always satisfy the Prime Directive of getting the right answer above all else.**

Offline

**Still Learning****Guest**

Yes,now do we have to keep findin xn?

**bobbym****Administrator**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 107,751

Hi;

Do you have a programmable calculator or computer because the calculations are mean?

**In mathematics, you don't understand things. You just get used to them.****If it ain't broke, fix it until it is.**** Always satisfy the Prime Directive of getting the right answer above all else.**

Offline

**Still Learning****Guest**

Do i have to keep finding xn to infinity or there is a certain n?

**bobbym****Administrator**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 107,751

No, when you get convergence you stop. But it may take many iterations for that to occur.

There are tests and things to do to determine whether convergence but for the sake of this example we will overlook everything.

**In mathematics, you don't understand things. You just get used to them.****If it ain't broke, fix it until it is.**** Always satisfy the Prime Directive of getting the right answer above all else.**

Offline

**Still Learning****Guest**

Thank you it was very helpful,how does one solve system of equations using it?(just curious)

**bobbym****Administrator**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 107,751

A system of equations is a little different. First you should see how the one we are doing is solved.

**In mathematics, you don't understand things. You just get used to them.****If it ain't broke, fix it until it is.**** Always satisfy the Prime Directive of getting the right answer above all else.**

Offline

**Still Learning****Guest**

Oh yes,I have tried it,it converges at 1.368808...

**bobbym****Administrator**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 107,751

Very good!

By the way the answer to 50 places of the above root is

1.3688081078213726352274143300213255395424355414875...

There are many other iterative forms for that equation. For instance,

If you try that one you will get a surprise.

**In mathematics, you don't understand things. You just get used to them.****If it ain't broke, fix it until it is.**** Always satisfy the Prime Directive of getting the right answer above all else.**

Offline

**bob bundy****Moderator**- Registered: 2010-06-20
- Posts: 7,763

hi Still Learning,

Welcome to the forum.

Mathematicians say that the formula used here converges because successive iterations lead to values of x that get closer and closer to a solution to the equation.

I have made a graph that shows what is going on.

You put the equation

on a graph (blue in my picture)

and also the line

shown red.

You choose an initial guess (x1) and draw a vertical line until it meets the blue curve. This is at the point (x1,y1).

Then you draw horizontally until you meet the red line. This is the point (y1,y1). But rename it (x2,x2)

Now use x2 as the new value to try for x.

Draw a vertical line until it meets the blue curve. This is the point (x2,y2)

Draw horizontally from here to meet the red line at (y2,y2). Rename this (x3,x3).

and so on.

I have shown these movements as a green path. If this path spirals inwards towards a point, then the iteration is converging.

Where the blue curve and the red line cross, is the solution.

Sometimes the iterations do not move inwards towards the solution because the iteration isn't converging. So you have to find the right iterative equation.

Surprisingly, all it depends on is the gradient of the blue curve at the point it crosses the red line.

Bob

Children are not defined by school ...........The Fonz

You cannot teach a man anything; you can only help him find it within himself..........Galileo Galilei

Offline

**bobbym****Administrator**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 107,751

Hi Bob and Still Learning;

If you try that one you will get a surprise.

If we start with an initial condition of 1 we get the following diagram called a cobweb. See fig 1.

The arrow shows where the point ends up after 5 iterations. Notice it is getting further away from the root. We say it being repelled. To show that not even a closer guess will help, the second figure shows an initial condition of 1.3. After 12 iterations the arrow shows where it ended up. Further away from the root then when it started.

So although there zillions of iterative forms not all of them converge on a root. A little calculus is needed to know when convergence is assured and how fast it will be.

Try this one on your own,

**In mathematics, you don't understand things. You just get used to them.****If it ain't broke, fix it until it is.**** Always satisfy the Prime Directive of getting the right answer above all else.**

Offline

**Still Learning****Guest**

Wow,that converges at 1.92318... And 0.54894...,why?and I have 2 other questions

(a)for non linear equations how do I find other answers?

(b)can I pick any value for x1?

**bobbym****Administrator**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 107,751

Iteration is more robust than the classical methods taught. It is a general method to solve any type of equation. You can use any initial condition but not all of them will converge. You would of course try to get a good initial guess for a simple system like this.

In real life the number of equations is in the hundreds or thousands with that many variables. Intelligent guessing is out unless you can plot in thousands of dimensions. We would just pick 1 or 0 for all the initial conditions.

Wow,that converges at 1.92318... And 0.54894...,why?

It does not converge it will keep being repelled by the root, going further and further away.

**In mathematics, you don't understand things. You just get used to them.****If it ain't broke, fix it until it is.**** Always satisfy the Prime Directive of getting the right answer above all else.**

Offline

**Still Learning****Guest**

Yes,and about other answers,is there a iterative method for that?

**bobbym****Administrator**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 107,751

Usually it is trial and error. To find other answers you try different initial conditions. For that cubic you would now try x1 = 1 + i maybe, since you know the other two answers are in the complex plane.

**In mathematics, you don't understand things. You just get used to them.****If it ain't broke, fix it until it is.**** Always satisfy the Prime Directive of getting the right answer above all else.**

Offline

**Still Learning****Guest**

Thank you,but is there a rule for taking x to a side(as the second one you gave didn't solve) and you didnt write about system of linear equation.(again just curious)

**bobbym****Administrator**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 107,751

X to a side? I do not understand what you are asking.

**In mathematics, you don't understand things. You just get used to them.****If it ain't broke, fix it until it is.**** Always satisfy the Prime Directive of getting the right answer above all else.**

Offline

**anonimnystefy****Real Member**- From: Harlan's World
- Registered: 2011-05-23
- Posts: 16,018

I think he wants to know how to know which x to solve for to actually get the solutions that do not diverge...

Here lies the reader who will never open this book. He is forever dead.

Taking a new step, uttering a new word, is what people fear most. ― Fyodor Dostoyevsky, Crime and Punishment

The knowledge of some things as a function of age is a delta function.

Offline

**bobbym****Administrator**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 107,751

Hi;

Okay, there is no rule. There are many possibilities as we will see. There is some calculus that is useful in determining a good one for simple systems.

But there are other questions to answer first.

For a system of equations.

A general rule here is to look for the largest coefficient and solve for that variable for each equation. Using that we get,

We will use

after 7 iterations,

the roots are x = 2, y = -1.5, z = 4 / 3.

**In mathematics, you don't understand things. You just get used to them.****If it ain't broke, fix it until it is.**** Always satisfy the Prime Directive of getting the right answer above all else.**

Offline