Math Is Fun Forum

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

You are not logged in.

#1 2012-12-15 15:49:38

Still Learning
Guest

Iteration

How do i solve a equation with iteration?

#2 2012-12-15 16:00:43

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Iteration

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

#3 2012-12-15 16:39:44

Still Learning
Guest

Re: Iteration

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.

#4 2012-12-15 17:06:51

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Iteration

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

#5 2012-12-15 17:56:22

Still Learning
Guest

Re: Iteration

Yes,now do we have to keep findin xn?

#6 2012-12-15 18:00:52

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Iteration

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

#7 2012-12-15 18:12:42

Still Learning
Guest

Re: Iteration

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

#8 2012-12-15 18:19:21

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Iteration

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

#9 2012-12-15 18:27:21

Still Learning
Guest

Re: Iteration

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

#10 2012-12-15 18:44:28

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Iteration

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

#11 2012-12-15 20:21:11

Still Learning
Guest

Re: Iteration

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

#12 2012-12-15 20:42:26

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Iteration

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

#13 2012-12-15 21:39:49

Bob
Administrator
Registered: 2010-06-20
Posts: 10,053

Re: Iteration

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
Sometimes I deliberately make mistakes, just to test you!  …………….Bob smile

Offline

#14 2012-12-15 22:09:57

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Iteration

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

#15 2012-12-15 22:10:55

Still Learning
Guest

Re: Iteration

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?

#16 2012-12-15 22:18:41

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Iteration

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

#17 2012-12-16 00:52:15

Still Learning
Guest

Re: Iteration

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

#18 2012-12-16 00:58:21

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Iteration

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

#19 2012-12-16 02:25:58

Still Learning
Guest

Re: Iteration

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)

#20 2012-12-16 10:59:14

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Iteration

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

#21 2012-12-16 11:18:42

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

Re: Iteration

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

#22 2012-12-16 11:26:00

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Iteration

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

Board footer

Powered by FluxBB